Example #1
0
 def _validate_shared_attr(self, is_shared, vn_obj):
     if not is_shared and vn_obj.is_shared:
         for vmi in vn_obj.get_virtual_machine_interface_back_refs() or []:
             vmi_obj = vmi_handler.VMInterfaceHandler(
                 self._vnc_lib).get_vmi_obj(vmi['uuid'])
             if vmi_obj.parent_type == 'project' and (vmi_obj.parent_uuid !=
                                                      vn_obj.parent_uuid):
                 self._raise_contrail_exception('InvalidSharedSetting',
                                                network=vn_obj.display_name,
                                                resource='network')
 def __init__(self, vnc_lib):
     super(LogicalRouterInterfaceHandler, self).__init__(vnc_lib)
     self._vmi_handler = vmi_handler.VMInterfaceHandler(self._vnc_lib)
     self._subnet_handler = subnet_handler.SubnetHandler(self._vnc_lib)