Bump hacking version

Pick up newer versions of this library. Thankfully no serious changes
are needed.

Change-Id: I69e523844529fc1c8aa0c1ce764182dbe29cfeb6
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This commit is contained in:
Stephen Finucane 2019-06-14 11:51:52 +01:00 committed by Dean Troyer
parent b9d6310556
commit 6419533f43
10 changed files with 41 additions and 43 deletions

View File

@ -22,14 +22,14 @@ extras==1.0.0
fasteners==0.7.0 fasteners==0.7.0
fixtures==3.0.0 fixtures==3.0.0
flake8-import-order==0.13 flake8-import-order==0.13
flake8==2.5.5 flake8==2.6.2
future==0.16.0 future==0.16.0
futurist==1.2.0 futurist==1.2.0
gitdb==0.6.4 gitdb==0.6.4
GitPython==1.0.1 GitPython==1.0.1
gnocchiclient==3.3.1 gnocchiclient==3.3.1
greenlet==0.4.10 greenlet==0.4.10
hacking==0.12.0 hacking==1.1.0
httplib2==0.9.1 httplib2==0.9.1
idna==2.6 idna==2.6
iso8601==0.1.11 iso8601==0.1.11
@ -71,14 +71,13 @@ paramiko==2.0.0
Paste==2.0.2 Paste==2.0.2
PasteDeploy==1.5.0 PasteDeploy==1.5.0
pbr==2.0.0 pbr==2.0.0
pep8==1.5.7
pika-pool==0.1.3 pika-pool==0.1.3
pika==0.10.0 pika==0.10.0
ply==3.10 ply==3.10
positional==1.2.1 positional==1.2.1
prettytable==0.7.2 prettytable==0.7.2
pyasn1==0.1.8 pyasn1==0.1.8
pycodestyle==2.3.1 pycodestyle==2.0.0
pycparser==2.18 pycparser==2.18
pyflakes==0.8.1 pyflakes==0.8.1
pyinotify==0.9.6 pyinotify==0.9.6

View File

@ -52,6 +52,6 @@ class ShowConfiguration(command.ShowOne):
info = self.app.client_manager.get_configuration() info = self.app.client_manager.get_configuration()
for key, value in six.iteritems(info.pop('auth', {})): for key, value in six.iteritems(info.pop('auth', {})):
if parsed_args.mask and key.lower() in secret_opts: if parsed_args.mask and key.lower() in secret_opts:
value = REDACTED value = REDACTED
info['auth.' + key] = value info['auth.' + key] = value
return zip(*sorted(six.iteritems(info))) return zip(*sorted(six.iteritems(info)))

View File

@ -112,7 +112,7 @@ class ShowHypervisor(command.ShowOne):
# example: 17:37:14 up 2:33, 3 users, # example: 17:37:14 up 2:33, 3 users,
# load average: 0.33, 0.36, 0.34 # load average: 0.33, 0.36, 0.34
m = re.match( m = re.match(
"\s*(.+)\sup\s+(.+),\s+(.+)\susers?,\s+load average:\s(.+)", r"\s*(.+)\sup\s+(.+),\s+(.+)\susers?,\s+load average:\s(.+)",
uptime['uptime']) uptime['uptime'])
if m: if m:
hypervisor["host_time"] = m.group(1) hypervisor["host_time"] = m.group(1)

View File

@ -79,37 +79,37 @@ def _format_servers_list_power_state(state):
def _get_ip_address(addresses, address_type, ip_address_family): def _get_ip_address(addresses, address_type, ip_address_family):
# Old style addresses # Old style addresses
if address_type in addresses: if address_type in addresses:
for addy in addresses[address_type]: for addy in addresses[address_type]:
if int(addy['version']) in ip_address_family:
return addy['addr']
# New style addresses
new_address_type = address_type
if address_type == 'public':
new_address_type = 'floating'
if address_type == 'private':
new_address_type = 'fixed'
for network in addresses:
for addy in addresses[network]:
# Case where it is list of strings
if isinstance(addy, six.string_types):
if new_address_type == 'fixed':
return addresses[network][0]
else:
return addresses[network][-1]
# Case where it is a dict
if 'OS-EXT-IPS:type' not in addy:
continue
if addy['OS-EXT-IPS:type'] == new_address_type:
if int(addy['version']) in ip_address_family: if int(addy['version']) in ip_address_family:
return addy['addr'] return addy['addr']
msg = _("ERROR: No %(type)s IP version %(family)s address found")
# New style addresses raise exceptions.CommandError(
new_address_type = address_type msg % {"type": address_type,
if address_type == 'public': "family": ip_address_family}
new_address_type = 'floating' )
if address_type == 'private':
new_address_type = 'fixed'
for network in addresses:
for addy in addresses[network]:
# Case where it is list of strings
if isinstance(addy, six.string_types):
if new_address_type == 'fixed':
return addresses[network][0]
else:
return addresses[network][-1]
# Case where it is a dict
if 'OS-EXT-IPS:type' not in addy:
continue
if addy['OS-EXT-IPS:type'] == new_address_type:
if int(addy['version']) in ip_address_family:
return addy['addr']
msg = _("ERROR: No %(type)s IP version %(family)s address found")
raise exceptions.CommandError(
msg % {"type": address_type,
"family": ip_address_family}
)
def _prefix_checked_value(prefix): def _prefix_checked_value(prefix):

View File

@ -358,7 +358,7 @@ class ListNetworkSegmentRange(command.Lister):
parsed_args.used and _is_prop_empty(columns, props, 'used') or \ parsed_args.used and _is_prop_empty(columns, props, 'used') or \
parsed_args.unused and \ parsed_args.unused and \
not _is_prop_empty(columns, props, 'used'): not _is_prop_empty(columns, props, 'used'):
continue continue
if parsed_args.long: if parsed_args.long:
props = _update_additional_fields_from_props(columns, props) props = _update_additional_fields_from_props(columns, props)
display_props += (props,) display_props += (props,)

View File

@ -209,5 +209,6 @@ def main(argv=None):
return OpenStackShell().run(argv) return OpenStackShell().run(argv)
if __name__ == "__main__": if __name__ == "__main__":
sys.exit(main()) sys.exit(main())

View File

@ -505,7 +505,7 @@ class FakeSecurityGroup(object):
@staticmethod @staticmethod
def get_security_groups(security_groups=None, count=2): def get_security_groups(security_groups=None, count=2):
"""Get an iterable MagicMock object with a list of faked security groups. """Get an iterable MagicMock with a list of faked security groups.
If security groups list is provided, then initialize the Mock object If security groups list is provided, then initialize the Mock object
with the list. Otherwise create one. with the list. Otherwise create one.

View File

@ -1344,7 +1344,7 @@ class FakeSecurityGroupRule(object):
@staticmethod @staticmethod
def get_security_group_rules(security_group_rules=None, count=2): def get_security_group_rules(security_group_rules=None, count=2):
"""Get an iterable Mock object with a list of faked security group rules. """Get an iterable Mock with a list of faked security group rules.
If security group rules list is provided, then initialize the Mock If security group rules list is provided, then initialize the Mock
object with the list. Otherwise create one. object with the list. Otherwise create one.

View File

@ -1,8 +1,7 @@
# The order of packages is significant, because pip processes them in the order # The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration # of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later. # process, which may cause wedges in the gate later.
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 hacking>=1.1.0,<1.2.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD fixtures>=3.0.0 # Apache-2.0/BSD
flake8-import-order==0.13 # LGPLv3 flake8-import-order==0.13 # LGPLv3

View File

@ -132,9 +132,8 @@ show-source = True
# H203: Use assertIs(Not)None to check for None # H203: Use assertIs(Not)None to check for None
enable-extensions = H203 enable-extensions = H203
exclude = .git,.tox,dist,doc,*lib/python*,*egg,build,tools exclude = .git,.tox,dist,doc,*lib/python*,*egg,build,tools
# If 'ignore' is not set there are default errors and warnings that are set # W504 is disabled since you must choose between this or W503
# Doc: http://flake8.readthedocs.org/en/latest/config.html#default ignore = W504
ignore = __
import-order-style = pep8 import-order-style = pep8
application_import_names = openstackclient application_import_names = openstackclient