[CI] Update hacking and fix pep8 errors
Recent release of pbr 2.0.0 requires us to update hacking in rally requirements. * Added missing new lines at the end of files * Skipped H105 (Don't use author tags). These lines cannot be removed without an agreement with the author. Change-Id: Iac581ea4ded8ef85cd8a5bc204ac0c4436088eb6
This commit is contained in:
parent
9fa3c3b5ba
commit
51e093f92b
|
@ -178,4 +178,4 @@ class ValidateMonasca(scenario.OpenStackScenario):
|
||||||
self,
|
self,
|
||||||
"authenticate.validate_monasca_%s_times" % repetitions):
|
"authenticate.validate_monasca_%s_times" % repetitions):
|
||||||
for i in range(repetitions):
|
for i in range(repetitions):
|
||||||
list(monasca_client.metrics.list(limit=0))
|
list(monasca_client.metrics.list(limit=0))
|
||||||
|
|
|
@ -65,4 +65,4 @@ class ListMatchedMeters(ceiloutils.CeilometerScenario):
|
||||||
filter_by_user_id,
|
filter_by_user_id,
|
||||||
filter_by_resource_id,
|
filter_by_resource_id,
|
||||||
metadata_query)
|
metadata_query)
|
||||||
self._list_meters(query, limit)
|
self._list_meters(query, limit)
|
||||||
|
|
|
@ -98,4 +98,4 @@ class ListMatchedResources(ceiloutils.CeilometerScenario):
|
||||||
filter_by_resource_id,
|
filter_by_resource_id,
|
||||||
metadata_query)
|
metadata_query)
|
||||||
query += self._make_timestamp_query(start_time, end_time)
|
query += self._make_timestamp_query(start_time, end_time)
|
||||||
self._list_resources(query, limit)
|
self._list_resources(query, limit)
|
||||||
|
|
|
@ -64,4 +64,4 @@ class ListSamples(ceiloutils.CeilometerScenario):
|
||||||
if metadata_query:
|
if metadata_query:
|
||||||
scenario.run(metadata_query=metadata_query)
|
scenario.run(metadata_query=metadata_query)
|
||||||
if limit:
|
if limit:
|
||||||
scenario.run(limit=limit)
|
scenario.run(limit=limit)
|
||||||
|
|
|
@ -70,4 +70,4 @@ class GetStats(utils.CeilometerScenario):
|
||||||
filter_by_user_id,
|
filter_by_user_id,
|
||||||
filter_by_resource_id,
|
filter_by_resource_id,
|
||||||
metadata_query)
|
metadata_query)
|
||||||
self._get_stats(meter_name, query, period, groupby, aggregates)
|
self._get_stats(meter_name, query, period, groupby, aggregates)
|
||||||
|
|
|
@ -68,4 +68,4 @@ class CreateUserAndListTraitDescriptions(
|
||||||
"""
|
"""
|
||||||
self.admin_keystone.create_user()
|
self.admin_keystone.create_user()
|
||||||
event = self._list_events()[0]
|
event = self._list_events()[0]
|
||||||
self._list_event_trait_descriptions(event_type=event.event_type)
|
self._list_event_trait_descriptions(event_type=event.event_type)
|
||||||
|
|
|
@ -55,4 +55,4 @@ class BootServer(utils.EC2Scenario):
|
||||||
:param flavor: flavor to be used to boot an instance
|
:param flavor: flavor to be used to boot an instance
|
||||||
:param kwargs: optional additional arguments for server creation
|
:param kwargs: optional additional arguments for server creation
|
||||||
"""
|
"""
|
||||||
self._boot_servers(image, flavor, **kwargs)
|
self._boot_servers(image, flavor, **kwargs)
|
||||||
|
|
|
@ -82,4 +82,4 @@ class CreateAndDeleteNode(utils.IronicScenario):
|
||||||
:param kwargs: Optional additional arguments for node creation
|
:param kwargs: Optional additional arguments for node creation
|
||||||
"""
|
"""
|
||||||
node = self._create_node(**kwargs)
|
node = self._create_node(**kwargs)
|
||||||
self._delete_node(node.uuid)
|
self._delete_node(node.uuid)
|
||||||
|
|
|
@ -76,4 +76,4 @@ class CreateAndDeployEnvironment(utils.MuranoScenario):
|
||||||
package.fully_qualified_name,
|
package.fully_qualified_name,
|
||||||
atomic_action=False)
|
atomic_action=False)
|
||||||
|
|
||||||
self._deploy_environment(environment, session)
|
self._deploy_environment(environment, session)
|
||||||
|
|
|
@ -154,4 +154,4 @@ class ImportAndFilterApplications(utils.MuranoScenario):
|
||||||
self._import_package(package_path)
|
self._import_package(package_path)
|
||||||
self._filter_applications(filter_query)
|
self._filter_applications(filter_query)
|
||||||
finally:
|
finally:
|
||||||
os.remove(package_path)
|
os.remove(package_path)
|
||||||
|
|
|
@ -270,4 +270,4 @@ class CreateAndUpdateHealthmonitors(utils.NeutronScenario):
|
||||||
healthmonitor = self._create_v1_healthmonitor(
|
healthmonitor = self._create_v1_healthmonitor(
|
||||||
**healthmonitor_create_args)
|
**healthmonitor_create_args)
|
||||||
self._update_v1_healthmonitor(healthmonitor,
|
self._update_v1_healthmonitor(healthmonitor,
|
||||||
**healthmonitor_update_args)
|
**healthmonitor_update_args)
|
||||||
|
|
|
@ -86,4 +86,4 @@ class CreateAndUpdateSecurityGroups(utils.NeutronScenario):
|
||||||
security_group = self._create_security_group(
|
security_group = self._create_security_group(
|
||||||
**security_group_create_args)
|
**security_group_create_args)
|
||||||
self._update_security_group(security_group,
|
self._update_security_group(security_group,
|
||||||
**security_group_update_args)
|
**security_group_update_args)
|
||||||
|
|
|
@ -100,4 +100,4 @@ class BootAndDeleteServerWithKeypair(utils.NovaScenario):
|
||||||
key_name=keypair,
|
key_name=keypair,
|
||||||
**boot_server_kwargs)
|
**boot_server_kwargs)
|
||||||
self._delete_server(server)
|
self._delete_server(server)
|
||||||
self._delete_keypair(keypair)
|
self._delete_keypair(keypair)
|
||||||
|
|
|
@ -224,4 +224,4 @@ class CreateScaleDeleteCluster(utils.SaharaScenario):
|
||||||
elif delta < 0:
|
elif delta < 0:
|
||||||
self._scale_cluster_down(cluster, delta)
|
self._scale_cluster_down(cluster, delta)
|
||||||
|
|
||||||
self._delete_cluster(cluster)
|
self._delete_cluster(cluster)
|
||||||
|
|
|
@ -135,4 +135,4 @@ class CreateLaunchJobSequenceWithScaling(utils.SaharaScenario,):
|
||||||
self._scale_cluster_down(cluster, delta)
|
self._scale_cluster_down(cluster, delta)
|
||||||
|
|
||||||
LOG.debug("Starting Job sequence")
|
LOG.debug("Starting Job sequence")
|
||||||
launch_job_sequence.run(jobs)
|
launch_job_sequence.run(jobs)
|
||||||
|
|
|
@ -110,4 +110,4 @@ class CreateDeleteNodeGroupTemplates(utils.SaharaScenario):
|
||||||
use_autoconfig=use_autoconfig)
|
use_autoconfig=use_autoconfig)
|
||||||
|
|
||||||
self._delete_node_group_template(master_ngt)
|
self._delete_node_group_template(master_ngt)
|
||||||
self._delete_node_group_template(worker_ngt)
|
self._delete_node_group_template(worker_ngt)
|
||||||
|
|
|
@ -45,4 +45,4 @@ class CreateAndDeleteCluster(utils.SenlinScenario):
|
||||||
profile_id = self.context["tenant"]["profile"]
|
profile_id = self.context["tenant"]["profile"]
|
||||||
cluster = self._create_cluster(profile_id, desired_capacity,
|
cluster = self._create_cluster(profile_id, desired_capacity,
|
||||||
min_size, max_size, timeout, metadata)
|
min_size, max_size, timeout, metadata)
|
||||||
self._delete_cluster(cluster)
|
self._delete_cluster(cluster)
|
||||||
|
|
|
@ -188,4 +188,4 @@ class ListAndDownloadObjectsInContainers(utils.SwiftScenario):
|
||||||
for container_name, objects in objects_dict.items():
|
for container_name, objects in objects_dict.items():
|
||||||
for obj in objects:
|
for obj in objects:
|
||||||
self._download_object(container_name, obj["name"],
|
self._download_object(container_name, obj["name"],
|
||||||
atomic_action=False)
|
atomic_action=False)
|
||||||
|
|
|
@ -93,4 +93,4 @@ class CreateAuditAndDelete(utils.WatcherScenario):
|
||||||
|
|
||||||
audit_template_uuid = self.context["audit_templates"][0]
|
audit_template_uuid = self.context["audit_templates"][0]
|
||||||
audit = self._create_audit(audit_template_uuid)
|
audit = self._create_audit(audit_template_uuid)
|
||||||
self._delete_audit(audit)
|
self._delete_audit(audit)
|
||||||
|
|
|
@ -64,4 +64,4 @@ class ProducerConsumer(zutils.ZaqarScenario):
|
||||||
in range(msg_count)]
|
in range(msg_count)]
|
||||||
self._messages_post(queue, messages, min_msg_count, max_msg_count)
|
self._messages_post(queue, messages, min_msg_count, max_msg_count)
|
||||||
self._messages_list(queue)
|
self._messages_list(queue)
|
||||||
self._queue_delete(queue)
|
self._queue_delete(queue)
|
||||||
|
|
|
@ -238,4 +238,4 @@ class WatcherGoal(types.ResourceType):
|
||||||
resource_config.get("name"))],
|
resource_config.get("name"))],
|
||||||
typename="goal",
|
typename="goal",
|
||||||
id_attr="uuid")
|
id_attr="uuid")
|
||||||
return resource_id
|
return resource_id
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
# 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.
|
||||||
|
|
||||||
# [do-not-touch] we need to modify our code to support latest release
|
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
|
||||||
hacking>=0.9.2,<0.10 # Apache Software License
|
|
||||||
|
|
||||||
pytest>=2.7,<=3.0.6 # MIT
|
pytest>=2.7,<=3.0.6 # MIT
|
||||||
# py.test plugin for measuring coverage.
|
# py.test plugin for measuring coverage.
|
||||||
|
|
|
@ -324,4 +324,4 @@ class HeatStacksTestCase(test.ScenarioTestCase):
|
||||||
self.default_template, self.default_parameters,
|
self.default_template, self.default_parameters,
|
||||||
self.default_files, self.default_environment)
|
self.default_files, self.default_environment)
|
||||||
mock__stack_list_output.assert_called_once_with(
|
mock__stack_list_output.assert_called_once_with(
|
||||||
mock__create_stack.return_value)
|
mock__create_stack.return_value)
|
||||||
|
|
|
@ -153,4 +153,4 @@ class MistralScenarioTestCase(test.ScenarioTestCase):
|
||||||
self._test_atomic_action_timer(
|
self._test_atomic_action_timer(
|
||||||
scenario.atomic_actions(),
|
scenario.atomic_actions(),
|
||||||
"mistral.delete_execution"
|
"mistral.delete_execution"
|
||||||
)
|
)
|
||||||
|
|
|
@ -52,4 +52,4 @@ class MistralWorkbooksTestCase(test.ScenarioTestCase):
|
||||||
|
|
||||||
self.assertTrue(mock_create_workbook__create_workbook.called)
|
self.assertTrue(mock_create_workbook__create_workbook.called)
|
||||||
mock_create_workbook__delete_workbook.assert_called_once_with(
|
mock_create_workbook__delete_workbook.assert_called_once_with(
|
||||||
fake_wb.name)
|
fake_wb.name)
|
||||||
|
|
|
@ -83,4 +83,4 @@ class MuranoPackagesTestCase(test.TestCase):
|
||||||
scenario._zip_package.return_value)
|
scenario._zip_package.return_value)
|
||||||
scenario._filter_applications.assert_called_once_with(
|
scenario._filter_applications.assert_called_once_with(
|
||||||
{"category": "Web"}
|
{"category": "Web"}
|
||||||
)
|
)
|
||||||
|
|
|
@ -73,4 +73,4 @@ class PyTestLauncherTestCase(test.TestCase):
|
||||||
self.assertEqual(1, self.sp.check_call.call_count)
|
self.assertEqual(1, self.sp.check_call.call_count)
|
||||||
call_args_obj = self.sp.check_call.call_args_list[0]
|
call_args_obj = self.sp.check_call.call_args_list[0]
|
||||||
call_args = call_args_obj[0]
|
call_args = call_args_obj[0]
|
||||||
self.assertEqual(expected_path, call_args[0][-1])
|
self.assertEqual(expected_path, call_args[0][-1])
|
||||||
|
|
2
tox.ini
2
tox.ini
|
@ -76,7 +76,7 @@ deps = requests[security]
|
||||||
commands = python {toxinidir}/tests/ci/sync_requirements.py {posargs}
|
commands = python {toxinidir}/tests/ci/sync_requirements.py {posargs}
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
ignore = H703
|
ignore = H703,H105
|
||||||
show-source = true
|
show-source = true
|
||||||
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools,build,setup.py
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools,build,setup.py
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue