class Meta(MachineHandler.Meta): abstract = False queryset = node_prefetch( Controller.controllers.all().prefetch_related("interface_set"), 'controllerinfo' ) allowed_methods = [ 'list', 'get', 'create', 'update', 'action', 'set_active', 'check_power', 'check_images', 'create_physical', 'create_vlan', 'create_bond', 'update_interface', 'delete_interface', 'link_subnet', 'unlink_subnet', 'get_summary_xml', 'get_summary_yaml', ] form = ControllerForm exclude = [ "status_expires", "parent", "boot_interface", "boot_cluster_ip", "token", "netboot", "agent_name", "power_state_queried", "power_state_updated", "gateway_link_ipv4", "gateway_link_ipv6", "enable_ssh", "skip_networking", "skip_storage", "instance_power_parameters", "address_ttl", "url", "dns_process", "managing_process", ] list_fields = [ "id", "system_id", "hostname", "node_type", "status", "last_image_sync", "cpu_count", "cpu_speed", ] listen_channels = [ "controller", ]
class Meta(NodeHandler.Meta): abstract = False queryset = node_prefetch( Node.objects.filter(parent=None, switch__isnull=False)) allowed_methods = ['list', 'get', 'update', 'action'] exclude = MachineHandler.Meta.exclude list_fields = MachineHandler.Meta.list_fields # XXX: Which channel should we listen for? listen_channels = []
class Meta(NodeHandler.Meta): abstract = False queryset = node_prefetch(Machine.objects.all()).select_related('bmc') allowed_methods = [ 'list', 'get', 'create', 'update', 'action', 'set_active', 'check_power', 'create_physical', 'create_vlan', 'create_bond', 'create_bridge', 'update_interface', 'delete_interface', 'link_subnet', 'unlink_subnet', 'mount_special', 'unmount_special', 'update_filesystem', 'update_disk', 'delete_disk', 'delete_partition', 'delete_volume_group', 'delete_cache_set', 'delete_filesystem', 'create_partition', 'create_cache_set', 'create_bcache', 'create_raid', 'create_volume_group', 'create_logical_volume', 'set_boot_disk', 'default_user' ] form = AdminMachineWithMACAddressesForm exclude = [ "creation_type", "status_expires", "previous_status", "parent", "boot_interface", "boot_cluster_ip", "token", "netboot", "agent_name", "power_state_queried", "power_state_updated", "gateway_link_ipv4", "gateway_link_ipv6", "enable_ssh", "skip_networking", "skip_storage", "instance_power_parameters", "address_ttl", "url", "dns_process", "managing_process", "last_image_sync", "install_rackd", ] list_fields = [ "id", "system_id", "hostname", "owner", "cpu_count", "memory", "power_state", "domain", "zone", ] listen_channels = [ "machine", ]
class Meta(NodeHandler.Meta): abstract = False queryset = node_prefetch( Node.objects.filter(parent=None, switch__isnull=False)) allowed_methods = ['list', 'get', 'update', 'action'] exclude = MachineHandler.Meta.exclude list_fields = MachineHandler.Meta.list_fields listen_channels = [ 'machine', 'device', 'controller', 'switch', ]
class Meta(NodeHandler.Meta): abstract = False queryset = node_prefetch( Node.objects.filter(parent=None, switch__isnull=False)) allowed_methods = [ "list", "get", "update", "action", "get_summary_xml", "get_summary_yaml", ] exclude = MachineHandler.Meta.exclude list_fields = MachineHandler.Meta.list_fields listen_channels = ["machine", "device", "controller", "switch"]
class Meta(NodeHandler.Meta): abstract = False queryset = node_prefetch(Machine.objects.all()) list_queryset = ( Machine.objects.select_related( 'boot_interface', 'owner', 'zone', 'domain', 'bmc') .prefetch_related( 'blockdevice_set__iscsiblockdevice__' 'partitiontable_set__partitions') .prefetch_related( 'blockdevice_set__physicalblockdevice__' 'partitiontable_set__partitions') .prefetch_related( 'blockdevice_set__virtualblockdevice__' 'partitiontable_set__partitions') .prefetch_related( 'interface_set__ip_addresses__subnet__vlan__space') .prefetch_related( 'interface_set__ip_addresses__subnet__vlan__fabric') .prefetch_related('interface_set__vlan__fabric') .prefetch_related('tags') .prefetch_related('pool') ) allowed_methods = [ 'list', 'get', 'create', 'update', 'action', 'set_active', 'check_power', 'create_physical', 'create_vlan', 'create_bond', 'create_bridge', 'update_interface', 'delete_interface', 'link_subnet', 'unlink_subnet', 'mount_special', 'unmount_special', 'update_filesystem', 'update_disk', 'delete_disk', 'delete_partition', 'delete_volume_group', 'delete_cache_set', 'delete_filesystem', 'create_partition', 'create_cache_set', 'create_bcache', 'create_raid', 'create_volume_group', 'create_logical_volume', 'set_boot_disk', 'default_user', 'get_summary_xml', 'get_summary_yaml', ] form = AdminMachineWithMACAddressesForm exclude = [ "creation_type", "status_expires", "previous_status", "parent", "boot_interface", "boot_cluster_ip", "token", "netboot", "agent_name", "power_state_queried", "power_state_updated", "gateway_link_ipv4", "gateway_link_ipv6", "enable_ssh", "skip_bmc_config", "skip_networking", "skip_storage", "instance_power_parameters", "address_ttl", "url", "dns_process", "managing_process", "last_image_sync", "install_rackd", "install_kvm", ] list_fields = [ "id", "system_id", "hostname", "locked", "owner", "cpu_count", "cpu_speed", "memory", "power_state", "domain", "pool", "zone", ] listen_channels = [ "machine", ] create_permission = NodePermission.admin view_permission = NodePermission.view edit_permission = NodePermission.admin delete_permission = NodePermission.admin
class Meta(NodeHandler.Meta): abstract = False queryset = (node_prefetch(Machine.objects.all()).prefetch_related( "blockdevice_set__iscsiblockdevice__" "partitiontable_set__partitions").prefetch_related( "blockdevice_set__physicalblockdevice__" "partitiontable_set__partitions__filesystem_set"). prefetch_related("blockdevice_set__virtualblockdevice__" "partitiontable_set__partitions")) list_queryset = ( Machine.objects.select_related( "owner", "zone", "domain", "bmc").prefetch_related( "blockdevice_set__iscsiblockdevice__" "partitiontable_set__partitions").prefetch_related( "blockdevice_set__physicalblockdevice__" "partitiontable_set__partitions").prefetch_related( "blockdevice_set__physicalblockdevice__numa_node"). prefetch_related( "blockdevice_set__virtualblockdevice__" "partitiontable_set__partitions").prefetch_related( "interface_set__ip_addresses__subnet__vlan__space" ).prefetch_related( "interface_set__ip_addresses__subnet__vlan__fabric" ).prefetch_related("interface_set__numa_node"). prefetch_related("interface_set__vlan__fabric").prefetch_related( "boot_interface__vlan__fabric").prefetch_related( "tags").prefetch_related("pool").annotate( status_event_type_description=Subquery( Event.objects.filter( node=OuterRef("pk"), type__level__gte=logging.INFO).order_by( "-created", "-id").values("type__description")[:1]), status_event_description=Subquery( Event.objects.filter( node=OuterRef("pk"), type__level__gte=logging.INFO).order_by( "-created", "-id").values("description")[:1]), numa_nodes_count=Count("numanode"), sriov_support=Exists( Interface.objects.filter(node=OuterRef("pk"), sriov_max_vf__gt=0)), )) allowed_methods = [ "list", "get", "create", "update", "action", "set_active", "check_power", "create_physical", "create_vlan", "create_bond", "create_bridge", "update_interface", "delete_interface", "link_subnet", "unlink_subnet", "mount_special", "unmount_special", "update_filesystem", "update_disk", "delete_disk", "delete_partition", "delete_volume_group", "delete_cache_set", "delete_filesystem", "delete_vmfs_datastore", "update_vmfs_datastore", "create_partition", "create_cache_set", "create_bcache", "create_raid", "create_volume_group", "create_logical_volume", "create_vmfs_datastore", "set_boot_disk", "apply_storage_layout", "default_user", "get_summary_xml", "get_summary_yaml", "set_script_result_suppressed", "set_script_result_unsuppressed", "get_suppressible_script_results", "get_latest_failed_testing_script_results", ] form = AdminMachineWithMACAddressesForm exclude = [ "creation_type", "status_expires", "previous_status", "parent", "boot_interface", "boot_cluster_ip", "token", "netboot", "ephemeral_deploy", "agent_name", "power_state_queried", "power_state_updated", "gateway_link_ipv4", "gateway_link_ipv6", "enable_ssh", "skip_networking", "skip_storage", "instance_power_parameters", "address_ttl", "url", "dns_process", "managing_process", "last_image_sync", "install_rackd", "install_kvm", ] list_fields = [ "id", "system_id", "hostname", "locked", "owner", "cpu_count", "cpu_speed", "description", "error_description", "memory", "power_state", "domain", "pool", "zone", ] listen_channels = ["machine"] create_permission = NodePermission.admin view_permission = NodePermission.view edit_permission = NodePermission.admin delete_permission = NodePermission.admin
class Meta(NodeHandler.Meta): abstract = False queryset = node_prefetch(Device.objects.filter(parent=None)) allowed_methods = [ 'list', 'get', 'set_active', 'create', 'create_interface', 'create_physical', 'update_interface', 'delete_interface', 'link_subnet', 'unlink_subnet', 'update', 'action' ] exclude = [ "creation_type", "type", "boot_interface", "boot_cluster_ip", "boot_disk", "token", "netboot", "agent_name", "cpu_count", "cpu_speed", "current_commissioning_script_set", "current_testing_script_set", "current_installation_script_set", "memory", "power_state", "routers", "architecture", "bios_boot_method", "status", "previous_status", "status_expires", "power_state_queried", "power_state_updated", "osystem", "error_description", "error", "license_key", "distro_series", "min_hwe_kernel", "hwe_kernel", "gateway_link_ipv4", "gateway_link_ipv6", "enable_ssh", "skip_networking", "skip_storage", "instance_power_parameters", "dns_process", "managing_process", "address_ttl", "url", "last_image_sync", "default_user", "install_rackd", ] list_fields = [ "id", "system_id", "hostname", "owner", "domain", "zone", "parent", "pxe_mac", ] listen_channels = [ "device", ]
class Meta(MachineHandler.Meta): abstract = False queryset = node_prefetch( Controller.controllers.all().prefetch_related( "service_set"), "controllerinfo") list_queryset = ( Controller.controllers.all() .select_related("controllerinfo", "domain", "bmc") .prefetch_related("service_set") .prefetch_related("tags") .annotate( status_event_type_description=Subquery( Event.objects .filter( node=OuterRef('pk'), type__level__gte=logging.INFO) .order_by('-created', '-id') .values('type__description')[:1]), status_event_description=Subquery( Event.objects .filter( node=OuterRef('pk'), type__level__gte=logging.INFO) .order_by('-created', '-id') .values('description')[:1])) ) allowed_methods = [ 'list', 'get', 'create', 'update', 'action', 'set_active', 'check_power', 'check_images', 'create_physical', 'create_vlan', 'create_bond', 'update_interface', 'delete_interface', 'link_subnet', 'unlink_subnet', 'get_summary_xml', 'get_summary_yaml', 'set_script_result_suppressed', 'set_script_result_unsuppressed', 'get_suppressible_script_results', 'get_latest_failed_testing_script_results', ] form = ControllerForm exclude = [ "status_expires", "parent", "boot_interface", "boot_cluster_ip", "token", "netboot", "agent_name", "power_state_queried", "power_state_updated", "gateway_link_ipv4", "gateway_link_ipv6", "enable_ssh", "skip_bmc_config", "skip_networking", "skip_storage", "instance_power_parameters", "address_ttl", "url", "dns_process", "managing_process", ] list_fields = [ "id", "system_id", "hostname", "domain", "node_type", "status", "last_image_sync", "cpu_count", "cpu_speed", ] listen_channels = [ "controller", ]