class Meta: resource_name = "ha_cluster" authorization = PatchedDjangoAuthorization() authentication = AnonymousAuthentication() list_allowed_methods = ["get"] detail_allowed_methods = [] include_resource_uri = False
class Meta: # ManagedTarget is a Polymorphic Model which gets related # to content_type in the __metaclass__ queryset = ManagedTarget.objects.all() resource_name = "target" excludes = ["not_deleted", "bytes_per_inode", "reformat"] filtering = { "id": ["exact", "in"], "immutable_state": ["exact"], "name": ["exact"], } authorization = PatchedDjangoAuthorization() authentication = AnonymousAuthentication() ordering = ["name"] list_allowed_methods = ["get"] detail_allowed_methods = ["get", "put", "delete"] validation = TargetValidation() always_return_data = True readonly = [ "filesystems", "name", "uuid", "ha_label", "filesystem_name", "filesystem_id", ]
class Meta: object_class = dict resource_name = "help" detail_allowed_methods = [] list_allowed_methods = [] authorization = PatchedDjangoAuthorization() authentication = AnonymousAuthentication()
class Meta: queryset = ManagedHost.objects.select_related( "lnet_configuration").prefetch_related( "lnet_configuration__nid_set") resource_name = "host" excludes = ["not_deleted"] authentication = AnonymousAuthentication() authorization = PatchedDjangoAuthorization() ordering = ["fqdn"] list_allowed_methods = ["get", "post", "put"] detail_allowed_methods = ["get", "put", "delete"] readonly = [ "nodename", "fqdn", "nids", "member_of_active_filesystem", "needs_update", "boot_time", "client_mounts", ] # HYD-2256: remove these fields when other auth schemes work readonly += ["root_pw", "private_key_passphrase", "private_key"] validation = HostValidation() always_return_data = True filtering = { "id": ["exact"], "fqdn": ["exact", "startswith"], "role": ["exact"] }
class Meta: queryset = NTPConfiguration.objects.all() resource_name = "ntp_configuration" list_allowed_methods = ["get", "put"] detail_allowed_methods = ["get", "put"] authorization = PatchedDjangoAuthorization() authentication = AnonymousAuthentication()
class Meta: resource_name = "updates_available" authorization = PatchedDjangoAuthorization() authentication = AnonymousAuthentication() validation = UpdatesAvailableAlertValidation() list_allowed_methods = ["post"] detail_allowed_methods = []
class Meta: list_allowed_methods = ["get", "post"] detail_allowed_methods = ["get", "put"] resource_name = "host_profile" authentication = AnonymousAuthentication() authorization = PatchedDjangoAuthorization() object_class = dict
class Meta: queryset = AlertState.objects.order_by("-begin") resource_name = "alert" filtering = { "begin": SeverityResource.ALL_FILTER_DATE, "end": SeverityResource.ALL_FILTER_DATE, "message": SeverityResource.ALL_FILTER_STR, "active": SeverityResource.ALL_FILTER_BOOL, "dismissed": SeverityResource.ALL_FILTER_BOOL, "id": SeverityResource.ALL_FILTER_INT, "severity": SeverityResource.ALL_FILTER_ENUMERATION, "created_at": SeverityResource.ALL_FILTER_DATE, "alert_type": SeverityResource.ALL_FILTER_ENUMERATION, "alert_item_id": SeverityResource.ALL_FILTER_INT, "lustre_pid": SeverityResource.ALL_FILTER_INT, "record_type": SeverityResource.ALL_FILTER_ENUMERATION, } ordering = ["begin", "end", "active"] serializer = DateSerializer() authorization = PatchedDjangoAuthorization() authentication = AnonymousAuthentication() list_allowed_methods = ["get"] detail_allowed_methods = ["get", "patch", "put"] always_return_data = True
class Meta: list_allowed_methods = ["post"] detail_allowed_methods = [] resource_name = "run_stratagem" authorization = PatchedDjangoAuthorization() authentication = AnonymousAuthentication() object_class = dict validation = RunStratagemValidation()
class Meta: queryset = CopytoolOperation.objects.select_related().all() resource_name = "copytool_operation" excludes = ["not_deleted"] authorization = PatchedDjangoAuthorization() authentication = AnonymousAuthentication() list_allowed_methods = ["get"] detail_allowed_methods = ["get"]
class Meta: queryset = LustreClientMount.objects.all() resource_name = "client_mount" authentication = AnonymousAuthentication() authorization = PatchedDjangoAuthorization() list_allowed_methods = ["get", "post"] filtering = {"host": ["exact"], "filesystem": ["exact"]}
class Meta: queryset = NetworkInterface.objects.select_related("host", "nid").all() authorization = PatchedDjangoAuthorization() authentication = AnonymousAuthentication() resource_name = "network_interface" list_allowed_methods = ["get"] detail_allowed_methods = ["get"] filtering = {"host": ALL_WITH_RELATIONS, "id": ["exact"]}
class Meta: resource_name = "stratagem_configuration" queryset = StratagemConfiguration.objects.all() authorization = PatchedDjangoAuthorization() authentication = AnonymousAuthentication() list_allowed_methods = ["get", "post"] detail_allowed_methods = ["get", "put", "delete"] validation = StratagemConfigurationValidation() filtering = {"filesystem": ["exact"]}
class Meta: queryset = StorageResourceRecord.objects.filter( resource_class__id__in=filter_class_ids()) resource_name = "storage_resource" filtering = {"class_name": ["exact"], "plugin_name": ["exact"]} authorization = PatchedDjangoAuthorization() authentication = AnonymousAuthentication() always_return_data = True validation = StorageResourceValidation()
class Meta: queryset = VolumeNode.objects.all().select_related("host") resource_name = "volume_node" authorization = PatchedDjangoAuthorization() authentication = AnonymousAuthentication() excludes = ["not_deleted"] list_allowed_methods = ["get"] detail_allowed_methods = ["get"] filtering = {"host": ["exact"], "path": ["exact"]}
class Meta: queryset = StepResult.objects.all() resource_name = "step" authorization = PatchedDjangoAuthorization() authentication = AnonymousAuthentication() excludes = ["step_klass"] filtering = {"job": ["exact"], "id": ["exact", "in"]} ordering = ["created_at", "modified_at"] list_allowed_methods = ["get"] detail_allowed_methods = ["get"]
class Meta: queryset = Ticket.objects.select_related("masterticket", "filesystemticket").all() resource_name = "ticket" authorization = PatchedDjangoAuthorization() authentication = AnonymousAuthentication() excludes = ["not_deleted"] ordering = ["name"] list_allowed_methods = ["get"] detail_allowed_methods = ["get"] filtering = {"name": ["exact"], "id": ["exact"]}
class Meta: queryset = PowerControlDeviceOutlet.objects.all() resource_name = "power_control_device_outlet" authorization = PatchedDjangoAuthorization() authentication = AnonymousAuthentication() validation = ResolvingFormValidation( form_class=PowerControlDeviceOutletForm) list_allowed_methods = ["get", "post"] detail_allowed_methods = ["get", "put", "delete", "patch"] readonly = ["id"] excludes = ["not_deleted"] always_return_data = True
class Meta: queryset = LNetConfiguration.objects.all() authorization = PatchedDjangoAuthorization() authentication = AnonymousAuthentication() resource_name = "lnet_configuration" list_allowed_methods = ["get", "put"] detail_allowed_methods = ["get", "put"] filtering = { "host": ALL_WITH_RELATIONS, "id": ["exact"], "host__fqdn": ["exact", "startswith"] }
class Meta: queryset = Job.objects.all() resource_name = "job" authorization = PatchedDjangoAuthorization() authentication = AnonymousAuthentication() excludes = ["task_id", "locks_json", "wait_for_json"] ordering = ["created_at"] list_allowed_methods = ["get"] detail_allowed_methods = ["get", "put"] filtering = {"id": ["exact", "in"], "state": ["exact", "in"]} always_return_data = True validation = JobValidation()
class Meta: queryset = ManagedFilesystem.objects.all() resource_name = "filesystem" authorization = PatchedDjangoAuthorization() authentication = AnonymousAuthentication() excludes = ["not_deleted", "ost_next_index", "mdt_next_index"] ordering = ["name"] filtering = {"id": ["exact", "in"], "name": ["exact"]} list_allowed_methods = ["get"] detail_allowed_methods = ["get", "delete", "put"] validation = FilesystemValidation() always_return_data = True
class Meta: queryset = Copytool.objects.select_related().all() resource_name = "copytool" excludes = ["not_deleted"] authorization = PatchedDjangoAuthorization() authentication = AnonymousAuthentication() validation = CopytoolValidation() list_allowed_methods = ["get", "post"] detail_allowed_methods = ["get", "put"] # readonly = ['host', 'filesystem', 'index', 'path', 'hsm_arguments', # 'pid'] always_return_data = True filtering = {"filesystem_id": ["exact"]}
class Meta: queryset = PowerControlDevice.objects.all() resource_name = "power_control_device" authorization = PatchedDjangoAuthorization() authentication = AnonymousAuthentication() validation = ResolvingFormValidation(form_class=PowerControlDeviceForm) ordering = ["name"] filtering = {"name": ["exact"]} excludes = ["not_deleted", "password"] list_allowed_methods = ["get", "post"] detail_allowed_methods = ["get", "put", "delete"] readonly = ["id"] always_return_data = True
class Meta: queryset = OstPool.objects.all() resource_name = "ostpool" authentication = AnonymousAuthentication() authorization = PatchedDjangoAuthorization() excludes = ["not_deleted"] ordering = ["filesystem", "name"] list_allowed_methods = ["get", "delete", "put", "post"] detail_allowed_methods = ["get", "put", "delete"] filtering = { "filesystem": ["exact"], "name": ["exact"], "id": ["exact"] }
class Meta: queryset = Nid.objects.select_related("network_interface", "lnet_configuration").all() authorization = PatchedDjangoAuthorization() authentication = AnonymousAuthentication() validation = NidValidation() resource_name = "nid" list_allowed_methods = ["get", "post", "delete"] detail_allowed_methods = ["get", "post", "put", "delete"] filtering = { "network_interface": ALL_WITH_RELATIONS, "lnet_configuration": ALL_WITH_RELATIONS, "id": ["exact"] }
class Meta: queryset = StorageResourceClass.objects.filter( id__in=filter_class_ids()) resource_name = "storage_resource_class" filtering = { "plugin_name": ["exact"], "class_name": ["exact"], "user_creatable": ["exact"], "plugin_internal": ["exact"], } authorization = PatchedDjangoAuthorization() authentication = AnonymousAuthentication() list_allowed_methods = ["get"] detail_allowed_methods = ["get"] ordering = ["class_name"]
class Meta: queryset = ServerProfile.objects.all() resource_name = "server_profile" authentication = AnonymousAuthentication() authorization = PatchedDjangoAuthorization() ordering = ["managed", "default"] list_allowed_methods = ["get"] readonly = ["ui_name", "repolist"] filtering = { "name": ["exact"], "managed": ["exact"], "worker": ["exact"], "default": ["exact"], "user_selectable": ["exact"], }
class Meta: queryset = Command.objects.all() list_allowed_methods = ["get", "post"] detail_allowed_methods = ["get", "patch"] ordering = ["created_at"] filtering = { "complete": ["exact"], "id": ["exact", "in"], "dismissed": ["exact"], "errored": ["exact"], "created_at": ["gte", "lte", "gt", "lt"], "cancelled": ["exact"], } authorization = PatchedDjangoAuthorization() authentication = AnonymousAuthentication() validation = CommandValidation() always_return_data = True
class Meta: # ManagedTarget is a Polymorphic Model which gets related # to content_type in the __metaclass__ queryset = ManagedTarget.objects.select_related( "content_type", "volume", "volume__storage_resource__resource_class", "volume__storage_resource__resource_class__storage_plugin", "managedost", "managedmdt", "managedmgs", ).prefetch_related("managedtargetmount_set", "managedtargetmount_set__host", "managedtargetmount_set__host__lnet_configuration") resource_name = "target" excludes = ["not_deleted", "bytes_per_inode", "reformat"] filtering = { "kind": ["exact"], "filesystem_id": ["exact"], "host_id": ["exact"], "id": ["exact", "in"], "immutable_state": ["exact"], "name": ["exact"], } authorization = PatchedDjangoAuthorization() authentication = AnonymousAuthentication() ordering = ["volume_name", "name"] list_allowed_methods = ["get", "post", "patch"] detail_allowed_methods = ["get", "put", "delete"] validation = TargetValidation() always_return_data = True readonly = [ "active_host", "failover_server_name", "volume_name", "primary_server_name", "filesystems", "name", "uuid", "primary_server", "failover_servers", "active_host_name", "ha_label", "filesystem_name", "filesystem_id", ]
class Meta: # Join in these three models to dehydrate_kind without big penalties queryset = (Volume.objects.all().select_related( "storage_resource", "storage_resource__resource_class", "storage_resource__resource_class__storage_plugin", ).prefetch_related("volumenode_set", "volumenode_set__host")) resource_name = "volume" authorization = PatchedDjangoAuthorization() authentication = AnonymousAuthentication() excludes = ["not_deleted"] ordering = ["label", "size"] list_allowed_methods = ["get"] detail_allowed_methods = ["get", "put"] always_return_data = True filtering = {"id": ["exact"], "label": ["exact", "endswith"]}