diff options
author | fmenguy <francoisregis.menguy@orange.com> | 2021-06-04 14:21:29 +0200 |
---|---|---|
committer | fmenguy <francoisregis.menguy@orange.com> | 2021-06-04 14:21:29 +0200 |
commit | 1ab93ad2bba7ca570d72c4823321169b9f235cf8 (patch) | |
tree | b7b17758fa07607bf647cae478a4a3d841cc5c51 /nfvbench/nfvbench.py | |
parent | d181b23c2fc078faac0342de6102c62fb8a4f1f7 (diff) |
NFVBENCH-212 Add clouds.yaml file as a config file to use for openstack API access
Change-Id: If855ffda1070ed9c9c4544230e4efec185a93f45
Signed-off-by: fmenguy <francoisregis.menguy@orange.com>
Diffstat (limited to 'nfvbench/nfvbench.py')
-rw-r--r-- | nfvbench/nfvbench.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/nfvbench/nfvbench.py b/nfvbench/nfvbench.py index 598247a..0719247 100644 --- a/nfvbench/nfvbench.py +++ b/nfvbench/nfvbench.py @@ -60,8 +60,8 @@ class NFVBench(object): self.config_plugin = config_plugin self.factory = factory self.notifier = notifier - self.cred = credentials.Credentials(config.openrc_file, None, False) \ - if config.openrc_file else None + self.cred = credentials.Credentials(config.openrc_file, config.clouds_detail, None, False) \ + if config.openrc_file or config.clouds_detail else None self.chain_runner = None self.specs = Specs() self.specs.set_openstack_spec(openstack_spec) @@ -96,8 +96,10 @@ class NFVBench(object): # check that an empty openrc file (no OpenStack) is only allowed # with EXT chain - if not self.config.openrc_file and self.config.service_chain != ChainType.EXT: - raise Exception("openrc_file in the configuration is required for PVP/PVVP chains") + if (not self.config.openrc_file and not self.config.clouds_detail) and \ + self.config.service_chain != ChainType.EXT: + raise Exception("openrc_file or clouds_detail in the configuration is required" + " for PVP/PVVP chains") self.specs.set_run_spec(self.config_plugin.get_run_spec(self.config, self.specs.openstack)) |