Browse Source

Bump hacking to 3.0.0

Change-Id: I6979eacbb9b4d062d7f0fb8228dbef6b97da416e
tags/0.13.0
Riccardo Pittau 3 months ago
parent
commit
ec13cbad48
10 changed files with 25 additions and 25 deletions
  1. +2
    -2
      ironic_staging_drivers/intel_nm/__init__.py
  2. +5
    -6
      ironic_staging_drivers/intel_nm/nm_commands.py
  3. +6
    -6
      ironic_staging_drivers/intel_nm/nm_vendor.py
  4. +2
    -2
      ironic_staging_drivers/ovirt/ovirt.py
  5. +2
    -2
      ironic_staging_drivers/tests/unit/intel_nm/test_commands.py
  6. +2
    -2
      ironic_staging_drivers/tests/unit/intel_nm/test_vendor.py
  7. +1
    -1
      lower-constraints.txt
  8. +1
    -1
      test-requirements.txt
  9. +2
    -2
      tools/list-package-entrypoints.py
  10. +2
    -1
      tox.ini

+ 2
- 2
ironic_staging_drivers/intel_nm/__init__.py View File

@@ -24,5 +24,5 @@ class IntelNMHardware(ipmi.IPMIHardware):
@property
def supported_vendor_interfaces(self):
"""List of supported vendor interfaces."""
return (super(IntelNMHardware, self).supported_vendor_interfaces +
[nm_vendor.IntelNMVendorPassthru])
return (super(IntelNMHardware, self).supported_vendor_interfaces
+ [nm_vendor.IntelNMVendorPassthru])

+ 5
- 6
ironic_staging_drivers/intel_nm/nm_commands.py View File

@@ -245,8 +245,8 @@ def set_policy(policy):
policy['trigger_limit'] = 0

cmd = _create_command_head(POLICY_SET)
_append_to_command(cmd, _hex(DOMAINS[policy['domain_id']] |
0x10 if policy['enable'] else 0x00))
_append_to_command(cmd, _hex(DOMAINS[policy['domain_id']]
| 0x10 if policy['enable'] else 0x00))
_append_to_command(cmd, _hex(policy['policy_id']))
# 0x10 is policy add flag
flags = TRIGGERS[policy['policy_trigger']]
@@ -341,10 +341,9 @@ def get_capabilities(data):
cmd = _create_command_head(CAPABILITIES_GET)
_append_to_command(cmd, _hex(DOMAINS[data['domain_id']]))
power_policy = 0x10
_append_to_command(cmd, _hex(TRIGGERS[data['policy_trigger']] |
power_policy |
POWER_DOMAIN[data['power_domain']]))

_append_to_command(cmd, _hex(TRIGGERS[data['policy_trigger']]
| power_policy
| POWER_DOMAIN[data['power_domain']]))
return cmd




+ 6
- 6
ironic_staging_drivers/intel_nm/nm_vendor.py View File

@@ -177,7 +177,7 @@ class IntelNMVendorPassthru(base.VendorInterface):
'communication_failures')

if kwargs['scope'] == 'policy' and 'policy_id' not in kwargs:
raise exception.MissingParameterValue(_('Missing "policy_id"'))
raise exception.MissingParameterValue(_('Missing "policy_id"'))

if kwargs.get('parameter_name') not in global_params:
if 'domain_id' not in kwargs:
@@ -197,11 +197,11 @@ class IntelNMVendorPassthru(base.VendorInterface):
_('Parameter name is mandatory for getting statistics'))
# valid parameters depend on scope
if (kwargs['parameter_name'] not in
nm_commands.STATISTICS[kwargs['scope']]):
raise exception.InvalidParameterValue(
_('Invalid parameter name %(param)s for scope '
'%(scope)s') % {'param': kwargs['parameter_name'],
'scope': kwargs['scope']})
nm_commands.STATISTICS[kwargs['scope']]):
raise exception.InvalidParameterValue(
_('Invalid parameter name %(param)s for scope '
'%(scope)s') % {'param': kwargs['parameter_name'],
'scope': kwargs['scope']})

def get_properties(self):
"""Returns the properties of the interface.."""


+ 2
- 2
ironic_staging_drivers/ovirt/ovirt.py View File

@@ -118,8 +118,8 @@ def _parse_driver_info(node):
insecure = driver_info['ovirt_insecure']
ovirt_ca_file = driver_info['ovirt_ca_file']
if not insecure and ovirt_ca_file is None:
msg = _("Missing ovirt_ca_file in the node's driver_info")
raise exception.MissingParameterValue(msg)
msg = _("Missing ovirt_ca_file in the node's driver_info")
raise exception.MissingParameterValue(msg)
return driver_info




+ 2
- 2
ironic_staging_drivers/tests/unit/intel_nm/test_commands.py View File

@@ -114,8 +114,8 @@ class IntelNMPoliciesCommandTestCase(base.TestCase):

def test_remove_policy(self):
data = {'domain_id': 'platform', 'policy_id': 123}
expected = (['0x2E', '0xC1', '0x57', '0x01', '0x00', '0x00', '0x7B'] +
['0x00'] * 12)
expected = (['0x2E', '0xC1', '0x57', '0x01', '0x00', '0x00', '0x7B']
+ ['0x00'] * 12)
result = commands.remove_policy(data)
self.assertEqual(expected, result)



+ 2
- 2
ironic_staging_drivers/tests/unit/intel_nm/test_vendor.py View File

@@ -71,8 +71,8 @@ class IntelNMPassthruTestCase(db_base.DbTestCase):
enabled_management_interfaces=['ipmitool'])
self.node = obj_utils.create_test_node(self.context,
driver='staging-nm')
self.temp_filename = os.path.join(CONF.tempdir, self.node.uuid +
'.sdr')
self.temp_filename = os.path.join(CONF.tempdir, self.node.uuid
+ '.sdr')

@mock.patch.object(ironic_utils, 'unlink_without_raise', spec_set=True,
autospec=True)


+ 1
- 1
lower-constraints.txt View File

@@ -19,7 +19,7 @@ flake8-import-order==0.11
flake8==2.5.5
future==0.16.0
greenlet==0.4.13
hacking==0.12.0
hacking==3.0.0
idna==2.6
imagesize==1.0.0
ironic-lib==2.5.0


+ 1
- 1
test-requirements.txt View File

@@ -2,7 +2,7 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.

hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
hacking>=3.0.0,<3.1.0 # Apache-2.0
flake8-import-order==0.11 # LGPLv3

coverage!=4.4,>=4.0 # Apache-2.0


+ 2
- 2
tools/list-package-entrypoints.py View File

@@ -29,8 +29,8 @@ def filter_ep_names(eps, ep_type, skips=None, filters=None):
filters = []

def filter_func(name):
return (all([s not in name for s in skips]) and
all([f in name for f in filters]))
return (all([s not in name for s in skips])
and all([f in name for f in filters]))

return filter(filter_func, list(eps.get(ep_type, {}).keys()))



+ 2
- 1
tox.ini View File

@@ -52,7 +52,8 @@ commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenote

[flake8]
# [E129] visually indented line with same indent as next logical line
ignore = E129
# [W503] Line break before binary operator.
ignore = E129,W503
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build
import-order-style = pep8
application-import-names = ironic_staging_drivers


Loading…
Cancel
Save