diff options
author | ahothan <ahothan@cisco.com> | 2018-01-16 12:46:21 -0800 |
---|---|---|
committer | ahothan <ahothan@cisco.com> | 2018-01-16 12:46:21 -0800 |
commit | 02c8ed97e27b6e417945d27d4d3c2ab8e7dbfa7e (patch) | |
tree | c6335c42266f70c77b7fa2560d5b932040e66d9a /nfvbench/chain_clients.py | |
parent | b481ad4a6c6b98cac760b12e4190f9540869e673 (diff) |
[NFVBENCH-62] Add support for non-openstack environments
Add Unit test to validate non-openstack with dummy traffic gen
Change-Id: I359ddb7d43169f706d8262842af975d5b4675a3a
Signed-off-by: ahothan <ahothan@cisco.com>
Diffstat (limited to 'nfvbench/chain_clients.py')
-rw-r--r-- | nfvbench/chain_clients.py | 18 |
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): |