diff --git a/RO-VIM-azure/osm_rovim_azure/vimconn_azure.py b/RO-VIM-azure/osm_rovim_azure/vimconn_azure.py index e964884931339f350f30d44d6baca22eae88ff8f..15c3cadc349687c159f6f3668486478a89c162ff 100755 --- a/RO-VIM-azure/osm_rovim_azure/vimconn_azure.py +++ b/RO-VIM-azure/osm_rovim_azure/vimconn_azure.py @@ -1782,7 +1782,21 @@ class vimconnector(vimconn.VimConnector): 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" ) @@ -1862,6 +1876,10 @@ class vimconnector(vimconn.VimConnector): 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) diff --git a/releasenotes/notes/fix_healing-009e1ffa37c726a7.yaml b/releasenotes/notes/fix_healing-009e1ffa37c726a7.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ce69f1050d38bd30ebd660f88e59b6883d56cf0c --- /dev/null +++ b/releasenotes/notes/fix_healing-009e1ffa37c726a7.yaml @@ -0,0 +1,23 @@ +####################################################################################### +# 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.