X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_ro%2Fvimconn.py;h=5c9484092a5aeecaa67dbd1ea1be2c359408d7e3;hb=c19c5653c9ca00d27f4a9247973e5a811f14dfde;hp=4a7cc095545e52144187382124504cb2851ae299;hpb=c5293def02d95ed4ee086dd8842437b76ec05c4e;p=osm%2FRO.git diff --git a/osm_ro/vimconn.py b/osm_ro/vimconn.py index 4a7cc095..5c948409 100644 --- a/osm_ro/vimconn.py +++ b/osm_ro/vimconn.py @@ -331,7 +331,11 @@ class vimconnector(): 'dhcp_count': number of IPs to grant. 'shared': if this network can be seen/use by other tenants/organization 'vlan': in case of a data or ptp net_type, the intended vlan tag to be used for the network - Returns the network identifier on success or raises and exception on failure + Returns a tuple with the network identifier and created_items, or raises an exception on error + created_items can be None or a dictionary where this method can include key-values that will be passed to + the method delete_network. Can be used to store created segments, created l2gw connections, etc. + Format is vimconnector dependent, but do not use nested dictionaries and a value of None should be the same + as not present. """ raise vimconnNotImplemented( "Should have implemented this" ) @@ -370,8 +374,11 @@ class vimconnector(): """ raise vimconnNotImplemented( "Should have implemented this" ) - def delete_network(self, net_id): - """Deletes a tenant network from VIM + def delete_network(self, net_id, created_items=None): + """ + Removes a tenant network from VIM and its associated elements + :param net_id: VIM identifier of the network, provided by method new_network + :param created_items: dictionary with extra items to be deleted. provided by method new_network Returns the network identifier or raises an exception upon error or when network is not found """ raise vimconnNotImplemented( "Should have implemented this" ) @@ -533,7 +540,7 @@ class vimconnector(): def delete_vminstance(self, vm_id, created_items=None): """ - Removes a VM instance from VIM and each associate elements + Removes a VM instance from VIM and its associated elements :param vm_id: VIM identifier of the VM, provided by method new_vminstance :param created_items: dictionary with extra items to be deleted. provided by method new_vminstance and/or method action_vminstance