vm = self.conn_compute.virtual_machines.get(
self.resource_group, res_name
)
- out_vm["vim_info"] = str(vm)
+ img = vm.storage_profile.image_reference
+ images = self._get_version_image_list(
+ img.publisher, img.offer, img.sku, img.version
+ )
+ vim_info = {
+ "id": vm.id,
+ "name": vm.name,
+ "location": vm.location,
+ "provisioning_state": vm.provisioning_state,
+ "vm_id": vm.vm_id,
+ "type": vm.type,
+ "flavor": {"id": vm.hardware_profile.vm_size},
+ "image": images[0],
+ }
+ out_vm["vim_info"] = str(vim_info)
out_vm["status"] = self.provision_state2osm.get(
vm.provisioning_state, "OTHER"
)
self.logger.debug("Public ip address is: %s", public_ip.ip_address)
ips.append(public_ip.ip_address)
+ subnet = nic_data.ip_configurations[0].subnet.id
+ if subnet:
+ interface_dict["vim_net_id"] = subnet
+
private_ip = nic_data.ip_configurations[0].private_ip_address
ips.append(private_ip)
--- /dev/null
+#######################################################################################
+# Copyright ETSI Contributors and Others.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#######################################################################################
+---
+fixes:
+ - |
+ Fix a healing bug when a NS is deployed on Azure.
+ Healing operation doesn't work with VMs deployed on Azure due to lack of
+ information in vnfrs requiered for the operation. That data must be
+ provided by the 'refresh_vms_status' method in the connector.