aboutsummaryrefslogtreecommitdiffstats
path: root/nfvbench/chain_clients.py
diff options
context:
space:
mode:
Diffstat (limited to 'nfvbench/chain_clients.py')
-rw-r--r--nfvbench/chain_clients.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/nfvbench/chain_clients.py b/nfvbench/chain_clients.py
index 7106129..faf7c2a 100644
--- a/nfvbench/chain_clients.py
+++ b/nfvbench/chain_clients.py
@@ -416,7 +416,8 @@ class BasicStageClient(object):
Creates two networks and spawn a VM which act as a loop VM connected
with the two networks.
"""
- self._setup_openstack_clients()
+ if self.cred:
+ self._setup_openstack_clients()
def dispose(self, only_vm=False):
"""
@@ -448,12 +449,15 @@ class EXTStageClient(BasicStageClient):
super(EXTStageClient, self).setup()
# Lookup two existing networks
- for net_name in [self.config.external_networks.left, self.config.external_networks.right]:
- net = self._lookup_network(net_name)
- if net:
- self.nets.append(net)
- else:
- raise StageClientException('Existing network {} cannot be found.'.format(net_name))
+ if self.cred:
+ for net_name in [self.config.external_networks.left,
+ self.config.external_networks.right]:
+ net = self._lookup_network(net_name)
+ if net:
+ self.nets.append(net)
+ else:
+ raise StageClientException('Existing network {} cannot be found.'.
+ format(net_name))
class PVPStageClient(BasicStageClient):