Browse Source

Synchronize with global requirements

This patch allignes both versions and order of packages in
requirements.txt and test-requirements.txt with master revision
of OpenStack's global requirements in Mitaka release cycle.

In order to perform the soft sync all settings from setup.py were
moved to setup.cfg and setup.py was autogenerated using cookiecutter
and the default project template for OpenStack projects.

Partial-bug: #1469045
Change-Id: I4486a6b5474b15fb2261c2642895064d80877618
tags/9.0.1
Roman Prykhodchenko 3 years ago
parent
commit
3309949228
9 changed files with 174 additions and 65 deletions
  1. 17
    0
      CONTRIBUTING.rst
  2. 4
    0
      HACKING.rst
  3. 30
    0
      README.rst
  4. 23
    0
      network_checker/hooks.py
  5. 14
    8
      requirements.txt
  6. 53
    0
      setup.cfg
  7. 21
    47
      setup.py
  8. 10
    5
      test-requirements.txt
  9. 2
    5
      tox.ini

+ 17
- 0
CONTRIBUTING.rst View File

@@ -0,0 +1,17 @@
1
+If you would like to contribute to the development of OpenStack, you must
2
+follow the steps in this page:
3
+
4
+   http://docs.openstack.org/infra/manual/developers.html
5
+
6
+If you already have a good understanding of how the system works and your
7
+OpenStack accounts are set up, you can skip to the development workflow
8
+section of this documentation to learn how changes to OpenStack should be
9
+submitted for review via the Gerrit tool:
10
+
11
+   http://docs.openstack.org/infra/manual/developers.html#development-workflow
12
+
13
+Pull requests submitted through GitHub will be ignored.
14
+
15
+Bugs should be filed on Launchpad, not GitHub:
16
+
17
+   https://bugs.launchpad.net/network-checker

+ 4
- 0
HACKING.rst View File

@@ -0,0 +1,4 @@
1
+network-checker Style Commandments
2
+===============================================
3
+
4
+Read the OpenStack Style Commandments http://docs.openstack.org/developer/hacking/

+ 30
- 0
README.rst View File

@@ -0,0 +1,30 @@
1
+===============================
2
+network-checker
3
+===============================
4
+
5
+network-checker provides utilities for verifying a network setup. At this
6
+moment it is mainly used in `Fuel <https://github.com/stackforge/fuel-web>`_.
7
+
8
+
9
+-----------------
10
+Project resources
11
+-----------------
12
+
13
+Project status, bugs, and blueprints are tracked on Launchpad:
14
+  https://launchpad.net/fuel
15
+
16
+Development documentation is hosted here:
17
+  https://docs.fuel-infra.org/fuel-dev
18
+
19
+User guide can be found here:
20
+  http://docs.mirantis.com
21
+
22
+Any additional information can be found on the Fuel's project wiki
23
+  https://wiki.openstack.org/wiki/Fuel
24
+
25
+Anyone wishing to contribute to shotgun should follow the general
26
+OpenStack process. A good reference for it can be found here:
27
+  https://wiki.openstack.org/wiki/How_To_Contribute
28
+
29
+  http://docs.openstack.org/infra/manual/developers.html
30
+

+ 23
- 0
network_checker/hooks.py View File

@@ -0,0 +1,23 @@
1
+#    Copyright 2014 Mirantis, Inc.
2
+#
3
+#    This program is free software; you can redistribute it and/or modify
4
+#    it under the terms of the GNU General Public License as published by
5
+#    the Free Software Foundation; either version 2 of the License, or
6
+#    (at your option) any later version.
7
+#
8
+#    This program is distributed in the hope that it will be useful,
9
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
+#    GNU General Public License for more details.
12
+#
13
+#    You should have received a copy of the GNU General Public License along
14
+#    with this program; if not, write to the Free Software Foundation, Inc.,
15
+#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16
+
17
+
18
+def setup_hook(config):
19
+    import pbr
20
+    import pbr.packaging
21
+
22
+    # this monkey patch is to avoid appending git version to version
23
+    pbr.packaging._get_version_from_git = lambda pre_version: pre_version

+ 14
- 8
requirements.txt View File

@@ -1,9 +1,15 @@
1
-cliff-tablib
2
-scapy==2.2.0-dev
3
-pypcap==1.1.1
4
-stevedore
1
+# The order of packages is significant, because pip processes them in the order
2
+# of appearance. Changing the order has an impact on the overall integration
3
+# process, which may cause wedges in the gate later.
4
+cliff-tablib>=1.0 # Apache-2.0
5
+stevedore>=1.5.0 # Apache-2.0
6
+PyYAML>=3.1.0 # MIT
7
+requests!=2.9.0,>=2.8.1 # Apache-2.0
8
+netifaces>=0.10.4 # MIT
9
+six>=1.9.0 # MIT
10
+
11
+# Packages beyond this line are not in Global Requirements list
12
+# and must be added there or replaced.
5 13
 daemonize
6
-pyyaml
7
-requests
8
-netifaces
9
-six
14
+pypcap>=1.1.1
15
+scapy>=2.2.0-dev

+ 53
- 0
setup.cfg View File

@@ -0,0 +1,53 @@
1
+[metadata]
2
+name = network-checker
3
+version = 9.0.0
4
+summary = Command line utilities for performing network verification
5
+author = Mirantis Inc.
6
+author-email = product@mirantis.com
7
+home-page = http://mirantis.com
8
+description-file =
9
+    README.rst
10
+classifier =
11
+    Environment :: OpenStack
12
+    Intended Audience :: Information Technology
13
+    Intended Audience :: System Administrators
14
+    License :: OSI Approved :: GNU General Public License v2 (GPLv2)
15
+    Operating System :: POSIX :: Linux
16
+    Programming Language :: Python
17
+    Programming Language :: Python :: 2
18
+    Programming Language :: Python :: 2.7
19
+
20
+[files]
21
+packages =
22
+    dhcp_checker
23
+    fuel_network_checker
24
+    network_checker
25
+    url_access_checker
26
+
27
+[entry_points]
28
+console_scripts =
29
+   net_probe.py=network_checker.net_check.api:main
30
+   fuel-netcheck=network_checker.cli:main
31
+   dhcpcheck=dhcp_checker.cli:main
32
+   urlaccesscheck=url_access_checker.cli:main
33
+
34
+dhcp.check =
35
+   discover=dhcp_checker.commands:ListDhcpServers
36
+   request=dhcp_checker.commands:ListDhcpAssignment
37
+   vlans=dhcp_checker.commands:DhcpWithVlansCheck
38
+
39
+network_checker =
40
+   multicast=network_checker.multicast.api:MulticastChecker
41
+   simple=network_checker.tests.simple:SimpleChecker
42
+
43
+urlaccesscheck =
44
+   check=url_access_checker.commands:CheckUrls
45
+   with_setup=url_access_checker.commands:CheckUrlsWithSetup
46
+
47
+[global]
48
+setup-hooks =
49
+    pbr.hooks.setup_hook
50
+    network_checker.hooks.setup_hook
51
+
52
+[wheel]
53
+python-tag = py2

+ 21
- 47
setup.py View File

@@ -1,55 +1,29 @@
1
-#    Copyright 2014 Mirantis, Inc.
1
+# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
2 2
 #
3
-#    This program is free software; you can redistribute it and/or modify
4
-#    it under the terms of the GNU General Public License as published by
5
-#    the Free Software Foundation; either version 2 of the License, or
6
-#    (at your option) any later version.
3
+# Licensed under the Apache License, Version 2.0 (the "License");
4
+# you may not use this file except in compliance with the License.
5
+# You may obtain a copy of the License at
7 6
 #
8
-#    This program is distributed in the hope that it will be useful,
9
-#    but WITHOUT ANY WARRANTY; without even the implied warranty of
10
-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
-#    GNU General Public License for more details.
7
+#    http://www.apache.org/licenses/LICENSE-2.0
12 8
 #
13
-#    You should have received a copy of the GNU General Public License along
14
-#    with this program; if not, write to the Free Software Foundation, Inc.,
15
-#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
9
+# Unless required by applicable law or agreed to in writing, software
10
+# distributed under the License is distributed on an "AS IS" BASIS,
11
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12
+# implied.
13
+# See the License for the specific language governing permissions and
14
+# limitations under the License.
16 15
 
16
+# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
17 17
 import setuptools
18 18
 
19
+# In python < 2.7.4, a lazy loading of package `pbr` will break
20
+# setuptools if some other modules registered functions in `atexit`.
21
+# solution from: http://bugs.python.org/issue15881#msg170215
22
+try:
23
+    import multiprocessing  # noqa
24
+except ImportError:
25
+    pass
19 26
 
20 27
 setuptools.setup(
21
-    name="network-checker",
22
-    version='9.0.0',
23
-    author="Mirantis Inc",
24
-    classifiers=[
25
-        "License :: OSI Approved :: Apache 2.0",
26
-        "Development Status :: 5 - Production/Stable",
27
-        "Environment :: Console",
28
-        "Operating System :: POSIX",
29
-        "Programming Language :: Python",
30
-        "Topic :: Software Development :: Testing"
31
-    ],
32
-    include_package_data=True,
33
-    packages=setuptools.find_packages(),
34
-    entry_points={
35
-        'console_scripts': [
36
-            'net_probe.py = network_checker.net_check.api:main',
37
-            'fuel-netcheck = network_checker.cli:main',
38
-            'dhcpcheck = dhcp_checker.cli:main',
39
-            'urlaccesscheck = url_access_checker.cli:main',
40
-        ],
41
-        'dhcp.check': [
42
-            'discover = dhcp_checker.commands:ListDhcpServers',
43
-            'request = dhcp_checker.commands:ListDhcpAssignment',
44
-            'vlans = dhcp_checker.commands:DhcpWithVlansCheck'
45
-        ],
46
-        'network_checker': [
47
-            'multicast = network_checker.multicast.api:MulticastChecker',
48
-            'simple = network_checker.tests.simple:SimpleChecker'
49
-        ],
50
-        'urlaccesscheck': [
51
-            'check = url_access_checker.commands:CheckUrls',
52
-            'with_setup = url_access_checker.commands:CheckUrlsWithSetup'
53
-        ],
54
-    },
55
-)
28
+    setup_requires=['pbr>=1.8'],
29
+    pbr=True)

+ 10
- 5
test-requirements.txt View File

@@ -1,6 +1,11 @@
1
--r requirements.txt
2
-hacking==0.7
3
-mock==1.0.1
1
+# The order of packages is significant, because pip processes them in the order
2
+# of appearance. Changing the order has an impact on the overall integration
3
+# process, which may cause wedges in the gate later.
4
+hacking<0.11,>=0.10.2 # Apache-2.0
5
+mock>=1.2 # BSD
6
+unittest2 # BSD
7
+requests-mock>=0.7.0 # Apache-2.0
8
+
9
+# Packages beyond this line are not in Global Requirements list
10
+# and must be added there or replaced.
4 11
 pytest
5
-unittest2
6
-requests-mock

+ 2
- 5
tox.ini View File

@@ -5,14 +5,12 @@ envlist = py27,pep8
5 5
 
6 6
 [testenv]
7 7
 usedevelop = True
8
-install_command = pip install --allow-external -U {opts} {packages}
9 8
 setenv = VIRTUAL_ENV={envdir}
10
-deps = -r{toxinidir}/test-requirements.txt
9
+deps = -r{toxinidir}/requirements.txt
10
+       -r{toxinidir}/test-requirements.txt
11 11
 commands = py.test {toxinidir}/url_access_checker/tests
12 12
 
13 13
 [testenv:pep8]
14
-deps = hacking==0.10
15
-usedevelop = False
16 14
 commands =
17 15
     flake8 {posargs:.}
18 16
 
@@ -24,7 +22,6 @@ envdir = devenv
24 22
 usedevelop = True
25 23
 
26 24
 [flake8]
27
-ignore = H234,H302,H802
28 25
 exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,__init__.py,docs
29 26
 show-pep8 = True
30 27
 show-source = True

Loading…
Cancel
Save