Code Review
/
doctor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
fix referring neutron option in inspector
[doctor.git]
/
doctor_tests
/
inspector
/
sample.py
diff --git
a/doctor_tests/inspector/sample.py
b/doctor_tests/inspector/sample.py
index
114e4eb
..
5432872
100644
(file)
--- a/
doctor_tests/inspector/sample.py
+++ b/
doctor_tests/inspector/sample.py
@@
-35,7
+35,8
@@
class SampleInspector(BaseInspector):
auth = get_identity_auth(project=self.conf.doctor_project)
session = get_session(auth=auth)
auth = get_identity_auth(project=self.conf.doctor_project)
session = get_session(auth=auth)
- self.neutron = neutron_client(session)
+ if self.conf.inspector.update_neutron_port_dp_status:
+ self.neutron = neutron_client(session)
self.servers = collections.defaultdict(list)
self.hostnames = list()
self.servers = collections.defaultdict(list)
self.hostnames = list()
@@
-94,10
+95,12
@@
class SampleInspector(BaseInspector):
self.hostnames.append(hostname)
thr1 = self._disable_compute_host(hostname)
thr2 = self._vms_reset_state('error', hostname)
self.hostnames.append(hostname)
thr1 = self._disable_compute_host(hostname)
thr2 = self._vms_reset_state('error', hostname)
- thr3 = self._set_ports_data_plane_status('DOWN', hostname)
+ if self.conf.inspector.update_neutron_port_dp_status:
+ thr3 = self._set_ports_data_plane_status('DOWN', hostname)
thr1.join()
thr2.join()
thr1.join()
thr2.join()
- thr3.join()
+ if self.conf.inspector.update_neutron_port_dp_status:
+ thr3.join()
@utils.run_async
def _disable_compute_host(self, hostname):
@utils.run_async
def _disable_compute_host(self, hostname):