The networking_cisco.plugins.cisco.db.device_manager.hosting_device_manager_db
Module¶
-
class
networking_cisco.plugins.cisco.db.device_manager.hosting_device_manager_db.
HostingDeviceManagerMixin
¶ Bases:
networking_cisco.plugins.cisco.db.device_manager.hosting_devices_db.HostingDeviceDBMixin
A class implementing a resource manager for hosting devices.
The caller should make sure that HostingDeviceManagerMixin is a singleton.
-
acquire_hosting_device_slots
(context, hosting_device, resource, resource_type, resource_service, num, exclusive=False)¶ Assign <num> slots in <hosting_device> to logical <resource>.
If exclusive is True the hosting device is bound to the resource’s tenant. Otherwise it is not bound to any tenant.
Returns True if allocation was granted, False otherwise.
-
delete_all_hosting_devices
(context, force_delete=False)¶ Deletes all hosting devices.
-
delete_all_hosting_devices_by_template
(context, template, force_delete=False)¶ Deletes all hosting devices based on <template>.
-
get_device_info_for_agent
(context, hosting_device_db)¶ Returns information about <hosting_device> needed by config agent.
Convenience function that service plugins can use to populate their resources with information about the device hosting their logical resource.
-
get_hosting_device_config
(context, id)¶
-
get_hosting_device_driver
(context, id)¶ Returns device driver for hosting device template with <id>.
-
get_hosting_device_plugging_driver
(context, id)¶ Returns plugging driver for hosting device template with <id>.
-
get_hosting_devices_qry
(context, hosting_device_ids, load_agent=True)¶ Returns hosting devices with <hosting_device_ids>.
-
get_slot_allocation
(context, template_id=None, hosting_device_id=None, resource_id=None)¶
-
handle_non_responding_hosting_devices
(context, cfg_agent, hosting_device_ids)¶
-
classmethod
l3_tenant_id
()¶ Returns id of tenant owning hosting device resources.
-
classmethod
mgmt_nw_id
()¶ Returns id of the management network.
-
classmethod
mgmt_sec_grp_id
()¶ Returns id of security group used by the management network.
-
classmethod
mgmt_subnet_id
()¶
-
release_hosting_device_slots
(context, hosting_device, resource, num)¶ Free <num> slots in <hosting_device> from logical resource <id>.
Returns True if deallocation was successful. False otherwise.
-
report_hosting_device_shortage
(context, template, requested=0)¶ Used to report shortage of hosting devices based on <template>.
-
svc_vm_mgr
¶
-