X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_ro%2Fvimconn_aws.py;h=e35318f2137da3e5d77b23d9e737da681b7c7add;hb=ecc683920f5bd9065bae7b07e10953477fd0a3e8;hp=0e1f57396bb73a75fb5d894beced13221465e1cf;hpb=98e909c77827a222ad5658554dee51ecffbdaff0;p=osm%2FRO.git diff --git a/osm_ro/vimconn_aws.py b/osm_ro/vimconn_aws.py index 0e1f5739..e35318f2 100644 --- a/osm_ro/vimconn_aws.py +++ b/osm_ro/vimconn_aws.py @@ -78,7 +78,7 @@ class vimconnector(vimconn.vimconnector): if 'region_name' in config: self.region = config.get('region_name') else: - raise vimconn.vimconnNotFoundException("AWS region_name is not specified at config") + raise vimconn.vimconnException("AWS region_name is not specified at config") self.vpc_data = {} self.subnet_data = {} @@ -109,8 +109,11 @@ class vimconnector(vimconn.vimconnector): flavor_data = config.get('flavor_info') if isinstance(flavor_data, str): try: - with open(flavor_data[1:], 'r') as stream: - self.flavor_info = yaml.load(stream) + if flavor_data[0] == "@": # read from a file + with open(flavor_data[1:], 'r') as stream: + self.flavor_info = yaml.load(stream) + else: + self.flavor_info = yaml.load(flavor_data) except yaml.YAMLError as e: self.flavor_info = None raise vimconn.vimconnException("Bad format at file '{}': {}".format(flavor_data[1:], e)) @@ -605,9 +608,9 @@ class vimconnector(vimconn.vimconnector): mac_address: (optional) mac address to assign to this interface type: (mandatory) can be one of: virtual, in this case always connected to a network of type 'net_type=bridge' - PF - (passthrough): depending on VIM capabilities it can be connected to a data/ptp network ot it - can created unconnected - VF - (SRIOV with VLAN tag): same as PF for network connectivity. + 'PCI-PASSTHROUGH' or 'PF' (passthrough): depending on VIM capabilities it can be connected to a data/ptp network ot it + can created unconnected + 'SR-IOV' or 'VF' (SRIOV with VLAN tag): same as PF for network connectivity. VFnotShared - (SRIOV without VLAN tag) same as PF for network connectivity. VF where no other VFs are allocated on the same physical NIC bw': (optional) only for PF/VF/VFnotShared. Minimal Bandwidth required for the interface in GBPS