From 8962a1dcd546ec6903326cd2eb20035859367b43 Mon Sep 17 00:00:00 2001 From: zhnd Date: Thu, 5 Sep 2024 16:00:51 +0800 Subject: [PATCH] feat: update api doc and i18n --- .../static/specs/4.4.0-swagger.json | 66248 ++++++++-------- .../swagger/examples/swagger-examples.json | 5202 +- .../swagger/locales/en/4.4.0.json | 6 +- .../swagger/locales/zh/4.4.0.json | 46 +- 4 files changed, 35890 insertions(+), 35612 deletions(-) diff --git a/cloudtower-api-doc/static/specs/4.4.0-swagger.json b/cloudtower-api-doc/static/specs/4.4.0-swagger.json index b3cf343..fe80fca 100644 --- a/cloudtower-api-doc/static/specs/4.4.0-swagger.json +++ b/cloudtower-api-doc/static/specs/4.4.0-swagger.json @@ -51086,180 +51086,79 @@ ], "type": "object" }, - "UserAuditLogStatus": { - "enum": [ - "FAILED", - "SUCCESSED" - ], - "type": "string" - }, - "NestedUser": { + "NestedCapacity": { "properties": { - "id": { - "type": "string" + "column": { + "type": "integer", + "format": "int32", + "nullable": true }, - "name": { - "type": "string" + "row": { + "type": "integer", + "format": "int32", + "nullable": true } }, - "required": [ - "id", - "name" - ], "type": "object", "additionalProperties": false }, - "UserAuditLog": { + "NestedClusterTopo": { "properties": { - "action": { - "type": "string" - }, - "auth_type": { - "type": "string", - "nullable": true - }, - "cluster": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedCluster" - } - ], - "nullable": true - }, - "createdAt": { - "type": "string" - }, - "finished_at": { - "type": "string", - "nullable": true - }, "id": { "type": "string" }, - "ip_address": { - "type": "string" - }, - "message": { + "name": { "type": "string" - }, - "resource_id": { - "type": "string", - "nullable": true - }, - "resource_type": { - "type": "string", - "nullable": true - }, - "started_at": { - "type": "string", - "nullable": true - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/UserAuditLogStatus" - } - ], - "nullable": true - }, - "user": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedUser" - } - ], - "nullable": true - }, - "username": { - "type": "string", - "nullable": true } }, "required": [ - "action", - "createdAt", "id", - "ip_address", - "message" + "name" ], "type": "object", "additionalProperties": false }, - "WithTask_UserAuditLog_": { - "properties": { - "task_id": { - "type": "string", - "nullable": true - }, - "data": { - "$ref": "#/components/schemas/UserAuditLog" - } - }, - "required": [ - "data" + "Direction": { + "enum": [ + "HORIZONTAL", + "VERTICAL" ], - "type": "object" + "type": "string" }, - "UserAuditLogMessage": { - "properties": { - "en-US": { - "type": "string" - }, - "zh-CN": { - "type": "string" - } - }, - "required": [ - "en-US", - "zh-CN" + "BrickPhaseEnum": { + "enum": [ + "BACKWARD", + "FORWARD" ], - "type": "object" + "type": "string" }, - "UserAuditLogCreationParams": { + "NestedBrickDiskLayout": { "properties": { - "started_at": { - "type": "string" - }, - "finished_at": { - "type": "string" - }, - "cluster_id": { - "type": "string" - }, - "resource_id": { - "type": "string" - }, - "ip_address": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/UserAuditLogStatus" - }, - "user_id": { - "type": "string" + "column": { + "type": "integer", + "format": "int32" }, - "message": { - "$ref": "#/components/schemas/UserAuditLogMessage" + "direction": { + "$ref": "#/components/schemas/Direction" }, - "resource_type": { - "type": "string", - "minLength": 1 + "phase": { + "$ref": "#/components/schemas/BrickPhaseEnum" }, - "action": { - "type": "string", - "minLength": 1 + "row": { + "type": "integer", + "format": "int32" } }, "required": [ - "status", - "user_id", - "message", - "resource_type", - "action" + "column", + "direction", + "phase", + "row" ], - "type": "object" + "type": "object", + "additionalProperties": false }, - "NestedBackupService": { + "NestedNodeTopo": { "properties": { "id": { "type": "string" @@ -51275,7 +51174,27 @@ "type": "object", "additionalProperties": false }, - "NestedBackupStoreRepository": { + "PowerPosition": { + "enum": [ + "LEFT", + "MIDDLE", + "RIGHT" + ], + "type": "string" + }, + "NestedBrickPower": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object", + "additionalProperties": false + }, + "NestedRackTopo": { "properties": { "id": { "type": "string" @@ -51291,276 +51210,139 @@ "type": "object", "additionalProperties": false }, - "BackupPlanPeriod": { - "enum": [ - "DAILY", - "HOURLY", - "MINUTELY", - "MONTHLY", - "WEEKLY", - "YEARLY" - ], - "type": "string" - }, - "WeekdayTypeEnum": { - "enum": [ - "FRI", - "MON", - "SAT", - "SUN", - "THU", - "TUE", - "WED" - ], - "type": "string" - }, - "NestedBackupPlanTimePoint": { + "NestedTagPosition": { "properties": { - "date": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "date_position": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array", - "nullable": true - }, - "hour": { + "column": { "type": "integer", "format": "int32" }, - "minute": { + "row": { "type": "integer", "format": "int32" }, - "weekday": { - "allOf": [ - { - "$ref": "#/components/schemas/WeekdayTypeEnum" - } - ], - "nullable": true + "tag": { + "type": "string" } }, "required": [ - "hour", - "minute" + "column", + "row", + "tag" ], "type": "object", "additionalProperties": false }, - "BackupPlanKeepPolicy": { - "enum": [ - "COUNT", - "FOREVER", - "TIME" - ], - "type": "string" - }, - "BackupPlanExecutionStatus": { - "enum": [ - "FAILED", - "NEVER_EXECUTE", - "PARTIAL_SUCCESS", - "PAUSED", - "RUNNING", - "SUCCESS", - "WAITING_EXECUTE" - ], - "type": "string" - }, - "BackupPlanStatus": { - "enum": [ - "PAUSED", - "STOPPED", - "WORKING" - ], - "type": "string" - }, - "BackupPlan": { + "BrickTopo": { "properties": { - "backup_service": { - "$ref": "#/components/schemas/NestedBackupService" - }, - "backup_store_repository": { - "$ref": "#/components/schemas/NestedBackupStoreRepository" - }, - "compression": { - "type": "boolean", - "nullable": true - }, - "compression_ratio": { - "type": "number", - "format": "double", - "nullable": true + "capacity": { + "$ref": "#/components/schemas/NestedCapacity" }, - "createdAt": { - "type": "string" + "cluster": { + "$ref": "#/components/schemas/NestedCluster" }, - "description": { - "type": "string", + "cluster_topo": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedClusterTopo" + } + ], "nullable": true }, - "enable_window": { - "type": "boolean" - }, - "entityAsyncStatus": { + "disk_layout": { "allOf": [ { - "$ref": "#/components/schemas/EntityAsyncStatus" + "$ref": "#/components/schemas/NestedBrickDiskLayout" } ], "nullable": true }, - "full_interval": { + "height": { "type": "integer", "format": "int32" }, - "full_period": { - "$ref": "#/components/schemas/BackupPlanPeriod" - }, - "full_time_point": { - "$ref": "#/components/schemas/NestedBackupPlanTimePoint" - }, "id": { "type": "string" }, - "incremental_interval": { - "type": "integer", - "format": "int32", - "nullable": true + "local_id": { + "type": "string" }, - "incremental_period": { - "$ref": "#/components/schemas/BackupPlanPeriod" + "model": { + "type": "string", + "nullable": true }, - "incremental_time_points": { - "items": { - "$ref": "#/components/schemas/NestedBackupPlanTimePoint" - }, - "type": "array" + "name": { + "type": "string" }, - "incremental_weekdays": { + "node_topoes": { "items": { - "$ref": "#/components/schemas/WeekdayTypeEnum" + "$ref": "#/components/schemas/NestedNodeTopo" }, "type": "array", "nullable": true }, - "keep_policy": { + "position": { + "type": "integer", + "format": "int32" + }, + "power_layout": { "allOf": [ { - "$ref": "#/components/schemas/BackupPlanKeepPolicy" + "$ref": "#/components/schemas/Direction" } ], "nullable": true }, - "keep_policy_value": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "last_execute_status": { - "$ref": "#/components/schemas/BackupPlanExecutionStatus" - }, - "last_execute_success_job_count": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "last_execute_total_job_count": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "last_executed_at": { - "type": "string", - "nullable": true - }, - "last_manual_execute_status": { - "$ref": "#/components/schemas/BackupPlanExecutionStatus" - }, - "last_manual_execute_success_job_count": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "last_manual_execute_total_job_count": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "last_manual_executed_at": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string" - }, - "next_execute_time": { - "type": "string", - "nullable": true - }, - "physical_size": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "snapshot_consistent_type": { + "power_position": { "allOf": [ { - "$ref": "#/components/schemas/ConsistentType" + "$ref": "#/components/schemas/PowerPosition" } ], "nullable": true }, - "status": { - "$ref": "#/components/schemas/BackupPlanStatus" - }, - "valid_size_of_backup_object": { - "type": "integer", - "format": "int64", + "powers": { + "items": { + "$ref": "#/components/schemas/NestedBrickPower" + }, + "type": "array", "nullable": true }, - "window_end": { - "type": "string", + "rack_topo": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedRackTopo" + } + ], "nullable": true }, - "window_start": { - "type": "string", + "tag_position_in_brick": { + "items": { + "$ref": "#/components/schemas/NestedTagPosition" + }, + "type": "array", "nullable": true } }, "required": [ - "backup_service", - "backup_store_repository", - "createdAt", - "enable_window", - "full_interval", - "full_period", - "full_time_point", + "capacity", + "cluster", + "height", "id", - "incremental_period", - "incremental_time_points", - "last_execute_status", - "last_manual_execute_status", + "local_id", "name", - "status" + "position" ], "type": "object", "additionalProperties": false }, - "WithTask_BackupPlan_": { + "WithTask_BrickTopo_": { "properties": { "task_id": { "type": "string", "nullable": true }, "data": { - "$ref": "#/components/schemas/BackupPlan" + "$ref": "#/components/schemas/BrickTopo" } }, "required": [ @@ -51568,388 +51350,306 @@ ], "type": "object" }, - "BackupPlanTimePoint": { + "NodeTopoWhereInput": { "properties": { - "weekday": { - "allOf": [ - { - "$ref": "#/components/schemas/WeekdayTypeEnum" - } - ], + "AND": { + "items": { + "$ref": "#/components/schemas/NodeTopoWhereInput" + }, + "type": "array", "nullable": true }, - "minute": { - "type": "integer", - "format": "int32" - }, - "hour": { - "type": "integer", - "format": "int32" + "NOT": { + "items": { + "$ref": "#/components/schemas/NodeTopoWhereInput" + }, + "type": "array", + "nullable": true }, - "date_position": { + "OR": { "items": { - "type": "integer", - "format": "int32" + "$ref": "#/components/schemas/NodeTopoWhereInput" }, "type": "array", "nullable": true }, - "date": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "required": [ - "minute", - "hour" - ], - "type": "object" - }, - "BackupPlanDelayOption": { - "enum": [ - "KEEP_GO_ON", - "STOP_BACKUP" - ], - "type": "string" - }, - "BackupPlanCreationParams": { - "properties": { - "keep_policy_value": { - "type": "integer", - "format": "int32" - }, - "keep_policy": { - "$ref": "#/components/schemas/BackupPlanKeepPolicy" - }, - "backup_delay_option": { - "$ref": "#/components/schemas/BackupPlanDelayOption" - }, - "window_end": { - "type": "string" - }, - "window_start": { - "type": "string" - }, - "enable_window": { - "type": "boolean" - }, - "full_time_point": { - "$ref": "#/components/schemas/BackupPlanTimePoint" - }, - "full_period": { - "$ref": "#/components/schemas/BackupPlanPeriod" - }, - "full_interval": { - "type": "integer", - "format": "int32" - }, - "incremental_weekdays": { - "items": { - "$ref": "#/components/schemas/WeekdayTypeEnum" - }, - "type": "array" - }, - "incremental_time_points": { - "items": { - "$ref": "#/components/schemas/BackupPlanTimePoint" - }, - "type": "array" - }, - "incremental_interval": { - "type": "integer", - "format": "int32" - }, - "incremental_period": { - "$ref": "#/components/schemas/BackupPlanPeriod" - }, - "snapshot_consistent_type": { - "$ref": "#/components/schemas/ConsistentType" - }, - "compression": { - "type": "boolean" - }, - "vms": { - "$ref": "#/components/schemas/VmWhereInput" - }, - "description": { - "type": "string" - }, - "backup_store_repository_id": { - "type": "string" - }, - "backup_service_id": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": [ - "keep_policy_value", - "keep_policy", - "enable_window", - "full_time_point", - "full_period", - "full_interval", - "incremental_interval", - "incremental_period", - "snapshot_consistent_type", - "compression", - "vms", - "backup_store_repository_id", - "backup_service_id", - "name" - ], - "type": "object" - }, - "BackupPlanWhereInput": { - "properties": { - "AND": { - "items": { - "$ref": "#/components/schemas/BackupPlanWhereInput" - }, - "type": "array", - "nullable": true - }, - "NOT": { - "items": { - "$ref": "#/components/schemas/BackupPlanWhereInput" - }, - "type": "array", + "brick_topo": { + "allOf": [ + { + "$ref": "#/components/schemas/BrickTopoWhereInput" + } + ], "nullable": true }, - "OR": { - "items": { - "$ref": "#/components/schemas/BackupPlanWhereInput" - }, - "type": "array", + "cluster": { + "allOf": [ + { + "$ref": "#/components/schemas/ClusterWhereInput" + } + ], "nullable": true }, - "backup_service": { + "cluster_topo": { "allOf": [ { - "$ref": "#/components/schemas/BackupServiceWhereInput" + "$ref": "#/components/schemas/ClusterTopoWhereInput" } ], "nullable": true }, - "backup_store_repository": { + "host": { "allOf": [ { - "$ref": "#/components/schemas/BackupStoreRepositoryWhereInput" + "$ref": "#/components/schemas/HostWhereInput" } ], "nullable": true }, - "compression": { - "type": "boolean", + "id": { + "type": "string", "nullable": true }, - "compression_not": { - "type": "boolean", + "id_contains": { + "type": "string", "nullable": true }, - "compression_ratio": { - "type": "number", - "format": "double", + "id_ends_with": { + "type": "string", "nullable": true }, - "compression_ratio_gt": { - "type": "number", - "format": "double", + "id_gt": { + "type": "string", "nullable": true }, - "compression_ratio_gte": { - "type": "number", - "format": "double", + "id_gte": { + "type": "string", "nullable": true }, - "compression_ratio_in": { + "id_in": { "items": { - "type": "number", - "format": "double" + "type": "string" }, "type": "array", "nullable": true }, - "compression_ratio_lt": { - "type": "number", - "format": "double", + "id_lt": { + "type": "string", "nullable": true }, - "compression_ratio_lte": { - "type": "number", - "format": "double", + "id_lte": { + "type": "string", "nullable": true }, - "compression_ratio_not": { - "type": "number", - "format": "double", + "id_not": { + "type": "string", "nullable": true }, - "compression_ratio_not_in": { + "id_not_contains": { + "type": "string", + "nullable": true + }, + "id_not_ends_with": { + "type": "string", + "nullable": true + }, + "id_not_in": { "items": { - "type": "number", - "format": "double" + "type": "string" }, "type": "array", "nullable": true }, - "createdAt": { + "id_not_starts_with": { "type": "string", "nullable": true }, - "createdAt_gt": { + "id_starts_with": { "type": "string", "nullable": true }, - "createdAt_gte": { + "local_id": { "type": "string", "nullable": true }, - "createdAt_in": { + "local_id_contains": { + "type": "string", + "nullable": true + }, + "local_id_ends_with": { + "type": "string", + "nullable": true + }, + "local_id_gt": { + "type": "string", + "nullable": true + }, + "local_id_gte": { + "type": "string", + "nullable": true + }, + "local_id_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "createdAt_lt": { + "local_id_lt": { "type": "string", "nullable": true }, - "createdAt_lte": { + "local_id_lte": { "type": "string", "nullable": true }, - "createdAt_not": { + "local_id_not": { "type": "string", "nullable": true }, - "createdAt_not_in": { + "local_id_not_contains": { + "type": "string", + "nullable": true + }, + "local_id_not_ends_with": { + "type": "string", + "nullable": true + }, + "local_id_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "description": { + "local_id_not_starts_with": { "type": "string", "nullable": true }, - "description_contains": { + "local_id_starts_with": { "type": "string", "nullable": true }, - "description_ends_with": { + "name": { "type": "string", "nullable": true }, - "description_gt": { + "name_contains": { "type": "string", "nullable": true }, - "description_gte": { + "name_ends_with": { "type": "string", "nullable": true }, - "description_in": { + "name_gt": { + "type": "string", + "nullable": true + }, + "name_gte": { + "type": "string", + "nullable": true + }, + "name_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "description_lt": { + "name_lt": { "type": "string", "nullable": true }, - "description_lte": { + "name_lte": { "type": "string", "nullable": true }, - "description_not": { + "name_not": { "type": "string", "nullable": true }, - "description_not_contains": { + "name_not_contains": { "type": "string", "nullable": true }, - "description_not_ends_with": { + "name_not_ends_with": { "type": "string", "nullable": true }, - "description_not_in": { + "name_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "description_not_starts_with": { + "name_not_starts_with": { "type": "string", "nullable": true }, - "description_starts_with": { + "name_starts_with": { "type": "string", "nullable": true - }, - "enable_window": { - "type": "boolean", - "nullable": true - }, - "enable_window_not": { - "type": "boolean", + } + }, + "type": "object", + "additionalProperties": false + }, + "BrickTopoWhereInput": { + "properties": { + "AND": { + "items": { + "$ref": "#/components/schemas/BrickTopoWhereInput" + }, + "type": "array", "nullable": true }, - "entityAsyncStatus": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" - } - ], + "NOT": { + "items": { + "$ref": "#/components/schemas/BrickTopoWhereInput" + }, + "type": "array", "nullable": true }, - "entityAsyncStatus_in": { + "OR": { "items": { - "$ref": "#/components/schemas/EntityAsyncStatus" + "$ref": "#/components/schemas/BrickTopoWhereInput" }, "type": "array", "nullable": true }, - "entityAsyncStatus_not": { + "cluster": { "allOf": [ { - "$ref": "#/components/schemas/EntityAsyncStatus" + "$ref": "#/components/schemas/ClusterWhereInput" } ], "nullable": true }, - "entityAsyncStatus_not_in": { - "items": { - "$ref": "#/components/schemas/EntityAsyncStatus" - }, - "type": "array", + "cluster_topo": { + "allOf": [ + { + "$ref": "#/components/schemas/ClusterTopoWhereInput" + } + ], "nullable": true }, - "full_interval": { + "height": { "type": "integer", "format": "int32", "nullable": true }, - "full_interval_gt": { + "height_gt": { "type": "integer", "format": "int32", "nullable": true }, - "full_interval_gte": { + "height_gte": { "type": "integer", "format": "int32", "nullable": true }, - "full_interval_in": { + "height_in": { "items": { "type": "integer", "format": "int32" @@ -51957,22 +51657,22 @@ "type": "array", "nullable": true }, - "full_interval_lt": { + "height_lt": { "type": "integer", "format": "int32", "nullable": true }, - "full_interval_lte": { + "height_lte": { "type": "integer", "format": "int32", "nullable": true }, - "full_interval_not": { + "height_not": { "type": "integer", "format": "int32", "nullable": true }, - "full_interval_not_in": { + "height_not_in": { "items": { "type": "integer", "format": "int32" @@ -51980,36 +51680,6 @@ "type": "array", "nullable": true }, - "full_period": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupPlanPeriod" - } - ], - "nullable": true - }, - "full_period_in": { - "items": { - "$ref": "#/components/schemas/BackupPlanPeriod" - }, - "type": "array", - "nullable": true - }, - "full_period_not": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupPlanPeriod" - } - ], - "nullable": true - }, - "full_period_not_in": { - "items": { - "$ref": "#/components/schemas/BackupPlanPeriod" - }, - "type": "array", - "nullable": true - }, "id": { "type": "string", "nullable": true @@ -52072,250 +51742,232 @@ "type": "string", "nullable": true }, - "incremental_interval": { - "type": "integer", - "format": "int32", + "local_id": { + "type": "string", "nullable": true }, - "incremental_interval_gt": { - "type": "integer", - "format": "int32", + "local_id_contains": { + "type": "string", "nullable": true }, - "incremental_interval_gte": { - "type": "integer", - "format": "int32", + "local_id_ends_with": { + "type": "string", "nullable": true }, - "incremental_interval_in": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array", + "local_id_gt": { + "type": "string", "nullable": true }, - "incremental_interval_lt": { - "type": "integer", - "format": "int32", + "local_id_gte": { + "type": "string", "nullable": true }, - "incremental_interval_lte": { - "type": "integer", - "format": "int32", + "local_id_in": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true }, - "incremental_interval_not": { - "type": "integer", - "format": "int32", + "local_id_lt": { + "type": "string", "nullable": true }, - "incremental_interval_not_in": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array", + "local_id_lte": { + "type": "string", "nullable": true }, - "incremental_period": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupPlanPeriod" - } - ], + "local_id_not": { + "type": "string", "nullable": true }, - "incremental_period_in": { - "items": { - "$ref": "#/components/schemas/BackupPlanPeriod" - }, - "type": "array", + "local_id_not_contains": { + "type": "string", "nullable": true }, - "incremental_period_not": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupPlanPeriod" - } - ], + "local_id_not_ends_with": { + "type": "string", "nullable": true }, - "incremental_period_not_in": { + "local_id_not_in": { "items": { - "$ref": "#/components/schemas/BackupPlanPeriod" + "type": "string" }, "type": "array", "nullable": true }, - "keep_policy": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupPlanKeepPolicy" - } - ], + "local_id_not_starts_with": { + "type": "string", "nullable": true }, - "keep_policy_in": { - "items": { - "$ref": "#/components/schemas/BackupPlanKeepPolicy" - }, - "type": "array", + "local_id_starts_with": { + "type": "string", "nullable": true }, - "keep_policy_not": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupPlanKeepPolicy" - } - ], + "model": { + "type": "string", "nullable": true }, - "keep_policy_not_in": { - "items": { - "$ref": "#/components/schemas/BackupPlanKeepPolicy" - }, - "type": "array", + "model_contains": { + "type": "string", "nullable": true }, - "keep_policy_value": { - "type": "integer", - "format": "int32", + "model_ends_with": { + "type": "string", "nullable": true }, - "keep_policy_value_gt": { - "type": "integer", - "format": "int32", + "model_gt": { + "type": "string", "nullable": true }, - "keep_policy_value_gte": { - "type": "integer", - "format": "int32", + "model_gte": { + "type": "string", "nullable": true }, - "keep_policy_value_in": { + "model_in": { "items": { - "type": "integer", - "format": "int32" + "type": "string" }, "type": "array", "nullable": true }, - "keep_policy_value_lt": { - "type": "integer", - "format": "int32", + "model_lt": { + "type": "string", "nullable": true }, - "keep_policy_value_lte": { - "type": "integer", - "format": "int32", + "model_lte": { + "type": "string", "nullable": true }, - "keep_policy_value_not": { - "type": "integer", - "format": "int32", + "model_not": { + "type": "string", "nullable": true }, - "keep_policy_value_not_in": { + "model_not_contains": { + "type": "string", + "nullable": true + }, + "model_not_ends_with": { + "type": "string", + "nullable": true + }, + "model_not_in": { "items": { - "type": "integer", - "format": "int32" + "type": "string" }, "type": "array", "nullable": true }, - "last_execute_status": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupPlanExecutionStatus" - } - ], + "model_not_starts_with": { + "type": "string", "nullable": true }, - "last_execute_status_in": { - "items": { - "$ref": "#/components/schemas/BackupPlanExecutionStatus" - }, - "type": "array", + "model_starts_with": { + "type": "string", "nullable": true }, - "last_execute_status_not": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupPlanExecutionStatus" - } - ], + "name": { + "type": "string", "nullable": true }, - "last_execute_status_not_in": { - "items": { - "$ref": "#/components/schemas/BackupPlanExecutionStatus" - }, - "type": "array", + "name_contains": { + "type": "string", "nullable": true }, - "last_execute_success_job_count": { - "type": "integer", - "format": "int32", + "name_ends_with": { + "type": "string", "nullable": true }, - "last_execute_success_job_count_gt": { - "type": "integer", - "format": "int32", + "name_gt": { + "type": "string", "nullable": true }, - "last_execute_success_job_count_gte": { - "type": "integer", - "format": "int32", + "name_gte": { + "type": "string", "nullable": true }, - "last_execute_success_job_count_in": { + "name_in": { "items": { - "type": "integer", - "format": "int32" + "type": "string" }, "type": "array", "nullable": true }, - "last_execute_success_job_count_lt": { - "type": "integer", - "format": "int32", + "name_lt": { + "type": "string", "nullable": true }, - "last_execute_success_job_count_lte": { - "type": "integer", - "format": "int32", + "name_lte": { + "type": "string", "nullable": true }, - "last_execute_success_job_count_not": { - "type": "integer", - "format": "int32", + "name_not": { + "type": "string", "nullable": true }, - "last_execute_success_job_count_not_in": { + "name_not_contains": { + "type": "string", + "nullable": true + }, + "name_not_ends_with": { + "type": "string", + "nullable": true + }, + "name_not_in": { "items": { - "type": "integer", - "format": "int32" + "type": "string" }, "type": "array", "nullable": true }, - "last_execute_total_job_count": { + "name_not_starts_with": { + "type": "string", + "nullable": true + }, + "name_starts_with": { + "type": "string", + "nullable": true + }, + "node_topoes_every": { + "allOf": [ + { + "$ref": "#/components/schemas/NodeTopoWhereInput" + } + ], + "nullable": true + }, + "node_topoes_none": { + "allOf": [ + { + "$ref": "#/components/schemas/NodeTopoWhereInput" + } + ], + "nullable": true + }, + "node_topoes_some": { + "allOf": [ + { + "$ref": "#/components/schemas/NodeTopoWhereInput" + } + ], + "nullable": true + }, + "position": { "type": "integer", "format": "int32", "nullable": true }, - "last_execute_total_job_count_gt": { + "position_gt": { "type": "integer", "format": "int32", "nullable": true }, - "last_execute_total_job_count_gte": { + "position_gte": { "type": "integer", "format": "int32", "nullable": true }, - "last_execute_total_job_count_in": { + "position_in": { "items": { "type": "integer", "format": "int32" @@ -52323,22 +51975,22 @@ "type": "array", "nullable": true }, - "last_execute_total_job_count_lt": { + "position_lt": { "type": "integer", "format": "int32", "nullable": true }, - "last_execute_total_job_count_lte": { + "position_lte": { "type": "integer", "format": "int32", "nullable": true }, - "last_execute_total_job_count_not": { + "position_not": { "type": "integer", "format": "int32", "nullable": true }, - "last_execute_total_job_count_not_in": { + "position_not_in": { "items": { "type": "integer", "format": "int32" @@ -52346,204 +51998,257 @@ "type": "array", "nullable": true }, - "last_executed_at": { - "type": "string", + "power_layout": { + "allOf": [ + { + "$ref": "#/components/schemas/Direction" + } + ], "nullable": true }, - "last_executed_at_gt": { - "type": "string", + "power_layout_in": { + "items": { + "$ref": "#/components/schemas/Direction" + }, + "type": "array", "nullable": true }, - "last_executed_at_gte": { - "type": "string", + "power_layout_not": { + "allOf": [ + { + "$ref": "#/components/schemas/Direction" + } + ], "nullable": true }, - "last_executed_at_in": { + "power_layout_not_in": { "items": { - "type": "string" + "$ref": "#/components/schemas/Direction" }, "type": "array", "nullable": true }, - "last_executed_at_lt": { - "type": "string", + "power_position": { + "allOf": [ + { + "$ref": "#/components/schemas/PowerPosition" + } + ], "nullable": true }, - "last_executed_at_lte": { - "type": "string", + "power_position_in": { + "items": { + "$ref": "#/components/schemas/PowerPosition" + }, + "type": "array", "nullable": true }, - "last_executed_at_not": { - "type": "string", + "power_position_not": { + "allOf": [ + { + "$ref": "#/components/schemas/PowerPosition" + } + ], "nullable": true }, - "last_executed_at_not_in": { + "power_position_not_in": { "items": { - "type": "string" + "$ref": "#/components/schemas/PowerPosition" }, "type": "array", "nullable": true }, - "last_manual_execute_status": { + "rack_topo": { "allOf": [ { - "$ref": "#/components/schemas/BackupPlanExecutionStatus" + "$ref": "#/components/schemas/RackTopoWhereInput" } ], "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "ClusterTopoWhereInput": { + "properties": { + "AND": { + "items": { + "$ref": "#/components/schemas/ClusterTopoWhereInput" + }, + "type": "array", + "nullable": true }, - "last_manual_execute_status_in": { + "NOT": { "items": { - "$ref": "#/components/schemas/BackupPlanExecutionStatus" + "$ref": "#/components/schemas/ClusterTopoWhereInput" }, "type": "array", "nullable": true }, - "last_manual_execute_status_not": { + "OR": { + "items": { + "$ref": "#/components/schemas/ClusterTopoWhereInput" + }, + "type": "array", + "nullable": true + }, + "brick_topoes_every": { "allOf": [ { - "$ref": "#/components/schemas/BackupPlanExecutionStatus" + "$ref": "#/components/schemas/BrickTopoWhereInput" } ], "nullable": true }, - "last_manual_execute_status_not_in": { - "items": { - "$ref": "#/components/schemas/BackupPlanExecutionStatus" - }, - "type": "array", + "brick_topoes_none": { + "allOf": [ + { + "$ref": "#/components/schemas/BrickTopoWhereInput" + } + ], "nullable": true }, - "last_manual_execute_success_job_count": { - "type": "integer", - "format": "int32", + "brick_topoes_some": { + "allOf": [ + { + "$ref": "#/components/schemas/BrickTopoWhereInput" + } + ], "nullable": true }, - "last_manual_execute_success_job_count_gt": { - "type": "integer", - "format": "int32", + "cluster": { + "allOf": [ + { + "$ref": "#/components/schemas/ClusterWhereInput" + } + ], "nullable": true }, - "last_manual_execute_success_job_count_gte": { - "type": "integer", - "format": "int32", + "id": { + "type": "string", "nullable": true }, - "last_manual_execute_success_job_count_in": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array", + "id_contains": { + "type": "string", "nullable": true }, - "last_manual_execute_success_job_count_lt": { - "type": "integer", - "format": "int32", + "id_ends_with": { + "type": "string", "nullable": true }, - "last_manual_execute_success_job_count_lte": { - "type": "integer", - "format": "int32", + "id_gt": { + "type": "string", "nullable": true }, - "last_manual_execute_success_job_count_not": { - "type": "integer", - "format": "int32", + "id_gte": { + "type": "string", "nullable": true }, - "last_manual_execute_success_job_count_not_in": { + "id_in": { "items": { - "type": "integer", - "format": "int32" + "type": "string" }, "type": "array", "nullable": true }, - "last_manual_execute_total_job_count": { - "type": "integer", - "format": "int32", + "id_lt": { + "type": "string", "nullable": true }, - "last_manual_execute_total_job_count_gt": { - "type": "integer", - "format": "int32", + "id_lte": { + "type": "string", "nullable": true }, - "last_manual_execute_total_job_count_gte": { - "type": "integer", - "format": "int32", + "id_not": { + "type": "string", "nullable": true }, - "last_manual_execute_total_job_count_in": { + "id_not_contains": { + "type": "string", + "nullable": true + }, + "id_not_ends_with": { + "type": "string", + "nullable": true + }, + "id_not_in": { "items": { - "type": "integer", - "format": "int32" + "type": "string" }, "type": "array", "nullable": true }, - "last_manual_execute_total_job_count_lt": { - "type": "integer", - "format": "int32", + "id_not_starts_with": { + "type": "string", "nullable": true }, - "last_manual_execute_total_job_count_lte": { - "type": "integer", - "format": "int32", + "id_starts_with": { + "type": "string", "nullable": true }, - "last_manual_execute_total_job_count_not": { - "type": "integer", - "format": "int32", + "local_id": { + "type": "string", "nullable": true }, - "last_manual_execute_total_job_count_not_in": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array", + "local_id_contains": { + "type": "string", "nullable": true }, - "last_manual_executed_at": { + "local_id_ends_with": { "type": "string", "nullable": true }, - "last_manual_executed_at_gt": { + "local_id_gt": { "type": "string", "nullable": true }, - "last_manual_executed_at_gte": { + "local_id_gte": { "type": "string", "nullable": true }, - "last_manual_executed_at_in": { + "local_id_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "last_manual_executed_at_lt": { + "local_id_lt": { "type": "string", "nullable": true }, - "last_manual_executed_at_lte": { + "local_id_lte": { "type": "string", "nullable": true }, - "last_manual_executed_at_not": { + "local_id_not": { "type": "string", "nullable": true }, - "last_manual_executed_at_not_in": { + "local_id_not_contains": { + "type": "string", + "nullable": true + }, + "local_id_not_ends_with": { + "type": "string", + "nullable": true + }, + "local_id_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, + "local_id_not_starts_with": { + "type": "string", + "nullable": true + }, + "local_id_starts_with": { + "type": "string", + "nullable": true + }, "name": { "type": "string", "nullable": true @@ -52606,372 +52311,297 @@ "type": "string", "nullable": true }, - "next_execute_time": { - "type": "string", - "nullable": true - }, - "next_execute_time_gt": { - "type": "string", + "node_topoes_every": { + "allOf": [ + { + "$ref": "#/components/schemas/NodeTopoWhereInput" + } + ], "nullable": true }, - "next_execute_time_gte": { - "type": "string", + "node_topoes_none": { + "allOf": [ + { + "$ref": "#/components/schemas/NodeTopoWhereInput" + } + ], "nullable": true }, - "next_execute_time_in": { - "items": { - "type": "string" - }, - "type": "array", + "node_topoes_some": { + "allOf": [ + { + "$ref": "#/components/schemas/NodeTopoWhereInput" + } + ], "nullable": true }, - "next_execute_time_lt": { - "type": "string", + "zone_topoes_every": { + "allOf": [ + { + "$ref": "#/components/schemas/ZoneTopoWhereInput" + } + ], "nullable": true }, - "next_execute_time_lte": { - "type": "string", + "zone_topoes_none": { + "allOf": [ + { + "$ref": "#/components/schemas/ZoneTopoWhereInput" + } + ], "nullable": true }, - "next_execute_time_not": { - "type": "string", + "zone_topoes_some": { + "allOf": [ + { + "$ref": "#/components/schemas/ZoneTopoWhereInput" + } + ], "nullable": true - }, - "next_execute_time_not_in": { + } + }, + "type": "object", + "additionalProperties": false + }, + "ZoneTopoWhereInput": { + "properties": { + "AND": { "items": { - "type": "string" + "$ref": "#/components/schemas/ZoneTopoWhereInput" }, "type": "array", "nullable": true }, - "physical_size": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "physical_size_gt": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "physical_size_gte": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "physical_size_in": { + "NOT": { "items": { - "type": "integer", - "format": "int64" + "$ref": "#/components/schemas/ZoneTopoWhereInput" }, "type": "array", "nullable": true }, - "physical_size_lt": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "physical_size_lte": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "physical_size_not": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "physical_size_not_in": { + "OR": { "items": { - "type": "integer", - "format": "int64" + "$ref": "#/components/schemas/ZoneTopoWhereInput" }, "type": "array", "nullable": true }, - "snapshot_consistent_type": { + "cluster": { "allOf": [ { - "$ref": "#/components/schemas/ConsistentType" + "$ref": "#/components/schemas/ClusterWhereInput" } ], "nullable": true }, - "snapshot_consistent_type_in": { - "items": { - "$ref": "#/components/schemas/ConsistentType" - }, - "type": "array", - "nullable": true - }, - "snapshot_consistent_type_not": { + "cluster_topo": { "allOf": [ { - "$ref": "#/components/schemas/ConsistentType" + "$ref": "#/components/schemas/ClusterTopoWhereInput" } ], "nullable": true }, - "snapshot_consistent_type_not_in": { - "items": { - "$ref": "#/components/schemas/ConsistentType" - }, - "type": "array", + "id": { + "type": "string", "nullable": true }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupPlanStatus" - } - ], + "id_contains": { + "type": "string", "nullable": true }, - "status_in": { + "id_ends_with": { + "type": "string", + "nullable": true + }, + "id_gt": { + "type": "string", + "nullable": true + }, + "id_gte": { + "type": "string", + "nullable": true + }, + "id_in": { "items": { - "$ref": "#/components/schemas/BackupPlanStatus" + "type": "string" }, "type": "array", "nullable": true }, - "status_not": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupPlanStatus" - } - ], - "nullable": true - }, - "status_not_in": { - "items": { - "$ref": "#/components/schemas/BackupPlanStatus" - }, - "type": "array", - "nullable": true - }, - "valid_size_of_backup_object": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "valid_size_of_backup_object_gt": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "valid_size_of_backup_object_gte": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "valid_size_of_backup_object_in": { - "items": { - "type": "integer", - "format": "int64" - }, - "type": "array", - "nullable": true - }, - "valid_size_of_backup_object_lt": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "valid_size_of_backup_object_lte": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "valid_size_of_backup_object_not": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "valid_size_of_backup_object_not_in": { - "items": { - "type": "integer", - "format": "int64" - }, - "type": "array", - "nullable": true - }, - "window_end": { + "id_lt": { "type": "string", "nullable": true }, - "window_end_contains": { + "id_lte": { "type": "string", "nullable": true }, - "window_end_ends_with": { + "id_not": { "type": "string", "nullable": true }, - "window_end_gt": { + "id_not_contains": { "type": "string", "nullable": true }, - "window_end_gte": { + "id_not_ends_with": { "type": "string", "nullable": true }, - "window_end_in": { + "id_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "window_end_lt": { + "id_not_starts_with": { "type": "string", "nullable": true }, - "window_end_lte": { + "id_starts_with": { "type": "string", "nullable": true }, - "window_end_not": { + "local_id": { "type": "string", "nullable": true }, - "window_end_not_contains": { + "local_id_contains": { "type": "string", "nullable": true }, - "window_end_not_ends_with": { + "local_id_ends_with": { "type": "string", "nullable": true }, - "window_end_not_in": { - "items": { - "type": "string" - }, - "type": "array", + "local_id_gt": { + "type": "string", "nullable": true }, - "window_end_not_starts_with": { + "local_id_gte": { "type": "string", "nullable": true }, - "window_end_starts_with": { - "type": "string", + "local_id_in": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true }, - "window_start": { + "local_id_lt": { "type": "string", "nullable": true }, - "window_start_contains": { + "local_id_lte": { "type": "string", "nullable": true }, - "window_start_ends_with": { + "local_id_not": { "type": "string", "nullable": true }, - "window_start_gt": { + "local_id_not_contains": { "type": "string", "nullable": true }, - "window_start_gte": { + "local_id_not_ends_with": { "type": "string", "nullable": true }, - "window_start_in": { + "local_id_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "window_start_lt": { - "type": "string", - "nullable": true - }, - "window_start_lte": { - "type": "string", - "nullable": true - }, - "window_start_not": { - "type": "string", - "nullable": true - }, - "window_start_not_contains": { + "local_id_not_starts_with": { "type": "string", "nullable": true }, - "window_start_not_ends_with": { + "local_id_starts_with": { "type": "string", "nullable": true }, - "window_start_not_in": { - "items": { - "type": "string" - }, - "type": "array", + "rack_topoes_every": { + "allOf": [ + { + "$ref": "#/components/schemas/RackTopoWhereInput" + } + ], "nullable": true }, - "window_start_not_starts_with": { - "type": "string", + "rack_topoes_none": { + "allOf": [ + { + "$ref": "#/components/schemas/RackTopoWhereInput" + } + ], "nullable": true }, - "window_start_starts_with": { - "type": "string", + "rack_topoes_some": { + "allOf": [ + { + "$ref": "#/components/schemas/RackTopoWhereInput" + } + ], "nullable": true } }, "type": "object", "additionalProperties": false }, - "BackupServiceWhereInput": { + "RackTopoWhereInput": { "properties": { "AND": { "items": { - "$ref": "#/components/schemas/BackupServiceWhereInput" + "$ref": "#/components/schemas/RackTopoWhereInput" }, "type": "array", "nullable": true }, "NOT": { "items": { - "$ref": "#/components/schemas/BackupServiceWhereInput" + "$ref": "#/components/schemas/RackTopoWhereInput" }, "type": "array", "nullable": true }, "OR": { "items": { - "$ref": "#/components/schemas/BackupServiceWhereInput" + "$ref": "#/components/schemas/RackTopoWhereInput" }, "type": "array", "nullable": true }, - "application": { + "brick_topoes_every": { "allOf": [ { - "$ref": "#/components/schemas/CloudTowerApplicationWhereInput" + "$ref": "#/components/schemas/BrickTopoWhereInput" } ], "nullable": true }, - "backup_clusters_every": { + "brick_topoes_none": { "allOf": [ { - "$ref": "#/components/schemas/ClusterWhereInput" + "$ref": "#/components/schemas/BrickTopoWhereInput" } ], "nullable": true }, - "backup_clusters_none": { + "brick_topoes_some": { "allOf": [ { - "$ref": "#/components/schemas/ClusterWhereInput" + "$ref": "#/components/schemas/BrickTopoWhereInput" } ], "nullable": true }, - "backup_clusters_some": { + "cluster": { "allOf": [ { "$ref": "#/components/schemas/ClusterWhereInput" @@ -52979,512 +52609,571 @@ ], "nullable": true }, - "backup_network_gateway": { - "type": "string", - "nullable": true - }, - "backup_network_gateway_contains": { - "type": "string", - "nullable": true - }, - "backup_network_gateway_ends_with": { - "type": "string", + "height": { + "type": "integer", + "format": "int32", "nullable": true }, - "backup_network_gateway_gt": { - "type": "string", + "height_gt": { + "type": "integer", + "format": "int32", "nullable": true }, - "backup_network_gateway_gte": { - "type": "string", + "height_gte": { + "type": "integer", + "format": "int32", "nullable": true }, - "backup_network_gateway_in": { + "height_in": { "items": { - "type": "string" + "type": "integer", + "format": "int32" }, "type": "array", "nullable": true }, - "backup_network_gateway_lt": { - "type": "string", - "nullable": true - }, - "backup_network_gateway_lte": { - "type": "string", - "nullable": true - }, - "backup_network_gateway_not": { - "type": "string", + "height_lt": { + "type": "integer", + "format": "int32", "nullable": true }, - "backup_network_gateway_not_contains": { - "type": "string", + "height_lte": { + "type": "integer", + "format": "int32", "nullable": true }, - "backup_network_gateway_not_ends_with": { - "type": "string", + "height_not": { + "type": "integer", + "format": "int32", "nullable": true }, - "backup_network_gateway_not_in": { + "height_not_in": { "items": { - "type": "string" + "type": "integer", + "format": "int32" }, "type": "array", "nullable": true }, - "backup_network_gateway_not_starts_with": { - "type": "string", - "nullable": true - }, - "backup_network_gateway_starts_with": { - "type": "string", - "nullable": true - }, - "backup_network_ip": { + "id": { "type": "string", "nullable": true }, - "backup_network_ip_contains": { + "id_contains": { "type": "string", "nullable": true }, - "backup_network_ip_ends_with": { + "id_ends_with": { "type": "string", "nullable": true }, - "backup_network_ip_gt": { + "id_gt": { "type": "string", "nullable": true }, - "backup_network_ip_gte": { + "id_gte": { "type": "string", "nullable": true }, - "backup_network_ip_in": { + "id_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "backup_network_ip_lt": { + "id_lt": { "type": "string", "nullable": true }, - "backup_network_ip_lte": { + "id_lte": { "type": "string", "nullable": true }, - "backup_network_ip_not": { + "id_not": { "type": "string", "nullable": true }, - "backup_network_ip_not_contains": { + "id_not_contains": { "type": "string", "nullable": true }, - "backup_network_ip_not_ends_with": { + "id_not_ends_with": { "type": "string", "nullable": true }, - "backup_network_ip_not_in": { + "id_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "backup_network_ip_not_starts_with": { + "id_not_starts_with": { "type": "string", "nullable": true }, - "backup_network_ip_starts_with": { + "id_starts_with": { "type": "string", "nullable": true }, - "backup_network_subnet_mask": { + "local_id": { "type": "string", "nullable": true }, - "backup_network_subnet_mask_contains": { + "local_id_contains": { "type": "string", "nullable": true }, - "backup_network_subnet_mask_ends_with": { + "local_id_ends_with": { "type": "string", "nullable": true }, - "backup_network_subnet_mask_gt": { + "local_id_gt": { "type": "string", "nullable": true }, - "backup_network_subnet_mask_gte": { + "local_id_gte": { "type": "string", "nullable": true }, - "backup_network_subnet_mask_in": { + "local_id_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "backup_network_subnet_mask_lt": { + "local_id_lt": { "type": "string", "nullable": true }, - "backup_network_subnet_mask_lte": { + "local_id_lte": { "type": "string", "nullable": true }, - "backup_network_subnet_mask_not": { + "local_id_not": { "type": "string", "nullable": true }, - "backup_network_subnet_mask_not_contains": { + "local_id_not_contains": { "type": "string", "nullable": true }, - "backup_network_subnet_mask_not_ends_with": { + "local_id_not_ends_with": { "type": "string", "nullable": true }, - "backup_network_subnet_mask_not_in": { + "local_id_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "backup_network_subnet_mask_not_starts_with": { + "local_id_not_starts_with": { "type": "string", "nullable": true }, - "backup_network_subnet_mask_starts_with": { + "local_id_starts_with": { "type": "string", "nullable": true }, - "backup_network_type": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupServiceNetworkType" - } - ], - "nullable": true - }, - "backup_network_type_in": { - "items": { - "$ref": "#/components/schemas/BackupServiceNetworkType" - }, - "type": "array", - "nullable": true - }, - "backup_network_type_not": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupServiceNetworkType" - } - ], - "nullable": true - }, - "backup_network_type_not_in": { - "items": { - "$ref": "#/components/schemas/BackupServiceNetworkType" - }, - "type": "array", - "nullable": true - }, - "backup_network_vlan": { + "name": { "type": "string", "nullable": true }, - "backup_network_vlan_contains": { + "name_contains": { "type": "string", "nullable": true }, - "backup_network_vlan_ends_with": { + "name_ends_with": { "type": "string", "nullable": true }, - "backup_network_vlan_gt": { + "name_gt": { "type": "string", "nullable": true }, - "backup_network_vlan_gte": { + "name_gte": { "type": "string", "nullable": true }, - "backup_network_vlan_in": { + "name_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "backup_network_vlan_lt": { + "name_lt": { "type": "string", "nullable": true }, - "backup_network_vlan_lte": { + "name_lte": { "type": "string", "nullable": true }, - "backup_network_vlan_not": { + "name_not": { "type": "string", "nullable": true }, - "backup_network_vlan_not_contains": { + "name_not_contains": { "type": "string", "nullable": true }, - "backup_network_vlan_not_ends_with": { + "name_not_ends_with": { "type": "string", "nullable": true }, - "backup_network_vlan_not_in": { + "name_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "backup_network_vlan_not_starts_with": { + "name_not_starts_with": { "type": "string", "nullable": true }, - "backup_network_vlan_starts_with": { + "name_starts_with": { "type": "string", "nullable": true }, - "backup_plans_every": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupPlanWhereInput" - } - ], - "nullable": true - }, - "backup_plans_none": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupPlanWhereInput" - } - ], - "nullable": true - }, - "backup_plans_some": { + "zone_topo": { "allOf": [ { - "$ref": "#/components/schemas/BackupPlanWhereInput" + "$ref": "#/components/schemas/ZoneTopoWhereInput" } ], "nullable": true - }, - "backup_rd_iops_max": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "backup_rd_iops_max_gt": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "backup_rd_iops_max_gte": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "backup_rd_iops_max_in": { + } + }, + "type": "object", + "additionalProperties": false + }, + "BrickTopoCreationParams": { + "properties": { + "tag_position_in_brick": { "items": { - "type": "integer", - "format": "int64" + "$ref": "#/components/schemas/NestedTagPosition" }, "type": "array", "nullable": true }, - "backup_rd_iops_max_lt": { - "type": "integer", - "format": "int64", - "nullable": true + "node_topoes": { + "$ref": "#/components/schemas/NodeTopoWhereInput" }, - "backup_rd_iops_max_lte": { - "type": "integer", - "format": "int64", - "nullable": true + "rack_topo_id": { + "type": "string" }, - "backup_rd_iops_max_not": { + "capacity": { + "$ref": "#/components/schemas/NestedCapacity" + }, + "cluster_id": { + "type": "string" + }, + "height": { "type": "integer", - "format": "int64", - "nullable": true + "format": "int32" }, - "backup_rd_iops_max_not_in": { - "items": { - "type": "integer", - "format": "int64" - }, - "type": "array", - "nullable": true + "name": { + "type": "string" }, - "backup_store_repositories_every": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupStoreRepositoryWhereInput" + "position": { + "type": "integer", + "format": "int32" + } + }, + "required": [ + "cluster_id", + "height", + "name", + "position" + ], + "type": "object" + }, + "BrickTopoUpdationParams": { + "properties": { + "data": { + "properties": { + "tag_position_in_brick": { + "items": { + "$ref": "#/components/schemas/NestedTagPosition" + }, + "type": "array", + "nullable": true + }, + "node_topoes": { + "$ref": "#/components/schemas/NodeTopoWhereInput" + }, + "capacity": { + "$ref": "#/components/schemas/NestedCapacity" + }, + "height": { + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string" + }, + "position": { + "type": "integer", + "format": "int32" } - ], - "nullable": true + }, + "type": "object" }, - "backup_store_repositories_none": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupStoreRepositoryWhereInput" + "where": { + "$ref": "#/components/schemas/BrickTopoWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "BrickTopoMoveParams": { + "properties": { + "data": { + "properties": { + "rack_topo_id": { + "type": "string" + }, + "position": { + "type": "integer", + "format": "int32" } + }, + "required": [ + "position" ], - "nullable": true + "type": "object" }, - "backup_store_repositories_some": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupStoreRepositoryWhereInput" - } - ], + "where": { + "$ref": "#/components/schemas/BrickTopoWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "DeleteBrickTopo": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "WithTask_DeleteBrickTopo_": { + "properties": { + "task_id": { + "type": "string", "nullable": true }, - "backup_wr_iops_max": { - "type": "integer", - "format": "int64", - "nullable": true + "data": { + "$ref": "#/components/schemas/DeleteBrickTopo" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "BrickTopoDeletionParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/BrickTopoWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "UploadResourceType": { + "enum": [ + "CLOUDTOWER_APPLICATION_PACKAGE", + "CLOUDTOWER_K8S_APP_PACKAGE", + "CLUSTER_IMAGE", + "CLUSTER_IMAGE_META", + "CONTENT_LIBRARY_IMAGE", + "ELF_IMAGE", + "EVEROUTE_PACKAGE", + "HOST_PLUGIN_PACKAGE", + "MONITOR_IMAGE", + "OVF", + "SVT_IMAGE", + "VM_VOLUME_QCOW2", + "VM_VOLUME_RAW" + ], + "type": "string" + }, + "UploadTaskStatus": { + "enum": [ + "FAILED", + "INITIALIZING", + "PAUSED", + "SUCCESSED", + "UPLOADING" + ], + "type": "string" + }, + "UploadTask": { + "properties": { + "args": { + "properties": {}, + "type": "object" }, - "backup_wr_iops_max_gt": { + "chunk_size": { "type": "integer", - "format": "int64", - "nullable": true + "format": "int64" }, - "backup_wr_iops_max_gte": { + "current_chunk": { "type": "integer", - "format": "int64", - "nullable": true + "format": "int32" }, - "backup_wr_iops_max_in": { - "items": { - "type": "integer", - "format": "int64" - }, - "type": "array", + "finished_at": { + "type": "string", "nullable": true }, - "backup_wr_iops_max_lt": { - "type": "integer", - "format": "int64", - "nullable": true + "id": { + "type": "string" }, - "backup_wr_iops_max_lte": { - "type": "integer", - "format": "int64", - "nullable": true + "resource_type": { + "$ref": "#/components/schemas/UploadResourceType" }, - "backup_wr_iops_max_not": { + "size": { "type": "integer", - "format": "int64", - "nullable": true - }, - "backup_wr_iops_max_not_in": { - "items": { - "type": "integer", - "format": "int64" - }, - "type": "array", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "description_contains": { - "type": "string", - "nullable": true - }, - "description_ends_with": { - "type": "string", - "nullable": true + "format": "int64" }, - "description_gt": { + "started_at": { "type": "string", "nullable": true }, - "description_gte": { - "type": "string", - "nullable": true + "status": { + "$ref": "#/components/schemas/UploadTaskStatus" }, - "description_in": { + "updatedAt": { + "type": "string" + } + }, + "required": [ + "args", + "chunk_size", + "current_chunk", + "id", + "resource_type", + "size", + "status", + "updatedAt" + ], + "type": "object", + "additionalProperties": false + }, + "ByteUnit": { + "type": "string", + "enum": [ + "B", + "KB", + "MB", + "GB", + "TB", + "PB" + ] + }, + "DeleteCloudTowerApplicationPackage": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "CloudTowerApplicationPackageWhereInput": { + "properties": { + "AND": { "items": { - "type": "string" + "$ref": "#/components/schemas/CloudTowerApplicationPackageWhereInput" }, "type": "array", "nullable": true }, - "description_lt": { - "type": "string", - "nullable": true - }, - "description_lte": { - "type": "string", - "nullable": true - }, - "description_not": { - "type": "string", - "nullable": true - }, - "description_not_contains": { - "type": "string", - "nullable": true - }, - "description_not_ends_with": { - "type": "string", + "NOT": { + "items": { + "$ref": "#/components/schemas/CloudTowerApplicationPackageWhereInput" + }, + "type": "array", "nullable": true }, - "description_not_in": { + "OR": { "items": { - "type": "string" + "$ref": "#/components/schemas/CloudTowerApplicationPackageWhereInput" }, "type": "array", "nullable": true }, - "description_not_starts_with": { - "type": "string", + "applications_every": { + "allOf": [ + { + "$ref": "#/components/schemas/CloudTowerApplicationWhereInput" + } + ], "nullable": true }, - "description_starts_with": { - "type": "string", + "applications_none": { + "allOf": [ + { + "$ref": "#/components/schemas/CloudTowerApplicationWhereInput" + } + ], "nullable": true }, - "entityAsyncStatus": { + "applications_some": { "allOf": [ { - "$ref": "#/components/schemas/EntityAsyncStatus" + "$ref": "#/components/schemas/CloudTowerApplicationWhereInput" } ], "nullable": true }, - "entityAsyncStatus_in": { + "architecture": { + "allOf": [ + { + "$ref": "#/components/schemas/Architecture" + } + ], + "nullable": true + }, + "architecture_in": { "items": { - "$ref": "#/components/schemas/EntityAsyncStatus" + "$ref": "#/components/schemas/Architecture" }, "type": "array", "nullable": true }, - "entityAsyncStatus_not": { + "architecture_not": { "allOf": [ { - "$ref": "#/components/schemas/EntityAsyncStatus" + "$ref": "#/components/schemas/Architecture" } ], "nullable": true }, - "entityAsyncStatus_not_in": { + "architecture_not_in": { "items": { - "$ref": "#/components/schemas/EntityAsyncStatus" + "$ref": "#/components/schemas/Architecture" }, "type": "array", "nullable": true @@ -53551,527 +53240,521 @@ "type": "string", "nullable": true }, - "kube_config": { + "name": { "type": "string", "nullable": true }, - "kube_config_contains": { + "name_contains": { "type": "string", "nullable": true }, - "kube_config_ends_with": { + "name_ends_with": { "type": "string", "nullable": true }, - "kube_config_gt": { + "name_gt": { "type": "string", "nullable": true }, - "kube_config_gte": { + "name_gte": { "type": "string", "nullable": true }, - "kube_config_in": { + "name_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "kube_config_lt": { + "name_lt": { "type": "string", "nullable": true }, - "kube_config_lte": { + "name_lte": { "type": "string", "nullable": true }, - "kube_config_not": { + "name_not": { "type": "string", "nullable": true }, - "kube_config_not_contains": { + "name_not_contains": { "type": "string", "nullable": true }, - "kube_config_not_ends_with": { + "name_not_ends_with": { "type": "string", "nullable": true }, - "kube_config_not_in": { + "name_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "kube_config_not_starts_with": { + "name_not_starts_with": { "type": "string", "nullable": true }, - "kube_config_starts_with": { + "name_starts_with": { "type": "string", "nullable": true }, - "management_network_gateway": { + "scosVersion": { "type": "string", "nullable": true }, - "management_network_gateway_contains": { + "scosVersion_contains": { "type": "string", "nullable": true }, - "management_network_gateway_ends_with": { + "scosVersion_ends_with": { "type": "string", "nullable": true }, - "management_network_gateway_gt": { + "scosVersion_gt": { "type": "string", "nullable": true }, - "management_network_gateway_gte": { + "scosVersion_gte": { "type": "string", "nullable": true }, - "management_network_gateway_in": { + "scosVersion_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "management_network_gateway_lt": { + "scosVersion_lt": { "type": "string", "nullable": true }, - "management_network_gateway_lte": { + "scosVersion_lte": { "type": "string", "nullable": true }, - "management_network_gateway_not": { + "scosVersion_not": { "type": "string", "nullable": true }, - "management_network_gateway_not_contains": { + "scosVersion_not_contains": { "type": "string", "nullable": true }, - "management_network_gateway_not_ends_with": { + "scosVersion_not_ends_with": { "type": "string", "nullable": true }, - "management_network_gateway_not_in": { + "scosVersion_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "management_network_gateway_not_starts_with": { + "scosVersion_not_starts_with": { "type": "string", "nullable": true }, - "management_network_gateway_starts_with": { + "scosVersion_starts_with": { "type": "string", "nullable": true }, - "management_network_ip": { + "version": { "type": "string", "nullable": true }, - "management_network_ip_contains": { + "version_contains": { "type": "string", "nullable": true }, - "management_network_ip_ends_with": { + "version_ends_with": { "type": "string", "nullable": true }, - "management_network_ip_gt": { + "version_gt": { "type": "string", "nullable": true }, - "management_network_ip_gte": { + "version_gte": { "type": "string", "nullable": true }, - "management_network_ip_in": { + "version_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "management_network_ip_lt": { + "version_lt": { "type": "string", "nullable": true }, - "management_network_ip_lte": { + "version_lte": { "type": "string", "nullable": true }, - "management_network_ip_not": { + "version_not": { "type": "string", "nullable": true }, - "management_network_ip_not_contains": { + "version_not_contains": { "type": "string", "nullable": true }, - "management_network_ip_not_ends_with": { + "version_not_ends_with": { "type": "string", "nullable": true }, - "management_network_ip_not_in": { + "version_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "management_network_ip_not_starts_with": { + "version_not_starts_with": { "type": "string", "nullable": true }, - "management_network_ip_starts_with": { + "version_starts_with": { "type": "string", "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "CloudTowerApplicationWhereInput": { + "properties": { + "AND": { + "items": { + "$ref": "#/components/schemas/CloudTowerApplicationWhereInput" + }, + "type": "array", + "nullable": true }, - "management_network_subnet_mask": { + "NOT": { + "items": { + "$ref": "#/components/schemas/CloudTowerApplicationWhereInput" + }, + "type": "array", + "nullable": true + }, + "OR": { + "items": { + "$ref": "#/components/schemas/CloudTowerApplicationWhereInput" + }, + "type": "array", + "nullable": true + }, + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], + "nullable": true + }, + "entityAsyncStatus_in": { + "items": { + "$ref": "#/components/schemas/EntityAsyncStatus" + }, + "type": "array", + "nullable": true + }, + "entityAsyncStatus_not": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], + "nullable": true + }, + "entityAsyncStatus_not_in": { + "items": { + "$ref": "#/components/schemas/EntityAsyncStatus" + }, + "type": "array", + "nullable": true + }, + "id": { "type": "string", "nullable": true }, - "management_network_subnet_mask_contains": { + "id_contains": { "type": "string", "nullable": true }, - "management_network_subnet_mask_ends_with": { + "id_ends_with": { "type": "string", "nullable": true }, - "management_network_subnet_mask_gt": { + "id_gt": { "type": "string", "nullable": true }, - "management_network_subnet_mask_gte": { + "id_gte": { "type": "string", "nullable": true }, - "management_network_subnet_mask_in": { + "id_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "management_network_subnet_mask_lt": { + "id_lt": { "type": "string", "nullable": true }, - "management_network_subnet_mask_lte": { + "id_lte": { "type": "string", "nullable": true }, - "management_network_subnet_mask_not": { + "id_not": { "type": "string", "nullable": true }, - "management_network_subnet_mask_not_contains": { + "id_not_contains": { "type": "string", "nullable": true }, - "management_network_subnet_mask_not_ends_with": { + "id_not_ends_with": { "type": "string", "nullable": true }, - "management_network_subnet_mask_not_in": { + "id_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "management_network_subnet_mask_not_starts_with": { + "id_not_starts_with": { "type": "string", "nullable": true }, - "management_network_subnet_mask_starts_with": { + "id_starts_with": { "type": "string", "nullable": true }, - "management_network_vlan": { + "name": { "type": "string", "nullable": true }, - "management_network_vlan_contains": { + "name_contains": { "type": "string", "nullable": true }, - "management_network_vlan_ends_with": { + "name_ends_with": { "type": "string", "nullable": true }, - "management_network_vlan_gt": { + "name_gt": { "type": "string", "nullable": true }, - "management_network_vlan_gte": { + "name_gte": { "type": "string", "nullable": true }, - "management_network_vlan_in": { + "name_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "management_network_vlan_lt": { + "name_lt": { "type": "string", "nullable": true }, - "management_network_vlan_lte": { + "name_lte": { "type": "string", "nullable": true }, - "management_network_vlan_not": { + "name_not": { "type": "string", "nullable": true }, - "management_network_vlan_not_contains": { + "name_not_contains": { "type": "string", "nullable": true }, - "management_network_vlan_not_ends_with": { + "name_not_ends_with": { "type": "string", "nullable": true }, - "management_network_vlan_not_in": { + "name_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "management_network_vlan_not_starts_with": { + "name_not_starts_with": { "type": "string", "nullable": true }, - "management_network_vlan_starts_with": { + "name_starts_with": { "type": "string", "nullable": true }, - "max_job_retry_times": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "max_job_retry_times_gt": { - "type": "integer", - "format": "int32", + "package": { + "allOf": [ + { + "$ref": "#/components/schemas/CloudTowerApplicationPackageWhereInput" + } + ], "nullable": true }, - "max_job_retry_times_gte": { - "type": "integer", - "format": "int32", + "placementSituation": { + "type": "string", "nullable": true }, - "max_job_retry_times_in": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array", + "placementSituation_contains": { + "type": "string", "nullable": true }, - "max_job_retry_times_lt": { - "type": "integer", - "format": "int32", + "placementSituation_ends_with": { + "type": "string", "nullable": true }, - "max_job_retry_times_lte": { - "type": "integer", - "format": "int32", + "placementSituation_gt": { + "type": "string", "nullable": true }, - "max_job_retry_times_not": { - "type": "integer", - "format": "int32", + "placementSituation_gte": { + "type": "string", "nullable": true }, - "max_job_retry_times_not_in": { + "placementSituation_in": { "items": { - "type": "integer", - "format": "int32" + "type": "string" }, "type": "array", "nullable": true }, - "max_parallel_backup_jobs": { - "type": "integer", - "format": "int32", + "placementSituation_lt": { + "type": "string", "nullable": true }, - "max_parallel_backup_jobs_gt": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "max_parallel_backup_jobs_gte": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "max_parallel_backup_jobs_in": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array", - "nullable": true - }, - "max_parallel_backup_jobs_lt": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "max_parallel_backup_jobs_lte": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "max_parallel_backup_jobs_not": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "max_parallel_backup_jobs_not_in": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array", + "placementSituation_lte": { + "type": "string", "nullable": true }, - "max_parallel_restore_jobs": { - "type": "integer", - "format": "int32", + "placementSituation_not": { + "type": "string", "nullable": true }, - "max_parallel_restore_jobs_gt": { - "type": "integer", - "format": "int32", + "placementSituation_not_contains": { + "type": "string", "nullable": true }, - "max_parallel_restore_jobs_gte": { - "type": "integer", - "format": "int32", + "placementSituation_not_ends_with": { + "type": "string", "nullable": true }, - "max_parallel_restore_jobs_in": { + "placementSituation_not_in": { "items": { - "type": "integer", - "format": "int32" + "type": "string" }, "type": "array", "nullable": true }, - "max_parallel_restore_jobs_lt": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "max_parallel_restore_jobs_lte": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "max_parallel_restore_jobs_not": { - "type": "integer", - "format": "int32", + "placementSituation_not_starts_with": { + "type": "string", "nullable": true }, - "max_parallel_restore_jobs_not_in": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array", + "placementSituation_starts_with": { + "type": "string", "nullable": true }, - "name": { + "placementVerb": { "type": "string", "nullable": true }, - "name_contains": { + "placementVerb_contains": { "type": "string", "nullable": true }, - "name_ends_with": { + "placementVerb_ends_with": { "type": "string", "nullable": true }, - "name_gt": { + "placementVerb_gt": { "type": "string", "nullable": true }, - "name_gte": { + "placementVerb_gte": { "type": "string", "nullable": true }, - "name_in": { + "placementVerb_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "name_lt": { + "placementVerb_lt": { "type": "string", "nullable": true }, - "name_lte": { + "placementVerb_lte": { "type": "string", "nullable": true }, - "name_not": { + "placementVerb_not": { "type": "string", "nullable": true }, - "name_not_contains": { + "placementVerb_not_contains": { "type": "string", "nullable": true }, - "name_not_ends_with": { + "placementVerb_not_ends_with": { "type": "string", "nullable": true }, - "name_not_in": { + "placementVerb_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "name_not_starts_with": { + "placementVerb_not_starts_with": { "type": "string", "nullable": true }, - "name_starts_with": { + "placementVerb_starts_with": { "type": "string", "nullable": true }, - "resource_version_gt": { + "resourceVersion": { "type": "integer", "format": "int32", "nullable": true }, - "resource_version_gte": { + "resourceVersion_gt": { "type": "integer", "format": "int32", "nullable": true }, - "resource_version_in": { + "resourceVersion_gte": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "resourceVersion_in": { "items": { "type": "integer", "format": "int32" @@ -54079,22 +53762,22 @@ "type": "array", "nullable": true }, - "resource_version_lt": { + "resourceVersion_lt": { "type": "integer", "format": "int32", "nullable": true }, - "resource_version_lte": { + "resourceVersion_lte": { "type": "integer", "format": "int32", "nullable": true }, - "resource_version_not": { + "resourceVersion_not": { "type": "integer", "format": "int32", "nullable": true }, - "resource_version_not_in": { + "resourceVersion_not_in": { "items": { "type": "integer", "format": "int32" @@ -54102,576 +53785,527 @@ "type": "array", "nullable": true }, - "restore_rd_iops_max": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "restore_rd_iops_max_gt": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "restore_rd_iops_max_gte": { - "type": "integer", - "format": "int64", + "state": { + "allOf": [ + { + "$ref": "#/components/schemas/CloudTowerApplicationState" + } + ], "nullable": true }, - "restore_rd_iops_max_in": { + "state_in": { "items": { - "type": "integer", - "format": "int64" + "$ref": "#/components/schemas/CloudTowerApplicationState" }, "type": "array", "nullable": true }, - "restore_rd_iops_max_lt": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "restore_rd_iops_max_lte": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "restore_rd_iops_max_not": { - "type": "integer", - "format": "int64", + "state_not": { + "allOf": [ + { + "$ref": "#/components/schemas/CloudTowerApplicationState" + } + ], "nullable": true }, - "restore_rd_iops_max_not_in": { + "state_not_in": { "items": { - "type": "integer", - "format": "int64" + "$ref": "#/components/schemas/CloudTowerApplicationState" }, "type": "array", "nullable": true }, - "restore_wr_iops_max": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "restore_wr_iops_max_gt": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "restore_wr_iops_max_gte": { - "type": "integer", - "format": "int64", + "targetPackage": { + "type": "string", "nullable": true }, - "restore_wr_iops_max_in": { - "items": { - "type": "integer", - "format": "int64" - }, - "type": "array", + "targetPackage_contains": { + "type": "string", "nullable": true }, - "restore_wr_iops_max_lt": { - "type": "integer", - "format": "int64", + "targetPackage_ends_with": { + "type": "string", "nullable": true }, - "restore_wr_iops_max_lte": { - "type": "integer", - "format": "int64", + "targetPackage_gt": { + "type": "string", "nullable": true }, - "restore_wr_iops_max_not": { - "type": "integer", - "format": "int64", + "targetPackage_gte": { + "type": "string", "nullable": true }, - "restore_wr_iops_max_not_in": { + "targetPackage_in": { "items": { - "type": "integer", - "format": "int64" + "type": "string" }, "type": "array", "nullable": true }, - "retry_interval": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "retry_interval_gt": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "retry_interval_gte": { - "type": "integer", - "format": "int32", + "targetPackage_lt": { + "type": "string", "nullable": true }, - "retry_interval_in": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array", + "targetPackage_lte": { + "type": "string", "nullable": true }, - "retry_interval_lt": { - "type": "integer", - "format": "int32", + "targetPackage_not": { + "type": "string", "nullable": true }, - "retry_interval_lte": { - "type": "integer", - "format": "int32", + "targetPackage_not_contains": { + "type": "string", "nullable": true }, - "retry_interval_not": { - "type": "integer", - "format": "int32", + "targetPackage_not_ends_with": { + "type": "string", "nullable": true }, - "retry_interval_not_in": { + "targetPackage_not_in": { "items": { - "type": "integer", - "format": "int32" + "type": "string" }, "type": "array", "nullable": true }, - "running_vm": { - "allOf": [ - { - "$ref": "#/components/schemas/VmWhereInput" - } - ], + "targetPackage_not_starts_with": { + "type": "string", "nullable": true }, - "status": { + "targetPackage_starts_with": { + "type": "string", + "nullable": true + }, + "user": { "allOf": [ { - "$ref": "#/components/schemas/BackupServiceStatus" + "$ref": "#/components/schemas/UserWhereInput" } ], "nullable": true - }, - "status_in": { + } + }, + "type": "object", + "additionalProperties": false + }, + "CloudTowerApplicationState": { + "enum": [ + "CONFIGURE_FAILED", + "CONFIGURING", + "ERROR", + "INSTALLING", + "INSTALL_FAILED", + "RUNNING", + "SCALE_FAILED", + "SCALING", + "TERMINATE_FAILED", + "TERMINATING", + "UPGRADE_FAILED", + "UPGRADING" + ], + "type": "string" + }, + "UserWhereInput": { + "properties": { + "AND": { "items": { - "$ref": "#/components/schemas/BackupServiceStatus" + "$ref": "#/components/schemas/UserWhereInput" }, "type": "array", "nullable": true }, - "status_not": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupServiceStatus" - } - ], + "NOT": { + "items": { + "$ref": "#/components/schemas/UserWhereInput" + }, + "type": "array", "nullable": true }, - "status_not_in": { + "OR": { "items": { - "$ref": "#/components/schemas/BackupServiceStatus" + "$ref": "#/components/schemas/UserWhereInput" }, "type": "array", "nullable": true }, - "storage_network_gateway": { + "auth_config_id": { "type": "string", "nullable": true }, - "storage_network_gateway_contains": { + "auth_config_id_contains": { "type": "string", "nullable": true }, - "storage_network_gateway_ends_with": { + "auth_config_id_ends_with": { "type": "string", "nullable": true }, - "storage_network_gateway_gt": { + "auth_config_id_gt": { "type": "string", "nullable": true }, - "storage_network_gateway_gte": { + "auth_config_id_gte": { "type": "string", "nullable": true }, - "storage_network_gateway_in": { + "auth_config_id_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "storage_network_gateway_lt": { + "auth_config_id_lt": { "type": "string", "nullable": true }, - "storage_network_gateway_lte": { + "auth_config_id_lte": { "type": "string", "nullable": true }, - "storage_network_gateway_not": { + "auth_config_id_not": { "type": "string", "nullable": true }, - "storage_network_gateway_not_contains": { + "auth_config_id_not_contains": { "type": "string", "nullable": true }, - "storage_network_gateway_not_ends_with": { + "auth_config_id_not_ends_with": { "type": "string", "nullable": true }, - "storage_network_gateway_not_in": { + "auth_config_id_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "storage_network_gateway_not_starts_with": { + "auth_config_id_not_starts_with": { "type": "string", "nullable": true }, - "storage_network_gateway_starts_with": { + "auth_config_id_starts_with": { "type": "string", "nullable": true }, - "storage_network_ip": { + "display_username": { "type": "string", "nullable": true }, - "storage_network_ip_contains": { + "display_username_contains": { "type": "string", "nullable": true }, - "storage_network_ip_ends_with": { + "display_username_ends_with": { "type": "string", "nullable": true }, - "storage_network_ip_gt": { + "display_username_gt": { "type": "string", "nullable": true }, - "storage_network_ip_gte": { + "display_username_gte": { "type": "string", "nullable": true }, - "storage_network_ip_in": { + "display_username_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "storage_network_ip_lt": { + "display_username_lt": { "type": "string", "nullable": true }, - "storage_network_ip_lte": { + "display_username_lte": { "type": "string", "nullable": true }, - "storage_network_ip_not": { + "display_username_not": { "type": "string", "nullable": true }, - "storage_network_ip_not_contains": { + "display_username_not_contains": { "type": "string", "nullable": true }, - "storage_network_ip_not_ends_with": { + "display_username_not_ends_with": { "type": "string", "nullable": true }, - "storage_network_ip_not_in": { + "display_username_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "storage_network_ip_not_starts_with": { + "display_username_not_starts_with": { "type": "string", "nullable": true }, - "storage_network_ip_starts_with": { + "display_username_starts_with": { "type": "string", "nullable": true }, - "storage_network_subnet_mask": { + "email_address": { "type": "string", "nullable": true }, - "storage_network_subnet_mask_contains": { + "email_address_contains": { "type": "string", "nullable": true }, - "storage_network_subnet_mask_ends_with": { + "email_address_ends_with": { "type": "string", "nullable": true }, - "storage_network_subnet_mask_gt": { + "email_address_gt": { "type": "string", "nullable": true }, - "storage_network_subnet_mask_gte": { + "email_address_gte": { "type": "string", "nullable": true }, - "storage_network_subnet_mask_in": { + "email_address_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "storage_network_subnet_mask_lt": { + "email_address_lt": { "type": "string", "nullable": true }, - "storage_network_subnet_mask_lte": { + "email_address_lte": { "type": "string", "nullable": true }, - "storage_network_subnet_mask_not": { + "email_address_not": { "type": "string", "nullable": true }, - "storage_network_subnet_mask_not_contains": { + "email_address_not_contains": { "type": "string", "nullable": true }, - "storage_network_subnet_mask_not_ends_with": { + "email_address_not_ends_with": { "type": "string", "nullable": true }, - "storage_network_subnet_mask_not_in": { + "email_address_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "storage_network_subnet_mask_not_starts_with": { + "email_address_not_starts_with": { "type": "string", "nullable": true }, - "storage_network_subnet_mask_starts_with": { + "email_address_starts_with": { "type": "string", "nullable": true }, - "storage_network_type": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupServiceNetworkType" - } - ], + "id": { + "type": "string", "nullable": true }, - "storage_network_type_in": { - "items": { - "$ref": "#/components/schemas/BackupServiceNetworkType" - }, - "type": "array", + "id_contains": { + "type": "string", "nullable": true }, - "storage_network_type_not": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupServiceNetworkType" - } - ], + "id_ends_with": { + "type": "string", "nullable": true }, - "storage_network_type_not_in": { + "id_gt": { + "type": "string", + "nullable": true + }, + "id_gte": { + "type": "string", + "nullable": true + }, + "id_in": { "items": { - "$ref": "#/components/schemas/BackupServiceNetworkType" + "type": "string" }, "type": "array", "nullable": true }, - "storage_network_vlan": { + "id_lt": { "type": "string", "nullable": true }, - "storage_network_vlan_contains": { + "id_lte": { "type": "string", "nullable": true }, - "storage_network_vlan_ends_with": { + "id_not": { "type": "string", "nullable": true }, - "storage_network_vlan_gt": { + "id_not_contains": { "type": "string", "nullable": true }, - "storage_network_vlan_gte": { + "id_not_ends_with": { "type": "string", "nullable": true }, - "storage_network_vlan_in": { + "id_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "storage_network_vlan_lt": { + "id_not_starts_with": { "type": "string", "nullable": true }, - "storage_network_vlan_lte": { + "id_starts_with": { "type": "string", "nullable": true }, - "storage_network_vlan_not": { + "internal": { + "type": "boolean", + "nullable": true + }, + "internal_not": { + "type": "boolean", + "nullable": true + }, + "ldap_dn": { "type": "string", "nullable": true }, - "storage_network_vlan_not_contains": { + "ldap_dn_contains": { "type": "string", "nullable": true }, - "storage_network_vlan_not_ends_with": { + "ldap_dn_ends_with": { "type": "string", "nullable": true }, - "storage_network_vlan_not_in": { + "ldap_dn_gt": { + "type": "string", + "nullable": true + }, + "ldap_dn_gte": { + "type": "string", + "nullable": true + }, + "ldap_dn_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "storage_network_vlan_not_starts_with": { + "ldap_dn_lt": { "type": "string", "nullable": true }, - "storage_network_vlan_starts_with": { + "ldap_dn_lte": { "type": "string", "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "CloudTowerApplicationWhereInput": { - "properties": { - "AND": { - "items": { - "$ref": "#/components/schemas/CloudTowerApplicationWhereInput" - }, - "type": "array", + }, + "ldap_dn_not": { + "type": "string", "nullable": true }, - "NOT": { + "ldap_dn_not_contains": { + "type": "string", + "nullable": true + }, + "ldap_dn_not_ends_with": { + "type": "string", + "nullable": true + }, + "ldap_dn_not_in": { "items": { - "$ref": "#/components/schemas/CloudTowerApplicationWhereInput" + "type": "string" }, "type": "array", "nullable": true }, - "OR": { - "items": { - "$ref": "#/components/schemas/CloudTowerApplicationWhereInput" - }, - "type": "array", - "nullable": true - }, - "entityAsyncStatus": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" - } - ], - "nullable": true - }, - "entityAsyncStatus_in": { - "items": { - "$ref": "#/components/schemas/EntityAsyncStatus" - }, - "type": "array", - "nullable": true - }, - "entityAsyncStatus_not": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" - } - ], + "ldap_dn_not_starts_with": { + "type": "string", "nullable": true }, - "entityAsyncStatus_not_in": { - "items": { - "$ref": "#/components/schemas/EntityAsyncStatus" - }, - "type": "array", + "ldap_dn_starts_with": { + "type": "string", "nullable": true }, - "id": { + "mobile_phone": { "type": "string", "nullable": true }, - "id_contains": { + "mobile_phone_contains": { "type": "string", "nullable": true }, - "id_ends_with": { + "mobile_phone_ends_with": { "type": "string", "nullable": true }, - "id_gt": { + "mobile_phone_gt": { "type": "string", "nullable": true }, - "id_gte": { + "mobile_phone_gte": { "type": "string", "nullable": true }, - "id_in": { + "mobile_phone_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "id_lt": { + "mobile_phone_lt": { "type": "string", "nullable": true }, - "id_lte": { + "mobile_phone_lte": { "type": "string", "nullable": true }, - "id_not": { + "mobile_phone_not": { "type": "string", "nullable": true }, - "id_not_contains": { + "mobile_phone_not_contains": { "type": "string", "nullable": true }, - "id_not_ends_with": { + "mobile_phone_not_ends_with": { "type": "string", "nullable": true }, - "id_not_in": { + "mobile_phone_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "id_not_starts_with": { + "mobile_phone_not_starts_with": { "type": "string", "nullable": true }, - "id_starts_with": { + "mobile_phone_starts_with": { "type": "string", "nullable": true }, @@ -54737,361 +54371,229 @@ "type": "string", "nullable": true }, - "package": { - "allOf": [ - { - "$ref": "#/components/schemas/CloudTowerApplicationPackageWhereInput" - } - ], - "nullable": true - }, - "placementSituation": { - "type": "string", - "nullable": true - }, - "placementSituation_contains": { - "type": "string", - "nullable": true - }, - "placementSituation_ends_with": { - "type": "string", - "nullable": true - }, - "placementSituation_gt": { - "type": "string", - "nullable": true - }, - "placementSituation_gte": { - "type": "string", - "nullable": true - }, - "placementSituation_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true - }, - "placementSituation_lt": { - "type": "string", + "password_expired": { + "type": "boolean", "nullable": true }, - "placementSituation_lte": { - "type": "string", + "password_expired_not": { + "type": "boolean", "nullable": true }, - "placementSituation_not": { + "password_updated_at": { "type": "string", "nullable": true }, - "placementSituation_not_contains": { + "password_updated_at_gt": { "type": "string", "nullable": true }, - "placementSituation_not_ends_with": { + "password_updated_at_gte": { "type": "string", "nullable": true }, - "placementSituation_not_in": { + "password_updated_at_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "placementSituation_not_starts_with": { - "type": "string", - "nullable": true - }, - "placementSituation_starts_with": { - "type": "string", - "nullable": true - }, - "placementVerb": { - "type": "string", - "nullable": true - }, - "placementVerb_contains": { - "type": "string", - "nullable": true - }, - "placementVerb_ends_with": { + "password_updated_at_lt": { "type": "string", "nullable": true }, - "placementVerb_gt": { + "password_updated_at_lte": { "type": "string", "nullable": true }, - "placementVerb_gte": { + "password_updated_at_not": { "type": "string", "nullable": true }, - "placementVerb_in": { + "password_updated_at_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "placementVerb_lt": { - "type": "string", - "nullable": true - }, - "placementVerb_lte": { - "type": "string", - "nullable": true - }, - "placementVerb_not": { - "type": "string", - "nullable": true - }, - "placementVerb_not_contains": { - "type": "string", - "nullable": true - }, - "placementVerb_not_ends_with": { - "type": "string", + "role": { + "allOf": [ + { + "$ref": "#/components/schemas/UserRole" + } + ], "nullable": true }, - "placementVerb_not_in": { + "role_in": { "items": { - "type": "string" + "$ref": "#/components/schemas/UserRole" }, "type": "array", "nullable": true }, - "placementVerb_not_starts_with": { - "type": "string", - "nullable": true - }, - "placementVerb_starts_with": { - "type": "string", - "nullable": true - }, - "resourceVersion": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "resourceVersion_gt": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "resourceVersion_gte": { - "type": "integer", - "format": "int32", + "role_not": { + "allOf": [ + { + "$ref": "#/components/schemas/UserRole" + } + ], "nullable": true }, - "resourceVersion_in": { + "role_not_in": { "items": { - "type": "integer", - "format": "int32" + "$ref": "#/components/schemas/UserRole" }, "type": "array", "nullable": true }, - "resourceVersion_lt": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "resourceVersion_lte": { - "type": "integer", - "format": "int32", + "roles_every": { + "allOf": [ + { + "$ref": "#/components/schemas/UserRoleNextWhereInput" + } + ], "nullable": true }, - "resourceVersion_not": { - "type": "integer", - "format": "int32", + "roles_none": { + "allOf": [ + { + "$ref": "#/components/schemas/UserRoleNextWhereInput" + } + ], "nullable": true }, - "resourceVersion_not_in": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array", + "roles_some": { + "allOf": [ + { + "$ref": "#/components/schemas/UserRoleNextWhereInput" + } + ], "nullable": true }, - "state": { + "source": { "allOf": [ { - "$ref": "#/components/schemas/CloudTowerApplicationState" + "$ref": "#/components/schemas/UserSource" } ], "nullable": true }, - "state_in": { + "source_in": { "items": { - "$ref": "#/components/schemas/CloudTowerApplicationState" + "$ref": "#/components/schemas/UserSource" }, "type": "array", "nullable": true }, - "state_not": { + "source_not": { "allOf": [ { - "$ref": "#/components/schemas/CloudTowerApplicationState" + "$ref": "#/components/schemas/UserSource" } ], "nullable": true }, - "state_not_in": { + "source_not_in": { "items": { - "$ref": "#/components/schemas/CloudTowerApplicationState" + "$ref": "#/components/schemas/UserSource" }, "type": "array", "nullable": true }, - "targetPackage": { + "username": { "type": "string", "nullable": true }, - "targetPackage_contains": { + "username_contains": { "type": "string", "nullable": true }, - "targetPackage_ends_with": { + "username_ends_with": { "type": "string", "nullable": true }, - "targetPackage_gt": { + "username_gt": { "type": "string", "nullable": true }, - "targetPackage_gte": { + "username_gte": { "type": "string", "nullable": true }, - "targetPackage_in": { + "username_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "targetPackage_lt": { + "username_lt": { "type": "string", "nullable": true }, - "targetPackage_lte": { + "username_lte": { "type": "string", "nullable": true }, - "targetPackage_not": { + "username_not": { "type": "string", "nullable": true }, - "targetPackage_not_contains": { + "username_not_contains": { "type": "string", "nullable": true }, - "targetPackage_not_ends_with": { + "username_not_ends_with": { "type": "string", "nullable": true }, - "targetPackage_not_in": { + "username_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "targetPackage_not_starts_with": { + "username_not_starts_with": { "type": "string", "nullable": true }, - "targetPackage_starts_with": { + "username_starts_with": { "type": "string", "nullable": true - }, - "user": { - "allOf": [ - { - "$ref": "#/components/schemas/UserWhereInput" - } - ], - "nullable": true } }, "type": "object", "additionalProperties": false }, - "CloudTowerApplicationPackageWhereInput": { + "UserRole": { + "enum": [ + "ADMIN", + "READ_ONLY", + "ROOT" + ], + "type": "string" + }, + "UserRoleNextWhereInput": { "properties": { "AND": { "items": { - "$ref": "#/components/schemas/CloudTowerApplicationPackageWhereInput" + "$ref": "#/components/schemas/UserRoleNextWhereInput" }, "type": "array", "nullable": true }, "NOT": { "items": { - "$ref": "#/components/schemas/CloudTowerApplicationPackageWhereInput" + "$ref": "#/components/schemas/UserRoleNextWhereInput" }, "type": "array", "nullable": true }, "OR": { "items": { - "$ref": "#/components/schemas/CloudTowerApplicationPackageWhereInput" - }, - "type": "array", - "nullable": true - }, - "applications_every": { - "allOf": [ - { - "$ref": "#/components/schemas/CloudTowerApplicationWhereInput" - } - ], - "nullable": true - }, - "applications_none": { - "allOf": [ - { - "$ref": "#/components/schemas/CloudTowerApplicationWhereInput" - } - ], - "nullable": true - }, - "applications_some": { - "allOf": [ - { - "$ref": "#/components/schemas/CloudTowerApplicationWhereInput" - } - ], - "nullable": true - }, - "architecture": { - "allOf": [ - { - "$ref": "#/components/schemas/Architecture" - } - ], - "nullable": true - }, - "architecture_in": { - "items": { - "$ref": "#/components/schemas/Architecture" - }, - "type": "array", - "nullable": true - }, - "architecture_not": { - "allOf": [ - { - "$ref": "#/components/schemas/Architecture" - } - ], - "nullable": true - }, - "architecture_not_in": { - "items": { - "$ref": "#/components/schemas/Architecture" + "$ref": "#/components/schemas/UserRoleNextWhereInput" }, "type": "array", "nullable": true @@ -55220,1284 +54722,1694 @@ "type": "string", "nullable": true }, - "scosVersion": { - "type": "string", - "nullable": true - }, - "scosVersion_contains": { - "type": "string", - "nullable": true - }, - "scosVersion_ends_with": { - "type": "string", - "nullable": true - }, - "scosVersion_gt": { - "type": "string", - "nullable": true - }, - "scosVersion_gte": { - "type": "string", + "platform": { + "allOf": [ + { + "$ref": "#/components/schemas/UserRolePlatform" + } + ], "nullable": true }, - "scosVersion_in": { + "platform_in": { "items": { - "type": "string" + "$ref": "#/components/schemas/UserRolePlatform" }, "type": "array", "nullable": true }, - "scosVersion_lt": { - "type": "string", - "nullable": true - }, - "scosVersion_lte": { - "type": "string", - "nullable": true - }, - "scosVersion_not": { - "type": "string", - "nullable": true - }, - "scosVersion_not_contains": { - "type": "string", - "nullable": true - }, - "scosVersion_not_ends_with": { - "type": "string", + "platform_not": { + "allOf": [ + { + "$ref": "#/components/schemas/UserRolePlatform" + } + ], "nullable": true }, - "scosVersion_not_in": { + "platform_not_in": { "items": { - "type": "string" + "$ref": "#/components/schemas/UserRolePlatform" }, "type": "array", "nullable": true }, - "scosVersion_not_starts_with": { - "type": "string", - "nullable": true - }, - "scosVersion_starts_with": { - "type": "string", - "nullable": true - }, - "version": { - "type": "string", - "nullable": true - }, - "version_contains": { - "type": "string", - "nullable": true - }, - "version_ends_with": { - "type": "string", - "nullable": true - }, - "version_gt": { - "type": "string", - "nullable": true - }, - "version_gte": { - "type": "string", + "preset": { + "allOf": [ + { + "$ref": "#/components/schemas/UserRolePreset" + } + ], "nullable": true }, - "version_in": { + "preset_in": { "items": { - "type": "string" + "$ref": "#/components/schemas/UserRolePreset" }, "type": "array", "nullable": true }, - "version_lt": { - "type": "string", - "nullable": true - }, - "version_lte": { - "type": "string", - "nullable": true - }, - "version_not": { - "type": "string", - "nullable": true - }, - "version_not_contains": { - "type": "string", - "nullable": true - }, - "version_not_ends_with": { - "type": "string", + "preset_not": { + "allOf": [ + { + "$ref": "#/components/schemas/UserRolePreset" + } + ], "nullable": true }, - "version_not_in": { + "preset_not_in": { "items": { - "type": "string" + "$ref": "#/components/schemas/UserRolePreset" }, "type": "array", "nullable": true }, - "version_not_starts_with": { - "type": "string", + "users_every": { + "allOf": [ + { + "$ref": "#/components/schemas/UserWhereInput" + } + ], "nullable": true }, - "version_starts_with": { - "type": "string", + "users_none": { + "allOf": [ + { + "$ref": "#/components/schemas/UserWhereInput" + } + ], + "nullable": true + }, + "users_some": { + "allOf": [ + { + "$ref": "#/components/schemas/UserWhereInput" + } + ], "nullable": true } }, "type": "object", "additionalProperties": false }, - "CloudTowerApplicationState": { + "UserRolePlatform": { "enum": [ - "CONFIGURE_FAILED", - "CONFIGURING", - "ERROR", - "INSTALLING", - "INSTALL_FAILED", - "RUNNING", - "SCALE_FAILED", - "SCALING", - "TERMINATE_FAILED", - "TERMINATING", - "UPGRADE_FAILED", - "UPGRADING" + "MANAGEMENT", + "SELF_SERVICE" ], "type": "string" }, - "UserWhereInput": { + "UserRolePreset": { + "enum": [ + "ADMIN", + "AUDITOR", + "READ_ONLY", + "ROOT", + "USER_ADMIN", + "VM_USER" + ], + "type": "string" + }, + "UserSource": { + "enum": [ + "AUTHN", + "LDAP", + "LOCAL" + ], + "type": "string" + }, + "DeleteCloudTowerApplicationPackageParams": { "properties": { - "AND": { - "items": { - "$ref": "#/components/schemas/UserWhereInput" - }, - "type": "array", - "nullable": true - }, - "NOT": { - "items": { - "$ref": "#/components/schemas/UserWhereInput" - }, - "type": "array", - "nullable": true - }, - "OR": { - "items": { - "$ref": "#/components/schemas/UserWhereInput" - }, - "type": "array", - "nullable": true - }, - "auth_config_id": { - "type": "string", - "nullable": true - }, - "auth_config_id_contains": { - "type": "string", - "nullable": true + "where": { + "$ref": "#/components/schemas/CloudTowerApplicationPackageWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "NestedCloudTowerApplicationPackage": { + "properties": { + "id": { + "type": "string" }, - "auth_config_id_ends_with": { - "type": "string", - "nullable": true + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "NestedUser": { + "properties": { + "id": { + "type": "string" }, - "auth_config_id_gt": { - "type": "string", + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "CloudTowerApplication": { + "properties": { + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], "nullable": true }, - "auth_config_id_gte": { - "type": "string", - "nullable": true + "id": { + "type": "string" }, - "auth_config_id_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true + "instanceStatuses": { + "properties": {}, + "type": "object" }, - "auth_config_id_lt": { - "type": "string", - "nullable": true + "name": { + "type": "string" }, - "auth_config_id_lte": { - "type": "string", + "package": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedCloudTowerApplicationPackage" + } + ], "nullable": true }, - "auth_config_id_not": { + "placementSituation": { "type": "string", "nullable": true }, - "auth_config_id_not_contains": { + "placementVerb": { "type": "string", "nullable": true }, - "auth_config_id_not_ends_with": { - "type": "string", - "nullable": true + "resourceVersion": { + "type": "integer", + "format": "int32" }, - "auth_config_id_not_in": { - "items": { - "type": "string" - }, - "type": "array", + "state": { + "allOf": [ + { + "$ref": "#/components/schemas/CloudTowerApplicationState" + } + ], "nullable": true }, - "auth_config_id_not_starts_with": { - "type": "string", - "nullable": true + "targetPackage": { + "type": "string" }, - "auth_config_id_starts_with": { - "type": "string", + "user": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedUser" + } + ], "nullable": true }, - "display_username": { - "type": "string", - "nullable": true + "vmSpec": { + "properties": {}, + "type": "object" + } + }, + "required": [ + "id", + "instanceStatuses", + "name", + "resourceVersion", + "targetPackage", + "vmSpec" + ], + "type": "object", + "additionalProperties": false + }, + "ApplicationVmSpecEnv": { + "properties": { + "value": { + "type": "string" }, - "display_username_contains": { - "type": "string", - "nullable": true + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "ApplicationVmSpecNic": { + "properties": { + "vlanId": { + "type": "string" }, - "display_username_ends_with": { - "type": "string", - "nullable": true + "mask": { + "type": "string" }, - "display_username_gt": { - "type": "string", - "nullable": true + "ip": { + "type": "string" }, - "display_username_gte": { - "type": "string", - "nullable": true + "gateway": { + "type": "string" }, - "display_username_in": { + "dhcp": { + "type": "boolean" + } + }, + "type": "object" + }, + "ApplicationVmSpecNetwork": { + "properties": { + "nics": { "items": { - "type": "string" + "$ref": "#/components/schemas/ApplicationVmSpecNic" }, - "type": "array", - "nullable": true - }, - "display_username_lt": { - "type": "string", - "nullable": true - }, - "display_username_lte": { - "type": "string", - "nullable": true - }, - "display_username_not": { - "type": "string", - "nullable": true - }, - "display_username_not_contains": { - "type": "string", - "nullable": true - }, - "display_username_not_ends_with": { - "type": "string", - "nullable": true + "type": "array" }, - "display_username_not_in": { + "dns": { "items": { "type": "string" }, - "type": "array", - "nullable": true - }, - "display_username_not_starts_with": { - "type": "string", - "nullable": true - }, - "display_username_starts_with": { - "type": "string", - "nullable": true - }, - "email_address": { - "type": "string", - "nullable": true - }, - "email_address_contains": { - "type": "string", - "nullable": true - }, - "email_address_ends_with": { - "type": "string", - "nullable": true - }, - "email_address_gt": { - "type": "string", - "nullable": true - }, - "email_address_gte": { - "type": "string", - "nullable": true - }, - "email_address_in": { + "type": "array" + } + }, + "type": "object" + }, + "ApplicationVmSpecStatus": { + "properties": { + "vmIps": { "items": { "type": "string" }, - "type": "array", - "nullable": true - }, - "email_address_lt": { - "type": "string", - "nullable": true + "type": "array" }, - "email_address_lte": { - "type": "string", - "nullable": true + "message": { + "$ref": "#/components/schemas/VmStatus" + } + }, + "type": "object" + }, + "ApplicationVmSpecStorage": { + "properties": { + "size_unit": { + "$ref": "#/components/schemas/ByteUnit" }, - "email_address_not": { - "type": "string", - "nullable": true + "size": { + "type": "integer", + "format": "int64" + } + }, + "type": "object" + }, + "ApplicationVmSpec": { + "properties": { + "vmUsage": { + "$ref": "#/components/schemas/VmUsage" }, - "email_address_not_contains": { - "type": "string", - "nullable": true + "storages": { + "items": { + "$ref": "#/components/schemas/ApplicationVmSpecStorage" + }, + "type": "array" }, - "email_address_not_ends_with": { - "type": "string", - "nullable": true + "status": { + "$ref": "#/components/schemas/ApplicationVmSpecStatus" }, - "email_address_not_in": { + "publicKeys": { "items": { "type": "string" }, - "type": "array", - "nullable": true + "type": "array" }, - "email_address_not_starts_with": { - "type": "string", - "nullable": true + "network": { + "$ref": "#/components/schemas/ApplicationVmSpecNetwork" }, - "email_address_starts_with": { - "type": "string", - "nullable": true + "name": { + "type": "string" }, - "id": { - "type": "string", - "nullable": true + "memory_unit": { + "$ref": "#/components/schemas/ByteUnit" }, - "id_contains": { - "type": "string", - "nullable": true + "memory": { + "type": "integer", + "format": "int64" }, - "id_ends_with": { - "type": "string", - "nullable": true + "internal": { + "type": "boolean" }, - "id_gt": { - "type": "string", - "nullable": true + "image": { + "type": "string" }, - "id_gte": { - "type": "string", - "nullable": true + "host": { + "type": "string" }, - "id_in": { + "env": { "items": { - "type": "string" + "$ref": "#/components/schemas/ApplicationVmSpecEnv" }, - "type": "array", - "nullable": true + "type": "array" }, - "id_lt": { - "type": "string", - "nullable": true + "cpu": { + "type": "integer", + "format": "int32" }, - "id_lte": { - "type": "string", - "nullable": true + "cluster": { + "type": "string" }, - "id_not": { - "type": "string", - "nullable": true + "cloudInitUserData": { + "type": "string" + } + }, + "type": "object" + }, + "ApplicationVmSpecPlacementSituation": { + "enum": [ + "DIFFERENT", + "SAME" + ], + "type": "string" + }, + "ApplicationVmSpecPlacementVerb": { + "enum": [ + "MUST", + "PREFER" + ], + "type": "string" + }, + "ApplicationVmSpecPlacement": { + "properties": { + "verb": { + "$ref": "#/components/schemas/ApplicationVmSpecPlacementVerb" }, - "id_not_contains": { - "type": "string", - "nullable": true + "situation": { + "$ref": "#/components/schemas/ApplicationVmSpecPlacementSituation" + } + }, + "required": [ + "verb", + "situation" + ], + "type": "object" + }, + "ApplicationVmSpecAffinityPolicy": { + "enum": [ + "MUST", + "PREFER" + ], + "type": "string" + }, + "ApplicationVmSpecDefinition": { + "properties": { + "vmAffinity": { + "$ref": "#/components/schemas/ApplicationVmSpecAffinityPolicy" }, - "id_not_ends_with": { - "type": "string", - "nullable": true + "placement": { + "$ref": "#/components/schemas/ApplicationVmSpecPlacement" }, - "id_not_in": { + "name": { + "type": "string" + }, + "group": { + "type": "string" + }, + "template": { + "$ref": "#/components/schemas/ApplicationVmSpec" + }, + "instances": { "items": { - "type": "string" + "$ref": "#/components/schemas/ApplicationVmSpec" }, - "type": "array", - "nullable": true + "type": "array" + } + }, + "type": "object" + }, + "DeployCloudTowerApplicationParams": { + "properties": { + "name": { + "type": "string" }, - "id_not_starts_with": { - "type": "string", - "nullable": true + "targetPackage": { + "type": "string" }, - "id_starts_with": { + "vmSpec": { + "$ref": "#/components/schemas/ApplicationVmSpecDefinition" + } + }, + "required": [ + "name", + "targetPackage", + "vmSpec" + ], + "type": "object" + }, + "CloudTowerApplicationWhereUniqueInput": { + "properties": { + "id": { "type": "string", "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "UpgradeCloudTowerApplicationParams": { + "properties": { + "data": { + "properties": { + "targetPackage": { + "type": "string" + } + }, + "required": [ + "targetPackage" + ], + "type": "object" }, - "internal": { - "type": "boolean", - "nullable": true - }, - "internal_not": { - "type": "boolean", - "nullable": true - }, - "ldap_dn": { - "type": "string", - "nullable": true - }, - "ldap_dn_contains": { - "type": "string", - "nullable": true + "where": { + "$ref": "#/components/schemas/CloudTowerApplicationWhereUniqueInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "UpdateCloudTowerApplicationVmSpecParams": { + "properties": { + "data": { + "properties": { + "vmSpec": { + "$ref": "#/components/schemas/ApplicationVmSpecDefinition" + } + }, + "required": [ + "vmSpec" + ], + "type": "object" }, - "ldap_dn_ends_with": { - "type": "string", - "nullable": true + "where": { + "$ref": "#/components/schemas/CloudTowerApplicationWhereUniqueInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "UninstallCloudTowerApplicationParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/CloudTowerApplicationWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "NestedApplication": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object", + "additionalProperties": false + }, + "NestedConsistencyGroup": { + "properties": { + "id": { + "type": "string" }, - "ldap_dn_gt": { - "type": "string", - "nullable": true + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "NestedDatacenter": { + "properties": { + "id": { + "type": "string" }, - "ldap_dn_gte": { + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "NestedEverouteCluster": { + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "NestedLabel": { + "properties": { + "id": { + "type": "string" + }, + "key": { + "type": "string" + }, + "value": { "type": "string", "nullable": true + } + }, + "required": [ + "id", + "key" + ], + "type": "object", + "additionalProperties": false + }, + "MetroCheckStatusEnum": { + "enum": [ + "CRITICAL", + "HEALTHY", + "INFO", + "NOTICE" + ], + "type": "string" + }, + "NestedMetroCheckItem": { + "properties": { + "critical": { + "items": { + "type": "string" + }, + "type": "array" }, - "ldap_dn_in": { + "info": { "items": { "type": "string" }, - "type": "array", - "nullable": true + "type": "array" }, - "ldap_dn_lt": { - "type": "string", - "nullable": true + "key": { + "type": "string" }, - "ldap_dn_lte": { - "type": "string", - "nullable": true + "labels": { + "properties": {}, + "type": "object" }, - "ldap_dn_not": { - "type": "string", - "nullable": true + "notice": { + "items": { + "type": "string" + }, + "type": "array" }, - "ldap_dn_not_contains": { - "type": "string", - "nullable": true + "status": { + "$ref": "#/components/schemas/MetroCheckStatusEnum" + } + }, + "required": [ + "critical", + "info", + "key", + "labels", + "notice", + "status" + ], + "type": "object", + "additionalProperties": false + }, + "NestedMetroCheckResult": { + "properties": { + "critical": { + "type": "integer", + "format": "int32" }, - "ldap_dn_not_ends_with": { - "type": "string", - "nullable": true + "info": { + "type": "integer", + "format": "int32" }, - "ldap_dn_not_in": { + "items": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedMetroCheckItem" }, - "type": "array", - "nullable": true + "type": "array" }, - "ldap_dn_not_starts_with": { - "type": "string", - "nullable": true + "notice": { + "type": "integer", + "format": "int32" }, - "ldap_dn_starts_with": { - "type": "string", - "nullable": true + "status": { + "$ref": "#/components/schemas/MetroCheckStatusEnum" + } + }, + "required": [ + "critical", + "info", + "items", + "notice", + "status" + ], + "type": "object", + "additionalProperties": false + }, + "NestedMetroAvailabilityChecklist": { + "properties": { + "primaryZone": { + "$ref": "#/components/schemas/NestedMetroCheckResult" }, - "mobile_phone": { - "type": "string", - "nullable": true + "primaryZoneAndWitness": { + "$ref": "#/components/schemas/NestedMetroCheckResult" }, - "mobile_phone_contains": { - "type": "string", - "nullable": true + "secondaryZone": { + "$ref": "#/components/schemas/NestedMetroCheckResult" }, - "mobile_phone_ends_with": { - "type": "string", - "nullable": true + "secondaryZoneAndWitness": { + "$ref": "#/components/schemas/NestedMetroCheckResult" }, - "mobile_phone_gt": { - "type": "string", - "nullable": true + "witness": { + "$ref": "#/components/schemas/NestedMetroCheckResult" }, - "mobile_phone_gte": { + "zoneAndZone": { + "$ref": "#/components/schemas/NestedMetroCheckResult" + } + }, + "required": [ + "primaryZone", + "primaryZoneAndWitness", + "secondaryZone", + "secondaryZoneAndWitness", + "witness", + "zoneAndZone" + ], + "type": "object", + "additionalProperties": false + }, + "NestedClusterSettings": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object", + "additionalProperties": false + }, + "NestedVcenterAccount": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object", + "additionalProperties": false + }, + "NestedVds": { + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "NestedVmFolder": { + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "NestedVmTemplate": { + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "NestedWitness": { + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "NestedZone": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object", + "additionalProperties": false + }, + "Cluster": { + "properties": { + "application_highest_version": { "type": "string", "nullable": true }, - "mobile_phone_in": { + "applications": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedApplication" }, "type": "array", "nullable": true }, - "mobile_phone_lt": { - "type": "string", - "nullable": true + "architecture": { + "$ref": "#/components/schemas/Architecture" }, - "mobile_phone_lte": { - "type": "string", + "auto_converge": { + "type": "boolean", "nullable": true }, - "mobile_phone_not": { - "type": "string", - "nullable": true + "connect_state": { + "$ref": "#/components/schemas/ConnectState" }, - "mobile_phone_not_contains": { - "type": "string", + "consistency_groups": { + "items": { + "$ref": "#/components/schemas/NestedConsistencyGroup" + }, + "type": "array", "nullable": true }, - "mobile_phone_not_ends_with": { + "current_cpu_model": { "type": "string", "nullable": true }, - "mobile_phone_not_in": { + "datacenters": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedDatacenter" }, "type": "array", "nullable": true }, - "mobile_phone_not_starts_with": { + "disconnected_date": { "type": "string", "nullable": true }, - "mobile_phone_starts_with": { - "type": "string", + "disconnected_reason": { + "allOf": [ + { + "$ref": "#/components/schemas/ClusterConnectorErrorCode" + } + ], "nullable": true }, - "name": { - "type": "string", + "dns": { + "items": { + "type": "string" + }, + "type": "array" + }, + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], "nullable": true }, - "name_contains": { - "type": "string", + "everoute_cluster": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedEverouteCluster" + } + ], "nullable": true }, - "name_ends_with": { - "type": "string", + "failure_data_space": { + "type": "integer", + "format": "int64", "nullable": true }, - "name_gt": { - "type": "string", + "has_metrox": { + "type": "boolean", "nullable": true }, - "name_gte": { - "type": "string", + "host_num": { + "type": "integer", + "format": "int32", "nullable": true }, - "name_in": { + "hosts": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedHost" }, "type": "array", "nullable": true }, - "name_lt": { - "type": "string", + "hypervisor": { + "allOf": [ + { + "$ref": "#/components/schemas/Hypervisor" + } + ], "nullable": true }, - "name_lte": { - "type": "string", - "nullable": true + "id": { + "type": "string" }, - "name_not": { - "type": "string", - "nullable": true + "ip": { + "type": "string" }, - "name_not_contains": { - "type": "string", + "is_all_flash": { + "type": "boolean", "nullable": true }, - "name_not_ends_with": { + "iscsi_vip": { "type": "string", "nullable": true }, - "name_not_in": { + "labels": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedLabel" }, "type": "array", "nullable": true }, - "name_not_starts_with": { + "license_expire_date": { "type": "string", "nullable": true }, - "name_starts_with": { + "license_serial": { "type": "string", "nullable": true }, - "password_expired": { - "type": "boolean", - "nullable": true - }, - "password_expired_not": { - "type": "boolean", + "license_sign_date": { + "type": "string", "nullable": true }, - "password_updated_at": { - "type": "string", - "nullable": true - }, - "password_updated_at_gt": { - "type": "string", + "license_type": { + "allOf": [ + { + "$ref": "#/components/schemas/LicenseType" + } + ], "nullable": true }, - "password_updated_at_gte": { + "local_id": { "type": "string", "nullable": true }, - "password_updated_at_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true - }, - "password_updated_at_lt": { + "maintenance_end_date": { "type": "string", "nullable": true }, - "password_updated_at_lte": { + "maintenance_start_date": { "type": "string", "nullable": true }, - "password_updated_at_not": { + "management_vip": { "type": "string", "nullable": true }, - "password_updated_at_not_in": { - "items": { - "type": "string" - }, - "type": "array", + "max_chunk_num": { + "type": "integer", + "format": "int32", "nullable": true }, - "role": { - "allOf": [ - { - "$ref": "#/components/schemas/UserRole" - } - ], + "max_physical_data_capacity": { + "type": "integer", + "format": "int64", "nullable": true }, - "role_in": { - "items": { - "$ref": "#/components/schemas/UserRole" - }, - "type": "array", + "max_physical_data_capacity_per_node": { + "type": "integer", + "format": "int64", "nullable": true }, - "role_not": { + "metro_availability_checklist": { "allOf": [ { - "$ref": "#/components/schemas/UserRole" + "$ref": "#/components/schemas/NestedMetroAvailabilityChecklist" } ], "nullable": true }, - "role_not_in": { - "items": { - "$ref": "#/components/schemas/UserRole" - }, - "type": "array", - "nullable": true - }, - "roles_every": { - "allOf": [ - { - "$ref": "#/components/schemas/UserRoleNextWhereInput" - } - ], + "mgt_gateway": { + "type": "string", "nullable": true }, - "roles_none": { - "allOf": [ - { - "$ref": "#/components/schemas/UserRoleNextWhereInput" - } - ], + "mgt_netmask": { + "type": "string", "nullable": true }, - "roles_some": { - "allOf": [ - { - "$ref": "#/components/schemas/UserRoleNextWhereInput" - } - ], + "migration_data_size": { + "type": "integer", + "format": "int64", "nullable": true }, - "source": { - "allOf": [ - { - "$ref": "#/components/schemas/UserSource" - } - ], + "migration_speed": { + "type": "integer", + "format": "int64", "nullable": true }, - "source_in": { - "items": { - "$ref": "#/components/schemas/UserSource" - }, - "type": "array", - "nullable": true + "name": { + "type": "string" }, - "source_not": { + "ntp_mode": { "allOf": [ { - "$ref": "#/components/schemas/UserSource" + "$ref": "#/components/schemas/NtpMode" } ], "nullable": true }, - "source_not_in": { - "items": { - "$ref": "#/components/schemas/UserSource" - }, - "type": "array", - "nullable": true - }, - "username": { - "type": "string", - "nullable": true - }, - "username_contains": { - "type": "string", - "nullable": true - }, - "username_ends_with": { - "type": "string", - "nullable": true - }, - "username_gt": { - "type": "string", - "nullable": true - }, - "username_gte": { - "type": "string", - "nullable": true - }, - "username_in": { + "ntp_servers": { "items": { "type": "string" }, - "type": "array", - "nullable": true - }, - "username_lt": { - "type": "string", - "nullable": true - }, - "username_lte": { - "type": "string", - "nullable": true - }, - "username_not": { - "type": "string", - "nullable": true - }, - "username_not_contains": { - "type": "string", - "nullable": true - }, - "username_not_ends_with": { - "type": "string", - "nullable": true + "type": "array" }, - "username_not_in": { - "items": { - "type": "string" - }, - "type": "array", + "nvme_over_rdma_enabled": { + "type": "boolean", "nullable": true }, - "username_not_starts_with": { - "type": "string", + "nvme_over_tcp_enabled": { + "type": "boolean", "nullable": true }, - "username_starts_with": { - "type": "string", - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "UserRole": { - "enum": [ - "ADMIN", - "READ_ONLY", - "ROOT" - ], - "type": "string" - }, - "UserRoleNextWhereInput": { - "properties": { - "AND": { - "items": { - "$ref": "#/components/schemas/UserRoleNextWhereInput" - }, - "type": "array", + "nvmf_enabled": { + "type": "boolean", "nullable": true }, - "NOT": { - "items": { - "$ref": "#/components/schemas/UserRoleNextWhereInput" - }, - "type": "array", + "pmem_enabled": { + "type": "boolean", "nullable": true }, - "OR": { - "items": { - "$ref": "#/components/schemas/UserRoleNextWhereInput" - }, - "type": "array", + "provisioned_cpu_cores": { + "type": "integer", + "format": "int32", "nullable": true }, - "id": { - "type": "string", + "provisioned_cpu_cores_for_active_vm": { + "type": "integer", + "format": "int32", "nullable": true }, - "id_contains": { - "type": "string", + "provisioned_for_active_vm_ratio": { + "type": "number", + "format": "double", "nullable": true }, - "id_ends_with": { - "type": "string", + "provisioned_memory_bytes": { + "type": "integer", + "format": "int64", "nullable": true }, - "id_gt": { - "type": "string", + "provisioned_ratio": { + "type": "number", + "format": "double", "nullable": true }, - "id_gte": { - "type": "string", + "rdma_enabled": { + "type": "boolean", "nullable": true }, - "id_in": { + "recommended_cpu_models": { "items": { "type": "string" }, - "type": "array", - "nullable": true - }, - "id_lt": { - "type": "string", - "nullable": true + "type": "array" }, - "id_lte": { - "type": "string", + "recover_data_size": { + "type": "integer", + "format": "int64", "nullable": true }, - "id_not": { - "type": "string", + "recover_speed": { + "type": "integer", + "format": "int64", "nullable": true }, - "id_not_contains": { - "type": "string", + "reserved_cpu_cores_for_system_service": { + "type": "integer", + "format": "int32", "nullable": true }, - "id_not_ends_with": { - "type": "string", + "running_vm_num": { + "type": "integer", + "format": "int32", "nullable": true }, - "id_not_in": { - "items": { - "type": "string" - }, - "type": "array", + "settings": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedClusterSettings" + } + ], "nullable": true }, - "id_not_starts_with": { - "type": "string", + "software_edition": { + "allOf": [ + { + "$ref": "#/components/schemas/SoftwareEdition" + } + ], "nullable": true }, - "id_starts_with": { - "type": "string", + "stopped_vm_num": { + "type": "integer", + "format": "int32", "nullable": true }, - "name": { - "type": "string", + "stretch": { + "type": "boolean", "nullable": true }, - "name_contains": { - "type": "string", + "suspended_vm_num": { + "type": "integer", + "format": "int32", "nullable": true }, - "name_ends_with": { - "type": "string", + "total_cache_capacity": { + "type": "integer", + "format": "int64", "nullable": true }, - "name_gt": { - "type": "string", + "total_cpu_cores": { + "type": "integer", + "format": "int32", "nullable": true }, - "name_gte": { - "type": "string", + "total_cpu_hz": { + "type": "integer", + "format": "int64", "nullable": true }, - "name_in": { + "total_cpu_models": { "items": { "type": "string" }, - "type": "array", - "nullable": true + "type": "array" }, - "name_lt": { - "type": "string", + "total_cpu_sockets": { + "type": "integer", + "format": "int32", "nullable": true }, - "name_lte": { - "type": "string", + "total_data_capacity": { + "type": "integer", + "format": "int64", "nullable": true }, - "name_not": { - "type": "string", + "total_memory_bytes": { + "type": "integer", + "format": "int64", "nullable": true }, - "name_not_contains": { + "type": { + "$ref": "#/components/schemas/ClusterType" + }, + "upgrade_tool_version": { "type": "string", "nullable": true }, - "name_not_ends_with": { - "type": "string", + "used_cpu_hz": { + "type": "number", + "format": "double", "nullable": true }, - "name_not_in": { - "items": { - "type": "string" - }, - "type": "array", + "used_data_space": { + "type": "integer", + "format": "int64", "nullable": true }, - "name_not_starts_with": { - "type": "string", + "used_memory_bytes": { + "type": "number", + "format": "double", "nullable": true }, - "name_starts_with": { - "type": "string", + "valid_data_space": { + "type": "integer", + "format": "int64", "nullable": true }, - "platform": { + "vcenterAccount": { "allOf": [ { - "$ref": "#/components/schemas/UserRolePlatform" + "$ref": "#/components/schemas/NestedVcenterAccount" } ], "nullable": true }, - "platform_in": { + "vdses": { "items": { - "$ref": "#/components/schemas/UserRolePlatform" + "$ref": "#/components/schemas/NestedVds" }, "type": "array", "nullable": true }, - "platform_not": { - "allOf": [ - { - "$ref": "#/components/schemas/UserRolePlatform" - } - ], + "version": { + "type": "string" + }, + "vhost_enabled": { + "type": "boolean", "nullable": true }, - "platform_not_in": { + "vm_folders": { "items": { - "$ref": "#/components/schemas/UserRolePlatform" + "$ref": "#/components/schemas/NestedVmFolder" }, "type": "array", "nullable": true }, - "preset": { - "allOf": [ - { - "$ref": "#/components/schemas/UserRolePreset" - } - ], + "vm_num": { + "type": "integer", + "format": "int32", "nullable": true }, - "preset_in": { + "vm_templates": { "items": { - "$ref": "#/components/schemas/UserRolePreset" + "$ref": "#/components/schemas/NestedVmTemplate" }, "type": "array", "nullable": true }, - "preset_not": { - "allOf": [ - { - "$ref": "#/components/schemas/UserRolePreset" - } - ], - "nullable": true - }, - "preset_not_in": { + "vms": { "items": { - "$ref": "#/components/schemas/UserRolePreset" + "$ref": "#/components/schemas/NestedVm" }, "type": "array", "nullable": true }, - "users_every": { - "allOf": [ - { - "$ref": "#/components/schemas/UserWhereInput" - } - ], - "nullable": true - }, - "users_none": { + "witness": { "allOf": [ { - "$ref": "#/components/schemas/UserWhereInput" + "$ref": "#/components/schemas/NestedWitness" } ], "nullable": true }, - "users_some": { - "allOf": [ - { - "$ref": "#/components/schemas/UserWhereInput" - } - ], + "zones": { + "items": { + "$ref": "#/components/schemas/NestedZone" + }, + "type": "array", "nullable": true } }, + "required": [ + "architecture", + "connect_state", + "dns", + "id", + "ip", + "name", + "ntp_servers", + "recommended_cpu_models", + "total_cpu_models", + "type", + "version" + ], "type": "object", "additionalProperties": false }, - "UserRolePlatform": { - "enum": [ - "MANAGEMENT", - "SELF_SERVICE" - ], - "type": "string" - }, - "UserRolePreset": { - "enum": [ - "ADMIN", - "AUDITOR", - "READ_ONLY", - "ROOT", - "USER_ADMIN", - "VM_USER" - ], - "type": "string" - }, - "UserSource": { - "enum": [ - "AUTHN", - "LDAP", - "LOCAL" - ], - "type": "string" - }, - "BackupServiceNetworkType": { - "enum": [ - "MANAGEMENT", - "NEW_NIC", - "STORAGE" + "WithTask_Cluster_": { + "properties": { + "task_id": { + "type": "string", + "nullable": true + }, + "data": { + "$ref": "#/components/schemas/Cluster" + } + }, + "required": [ + "data" ], - "type": "string" + "type": "object" }, - "BackupStoreRepositoryWhereInput": { + "ClusterCreationParams": { "properties": { - "AND": { - "items": { - "$ref": "#/components/schemas/BackupStoreRepositoryWhereInput" - }, - "type": "array", - "nullable": true + "datacenter_id": { + "type": "string" }, - "NOT": { - "items": { - "$ref": "#/components/schemas/BackupStoreRepositoryWhereInput" - }, - "type": "array", - "nullable": true + "secondary_zone_datacenter_id": { + "type": "string" }, - "OR": { - "items": { - "$ref": "#/components/schemas/BackupStoreRepositoryWhereInput" - }, - "type": "array", - "nullable": true + "primary_zone_datacenter_id": { + "type": "string" }, - "backup_plans_every": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupPlanWhereInput" - } - ], - "nullable": true + "password": { + "type": "string" }, - "backup_plans_none": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupPlanWhereInput" - } - ], - "nullable": true + "username": { + "type": "string" }, - "backup_plans_some": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupPlanWhereInput" + "ip": { + "type": "string" + } + }, + "required": [ + "password", + "username", + "ip" + ], + "type": "object" + }, + "ClusterUpdationParams": { + "properties": { + "data": { + "properties": { + "secondary_zone_id": { + "type": "string" + }, + "primary_zone_id": { + "type": "string" + }, + "datacenter_id": { + "type": "string" + }, + "secondary_zone_datacenter_id": { + "type": "string" + }, + "primary_zone_datacenter_id": { + "type": "string" + }, + "password": { + "type": "string" + }, + "username": { + "type": "string" + }, + "ip": { + "type": "string" } - ], - "nullable": true + }, + "type": "object" }, - "backup_restore_points_every": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupRestorePointWhereInput" + "where": { + "$ref": "#/components/schemas/ClusterWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "ClusterLicenseUpdationParams": { + "properties": { + "data": { + "properties": { + "license": { + "type": "string" } + }, + "required": [ + "license" ], - "nullable": true + "type": "object" }, - "backup_restore_points_none": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupRestorePointWhereInput" - } - ], - "nullable": true + "where": { + "$ref": "#/components/schemas/ClusterWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "MgtIpMapper": { + "properties": { + "ip": { + "type": "string" }, - "backup_restore_points_some": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupRestorePointWhereInput" + "host_id": { + "type": "string" + } + }, + "required": [ + "ip", + "host_id" + ], + "type": "object" + }, + "ClusterNetworkSettingUpdationParams": { + "properties": { + "data": { + "properties": { + "mgt_ip_mapper": { + "items": { + "$ref": "#/components/schemas/MgtIpMapper" + }, + "type": "array" + }, + "mgt_netmask": { + "type": "string" + }, + "mgt_gateway": { + "type": "string" + }, + "ntp_mode": { + "$ref": "#/components/schemas/NtpMode" + }, + "ntp_servers": { + "items": { + "type": "string" + }, + "type": "array" + }, + "dns": { + "items": { + "type": "string" + }, + "type": "array" + }, + "iscsi_vip": { + "type": "string" + }, + "management_vip": { + "type": "string" } - ], - "nullable": true + }, + "type": "object" }, - "backup_service": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupServiceWhereInput" + "where": { + "$ref": "#/components/schemas/ClusterWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "ClusterVirtualizationUpdationParams": { + "properties": { + "data": { + "properties": { + "auto_converge": { + "type": "boolean" + }, + "current_cpu_model": { + "type": "string" } - ], - "nullable": true - }, - "createdAt": { - "type": "string", - "nullable": true - }, - "createdAt_gt": { - "type": "string", - "nullable": true - }, - "createdAt_gte": { - "type": "string", - "nullable": true - }, - "createdAt_in": { - "items": { - "type": "string" }, - "type": "array", - "nullable": true - }, - "createdAt_lt": { - "type": "string", - "nullable": true + "type": "object" }, - "createdAt_lte": { - "type": "string", - "nullable": true + "where": { + "$ref": "#/components/schemas/ClusterWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "NestedVmRecycleBin": { + "properties": { + "enabled": { + "type": "boolean" }, - "createdAt_not": { - "type": "string", - "nullable": true + "retain": { + "type": "integer", + "format": "int32" + } + }, + "required": [ + "enabled", + "retain" + ], + "type": "object", + "additionalProperties": false + }, + "ClusterSettings": { + "properties": { + "cluster": { + "$ref": "#/components/schemas/NestedCluster" }, - "createdAt_not_in": { - "items": { - "type": "string" - }, - "type": "array", + "default_ha": { + "type": "boolean", "nullable": true }, - "description": { - "type": "string", + "default_storage_policy": { + "allOf": [ + { + "$ref": "#/components/schemas/VmVolumeElfStoragePolicyType" + } + ], "nullable": true }, - "description_contains": { - "type": "string", + "enabled_iscsi": { + "type": "boolean", "nullable": true }, - "description_ends_with": { - "type": "string", - "nullable": true + "id": { + "type": "string" }, - "description_gt": { - "type": "string", + "vm_recycle_bin": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedVmRecycleBin" + } + ], "nullable": true - }, - "description_gte": { + } + }, + "required": [ + "cluster", + "id" + ], + "type": "object", + "additionalProperties": false + }, + "WithTask_ClusterSettings_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "description_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true + "data": { + "$ref": "#/components/schemas/ClusterSettings" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "ClusterHaUpdationParams": { + "properties": { + "ha": { + "type": "boolean" }, - "description_lt": { - "type": "string", - "nullable": true + "where": { + "$ref": "#/components/schemas/ClusterWhereInput" + } + }, + "required": [ + "ha", + "where" + ], + "type": "object" + }, + "ClusterEnableIscsiUpdationParams": { + "properties": { + "enable_iscsi": { + "type": "boolean" }, - "description_lte": { + "where": { + "$ref": "#/components/schemas/ClusterWhereInput" + } + }, + "required": [ + "enable_iscsi", + "where" + ], + "type": "object" + }, + "DeleteCluster": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "WithTask_DeleteCluster_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "description_not": { - "type": "string", - "nullable": true + "data": { + "$ref": "#/components/schemas/DeleteCluster" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "ClusterDeletionParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/ClusterWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "MetaLeader": { + "properties": { + "meta_leader": { + "type": "string" }, - "description_not_contains": { - "type": "string", - "nullable": true + "cluster_id": { + "type": "string" + } + }, + "required": [ + "meta_leader", + "cluster_id" + ], + "type": "object" + }, + "GetMetaLeaderRequestBody": { + "properties": { + "where": { + "$ref": "#/components/schemas/ClusterWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "NestedIscsiLunSnapshot": { + "properties": { + "id": { + "type": "string" }, - "description_not_ends_with": { - "type": "string", - "nullable": true + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "NestedNvmfNamespaceSnapshot": { + "properties": { + "id": { + "type": "string" }, - "description_not_in": { + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "ConsistencyGroupSnapshot": { + "properties": { + "Iscsi_lun_snapshots": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedIscsiLunSnapshot" }, "type": "array", "nullable": true }, - "description_not_starts_with": { - "type": "string", - "nullable": true - }, - "description_starts_with": { - "type": "string", - "nullable": true - }, - "entityAsyncStatus": { + "consistency_group": { "allOf": [ { - "$ref": "#/components/schemas/EntityAsyncStatus" + "$ref": "#/components/schemas/NestedConsistencyGroup" } ], "nullable": true }, - "entityAsyncStatus_in": { - "items": { - "$ref": "#/components/schemas/EntityAsyncStatus" - }, - "type": "array", - "nullable": true - }, - "entityAsyncStatus_not": { + "entityAsyncStatus": { "allOf": [ { "$ref": "#/components/schemas/EntityAsyncStatus" @@ -56505,3137 +56417,3929 @@ ], "nullable": true }, - "entityAsyncStatus_not_in": { + "id": { + "type": "string" + }, + "labels": { "items": { - "$ref": "#/components/schemas/EntityAsyncStatus" + "$ref": "#/components/schemas/NestedLabel" }, "type": "array", "nullable": true }, - "error_code": { - "type": "string", - "nullable": true - }, - "error_code_contains": { - "type": "string", - "nullable": true - }, - "error_code_ends_with": { - "type": "string", - "nullable": true + "local_created_at": { + "type": "string" }, - "error_code_gt": { - "type": "string", - "nullable": true + "local_id": { + "type": "string" }, - "error_code_gte": { - "type": "string", - "nullable": true + "name": { + "type": "string" }, - "error_code_in": { + "nvmf_namespace_snapshots": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedNvmfNamespaceSnapshot" }, "type": "array", "nullable": true }, - "error_code_lt": { - "type": "string", - "nullable": true - }, - "error_code_lte": { - "type": "string", - "nullable": true - }, - "error_code_not": { + "unique_size": { + "type": "integer", + "format": "int64" + } + }, + "required": [ + "id", + "local_created_at", + "local_id", + "name", + "unique_size" + ], + "type": "object", + "additionalProperties": false + }, + "WithTask_ConsistencyGroupSnapshot_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "error_code_not_contains": { - "type": "string", - "nullable": true + "data": { + "$ref": "#/components/schemas/ConsistencyGroupSnapshot" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "ConsistencyGroupSnapshotCreationParams": { + "properties": { + "consistency_group_id": { + "type": "string" }, - "error_code_not_ends_with": { + "name": { + "type": "string" + } + }, + "required": [ + "consistency_group_id", + "name" + ], + "type": "object" + }, + "ConsistencyGroupSnapshotUpdationParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/ConsistencyGroupSnapshotWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "DeleteConsistencyGroupSnapshot": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "WithTask_DeleteConsistencyGroupSnapshot_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "error_code_not_in": { - "items": { - "type": "string" + "data": { + "$ref": "#/components/schemas/DeleteConsistencyGroupSnapshot" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "ConsistencyGroupSnapshotDeletionParams": { + "properties": { + "data": { + "properties": { + "remain_volume_snapshot": { + "type": "boolean" + } }, - "type": "array", - "nullable": true + "required": [ + "remain_volume_snapshot" + ], + "type": "object" }, - "error_code_not_starts_with": { - "type": "string", - "nullable": true + "where": { + "$ref": "#/components/schemas/ConsistencyGroupSnapshotWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "NestedConsistencyGroupSnapshot": { + "properties": { + "id": { + "type": "string" }, - "error_code_starts_with": { - "type": "string", - "nullable": true + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "NestedIscsiLun": { + "properties": { + "id": { + "type": "string" }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "NestedNvmfNamespace": { + "properties": { "id": { - "type": "string", - "nullable": true + "type": "string" }, - "id_contains": { - "type": "string", - "nullable": true + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "ConsistencyGroup": { + "properties": { + "cluster": { + "$ref": "#/components/schemas/NestedCluster" }, - "id_ends_with": { - "type": "string", + "consistency_group_snapshots": { + "items": { + "$ref": "#/components/schemas/NestedConsistencyGroupSnapshot" + }, + "type": "array", "nullable": true }, - "id_gt": { - "type": "string", - "nullable": true + "description": { + "type": "string" }, - "id_gte": { - "type": "string", + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], "nullable": true }, - "id_in": { + "id": { + "type": "string" + }, + "iscsi_luns": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedIscsiLun" }, "type": "array", "nullable": true }, - "id_lt": { - "type": "string", - "nullable": true - }, - "id_lte": { - "type": "string", + "labels": { + "items": { + "$ref": "#/components/schemas/NestedLabel" + }, + "type": "array", "nullable": true }, - "id_not": { - "type": "string", - "nullable": true + "local_created_at": { + "type": "string" }, - "id_not_contains": { - "type": "string", - "nullable": true + "local_id": { + "type": "string" }, - "id_not_ends_with": { - "type": "string", - "nullable": true + "name": { + "type": "string" }, - "id_not_in": { + "namespaces": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedNvmfNamespace" }, "type": "array", "nullable": true }, - "id_not_starts_with": { + "unique_size": { + "type": "integer", + "format": "int64" + } + }, + "required": [ + "cluster", + "description", + "id", + "local_created_at", + "local_id", + "name", + "unique_size" + ], + "type": "object", + "additionalProperties": false + }, + "WithTask_ConsistencyGroup_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "id_starts_with": { - "type": "string", - "nullable": true + "data": { + "$ref": "#/components/schemas/ConsistencyGroup" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "ConsistencyGroupCreationParams": { + "properties": { + "namespaces_ids": { + "items": { + "type": "string" + }, + "type": "array" }, - "iscsi_chap_name": { - "type": "string", - "nullable": true + "iscsi_luns_ids": { + "items": { + "type": "string" + }, + "type": "array" }, - "iscsi_chap_name_contains": { - "type": "string", - "nullable": true + "description": { + "type": "string" }, - "iscsi_chap_name_ends_with": { - "type": "string", - "nullable": true + "cluster_id": { + "type": "string" }, - "iscsi_chap_name_gt": { - "type": "string", - "nullable": true + "name": { + "type": "string" + } + }, + "required": [ + "namespaces_ids", + "iscsi_luns_ids", + "cluster_id", + "name" + ], + "type": "object" + }, + "ConsistencyGroupUpdationParams": { + "properties": { + "data": { + "properties": { + "remain_volume_snapshot": { + "type": "boolean" + }, + "namespaces_ids": { + "items": { + "type": "string" + }, + "type": "array" + }, + "iscsi_luns_ids": { + "items": { + "type": "string" + }, + "type": "array" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "type": "object" }, - "iscsi_chap_name_gte": { + "where": { + "$ref": "#/components/schemas/ConsistencyGroupWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "DeleteConsistencyGroup": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "WithTask_DeleteConsistencyGroup_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "iscsi_chap_name_in": { - "items": { - "type": "string" + "data": { + "$ref": "#/components/schemas/DeleteConsistencyGroup" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "ConsistencyGroupDeletionParams": { + "properties": { + "data": { + "properties": { + "remain_volume_snapshot": { + "type": "boolean" + } }, - "type": "array", - "nullable": true + "type": "object" }, - "iscsi_chap_name_lt": { - "type": "string", - "nullable": true + "where": { + "$ref": "#/components/schemas/ConsistencyGroupWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "NestedElfImage": { + "properties": { + "id": { + "type": "string" }, - "iscsi_chap_name_lte": { - "type": "string", - "nullable": true + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "NestedVmDisk": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object", + "additionalProperties": false + }, + "NestedVmSnapshot": { + "properties": { + "id": { + "type": "string" }, - "iscsi_chap_name_not": { - "type": "string", + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "ContentLibraryImage": { + "properties": { + "clusters": { + "items": { + "$ref": "#/components/schemas/NestedCluster" + }, + "type": "array", "nullable": true }, - "iscsi_chap_name_not_contains": { - "type": "string", - "nullable": true + "createdAt": { + "type": "string" }, - "iscsi_chap_name_not_ends_with": { - "type": "string", - "nullable": true + "description": { + "type": "string" }, - "iscsi_chap_name_not_in": { + "elf_image_uuids": { "items": { "type": "string" }, + "type": "array" + }, + "elf_images": { + "items": { + "$ref": "#/components/schemas/NestedElfImage" + }, "type": "array", "nullable": true }, - "iscsi_chap_name_not_starts_with": { - "type": "string", + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], "nullable": true }, - "iscsi_chap_name_starts_with": { - "type": "string", - "nullable": true + "id": { + "type": "string" }, - "iscsi_chap_secret": { - "type": "string", + "iscsi_luns": { + "items": { + "$ref": "#/components/schemas/NestedIscsiLun" + }, + "type": "array", "nullable": true }, - "iscsi_chap_secret_contains": { - "type": "string", + "labels": { + "items": { + "$ref": "#/components/schemas/NestedLabel" + }, + "type": "array", "nullable": true }, - "iscsi_chap_secret_ends_with": { - "type": "string", - "nullable": true + "name": { + "type": "string" }, - "iscsi_chap_secret_gt": { - "type": "string", - "nullable": true + "path": { + "type": "string" }, - "iscsi_chap_secret_gte": { - "type": "string", - "nullable": true + "size": { + "type": "integer", + "format": "int64" }, - "iscsi_chap_secret_in": { + "vm_disks": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedVmDisk" }, "type": "array", "nullable": true }, - "iscsi_chap_secret_lt": { - "type": "string", - "nullable": true - }, - "iscsi_chap_secret_lte": { - "type": "string", + "vm_snapshots": { + "items": { + "$ref": "#/components/schemas/NestedVmSnapshot" + }, + "type": "array", "nullable": true }, - "iscsi_chap_secret_not": { - "type": "string", - "nullable": true - }, - "iscsi_chap_secret_not_contains": { - "type": "string", - "nullable": true - }, - "iscsi_chap_secret_not_ends_with": { - "type": "string", - "nullable": true - }, - "iscsi_chap_secret_not_in": { + "vm_templates": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedVmTemplate" }, "type": "array", "nullable": true - }, - "iscsi_chap_secret_not_starts_with": { + } + }, + "required": [ + "createdAt", + "description", + "elf_image_uuids", + "id", + "name", + "path", + "size" + ], + "type": "object", + "additionalProperties": false + }, + "WithTask_ContentLibraryImage_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "iscsi_chap_secret_starts_with": { - "type": "string", - "nullable": true + "data": { + "$ref": "#/components/schemas/ContentLibraryImage" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "ContentLibraryImageUpdationParamsData": { + "properties": { + "clusters": { + "$ref": "#/components/schemas/ClusterWhereInput" }, - "iscsi_ip": { - "type": "string", - "nullable": true + "description": { + "type": "string" }, - "iscsi_ip_contains": { - "type": "string", - "nullable": true + "name": { + "type": "string" + } + }, + "type": "object" + }, + "ContentLibraryImageUpdationParams": { + "properties": { + "data": { + "$ref": "#/components/schemas/ContentLibraryImageUpdationParamsData" }, - "iscsi_ip_ends_with": { - "type": "string", - "nullable": true + "where": { + "$ref": "#/components/schemas/ContentLibraryImageWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "ContentLibraryImageUpdationClusterParamsData": { + "properties": { + "clusters": { + "$ref": "#/components/schemas/ClusterWhereInput" + } + }, + "required": [ + "clusters" + ], + "type": "object" + }, + "ContentLibraryImageUpdationClusterParams": { + "properties": { + "data": { + "$ref": "#/components/schemas/ContentLibraryImageUpdationClusterParamsData" }, - "iscsi_ip_gt": { + "where": { + "$ref": "#/components/schemas/ContentLibraryImageWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "DeleteContentLibraryImage": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "WithTask_DeleteContentLibraryImage_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "iscsi_ip_gte": { - "type": "string", - "nullable": true + "data": { + "$ref": "#/components/schemas/DeleteContentLibraryImage" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "ContentLibraryImageDeletionParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/ContentLibraryImageWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "ContentLibraryImageImportData": { + "properties": { + "url": { + "type": "string" }, - "iscsi_ip_in": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "cluster": { + "$ref": "#/components/schemas/ClusterWhereInput" + } + }, + "required": [ + "url", + "name", + "cluster" + ], + "type": "object" + }, + "ContentLibraryImageImportParams": { + "properties": { + "data": { + "$ref": "#/components/schemas/ContentLibraryImageImportData" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "OvfCpu": { + "properties": { + "sockets": { + "type": "integer", + "format": "int32" + }, + "cores": { + "type": "integer", + "format": "int32" + } + }, + "required": [ + "sockets", + "cores" + ], + "type": "object" + }, + "OvfNic": { + "properties": { + "mac": { + "type": "string" + } + }, + "required": [ + "mac" + ], + "type": "object" + }, + "OvfDisk": { + "properties": { + "size": { + "type": "integer", + "format": "int64" + }, + "type": { + "$ref": "#/components/schemas/VmDiskType" + }, + "bus": { + "$ref": "#/components/schemas/Bus" + }, + "name": { + "type": "string" + } + }, + "required": [ + "size", + "type", + "bus", + "name" + ], + "type": "object" + }, + "ParsedOVF": { + "properties": { + "firmware": { + "$ref": "#/components/schemas/VmFirmware" + }, + "disks": { "items": { - "type": "string" + "$ref": "#/components/schemas/OvfDisk" }, - "type": "array", - "nullable": true + "type": "array" }, - "iscsi_ip_lt": { - "type": "string", - "nullable": true + "nics": { + "items": { + "$ref": "#/components/schemas/OvfNic" + }, + "type": "array" }, - "iscsi_ip_lte": { - "type": "string", - "nullable": true + "memory": { + "type": "integer", + "format": "int64" }, - "iscsi_ip_not": { - "type": "string", - "nullable": true + "cpu": { + "$ref": "#/components/schemas/OvfCpu" }, - "iscsi_ip_not_contains": { + "vcpu": { + "type": "integer", + "format": "int32" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "firmware", + "disks", + "nics", + "memory", + "cpu", + "vcpu", + "name" + ], + "type": "object" + }, + "ExportFileDownloadLinks": { + "properties": { + "link": { + "type": "string" + }, + "filename": { + "type": "string" + } + }, + "required": [ + "link", + "filename" + ], + "type": "object" + }, + "VmExportFileWhereUniqueInput": { + "properties": { + "data_port_id": { "type": "string", "nullable": true }, - "iscsi_ip_not_ends_with": { + "id": { "type": "string", "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "GetExportFileDownloadLinksParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/VmExportFileWhereUniqueInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "NestedCpu": { + "properties": { + "cores": { + "type": "integer", + "format": "int32" }, - "iscsi_ip_not_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true + "sockets": { + "type": "integer", + "format": "int32" + } + }, + "required": [ + "cores", + "sockets" + ], + "type": "object", + "additionalProperties": false + }, + "NestedVmEntityFilterResult": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object", + "additionalProperties": false + }, + "NestedGpuDevice": { + "properties": { + "id": { + "type": "string" }, - "iscsi_ip_not_starts_with": { + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "NestedIsolationPolicy": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object", + "additionalProperties": false + }, + "NestedNic": { + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "NestedSnapshotPlan": { + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "NestedUsbDevice": { + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "NestedVmNic": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object", + "additionalProperties": false + }, + "NestedVmPlacementGroup": { + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "Vm": { + "properties": { + "bios_uuid": { "type": "string", "nullable": true }, - "iscsi_ip_starts_with": { - "type": "string", + "clock_offset": { + "$ref": "#/components/schemas/VmClockOffset" + }, + "cloud_init_supported": { + "type": "boolean", "nullable": true }, - "iscsi_lun_id": { - "type": "string", + "cluster": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedCluster" + } + ], "nullable": true }, - "iscsi_lun_id_contains": { - "type": "string", + "cpu": { + "$ref": "#/components/schemas/NestedCpu" + }, + "cpu_model": { + "type": "string" + }, + "cpu_usage": { + "type": "number", + "format": "double", "nullable": true }, - "iscsi_lun_id_ends_with": { + "deleted_at": { "type": "string", "nullable": true }, - "iscsi_lun_id_gt": { + "description": { + "type": "string" + }, + "dns_servers": { "type": "string", "nullable": true }, - "iscsi_lun_id_gte": { - "type": "string", + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], "nullable": true }, - "iscsi_lun_id_in": { + "entity_filter_results": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedVmEntityFilterResult" }, "type": "array", "nullable": true }, - "iscsi_lun_id_lt": { - "type": "string", - "nullable": true + "firmware": { + "$ref": "#/components/schemas/VmFirmware" }, - "iscsi_lun_id_lte": { - "type": "string", - "nullable": true - }, - "iscsi_lun_id_not": { - "type": "string", - "nullable": true - }, - "iscsi_lun_id_not_contains": { - "type": "string", - "nullable": true - }, - "iscsi_lun_id_not_ends_with": { - "type": "string", + "folder": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedVmFolder" + } + ], "nullable": true }, - "iscsi_lun_id_not_in": { + "gpu_devices": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedGpuDevice" }, "type": "array", "nullable": true }, - "iscsi_lun_id_not_starts_with": { - "type": "string", - "nullable": true - }, - "iscsi_lun_id_starts_with": { + "guest_cpu_model": { "type": "string", "nullable": true }, - "iscsi_port": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "iscsi_port_gt": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "iscsi_port_gte": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "iscsi_port_in": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array", - "nullable": true - }, - "iscsi_port_lt": { - "type": "integer", - "format": "int32", + "guest_os_type": { + "allOf": [ + { + "$ref": "#/components/schemas/VmGuestsOperationSystem" + } + ], "nullable": true }, - "iscsi_port_lte": { - "type": "integer", - "format": "int32", + "guest_size_usage": { + "type": "number", + "format": "double", "nullable": true }, - "iscsi_port_not": { + "guest_used_size": { "type": "integer", - "format": "int32", - "nullable": true - }, - "iscsi_port_not_in": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array", - "nullable": true - }, - "iscsi_target_iqn": { - "type": "string", - "nullable": true - }, - "iscsi_target_iqn_contains": { - "type": "string", - "nullable": true - }, - "iscsi_target_iqn_ends_with": { - "type": "string", - "nullable": true - }, - "iscsi_target_iqn_gt": { - "type": "string", - "nullable": true - }, - "iscsi_target_iqn_gte": { - "type": "string", - "nullable": true - }, - "iscsi_target_iqn_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true - }, - "iscsi_target_iqn_lt": { - "type": "string", - "nullable": true - }, - "iscsi_target_iqn_lte": { - "type": "string", - "nullable": true - }, - "iscsi_target_iqn_not": { - "type": "string", - "nullable": true - }, - "iscsi_target_iqn_not_contains": { - "type": "string", - "nullable": true - }, - "iscsi_target_iqn_not_ends_with": { - "type": "string", - "nullable": true - }, - "iscsi_target_iqn_not_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true - }, - "iscsi_target_iqn_not_starts_with": { - "type": "string", - "nullable": true - }, - "iscsi_target_iqn_starts_with": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "name_contains": { - "type": "string", - "nullable": true - }, - "name_ends_with": { - "type": "string", - "nullable": true - }, - "name_gt": { - "type": "string", - "nullable": true - }, - "name_gte": { - "type": "string", - "nullable": true - }, - "name_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true - }, - "name_lt": { - "type": "string", - "nullable": true - }, - "name_lte": { - "type": "string", + "format": "int64", "nullable": true }, - "name_not": { - "type": "string", - "nullable": true + "ha": { + "type": "boolean" }, - "name_not_contains": { - "type": "string", + "host": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedHost" + } + ], "nullable": true }, - "name_not_ends_with": { + "hostname": { "type": "string", "nullable": true }, - "name_not_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true - }, - "name_not_starts_with": { - "type": "string", - "nullable": true + "id": { + "type": "string" }, - "name_starts_with": { - "type": "string", - "nullable": true + "in_recycle_bin": { + "type": "boolean" }, - "nfs_path": { - "type": "string", - "nullable": true + "internal": { + "type": "boolean" }, - "nfs_path_contains": { - "type": "string", + "io_policy": { + "allOf": [ + { + "$ref": "#/components/schemas/VmDiskIoPolicy" + } + ], "nullable": true }, - "nfs_path_ends_with": { - "type": "string", - "nullable": true + "ips": { + "type": "string" }, - "nfs_path_gt": { - "type": "string", + "isolation_policy": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedIsolationPolicy" + } + ], "nullable": true }, - "nfs_path_gte": { + "kernel_info": { "type": "string", "nullable": true }, - "nfs_path_in": { + "labels": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedLabel" }, "type": "array", "nullable": true }, - "nfs_path_lt": { - "type": "string", - "nullable": true - }, - "nfs_path_lte": { - "type": "string", - "nullable": true - }, - "nfs_path_not": { - "type": "string", - "nullable": true - }, - "nfs_path_not_contains": { + "last_shutdown_time": { "type": "string", "nullable": true }, - "nfs_path_not_ends_with": { + "local_created_at": { "type": "string", "nullable": true }, - "nfs_path_not_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true - }, - "nfs_path_not_starts_with": { - "type": "string", - "nullable": true + "local_id": { + "type": "string" }, - "nfs_path_starts_with": { - "type": "string", + "logical_size_bytes": { + "type": "integer", + "format": "int64", "nullable": true }, - "nfs_server": { - "type": "string", + "max_bandwidth": { + "type": "integer", + "format": "int64", "nullable": true }, - "nfs_server_contains": { - "type": "string", + "max_bandwidth_policy": { + "allOf": [ + { + "$ref": "#/components/schemas/VmDiskIoRestrictType" + } + ], "nullable": true }, - "nfs_server_ends_with": { - "type": "string", + "max_iops": { + "type": "integer", + "format": "int32", "nullable": true }, - "nfs_server_gt": { - "type": "string", + "max_iops_policy": { + "allOf": [ + { + "$ref": "#/components/schemas/VmDiskIoRestrictType" + } + ], "nullable": true }, - "nfs_server_gte": { - "type": "string", - "nullable": true + "memory": { + "type": "integer", + "format": "int64" }, - "nfs_server_in": { - "items": { - "type": "string" - }, - "type": "array", + "memory_usage": { + "type": "number", + "format": "double", "nullable": true }, - "nfs_server_lt": { - "type": "string", - "nullable": true + "name": { + "type": "string" }, - "nfs_server_lte": { - "type": "string", - "nullable": true + "nested_virtualization": { + "type": "boolean" }, - "nfs_server_not": { - "type": "string", - "nullable": true + "node_ip": { + "type": "string" }, - "nfs_server_not_contains": { + "original_name": { "type": "string", "nullable": true }, - "nfs_server_not_ends_with": { + "os": { "type": "string", "nullable": true }, - "nfs_server_not_in": { + "out_uninstall_usb": { "items": { "type": "string" }, - "type": "array", - "nullable": true - }, - "nfs_server_not_starts_with": { - "type": "string", - "nullable": true - }, - "nfs_server_starts_with": { - "type": "string", - "nullable": true - }, - "resource_version_gt": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "resource_version_gte": { - "type": "integer", - "format": "int32", - "nullable": true + "type": "array" }, - "resource_version_in": { + "pci_nics": { "items": { - "type": "integer", - "format": "int32" + "$ref": "#/components/schemas/NestedNic" }, "type": "array", "nullable": true }, - "resource_version_lt": { - "type": "integer", - "format": "int32", - "nullable": true + "protected": { + "type": "boolean" }, - "resource_version_lte": { + "provisioned_size": { "type": "integer", - "format": "int32", + "format": "int64", "nullable": true }, - "resource_version_not": { + "size": { "type": "integer", - "format": "int32", - "nullable": true - }, - "resource_version_not_in": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array", - "nullable": true - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupStoreStatus" - } - ], - "nullable": true - }, - "status_in": { - "items": { - "$ref": "#/components/schemas/BackupStoreStatus" - }, - "type": "array", + "format": "int64", "nullable": true }, - "status_not": { + "snapshot_plan": { "allOf": [ { - "$ref": "#/components/schemas/BackupStoreStatus" + "$ref": "#/components/schemas/NestedSnapshotPlan" } ], "nullable": true }, - "status_not_in": { + "snapshots": { "items": { - "$ref": "#/components/schemas/BackupStoreStatus" + "$ref": "#/components/schemas/NestedVmSnapshot" }, "type": "array", "nullable": true }, - "total_capacity": { - "type": "integer", - "format": "int64", - "nullable": true + "status": { + "$ref": "#/components/schemas/VmStatus" }, - "total_capacity_gt": { - "type": "integer", - "format": "int64", + "unique_logical_size": { + "type": "number", + "format": "double", "nullable": true }, - "total_capacity_gte": { + "unique_size": { "type": "integer", "format": "int64", "nullable": true }, - "total_capacity_in": { + "usb_devices": { "items": { - "type": "integer", - "format": "int64" + "$ref": "#/components/schemas/NestedUsbDevice" }, "type": "array", "nullable": true }, - "total_capacity_lt": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "total_capacity_lte": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "total_capacity_not": { + "vcpu": { "type": "integer", - "format": "int64", - "nullable": true - }, - "total_capacity_not_in": { - "items": { - "type": "integer", - "format": "int64" - }, - "type": "array", - "nullable": true + "format": "int32" }, - "type": { + "video_type": { "allOf": [ { - "$ref": "#/components/schemas/BackupStoreType" + "$ref": "#/components/schemas/VmVideoType" } ], "nullable": true }, - "type_in": { + "vm_disks": { "items": { - "$ref": "#/components/schemas/BackupStoreType" + "$ref": "#/components/schemas/NestedVmDisk" }, "type": "array", "nullable": true }, - "type_not": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupStoreType" - } - ], - "nullable": true - }, - "type_not_in": { + "vm_nics": { "items": { - "$ref": "#/components/schemas/BackupStoreType" + "$ref": "#/components/schemas/NestedVmNic" }, "type": "array", "nullable": true }, - "update_timestamp": { - "type": "string", - "nullable": true - }, - "update_timestamp_contains": { - "type": "string", - "nullable": true - }, - "update_timestamp_ends_with": { - "type": "string", - "nullable": true - }, - "update_timestamp_gt": { - "type": "string", - "nullable": true - }, - "update_timestamp_gte": { - "type": "string", - "nullable": true - }, - "update_timestamp_in": { + "vm_placement_group": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedVmPlacementGroup" }, "type": "array", "nullable": true }, - "update_timestamp_lt": { - "type": "string", - "nullable": true - }, - "update_timestamp_lte": { - "type": "string", - "nullable": true + "vm_tools_status": { + "$ref": "#/components/schemas/VmToolsStatus" }, - "update_timestamp_not": { + "vm_tools_version": { "type": "string", "nullable": true }, - "update_timestamp_not_contains": { - "type": "string", + "vm_usage": { + "allOf": [ + { + "$ref": "#/components/schemas/VmUsage" + } + ], "nullable": true }, - "update_timestamp_not_ends_with": { - "type": "string", - "nullable": true - }, - "update_timestamp_not_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true - }, - "update_timestamp_not_starts_with": { + "win_opt": { + "type": "boolean" + } + }, + "required": [ + "clock_offset", + "cpu", + "cpu_model", + "description", + "firmware", + "ha", + "id", + "in_recycle_bin", + "internal", + "ips", + "local_id", + "memory", + "name", + "nested_virtualization", + "node_ip", + "out_uninstall_usb", + "protected", + "status", + "vcpu", + "vm_tools_status", + "win_opt" + ], + "type": "object", + "additionalProperties": false + }, + "WithTask_Vm_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "update_timestamp_starts_with": { - "type": "string", - "nullable": true + "data": { + "$ref": "#/components/schemas/Vm" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "BPSUnit": { + "type": "string", + "enum": [ + "Bps", + "KBps", + "MBps", + "GBps", + "TBps" + ] + }, + "MountNewCreateDisksParams": { + "properties": { + "max_bandwidth_policy": { + "$ref": "#/components/schemas/VmDiskIoRestrictType" }, - "used_data_space": { - "type": "integer", - "format": "int64", - "nullable": true + "max_bandwidth_unit": { + "$ref": "#/components/schemas/BPSUnit" }, - "used_data_space_gt": { + "max_bandwidth": { "type": "integer", - "format": "int64", - "nullable": true + "format": "int64" }, - "used_data_space_gte": { + "max_iops_policy": { + "$ref": "#/components/schemas/VmDiskIoRestrictType" + }, + "max_iops": { "type": "integer", - "format": "int64", - "nullable": true + "format": "int64" }, - "used_data_space_in": { - "items": { - "type": "integer", - "format": "int64" + "vm_volume": { + "properties": { + "elf_storage_policy": { + "$ref": "#/components/schemas/VmVolumeElfStoragePolicyType" + }, + "path": { + "type": "string" + }, + "size_unit": { + "$ref": "#/components/schemas/ByteUnit" + }, + "size": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } }, - "type": "array", - "nullable": true - }, - "used_data_space_lt": { - "type": "integer", - "format": "int64", - "nullable": true + "required": [ + "elf_storage_policy", + "size", + "name" + ], + "type": "object" }, - "used_data_space_lte": { + "index": { "type": "integer", - "format": "int64", - "nullable": true + "format": "int32" }, - "used_data_space_not": { + "key": { "type": "integer", - "format": "int64", - "nullable": true - }, - "used_data_space_not_in": { - "items": { - "type": "integer", - "format": "int64" - }, - "type": "array", - "nullable": true - }, - "used_data_space_usage": { - "type": "number", - "format": "double", - "nullable": true + "format": "int32" }, - "used_data_space_usage_gt": { - "type": "number", - "format": "double", - "nullable": true + "bus": { + "$ref": "#/components/schemas/Bus" }, - "used_data_space_usage_gte": { - "type": "number", - "format": "double", - "nullable": true + "boot": { + "type": "integer", + "format": "int32" + } + }, + "required": [ + "vm_volume", + "bus", + "boot" + ], + "type": "object" + }, + "MountDisksParams": { + "properties": { + "max_bandwidth_policy": { + "$ref": "#/components/schemas/VmDiskIoRestrictType" }, - "used_data_space_usage_in": { - "items": { - "type": "number", - "format": "double" - }, - "type": "array", - "nullable": true + "max_bandwidth_unit": { + "$ref": "#/components/schemas/BPSUnit" }, - "used_data_space_usage_lt": { - "type": "number", - "format": "double", - "nullable": true + "max_bandwidth": { + "type": "integer", + "format": "int64" }, - "used_data_space_usage_lte": { - "type": "number", - "format": "double", - "nullable": true + "max_iops_policy": { + "$ref": "#/components/schemas/VmDiskIoRestrictType" }, - "used_data_space_usage_not": { - "type": "number", - "format": "double", - "nullable": true + "max_iops": { + "type": "integer", + "format": "int64" }, - "used_data_space_usage_not_in": { - "items": { - "type": "number", - "format": "double" - }, - "type": "array", - "nullable": true + "vm_volume_id": { + "type": "string" }, - "valid_data_space": { + "index": { "type": "integer", - "format": "int64", - "nullable": true + "format": "int32" }, - "valid_data_space_gt": { + "key": { "type": "integer", - "format": "int64", - "nullable": true + "format": "int32" }, - "valid_data_space_gte": { + "bus": { + "$ref": "#/components/schemas/Bus" + }, + "boot": { "type": "integer", - "format": "int64", - "nullable": true + "format": "int32" + } + }, + "required": [ + "vm_volume_id", + "bus", + "boot" + ], + "type": "object" + }, + "VmCdRomParams": { + "properties": { + "content_library_image_id": { + "type": "string" }, - "valid_data_space_in": { - "items": { - "type": "integer", - "format": "int64" - }, - "type": "array", - "nullable": true + "elf_image_id": { + "type": "string" }, - "valid_data_space_lt": { + "index": { "type": "integer", - "format": "int64", - "nullable": true + "format": "int32" }, - "valid_data_space_lte": { + "key": { "type": "integer", - "format": "int64", - "nullable": true + "format": "int32" }, - "valid_data_space_not": { + "boot": { "type": "integer", - "format": "int64", - "nullable": true - }, - "valid_data_space_not_in": { - "items": { - "type": "integer", - "format": "int64" - }, - "type": "array", - "nullable": true + "format": "int32" } }, - "type": "object", - "additionalProperties": false + "required": [ + "boot" + ], + "type": "object" }, - "BackupRestorePointWhereInput": { + "VmDiskParams": { "properties": { - "AND": { + "mount_cd_roms": { "items": { - "$ref": "#/components/schemas/BackupRestorePointWhereInput" + "$ref": "#/components/schemas/VmCdRomParams" }, - "type": "array", - "nullable": true + "type": "array" }, - "NOT": { + "mount_disks": { "items": { - "$ref": "#/components/schemas/BackupRestorePointWhereInput" + "$ref": "#/components/schemas/MountDisksParams" }, - "type": "array", - "nullable": true + "type": "array" }, - "OR": { + "mount_new_create_disks": { "items": { - "$ref": "#/components/schemas/BackupRestorePointWhereInput" + "$ref": "#/components/schemas/MountNewCreateDisksParams" }, - "type": "array", - "nullable": true - }, - "backup_plan": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupPlanWhereInput" - } - ], - "nullable": true - }, - "backup_restore_executions_every": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupRestoreExecutionWhereInput" - } - ], - "nullable": true - }, - "backup_restore_executions_none": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupRestoreExecutionWhereInput" - } - ], - "nullable": true - }, - "backup_restore_executions_some": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupRestoreExecutionWhereInput" - } - ], - "nullable": true - }, - "backup_target_execution": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupTargetExecutionWhereInput" - } - ], - "nullable": true - }, - "cluster_local_id": { - "type": "string", - "nullable": true + "type": "array" + } + }, + "type": "object" + }, + "BitUnit": { + "type": "string", + "enum": [ + "bit", + "Kb", + "Mb", + "Gb", + "Tb", + "Pb" + ] + }, + "BitPSUnit": { + "type": "string", + "enum": [ + "bps", + "Kbps", + "Mbps", + "Gbps", + "Tbps" + ] + }, + "VmNicQosTraffic": { + "properties": { + "rate_limit_unit": { + "$ref": "#/components/schemas/BitPSUnit" }, - "cluster_local_id_contains": { - "type": "string", + "rate_limit": { + "type": "integer", + "format": "int64", "nullable": true }, - "cluster_local_id_ends_with": { - "type": "string", - "nullable": true + "burst_unit": { + "$ref": "#/components/schemas/BitUnit" }, - "cluster_local_id_gt": { - "type": "string", + "burst": { + "type": "integer", + "format": "int64", "nullable": true }, - "cluster_local_id_gte": { - "type": "string", - "nullable": true + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "type": "object" + }, + "VmNicQosOption": { + "properties": { + "egress": { + "$ref": "#/components/schemas/VmNicQosTraffic" }, - "cluster_local_id_in": { + "ingress": { + "$ref": "#/components/schemas/VmNicQosTraffic" + } + }, + "type": "object" + }, + "VpcNicParams": { + "properties": { + "ip_addresses": { "items": { "type": "string" }, - "type": "array", - "nullable": true + "type": "array" }, - "cluster_local_id_lt": { - "type": "string", - "nullable": true + "floating_ip_id": { + "type": "string" }, - "cluster_local_id_lte": { - "type": "string", - "nullable": true + "vpc_subnet_id": { + "type": "string" }, - "cluster_local_id_not": { - "type": "string", - "nullable": true + "vpc_id": { + "type": "string" + } + }, + "required": [ + "vpc_subnet_id", + "vpc_id" + ], + "type": "object" + }, + "VmNicParams": { + "properties": { + "vpc_nic": { + "$ref": "#/components/schemas/VpcNicParams" }, - "cluster_local_id_not_contains": { - "type": "string", - "nullable": true + "type": { + "$ref": "#/components/schemas/VmNicType" }, - "cluster_local_id_not_ends_with": { - "type": "string", - "nullable": true + "qos": { + "$ref": "#/components/schemas/VmNicQosOption" }, - "cluster_local_id_not_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true + "subnet_mask": { + "type": "string" }, - "cluster_local_id_not_starts_with": { - "type": "string", - "nullable": true + "gateway": { + "type": "string" }, - "cluster_local_id_starts_with": { - "type": "string", - "nullable": true + "ip_address": { + "type": "string" }, - "compressed": { - "type": "boolean", - "nullable": true + "nic_id": { + "type": "string" }, - "compressed_not": { - "type": "boolean", - "nullable": true + "connect_vlan_id": { + "type": "string" }, - "compression_ratio": { - "type": "number", - "format": "double", - "nullable": true + "mirror": { + "type": "boolean" }, - "compression_ratio_gt": { - "type": "number", - "format": "double", - "nullable": true + "model": { + "$ref": "#/components/schemas/VmNicModel" }, - "compression_ratio_gte": { - "type": "number", - "format": "double", - "nullable": true + "enabled": { + "type": "boolean" }, - "compression_ratio_in": { - "items": { - "type": "number", - "format": "double" - }, - "type": "array", - "nullable": true + "mac_address": { + "type": "string" }, - "compression_ratio_lt": { - "type": "number", - "format": "double", - "nullable": true + "local_id": { + "type": "string" + } + }, + "type": "object" + }, + "VmGpuOperationParams": { + "properties": { + "amount": { + "type": "integer", + "format": "int32" }, - "compression_ratio_lte": { - "type": "number", - "format": "double", - "nullable": true + "gpu_id": { + "type": "string" + } + }, + "required": [ + "gpu_id" + ], + "type": "object" + }, + "VmOwnerParams": { + "properties": { + "search_for": { + "type": "string", + "enum": [ + "username", + "id" + ] }, - "compression_ratio_not": { - "type": "number", - "format": "double", - "nullable": true + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "type": "object" + }, + "VmCreationParams": { + "properties": { + "owner": { + "$ref": "#/components/schemas/VmOwnerParams" }, - "compression_ratio_not_in": { + "gpu_devices": { "items": { - "type": "number", - "format": "double" + "$ref": "#/components/schemas/VmGpuOperationParams" }, - "type": "array", - "nullable": true - }, - "creation": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupRestorePointCreation" - } - ], - "nullable": true + "type": "array" }, - "creation_in": { - "items": { - "$ref": "#/components/schemas/BackupRestorePointCreation" - }, - "type": "array", - "nullable": true + "max_bandwidth_policy": { + "$ref": "#/components/schemas/VmDiskIoRestrictType" }, - "creation_not": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupRestorePointCreation" - } - ], - "nullable": true + "max_bandwidth_unit": { + "$ref": "#/components/schemas/BPSUnit" }, - "creation_not_in": { - "items": { - "$ref": "#/components/schemas/BackupRestorePointCreation" - }, - "type": "array", - "nullable": true + "max_bandwidth": { + "type": "integer", + "format": "int64" }, - "entityAsyncStatus": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" - } - ], - "nullable": true + "max_iops_policy": { + "$ref": "#/components/schemas/VmDiskIoRestrictType" }, - "entityAsyncStatus_in": { - "items": { - "$ref": "#/components/schemas/EntityAsyncStatus" - }, - "type": "array", - "nullable": true + "max_iops": { + "type": "integer", + "format": "int64" }, - "entityAsyncStatus_not": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" - } - ], - "nullable": true + "io_policy": { + "$ref": "#/components/schemas/VmDiskIoPolicy" }, - "entityAsyncStatus_not_in": { - "items": { - "$ref": "#/components/schemas/EntityAsyncStatus" - }, - "type": "array", - "nullable": true + "vcpu": { + "type": "integer", + "format": "int32" }, - "id": { - "type": "string", - "nullable": true + "status": { + "$ref": "#/components/schemas/VmStatus" }, - "id_contains": { - "type": "string", - "nullable": true + "firmware": { + "$ref": "#/components/schemas/VmFirmware" }, - "id_ends_with": { - "type": "string", - "nullable": true + "ha": { + "type": "boolean" }, - "id_gt": { - "type": "string", - "nullable": true + "pci_nics": { + "$ref": "#/components/schemas/NicWhereInput" }, - "id_gte": { - "type": "string", - "nullable": true + "vm_placement_group": { + "$ref": "#/components/schemas/VmPlacementGroupWhereInput" }, - "id_in": { + "vm_nics": { "items": { - "type": "string" + "$ref": "#/components/schemas/VmNicParams" }, - "type": "array", - "nullable": true + "type": "array" }, - "id_lt": { - "type": "string", - "nullable": true + "vm_disks": { + "$ref": "#/components/schemas/VmDiskParams" }, - "id_lte": { - "type": "string", - "nullable": true + "memory_unit": { + "$ref": "#/components/schemas/ByteUnit" }, - "id_not": { - "type": "string", - "nullable": true + "memory": { + "type": "integer", + "format": "int64" }, - "id_not_contains": { - "type": "string", - "nullable": true + "cpu_cores": { + "type": "integer", + "format": "int32" }, - "id_not_ends_with": { - "type": "string", - "nullable": true + "cpu_sockets": { + "type": "integer", + "format": "int32" }, - "id_not_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true + "guest_os_type": { + "$ref": "#/components/schemas/VmGuestsOperationSystem" }, - "id_not_starts_with": { - "type": "string", - "nullable": true + "folder_id": { + "type": "string" }, - "id_starts_with": { - "type": "string", - "nullable": true + "description": { + "type": "string" }, - "local_created_at": { - "type": "string", - "nullable": true + "name": { + "type": "string" }, - "local_created_at_gt": { - "type": "string", - "nullable": true + "host_id": { + "type": "string" }, - "local_created_at_gte": { - "type": "string", - "nullable": true + "cluster_id": { + "type": "string" + } + }, + "required": [ + "status", + "firmware", + "ha", + "vm_nics", + "vm_disks", + "memory", + "cpu_cores", + "cpu_sockets", + "name", + "cluster_id" + ], + "type": "object" + }, + "DiskOperateModifyDisk": { + "properties": { + "vm_volume_id": { + "type": "string" }, - "local_created_at_in": { - "items": { - "type": "string" + "bus": { + "$ref": "#/components/schemas/Bus" + }, + "disk_index": { + "type": "integer", + "format": "int32" + } + }, + "required": [ + "disk_index" + ], + "type": "object" + }, + "VmDiskOperate": { + "properties": { + "remove_disks": { + "properties": { + "disk_index": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array" + } }, - "type": "array", - "nullable": true + "required": [ + "disk_index" + ], + "type": "object" }, - "local_created_at_lt": { - "type": "string", - "nullable": true + "modify_disks": { + "items": { + "$ref": "#/components/schemas/DiskOperateModifyDisk" + }, + "type": "array" }, - "local_created_at_lte": { - "type": "string", - "nullable": true + "new_disks": { + "$ref": "#/components/schemas/VmDiskParams" + } + }, + "type": "object" + }, + "CloudInitNetworkTypeEnum": { + "enum": [ + "IPV4", + "IPV4_DHCP" + ], + "type": "string" + }, + "CloudInitNetWorkRoute": { + "properties": { + "network": { + "type": "string" }, - "local_created_at_not": { - "type": "string", - "nullable": true + "netmask": { + "type": "string" }, - "local_created_at_not_in": { + "gateway": { + "type": "string" + } + }, + "required": [ + "network", + "netmask", + "gateway" + ], + "type": "object" + }, + "CloudInitNetWork": { + "properties": { + "routes": { "items": { - "type": "string" + "$ref": "#/components/schemas/CloudInitNetWorkRoute" }, - "type": "array", - "nullable": true - }, - "local_id": { - "type": "string", - "nullable": true + "type": "array" }, - "local_id_contains": { - "type": "string", - "nullable": true + "type": { + "$ref": "#/components/schemas/CloudInitNetworkTypeEnum" }, - "local_id_ends_with": { - "type": "string", - "nullable": true + "nic_index": { + "type": "integer", + "format": "int32" }, - "local_id_gt": { - "type": "string", - "nullable": true + "netmask": { + "type": "string" }, - "local_id_gte": { - "type": "string", - "nullable": true + "ip_address": { + "type": "string" + } + }, + "required": [ + "type", + "nic_index" + ], + "type": "object" + }, + "TemplateCloudInit": { + "properties": { + "user_data": { + "type": "string" }, - "local_id_in": { + "public_keys": { "items": { "type": "string" }, - "type": "array", - "nullable": true - }, - "local_id_lt": { - "type": "string", - "nullable": true + "type": "array" }, - "local_id_lte": { - "type": "string", - "nullable": true + "hostname": { + "type": "string" }, - "local_id_not": { - "type": "string", - "nullable": true + "networks": { + "items": { + "$ref": "#/components/schemas/CloudInitNetWork" + }, + "type": "array" }, - "local_id_not_contains": { - "type": "string", - "nullable": true + "nameservers": { + "items": { + "type": "string" + }, + "type": "array" }, - "local_id_not_ends_with": { - "type": "string", - "nullable": true + "default_user_password": { + "type": "string" + } + }, + "type": "object" + }, + "VmCreateVmFromTemplateParams": { + "properties": { + "owner": { + "$ref": "#/components/schemas/VmOwnerParams" }, - "local_id_not_in": { + "gpu_devices": { "items": { - "type": "string" + "$ref": "#/components/schemas/VmGpuOperationParams" }, - "type": "array", - "nullable": true + "type": "array" }, - "local_id_not_starts_with": { - "type": "string", - "nullable": true + "cloud_init": { + "$ref": "#/components/schemas/TemplateCloudInit" }, - "local_id_starts_with": { - "type": "string", - "nullable": true + "is_full_copy": { + "type": "boolean" }, - "logical_size": { - "type": "integer", - "format": "int64", - "nullable": true + "template_id": { + "type": "string" }, - "logical_size_gt": { - "type": "integer", - "format": "int64", - "nullable": true + "max_bandwidth_policy": { + "$ref": "#/components/schemas/VmDiskIoRestrictType" }, - "logical_size_gte": { + "max_bandwidth_unit": { + "$ref": "#/components/schemas/BPSUnit" + }, + "max_bandwidth": { "type": "integer", - "format": "int64", - "nullable": true + "format": "int64" }, - "logical_size_in": { - "items": { - "type": "integer", - "format": "int64" - }, - "type": "array", - "nullable": true + "max_iops_policy": { + "$ref": "#/components/schemas/VmDiskIoRestrictType" }, - "logical_size_lt": { + "max_iops": { "type": "integer", - "format": "int64", - "nullable": true + "format": "int64" }, - "logical_size_lte": { - "type": "integer", - "format": "int64", - "nullable": true + "io_policy": { + "$ref": "#/components/schemas/VmDiskIoPolicy", + "deprecated": true }, - "logical_size_not": { + "vcpu": { "type": "integer", - "format": "int64", - "nullable": true - }, - "logical_size_not_in": { - "items": { - "type": "integer", - "format": "int64" - }, - "type": "array", - "nullable": true + "format": "int32" }, - "parent_restore_point": { - "type": "string", - "nullable": true + "status": { + "$ref": "#/components/schemas/VmStatus" }, - "parent_restore_point_contains": { - "type": "string", - "nullable": true + "firmware": { + "$ref": "#/components/schemas/VmFirmware" }, - "parent_restore_point_ends_with": { - "type": "string", - "nullable": true + "ha": { + "type": "boolean" }, - "parent_restore_point_gt": { - "type": "string", - "nullable": true + "pci_nics": { + "$ref": "#/components/schemas/NicWhereInput" }, - "parent_restore_point_gte": { - "type": "string", - "nullable": true + "vm_placement_group": { + "$ref": "#/components/schemas/VmPlacementGroupWhereInput" }, - "parent_restore_point_in": { + "vm_nics": { "items": { - "type": "string" + "$ref": "#/components/schemas/VmNicParams" }, - "type": "array", - "nullable": true + "type": "array" }, - "parent_restore_point_lt": { - "type": "string", - "nullable": true + "disk_operate": { + "$ref": "#/components/schemas/VmDiskOperate" }, - "parent_restore_point_lte": { - "type": "string", - "nullable": true + "memory_unit": { + "$ref": "#/components/schemas/ByteUnit" }, - "parent_restore_point_not": { - "type": "string", - "nullable": true + "memory": { + "type": "integer", + "format": "int64" }, - "parent_restore_point_not_contains": { - "type": "string", - "nullable": true + "cpu_cores": { + "type": "integer", + "format": "int32" }, - "parent_restore_point_not_ends_with": { - "type": "string", - "nullable": true + "cpu_sockets": { + "type": "integer", + "format": "int32" }, - "parent_restore_point_not_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true + "guest_os_type": { + "$ref": "#/components/schemas/VmGuestsOperationSystem" }, - "parent_restore_point_not_starts_with": { - "type": "string", - "nullable": true + "folder_id": { + "type": "string" }, - "parent_restore_point_starts_with": { - "type": "string", - "nullable": true + "description": { + "type": "string" }, - "physical_size": { - "type": "integer", - "format": "int64", - "nullable": true + "name": { + "type": "string" }, - "physical_size_gt": { - "type": "integer", - "format": "int64", - "nullable": true + "host_id": { + "type": "string" }, - "physical_size_gte": { - "type": "integer", - "format": "int64", - "nullable": true + "cluster_id": { + "type": "string" + } + }, + "required": [ + "is_full_copy", + "template_id", + "name" + ], + "type": "object" + }, + "VmCreateVmFromContentLibraryTemplateParams": { + "properties": { + "owner": { + "$ref": "#/components/schemas/VmOwnerParams" }, - "physical_size_in": { + "gpu_devices": { "items": { - "type": "integer", - "format": "int64" + "$ref": "#/components/schemas/VmGpuOperationParams" }, - "type": "array", - "nullable": true + "type": "array" }, - "physical_size_lt": { - "type": "integer", - "format": "int64", - "nullable": true + "cloud_init": { + "$ref": "#/components/schemas/TemplateCloudInit" }, - "physical_size_lte": { - "type": "integer", - "format": "int64", - "nullable": true + "is_full_copy": { + "type": "boolean" }, - "physical_size_not": { - "type": "integer", - "format": "int64", - "nullable": true + "template_id": { + "type": "string" }, - "physical_size_not_in": { - "items": { - "type": "integer", - "format": "int64" - }, - "type": "array", - "nullable": true + "max_bandwidth_policy": { + "$ref": "#/components/schemas/VmDiskIoRestrictType" }, - "resource_version_gt": { - "type": "integer", - "format": "int32", - "nullable": true + "max_bandwidth_unit": { + "$ref": "#/components/schemas/BPSUnit" }, - "resource_version_gte": { + "max_bandwidth": { "type": "integer", - "format": "int32", - "nullable": true + "format": "int64" }, - "resource_version_in": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array", - "nullable": true + "max_iops_policy": { + "$ref": "#/components/schemas/VmDiskIoRestrictType" }, - "resource_version_lt": { + "max_iops": { "type": "integer", - "format": "int32", - "nullable": true + "format": "int64" }, - "resource_version_lte": { - "type": "integer", - "format": "int32", - "nullable": true + "io_policy": { + "$ref": "#/components/schemas/VmDiskIoPolicy", + "deprecated": true }, - "resource_version_not": { + "vcpu": { "type": "integer", - "format": "int32", - "nullable": true + "format": "int32" }, - "resource_version_not_in": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array", - "nullable": true + "status": { + "$ref": "#/components/schemas/VmStatus" }, - "size": { - "type": "integer", - "format": "int64", - "nullable": true + "firmware": { + "$ref": "#/components/schemas/VmFirmware" }, - "size_gt": { - "type": "integer", - "format": "int64", - "nullable": true + "ha": { + "type": "boolean" }, - "size_gte": { - "type": "integer", - "format": "int64", - "nullable": true + "pci_nics": { + "$ref": "#/components/schemas/NicWhereInput" }, - "size_in": { + "vm_placement_group": { + "$ref": "#/components/schemas/VmPlacementGroupWhereInput" + }, + "vm_nics": { "items": { - "type": "integer", - "format": "int64" + "$ref": "#/components/schemas/VmNicParams" }, - "type": "array", - "nullable": true + "type": "array" }, - "size_lt": { + "disk_operate": { + "$ref": "#/components/schemas/VmDiskOperate" + }, + "memory_unit": { + "$ref": "#/components/schemas/ByteUnit" + }, + "memory": { "type": "integer", - "format": "int64", - "nullable": true + "format": "int64" }, - "size_lte": { + "cpu_cores": { "type": "integer", - "format": "int64", - "nullable": true + "format": "int32" }, - "size_not": { + "cpu_sockets": { "type": "integer", - "format": "int64", - "nullable": true + "format": "int32" }, - "size_not_in": { - "items": { - "type": "integer", - "format": "int64" - }, - "type": "array", - "nullable": true + "guest_os_type": { + "$ref": "#/components/schemas/VmGuestsOperationSystem" }, - "slice": { - "type": "string", - "nullable": true + "folder_id": { + "type": "string" }, - "slice_contains": { - "type": "string", - "nullable": true + "description": { + "type": "string" }, - "slice_ends_with": { - "type": "string", - "nullable": true + "name": { + "type": "string" }, - "slice_gt": { - "type": "string", - "nullable": true + "host_id": { + "type": "string" }, - "slice_gte": { + "cluster_id": { + "type": "string" + } + }, + "required": [ + "is_full_copy", + "template_id", + "name", + "cluster_id" + ], + "type": "object" + }, + "WithTask_Vm-Array_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "slice_in": { + "data": { "items": { - "type": "string" + "$ref": "#/components/schemas/Vm" }, - "type": "array", - "nullable": true + "type": "array" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "VmCreateVmFromContentLibraryTemplateBatchVmParams": { + "properties": { + "owner": { + "$ref": "#/components/schemas/VmOwnerParams" }, - "slice_lt": { - "type": "string", - "nullable": true + "gpu_devices": { + "items": { + "$ref": "#/components/schemas/VmGpuOperationParams" + }, + "type": "array" }, - "slice_lte": { - "type": "string", - "nullable": true + "cloud_init": { + "$ref": "#/components/schemas/TemplateCloudInit" }, - "slice_not": { - "type": "string", - "nullable": true + "is_full_copy": { + "type": "boolean" }, - "slice_not_contains": { - "type": "string", - "nullable": true + "max_bandwidth_policy": { + "$ref": "#/components/schemas/VmDiskIoRestrictType" }, - "slice_not_ends_with": { - "type": "string", - "nullable": true + "max_bandwidth_unit": { + "$ref": "#/components/schemas/BPSUnit" }, - "slice_not_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true + "max_bandwidth": { + "type": "integer", + "format": "int64" }, - "slice_not_starts_with": { - "type": "string", - "nullable": true + "max_iops_policy": { + "$ref": "#/components/schemas/VmDiskIoRestrictType" }, - "slice_starts_with": { - "type": "string", - "nullable": true + "max_iops": { + "type": "integer", + "format": "int64" }, - "snapshot_consistent_type": { - "allOf": [ - { - "$ref": "#/components/schemas/ConsistentType" - } - ], - "nullable": true + "vcpu": { + "type": "integer", + "format": "int32" }, - "snapshot_consistent_type_in": { - "items": { - "$ref": "#/components/schemas/ConsistentType" - }, - "type": "array", - "nullable": true + "status": { + "$ref": "#/components/schemas/VmStatus" }, - "snapshot_consistent_type_not": { - "allOf": [ - { - "$ref": "#/components/schemas/ConsistentType" - } - ], - "nullable": true + "firmware": { + "$ref": "#/components/schemas/VmFirmware" }, - "snapshot_consistent_type_not_in": { - "items": { - "$ref": "#/components/schemas/ConsistentType" - }, - "type": "array", - "nullable": true + "ha": { + "type": "boolean" }, - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupRestorePointType" - } - ], - "nullable": true + "pci_nics": { + "$ref": "#/components/schemas/NicWhereInput" }, - "type_in": { + "vm_placement_group": { + "$ref": "#/components/schemas/VmPlacementGroupWhereInput" + }, + "vm_nics": { "items": { - "$ref": "#/components/schemas/BackupRestorePointType" + "$ref": "#/components/schemas/VmNicParams" }, - "type": "array", - "nullable": true + "type": "array" }, - "type_not": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupRestorePointType" - } - ], - "nullable": true + "disk_operate": { + "$ref": "#/components/schemas/VmDiskOperate" }, - "type_not_in": { - "items": { - "$ref": "#/components/schemas/BackupRestorePointType" - }, - "type": "array", - "nullable": true + "memory_unit": { + "$ref": "#/components/schemas/ByteUnit" }, - "valid_capacity": { + "memory": { "type": "integer", - "format": "int64", - "nullable": true + "format": "int64" }, - "valid_capacity_gt": { + "cpu_cores": { "type": "integer", - "format": "int64", - "nullable": true + "format": "int32" }, - "valid_capacity_gte": { + "cpu_sockets": { "type": "integer", - "format": "int64", - "nullable": true + "format": "int32" }, - "valid_capacity_in": { - "items": { - "type": "integer", - "format": "int64" - }, - "type": "array", - "nullable": true + "guest_os_type": { + "$ref": "#/components/schemas/VmGuestsOperationSystem" }, - "valid_capacity_lt": { - "type": "integer", - "format": "int64", - "nullable": true + "folder_id": { + "type": "string" }, - "valid_capacity_lte": { - "type": "integer", - "format": "int64", - "nullable": true + "description": { + "type": "string" }, - "valid_capacity_not": { - "type": "integer", - "format": "int64", - "nullable": true + "name": { + "type": "string" }, - "valid_capacity_not_in": { + "host_id": { + "type": "string" + }, + "cluster_id": { + "type": "string" + } + }, + "required": [ + "is_full_copy", + "name", + "cluster_id" + ], + "type": "object" + }, + "VmCreateVmFromContentLibraryTemplateBatchParams": { + "properties": { + "vms": { "items": { - "type": "integer", - "format": "int64" + "$ref": "#/components/schemas/VmCreateVmFromContentLibraryTemplateBatchVmParams" }, - "type": "array", - "nullable": true - }, - "valid_size": { - "type": "integer", - "format": "int64", - "nullable": true + "type": "array" }, - "valid_size_gt": { - "type": "integer", - "format": "int64", - "nullable": true + "template_id": { + "type": "string" + } + }, + "required": [ + "vms", + "template_id" + ], + "type": "object" + }, + "ConvertVmTemplateToVmParams": { + "properties": { + "name": { + "type": "string" }, - "valid_size_gte": { - "type": "integer", - "format": "int64", - "nullable": true + "converted_from_template_id": { + "type": "string" + } + }, + "required": [ + "name", + "converted_from_template_id" + ], + "type": "object" + }, + "VmCloneParams": { + "properties": { + "owner": { + "$ref": "#/components/schemas/VmOwnerParams" }, - "valid_size_in": { + "gpu_devices": { "items": { - "type": "integer", - "format": "int64" + "$ref": "#/components/schemas/VmGpuOperationParams" }, - "type": "array", - "nullable": true + "type": "array" }, - "valid_size_lt": { - "type": "integer", - "format": "int64", - "nullable": true + "is_full_copy": { + "type": "boolean" }, - "valid_size_lte": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "valid_size_not": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "valid_size_not_in": { - "items": { - "type": "integer", - "format": "int64" - }, - "type": "array", - "nullable": true + "src_vm_id": { + "type": "string" }, - "vm": { - "allOf": [ - { - "$ref": "#/components/schemas/VmWhereInput" - } - ], - "nullable": true + "max_bandwidth_policy": { + "$ref": "#/components/schemas/VmDiskIoRestrictType" }, - "vm_local_id": { - "type": "string", - "nullable": true + "max_bandwidth_unit": { + "$ref": "#/components/schemas/BPSUnit" }, - "vm_local_id_contains": { - "type": "string", - "nullable": true + "max_bandwidth": { + "type": "integer", + "format": "int64" }, - "vm_local_id_ends_with": { - "type": "string", - "nullable": true + "max_iops_policy": { + "$ref": "#/components/schemas/VmDiskIoRestrictType" }, - "vm_local_id_gt": { - "type": "string", - "nullable": true + "max_iops": { + "type": "integer", + "format": "int64" }, - "vm_local_id_gte": { - "type": "string", - "nullable": true + "io_policy": { + "$ref": "#/components/schemas/VmDiskIoPolicy", + "deprecated": true }, - "vm_local_id_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true + "vcpu": { + "type": "integer", + "format": "int32" }, - "vm_local_id_lt": { - "type": "string", - "nullable": true + "status": { + "$ref": "#/components/schemas/VmStatus" }, - "vm_local_id_lte": { - "type": "string", - "nullable": true + "firmware": { + "$ref": "#/components/schemas/VmFirmware" }, - "vm_local_id_not": { - "type": "string", - "nullable": true + "ha": { + "type": "boolean" }, - "vm_local_id_not_contains": { - "type": "string", - "nullable": true + "pci_nics": { + "$ref": "#/components/schemas/NicWhereInput" }, - "vm_local_id_not_ends_with": { - "type": "string", - "nullable": true + "vm_placement_group": { + "$ref": "#/components/schemas/VmPlacementGroupWhereInput" }, - "vm_local_id_not_in": { + "vm_nics": { "items": { - "type": "string" + "$ref": "#/components/schemas/VmNicParams" }, - "type": "array", - "nullable": true - }, - "vm_local_id_not_starts_with": { - "type": "string", - "nullable": true - }, - "vm_local_id_starts_with": { - "type": "string", - "nullable": true - }, - "vm_name": { - "type": "string", - "nullable": true - }, - "vm_name_contains": { - "type": "string", - "nullable": true - }, - "vm_name_ends_with": { - "type": "string", - "nullable": true + "type": "array" }, - "vm_name_gt": { - "type": "string", - "nullable": true + "vm_disks": { + "$ref": "#/components/schemas/VmDiskParams" }, - "vm_name_gte": { - "type": "string", - "nullable": true + "memory_unit": { + "$ref": "#/components/schemas/ByteUnit" }, - "vm_name_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true + "memory": { + "type": "integer", + "format": "int64" }, - "vm_name_lt": { - "type": "string", - "nullable": true + "cpu_cores": { + "type": "integer", + "format": "int32" }, - "vm_name_lte": { - "type": "string", - "nullable": true + "cpu_sockets": { + "type": "integer", + "format": "int32" }, - "vm_name_not": { - "type": "string", - "nullable": true + "guest_os_type": { + "$ref": "#/components/schemas/VmGuestsOperationSystem" }, - "vm_name_not_contains": { - "type": "string", - "nullable": true + "folder_id": { + "type": "string" }, - "vm_name_not_ends_with": { - "type": "string", - "nullable": true + "description": { + "type": "string" }, - "vm_name_not_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true + "name": { + "type": "string" }, - "vm_name_not_starts_with": { - "type": "string", - "nullable": true + "host_id": { + "type": "string" }, - "vm_name_starts_with": { - "type": "string", - "nullable": true + "cluster_id": { + "type": "string" } }, - "type": "object", - "additionalProperties": false + "required": [ + "src_vm_id", + "name" + ], + "type": "object" }, - "BackupRestoreExecutionWhereInput": { + "VmRebuildParams": { "properties": { - "AND": { - "items": { - "$ref": "#/components/schemas/BackupRestoreExecutionWhereInput" - }, - "type": "array", - "nullable": true - }, - "NOT": { - "items": { - "$ref": "#/components/schemas/BackupRestoreExecutionWhereInput" - }, - "type": "array", - "nullable": true - }, - "OR": { - "items": { - "$ref": "#/components/schemas/BackupRestoreExecutionWhereInput" - }, - "type": "array", - "nullable": true - }, - "entityAsyncStatus": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" - } - ], - "nullable": true - }, - "entityAsyncStatus_in": { - "items": { - "$ref": "#/components/schemas/EntityAsyncStatus" - }, - "type": "array", - "nullable": true - }, - "entityAsyncStatus_not": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" - } - ], - "nullable": true + "owner": { + "$ref": "#/components/schemas/VmOwnerParams" }, - "entityAsyncStatus_not_in": { + "gpu_devices": { "items": { - "$ref": "#/components/schemas/EntityAsyncStatus" + "$ref": "#/components/schemas/VmGpuOperationParams" }, - "type": "array", - "nullable": true - }, - "id": { - "type": "string", - "nullable": true - }, - "id_contains": { - "type": "string", - "nullable": true - }, - "id_ends_with": { - "type": "string", - "nullable": true - }, - "id_gt": { - "type": "string", - "nullable": true - }, - "id_gte": { - "type": "string", - "nullable": true + "type": "array" }, - "id_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true + "is_full_copy": { + "type": "boolean" }, - "id_lt": { - "type": "string", - "nullable": true + "rebuild_from_snapshot_id": { + "type": "string" }, - "id_lte": { - "type": "string", - "nullable": true + "max_bandwidth_policy": { + "$ref": "#/components/schemas/VmDiskIoRestrictType" }, - "id_not": { - "type": "string", - "nullable": true + "max_bandwidth_unit": { + "$ref": "#/components/schemas/BPSUnit" }, - "id_not_contains": { - "type": "string", - "nullable": true + "max_bandwidth": { + "type": "integer", + "format": "int64" }, - "id_not_ends_with": { - "type": "string", - "nullable": true + "max_iops_policy": { + "$ref": "#/components/schemas/VmDiskIoRestrictType" }, - "id_not_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true + "max_iops": { + "type": "integer", + "format": "int64" }, - "id_not_starts_with": { - "type": "string", - "nullable": true + "io_policy": { + "$ref": "#/components/schemas/VmDiskIoPolicy", + "deprecated": true }, - "id_starts_with": { - "type": "string", - "nullable": true + "vcpu": { + "type": "integer", + "format": "int32" }, - "name": { - "type": "string", - "nullable": true + "status": { + "$ref": "#/components/schemas/VmStatus" }, - "name_contains": { - "type": "string", - "nullable": true + "firmware": { + "$ref": "#/components/schemas/VmFirmware" }, - "name_ends_with": { - "type": "string", - "nullable": true + "ha": { + "type": "boolean" }, - "name_gt": { - "type": "string", - "nullable": true + "pci_nics": { + "$ref": "#/components/schemas/NicWhereInput" }, - "name_gte": { - "type": "string", - "nullable": true + "vm_placement_group": { + "$ref": "#/components/schemas/VmPlacementGroupWhereInput" }, - "name_in": { + "vm_nics": { "items": { - "type": "string" + "$ref": "#/components/schemas/VmNicParams" }, - "type": "array", - "nullable": true - }, - "name_lt": { - "type": "string", - "nullable": true - }, - "name_lte": { - "type": "string", - "nullable": true - }, - "name_not": { - "type": "string", - "nullable": true - }, - "name_not_contains": { - "type": "string", - "nullable": true - }, - "name_not_ends_with": { - "type": "string", - "nullable": true + "type": "array" }, - "name_not_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true + "vm_disks": { + "$ref": "#/components/schemas/VmDiskParams" }, - "name_not_starts_with": { - "type": "string", - "nullable": true + "memory_unit": { + "$ref": "#/components/schemas/ByteUnit" }, - "name_starts_with": { - "type": "string", - "nullable": true + "memory": { + "type": "integer", + "format": "int64" }, - "resource_version_gt": { + "cpu_cores": { "type": "integer", - "format": "int32", - "nullable": true + "format": "int32" }, - "resource_version_gte": { + "cpu_sockets": { "type": "integer", - "format": "int32", - "nullable": true + "format": "int32" }, - "resource_version_in": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array", - "nullable": true + "guest_os_type": { + "$ref": "#/components/schemas/VmGuestsOperationSystem" }, - "resource_version_lt": { - "type": "integer", - "format": "int32", - "nullable": true + "folder_id": { + "type": "string" }, - "resource_version_lte": { - "type": "integer", - "format": "int32", - "nullable": true + "description": { + "type": "string" }, - "resource_version_not": { - "type": "integer", - "format": "int32", - "nullable": true + "name": { + "type": "string" }, - "resource_version_not_in": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array", - "nullable": true + "host_id": { + "type": "string" + }, + "cluster_id": { + "type": "string" } }, - "type": "object", - "additionalProperties": false + "required": [ + "rebuild_from_snapshot_id", + "name" + ], + "type": "object" }, - "BackupTargetExecutionWhereInput": { + "VmRollbackParams": { "properties": { - "AND": { - "items": { - "$ref": "#/components/schemas/BackupTargetExecutionWhereInput" + "data": { + "properties": { + "snapshot_id": { + "type": "string" + } }, - "type": "array", - "nullable": true + "required": [ + "snapshot_id" + ], + "type": "object" }, - "NOT": { - "items": { - "$ref": "#/components/schemas/BackupTargetExecutionWhereInput" + "where": { + "$ref": "#/components/schemas/VmWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "VmUpdateParams": { + "properties": { + "data": { + "properties": { + "vcpu": { + "type": "integer", + "format": "int32" + }, + "ha": { + "type": "boolean" + }, + "memory_unit": { + "$ref": "#/components/schemas/ByteUnit" + }, + "memory": { + "type": "integer", + "format": "int64" + }, + "cpu_cores": { + "type": "integer", + "format": "int32" + }, + "cpu_sockets": { + "type": "integer", + "format": "int32" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + } }, - "type": "array", - "nullable": true + "type": "object" }, - "OR": { - "items": { - "$ref": "#/components/schemas/BackupTargetExecutionWhereInput" - }, - "type": "array", - "nullable": true - }, - "backup_group": { - "type": "string", - "nullable": true - }, - "backup_group_contains": { - "type": "string", - "nullable": true - }, - "backup_group_ends_with": { - "type": "string", - "nullable": true - }, - "backup_group_gt": { - "type": "string", - "nullable": true - }, - "backup_group_gte": { - "type": "string", - "nullable": true - }, - "backup_group_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true - }, - "backup_group_lt": { - "type": "string", - "nullable": true - }, - "backup_group_lte": { - "type": "string", - "nullable": true - }, - "backup_group_not": { - "type": "string", - "nullable": true - }, - "backup_group_not_contains": { - "type": "string", - "nullable": true - }, - "backup_group_not_ends_with": { + "where": { + "$ref": "#/components/schemas/VmWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "DeleteVm": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "WithTask_DeleteVm_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "backup_group_not_in": { - "items": { - "type": "string" + "data": { + "$ref": "#/components/schemas/DeleteVm" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "VmOperateParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/VmWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "VmDeleteParams": { + "properties": { + "effect": { + "properties": { + "include_snapshots": { + "type": "boolean" + } }, - "type": "array", - "nullable": true - }, - "backup_group_not_starts_with": { - "type": "string", - "nullable": true - }, - "backup_group_starts_with": { - "type": "string", - "nullable": true + "type": "object" }, - "backup_plan_execution": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupPlanExecutionWhereInput" + "where": { + "$ref": "#/components/schemas/VmWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "VmStartParams": { + "properties": { + "data": { + "properties": { + "host_id": { + "type": "string" } + }, + "required": [ + "host_id" ], - "nullable": true + "type": "object" }, - "backup_restore_point": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupRestorePointWhereInput" + "where": { + "$ref": "#/components/schemas/VmWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "VmAddDiskParams": { + "properties": { + "data": { + "properties": { + "max_bandwidth_policy": { + "$ref": "#/components/schemas/VmDiskIoRestrictType" + }, + "max_bandwidth_unit": { + "$ref": "#/components/schemas/BPSUnit" + }, + "max_bandwidth": { + "type": "integer", + "format": "int64" + }, + "max_iops_policy": { + "$ref": "#/components/schemas/VmDiskIoRestrictType" + }, + "max_iops": { + "type": "integer", + "format": "int64" + }, + "io_policy": { + "$ref": "#/components/schemas/VmDiskIoPolicy" + }, + "vm_disks": { + "properties": { + "mount_disks": { + "items": { + "$ref": "#/components/schemas/MountDisksParams" + }, + "type": "array" + }, + "mount_new_create_disks": { + "items": { + "$ref": "#/components/schemas/MountNewCreateDisksParams" + }, + "type": "array" + } + }, + "type": "object" } - ], - "nullable": true - }, - "cluster_local_id": { - "type": "string", - "nullable": true - }, - "cluster_local_id_contains": { - "type": "string", - "nullable": true - }, - "cluster_local_id_ends_with": { - "type": "string", - "nullable": true - }, - "cluster_local_id_gt": { - "type": "string", - "nullable": true - }, - "cluster_local_id_gte": { - "type": "string", - "nullable": true - }, - "cluster_local_id_in": { - "items": { - "type": "string" }, - "type": "array", - "nullable": true - }, - "cluster_local_id_lt": { - "type": "string", - "nullable": true - }, - "cluster_local_id_lte": { - "type": "string", - "nullable": true - }, - "cluster_local_id_not": { - "type": "string", - "nullable": true - }, - "cluster_local_id_not_contains": { - "type": "string", - "nullable": true - }, - "cluster_local_id_not_ends_with": { - "type": "string", - "nullable": true + "required": [ + "vm_disks" + ], + "type": "object" }, - "cluster_local_id_not_in": { - "items": { - "type": "string" + "where": { + "$ref": "#/components/schemas/VmWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "VmUpdateDiskParams": { + "properties": { + "data": { + "properties": { + "content_library_image_id": { + "type": "string", + "nullable": true + }, + "elf_image_id": { + "type": "string", + "nullable": true + }, + "vm_volume_id": { + "type": "string" + }, + "vm_disk_id": { + "type": "string" + }, + "bus": { + "$ref": "#/components/schemas/Bus" + } }, - "type": "array", - "nullable": true - }, - "cluster_local_id_not_starts_with": { - "type": "string", - "nullable": true - }, - "cluster_local_id_starts_with": { - "type": "string", - "nullable": true - }, - "duration": { - "type": "integer", - "format": "int32", - "nullable": true + "required": [ + "vm_disk_id" + ], + "type": "object" }, - "duration_gt": { - "type": "integer", - "format": "int32", - "nullable": true + "where": { + "$ref": "#/components/schemas/VmWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "VmExpandVmDiskParams": { + "properties": { + "size_unit": { + "$ref": "#/components/schemas/ByteUnit" }, - "duration_gte": { + "size": { "type": "integer", - "format": "int32", - "nullable": true + "format": "int64" }, - "duration_in": { - "items": { - "type": "integer", - "format": "int32" + "where": { + "$ref": "#/components/schemas/VmDiskWhereInput" + } + }, + "required": [ + "size", + "where" + ], + "type": "object" + }, + "VmRemoveDiskParams": { + "properties": { + "data": { + "properties": { + "disk_ids": { + "items": { + "type": "string" + }, + "type": "array" + } }, - "type": "array", - "nullable": true - }, - "duration_lt": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "duration_lte": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "duration_not": { - "type": "integer", - "format": "int32", - "nullable": true + "required": [ + "disk_ids" + ], + "type": "object" }, - "duration_not_in": { - "items": { - "type": "integer", - "format": "int32" + "where": { + "$ref": "#/components/schemas/VmWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "VmAddCdRomParams": { + "properties": { + "data": { + "properties": { + "vm_cd_roms": { + "items": { + "$ref": "#/components/schemas/VmCdRomParams" + }, + "type": "array" + } }, - "type": "array", - "nullable": true + "required": [ + "vm_cd_roms" + ], + "type": "object" }, - "entityAsyncStatus": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" + "where": { + "$ref": "#/components/schemas/VmWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "VmRemoveCdRomParams": { + "properties": { + "data": { + "properties": { + "cd_rom_ids": { + "items": { + "type": "string" + }, + "type": "array" } + }, + "required": [ + "cd_rom_ids" ], - "nullable": true + "type": "object" }, - "entityAsyncStatus_in": { - "items": { - "$ref": "#/components/schemas/EntityAsyncStatus" - }, - "type": "array", - "nullable": true + "where": { + "$ref": "#/components/schemas/VmWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "VmEjectCdRomParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/VmDiskWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "VmToggleCdRomDisableParams": { + "properties": { + "disabled": { + "type": "boolean" }, - "entityAsyncStatus_not": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" + "where": { + "$ref": "#/components/schemas/VmDiskWhereInput" + } + }, + "required": [ + "disabled", + "where" + ], + "type": "object" + }, + "VmAddNicParams": { + "properties": { + "data": { + "properties": { + "vm_nics": { + "items": { + "$ref": "#/components/schemas/VmNicParams" + }, + "type": "array" } - ], - "nullable": true - }, - "entityAsyncStatus_not_in": { - "items": { - "$ref": "#/components/schemas/EntityAsyncStatus" }, - "type": "array", - "nullable": true - }, - "executed_at": { - "type": "string", - "nullable": true - }, - "executed_at_gt": { - "type": "string", - "nullable": true + "required": [ + "vm_nics" + ], + "type": "object" }, - "executed_at_gte": { + "where": { + "$ref": "#/components/schemas/VmWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "UpdateVpcNicPayloads": { + "properties": { + "floating_ip_id": { "type": "string", "nullable": true }, - "executed_at_in": { + "ip_addresses": { "items": { "type": "string" }, - "type": "array", - "nullable": true + "type": "array" }, - "executed_at_lt": { - "type": "string", - "nullable": true + "vpc_subnet_id": { + "type": "string" + } + }, + "type": "object" + }, + "VmUpdateNicParams": { + "properties": { + "data": { + "properties": { + "vpc_nic": { + "$ref": "#/components/schemas/UpdateVpcNicPayloads" + }, + "subnet_mask": { + "type": "string" + }, + "gateway": { + "type": "string" + }, + "ip_address": { + "type": "string" + }, + "nic_id": { + "type": "string" + }, + "connect_vlan_id": { + "type": "string" + }, + "mirror": { + "type": "boolean" + }, + "model": { + "$ref": "#/components/schemas/VmNicModel" + }, + "enabled": { + "type": "boolean" + }, + "mac_address": { + "type": "string" + }, + "nic_index": { + "type": "integer", + "format": "int32" + } + }, + "required": [ + "nic_index" + ], + "type": "object" }, - "executed_at_lte": { - "type": "string", + "where": { + "$ref": "#/components/schemas/VmWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "VmUpdateNicBasicInfoParams": { + "properties": { + "data": { + "properties": { + "subnet_mask": { + "type": "string" + }, + "gateway": { + "type": "string" + }, + "ip_address": { + "type": "string" + } + }, + "type": "object" + }, + "where": { + "$ref": "#/components/schemas/VmNicWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "VmUpdateNicAdvanceInfoParams": { + "properties": { + "data": { + "properties": { + "mirror": { + "type": "boolean" + }, + "enabled": { + "type": "boolean" + }, + "mac_address": { + "type": "string" + }, + "nic_id": { + "type": "string" + }, + "connect_vlan_id": { + "type": "string" + } + }, + "type": "object" + }, + "where": { + "$ref": "#/components/schemas/VmNicWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "VmUpdateNicQosOptionsParams": { + "properties": { + "data": { + "properties": { + "qos": { + "$ref": "#/components/schemas/VmNicQosOption" + } + }, + "type": "object" + }, + "where": { + "$ref": "#/components/schemas/VmNicWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "VmOperatePciNicParams": { + "properties": { + "data": { + "properties": { + "pci_nics": { + "$ref": "#/components/schemas/NicWhereInput" + } + }, + "type": "object" + }, + "where": { + "$ref": "#/components/schemas/VmWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "VmRemoveNicParams": { + "properties": { + "data": { + "properties": { + "nic_index": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array" + } + }, + "required": [ + "nic_index" + ], + "type": "object" + }, + "where": { + "$ref": "#/components/schemas/VmWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "VmRemoveNicByWhereParams": { + "properties": { + "effect": { + "properties": { + "vm_ids": { + "items": { + "type": "string" + }, + "type": "array", + "minItems": 1 + } + }, + "type": "object" + }, + "where": { + "$ref": "#/components/schemas/VmNicWhereInput" + } + }, + "required": [ + "effect", + "where" + ], + "type": "object" + }, + "VmAddGpuDeviceParams": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/VmGpuOperationParams" + }, + "type": "array", + "minItems": 1 + }, + "where": { + "$ref": "#/components/schemas/VmWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "VmRemoveGpuDeviceParams": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/VmGpuOperationParams" + }, + "type": "array", + "minItems": 1 + }, + "where": { + "$ref": "#/components/schemas/VmWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "InstallVmtoolsParams": { + "properties": { + "data": { + "properties": { + "svt_image_id": { + "type": "string" + }, + "cd_rom_id": { + "type": "string" + } + }, + "required": [ + "svt_image_id", + "cd_rom_id" + ], + "type": "object", + "deprecated": true + }, + "where": { + "$ref": "#/components/schemas/VmWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "VmMigrateParams": { + "properties": { + "data": { + "properties": { + "host_id": { + "type": "string" + } + }, + "required": [ + "host_id" + ], + "type": "object" + }, + "where": { + "$ref": "#/components/schemas/VmWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "MigrateType": { + "enum": [ + "COLD_MIGRATE", + "CUTOVER_MIGRATE", + "LIVE_MIGRATE" + ], + "type": "string" + }, + "VlanMapping": { + "properties": { + "src_vlan_local_id": { + "type": "string" + }, + "dest_vlan_local_id": { + "type": "string" + } + }, + "required": [ + "src_vlan_local_id", + "dest_vlan_local_id" + ], + "type": "object" + }, + "MigrateVmConfig": { + "properties": { + "remove_unmovable_devices": { + "type": "boolean" + }, + "new_name": { + "type": "string" + }, + "network_mapping": { + "items": { + "$ref": "#/components/schemas/VlanMapping" + }, + "type": "array" + }, + "migrate_type": { + "$ref": "#/components/schemas/MigrateType" + }, + "elf_storage_policy": { + "$ref": "#/components/schemas/VmVolumeElfStoragePolicyType" + }, + "delete_src_vm": { + "type": "boolean" + } + }, + "required": [ + "network_mapping", + "migrate_type", + "elf_storage_policy" + ], + "type": "object" + }, + "VmMigrateAcrossClusterParams": { + "properties": { + "data": { + "properties": { + "vm_config": { + "$ref": "#/components/schemas/MigrateVmConfig" + }, + "cluster_id": { + "type": "string" + }, + "host_id": { + "type": "string" + } + }, + "required": [ + "vm_config", + "cluster_id" + ], + "type": "object" + }, + "where": { + "$ref": "#/components/schemas/VmWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "TaskWhereInput": { + "properties": { + "AND": { + "items": { + "$ref": "#/components/schemas/TaskWhereInput" + }, + "type": "array", "nullable": true }, - "executed_at_not": { - "type": "string", + "NOT": { + "items": { + "$ref": "#/components/schemas/TaskWhereInput" + }, + "type": "array", "nullable": true }, - "executed_at_not_in": { + "OR": { "items": { - "type": "string" + "$ref": "#/components/schemas/TaskWhereInput" }, "type": "array", "nullable": true }, - "id": { + "cluster": { + "allOf": [ + { + "$ref": "#/components/schemas/ClusterWhereInput" + } + ], + "nullable": true + }, + "description": { "type": "string", "nullable": true }, - "id_contains": { + "description_contains": { "type": "string", "nullable": true }, - "id_ends_with": { + "description_ends_with": { "type": "string", "nullable": true }, - "id_gt": { + "description_gt": { "type": "string", "nullable": true }, - "id_gte": { + "description_gte": { "type": "string", "nullable": true }, - "id_in": { + "description_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "id_lt": { + "description_lt": { "type": "string", "nullable": true }, - "id_lte": { + "description_lte": { "type": "string", "nullable": true }, - "id_not": { + "description_not": { "type": "string", "nullable": true }, - "id_not_contains": { + "description_not_contains": { "type": "string", "nullable": true }, - "id_not_ends_with": { + "description_not_ends_with": { "type": "string", "nullable": true }, - "id_not_in": { + "description_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "id_not_starts_with": { + "description_not_starts_with": { "type": "string", "nullable": true }, - "id_starts_with": { + "description_starts_with": { "type": "string", "nullable": true }, - "local_id": { + "error_code": { "type": "string", "nullable": true }, - "local_id_contains": { + "error_code_contains": { "type": "string", "nullable": true }, - "local_id_ends_with": { + "error_code_ends_with": { "type": "string", "nullable": true }, - "local_id_gt": { + "error_code_gt": { "type": "string", "nullable": true }, - "local_id_gte": { + "error_code_gte": { "type": "string", "nullable": true }, - "local_id_in": { + "error_code_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "local_id_lt": { + "error_code_lt": { "type": "string", "nullable": true }, - "local_id_lte": { + "error_code_lte": { "type": "string", "nullable": true }, - "local_id_not": { + "error_code_not": { "type": "string", "nullable": true }, - "local_id_not_contains": { + "error_code_not_contains": { "type": "string", "nullable": true }, - "local_id_not_ends_with": { + "error_code_not_ends_with": { "type": "string", "nullable": true }, - "local_id_not_in": { + "error_code_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "local_id_not_starts_with": { + "error_code_not_starts_with": { "type": "string", "nullable": true }, - "local_id_starts_with": { + "error_code_starts_with": { "type": "string", "nullable": true }, - "parent_backup": { + "error_message": { "type": "string", "nullable": true }, - "parent_backup_contains": { + "error_message_contains": { "type": "string", "nullable": true }, - "parent_backup_ends_with": { + "error_message_ends_with": { "type": "string", "nullable": true }, - "parent_backup_gt": { + "error_message_gt": { "type": "string", "nullable": true }, - "parent_backup_gte": { + "error_message_gte": { "type": "string", "nullable": true }, - "parent_backup_in": { + "error_message_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "parent_backup_lt": { + "error_message_lt": { "type": "string", "nullable": true }, - "parent_backup_lte": { + "error_message_lte": { "type": "string", "nullable": true }, - "parent_backup_not": { + "error_message_not": { "type": "string", "nullable": true }, - "parent_backup_not_contains": { + "error_message_not_contains": { "type": "string", "nullable": true }, - "parent_backup_not_ends_with": { + "error_message_not_ends_with": { "type": "string", "nullable": true }, - "parent_backup_not_in": { + "error_message_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "parent_backup_not_starts_with": { + "error_message_not_starts_with": { "type": "string", "nullable": true }, - "parent_backup_starts_with": { + "error_message_starts_with": { "type": "string", "nullable": true }, - "read_bytes": { - "type": "integer", - "format": "int64", + "finished_at": { + "type": "string", "nullable": true }, - "read_bytes_gt": { - "type": "integer", - "format": "int64", + "finished_at_gt": { + "type": "string", "nullable": true }, - "read_bytes_gte": { - "type": "integer", - "format": "int64", + "finished_at_gte": { + "type": "string", "nullable": true }, - "read_bytes_in": { + "finished_at_in": { "items": { - "type": "integer", - "format": "int64" + "type": "string" }, "type": "array", "nullable": true }, - "read_bytes_lt": { - "type": "integer", - "format": "int64", + "finished_at_lt": { + "type": "string", "nullable": true }, - "read_bytes_lte": { - "type": "integer", - "format": "int64", + "finished_at_lte": { + "type": "string", "nullable": true }, - "read_bytes_not": { - "type": "integer", - "format": "int64", + "finished_at_not": { + "type": "string", "nullable": true }, - "read_bytes_not_in": { + "finished_at_not_in": { "items": { - "type": "integer", - "format": "int64" + "type": "string" }, "type": "array", "nullable": true }, - "resource_version_gt": { - "type": "integer", - "format": "int32", + "id": { + "type": "string", "nullable": true }, - "resource_version_gte": { - "type": "integer", - "format": "int32", + "id_contains": { + "type": "string", "nullable": true }, - "resource_version_in": { + "id_ends_with": { + "type": "string", + "nullable": true + }, + "id_gt": { + "type": "string", + "nullable": true + }, + "id_gte": { + "type": "string", + "nullable": true + }, + "id_in": { "items": { - "type": "integer", - "format": "int32" + "type": "string" }, "type": "array", "nullable": true }, - "resource_version_lt": { - "type": "integer", - "format": "int32", + "id_lt": { + "type": "string", "nullable": true }, - "resource_version_lte": { - "type": "integer", - "format": "int32", + "id_lte": { + "type": "string", "nullable": true }, - "resource_version_not": { - "type": "integer", - "format": "int32", + "id_not": { + "type": "string", "nullable": true }, - "resource_version_not_in": { + "id_not_contains": { + "type": "string", + "nullable": true + }, + "id_not_ends_with": { + "type": "string", + "nullable": true + }, + "id_not_in": { "items": { - "type": "integer", - "format": "int32" + "type": "string" }, "type": "array", "nullable": true }, - "retry_times": { - "type": "integer", - "format": "int32", + "id_not_starts_with": { + "type": "string", "nullable": true }, - "retry_times_gt": { - "type": "integer", - "format": "int32", + "id_starts_with": { + "type": "string", "nullable": true }, - "retry_times_gte": { - "type": "integer", - "format": "int32", + "internal": { + "type": "boolean", "nullable": true }, - "retry_times_in": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array", + "internal_not": { + "type": "boolean", "nullable": true }, - "retry_times_lt": { - "type": "integer", - "format": "int32", + "key": { + "type": "string", "nullable": true }, - "retry_times_lte": { - "type": "integer", - "format": "int32", + "key_contains": { + "type": "string", "nullable": true }, - "retry_times_not": { - "type": "integer", - "format": "int32", + "key_ends_with": { + "type": "string", "nullable": true }, - "retry_times_not_in": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array", + "key_gt": { + "type": "string", "nullable": true }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupExecutionStatus" - } - ], + "key_gte": { + "type": "string", "nullable": true }, - "status_in": { + "key_in": { "items": { - "$ref": "#/components/schemas/BackupExecutionStatus" + "type": "string" }, "type": "array", "nullable": true }, - "status_not": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupExecutionStatus" - } - ], + "key_lt": { + "type": "string", "nullable": true }, - "status_not_in": { + "key_lte": { + "type": "string", + "nullable": true + }, + "key_not": { + "type": "string", + "nullable": true + }, + "key_not_contains": { + "type": "string", + "nullable": true + }, + "key_not_ends_with": { + "type": "string", + "nullable": true + }, + "key_not_in": { "items": { - "$ref": "#/components/schemas/BackupExecutionStatus" + "type": "string" }, "type": "array", "nullable": true }, - "total_bytes": { - "type": "integer", - "format": "int64", + "key_not_starts_with": { + "type": "string", "nullable": true }, - "total_bytes_gt": { - "type": "integer", - "format": "int64", + "key_starts_with": { + "type": "string", "nullable": true }, - "total_bytes_gte": { - "type": "integer", - "format": "int64", + "local_created_at": { + "type": "string", "nullable": true }, - "total_bytes_in": { + "local_created_at_gt": { + "type": "string", + "nullable": true + }, + "local_created_at_gte": { + "type": "string", + "nullable": true + }, + "local_created_at_in": { "items": { - "type": "integer", - "format": "int64" + "type": "string" }, "type": "array", "nullable": true }, - "total_bytes_lt": { - "type": "integer", - "format": "int64", + "local_created_at_lt": { + "type": "string", "nullable": true }, - "total_bytes_lte": { - "type": "integer", - "format": "int64", + "local_created_at_lte": { + "type": "string", "nullable": true }, - "total_bytes_not": { - "type": "integer", - "format": "int64", + "local_created_at_not": { + "type": "string", "nullable": true }, - "total_bytes_not_in": { + "local_created_at_not_in": { "items": { - "type": "integer", - "format": "int64" + "type": "string" }, "type": "array", "nullable": true }, - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupExecutionType" - } - ], + "progress": { + "type": "number", + "format": "double", "nullable": true }, - "type_in": { + "progress_gt": { + "type": "number", + "format": "double", + "nullable": true + }, + "progress_gte": { + "type": "number", + "format": "double", + "nullable": true + }, + "progress_in": { "items": { - "$ref": "#/components/schemas/BackupExecutionType" + "type": "number", + "format": "double" }, "type": "array", "nullable": true }, - "type_not": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupExecutionType" - } - ], + "progress_lt": { + "type": "number", + "format": "double", "nullable": true }, - "type_not_in": { + "progress_lte": { + "type": "number", + "format": "double", + "nullable": true + }, + "progress_not": { + "type": "number", + "format": "double", + "nullable": true + }, + "progress_not_in": { "items": { - "$ref": "#/components/schemas/BackupExecutionType" + "type": "number", + "format": "double" }, "type": "array", "nullable": true }, - "vm": { - "allOf": [ - { - "$ref": "#/components/schemas/VmWhereInput" - } - ], - "nullable": true - }, - "vm_local_id": { + "resource_id": { "type": "string", "nullable": true }, - "vm_local_id_contains": { + "resource_id_contains": { "type": "string", "nullable": true }, - "vm_local_id_ends_with": { + "resource_id_ends_with": { "type": "string", "nullable": true }, - "vm_local_id_gt": { + "resource_id_gt": { "type": "string", "nullable": true }, - "vm_local_id_gte": { + "resource_id_gte": { "type": "string", "nullable": true }, - "vm_local_id_in": { + "resource_id_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "vm_local_id_lt": { + "resource_id_lt": { "type": "string", "nullable": true }, - "vm_local_id_lte": { + "resource_id_lte": { "type": "string", "nullable": true }, - "vm_local_id_not": { + "resource_id_not": { "type": "string", "nullable": true }, - "vm_local_id_not_contains": { + "resource_id_not_contains": { "type": "string", "nullable": true }, - "vm_local_id_not_ends_with": { + "resource_id_not_ends_with": { "type": "string", "nullable": true }, - "vm_local_id_not_in": { + "resource_id_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "vm_local_id_not_starts_with": { + "resource_id_not_starts_with": { "type": "string", "nullable": true }, - "vm_local_id_starts_with": { + "resource_id_starts_with": { "type": "string", "nullable": true }, - "vm_name": { + "resource_mutation": { "type": "string", "nullable": true }, - "vm_name_contains": { + "resource_mutation_contains": { "type": "string", "nullable": true }, - "vm_name_ends_with": { + "resource_mutation_ends_with": { "type": "string", "nullable": true }, - "vm_name_gt": { + "resource_mutation_gt": { "type": "string", "nullable": true }, - "vm_name_gte": { + "resource_mutation_gte": { "type": "string", "nullable": true }, - "vm_name_in": { + "resource_mutation_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "vm_name_lt": { + "resource_mutation_lt": { "type": "string", "nullable": true }, - "vm_name_lte": { + "resource_mutation_lte": { "type": "string", "nullable": true }, - "vm_name_not": { + "resource_mutation_not": { "type": "string", "nullable": true }, - "vm_name_not_contains": { + "resource_mutation_not_contains": { "type": "string", "nullable": true }, - "vm_name_not_ends_with": { + "resource_mutation_not_ends_with": { "type": "string", "nullable": true }, - "vm_name_not_in": { + "resource_mutation_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "vm_name_not_starts_with": { + "resource_mutation_not_starts_with": { "type": "string", "nullable": true }, - "vm_name_starts_with": { + "resource_mutation_starts_with": { "type": "string", "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "BackupPlanExecutionWhereInput": { - "properties": { - "AND": { - "items": { - "$ref": "#/components/schemas/BackupPlanExecutionWhereInput" - }, - "type": "array", + }, + "resource_rollback_error": { + "type": "string", "nullable": true }, - "NOT": { + "resource_rollback_error_contains": { + "type": "string", + "nullable": true + }, + "resource_rollback_error_ends_with": { + "type": "string", + "nullable": true + }, + "resource_rollback_error_gt": { + "type": "string", + "nullable": true + }, + "resource_rollback_error_gte": { + "type": "string", + "nullable": true + }, + "resource_rollback_error_in": { "items": { - "$ref": "#/components/schemas/BackupPlanExecutionWhereInput" + "type": "string" }, "type": "array", "nullable": true }, - "OR": { + "resource_rollback_error_lt": { + "type": "string", + "nullable": true + }, + "resource_rollback_error_lte": { + "type": "string", + "nullable": true + }, + "resource_rollback_error_not": { + "type": "string", + "nullable": true + }, + "resource_rollback_error_not_contains": { + "type": "string", + "nullable": true + }, + "resource_rollback_error_not_ends_with": { + "type": "string", + "nullable": true + }, + "resource_rollback_error_not_in": { "items": { - "$ref": "#/components/schemas/BackupPlanExecutionWhereInput" + "type": "string" }, "type": "array", "nullable": true }, - "backup_plan": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupPlanWhereInput" - } - ], - "nullable": true - }, - "deletable_flag_marked": { - "type": "boolean", + "resource_rollback_error_not_starts_with": { + "type": "string", "nullable": true }, - "deletable_flag_marked_not": { - "type": "boolean", + "resource_rollback_error_starts_with": { + "type": "string", "nullable": true }, - "duration": { + "resource_rollback_retry_count": { "type": "integer", "format": "int32", "nullable": true }, - "duration_gt": { + "resource_rollback_retry_count_gt": { "type": "integer", "format": "int32", "nullable": true }, - "duration_gte": { + "resource_rollback_retry_count_gte": { "type": "integer", "format": "int32", "nullable": true }, - "duration_in": { + "resource_rollback_retry_count_in": { "items": { "type": "integer", "format": "int32" @@ -59643,22 +60347,22 @@ "type": "array", "nullable": true }, - "duration_lt": { + "resource_rollback_retry_count_lt": { "type": "integer", "format": "int32", "nullable": true }, - "duration_lte": { + "resource_rollback_retry_count_lte": { "type": "integer", "format": "int32", "nullable": true }, - "duration_not": { + "resource_rollback_retry_count_not": { "type": "integer", "format": "int32", "nullable": true }, - "duration_not_in": { + "resource_rollback_retry_count_not_in": { "items": { "type": "integer", "format": "int32" @@ -59666,621 +60370,473 @@ "type": "array", "nullable": true }, - "entityAsyncStatus": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" - } - ], + "resource_rollbacked": { + "type": "boolean", "nullable": true }, - "entityAsyncStatus_in": { - "items": { - "$ref": "#/components/schemas/EntityAsyncStatus" - }, - "type": "array", + "resource_rollbacked_not": { + "type": "boolean", "nullable": true }, - "entityAsyncStatus_not": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" - } - ], + "resource_type": { + "type": "string", "nullable": true }, - "entityAsyncStatus_not_in": { - "items": { - "$ref": "#/components/schemas/EntityAsyncStatus" - }, - "type": "array", + "resource_type_contains": { + "type": "string", "nullable": true }, - "executed_at": { + "resource_type_ends_with": { "type": "string", "nullable": true }, - "executed_at_gt": { + "resource_type_gt": { "type": "string", "nullable": true }, - "executed_at_gte": { + "resource_type_gte": { "type": "string", "nullable": true }, - "executed_at_in": { + "resource_type_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "executed_at_lt": { + "resource_type_lt": { "type": "string", "nullable": true }, - "executed_at_lte": { + "resource_type_lte": { "type": "string", "nullable": true }, - "executed_at_not": { + "resource_type_not": { "type": "string", "nullable": true }, - "executed_at_not_in": { + "resource_type_not_contains": { + "type": "string", + "nullable": true + }, + "resource_type_not_ends_with": { + "type": "string", + "nullable": true + }, + "resource_type_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "id": { + "resource_type_not_starts_with": { "type": "string", "nullable": true }, - "id_contains": { + "resource_type_starts_with": { "type": "string", "nullable": true }, - "id_ends_with": { + "snapshot": { "type": "string", "nullable": true }, - "id_gt": { + "snapshot_contains": { "type": "string", "nullable": true }, - "id_gte": { + "snapshot_ends_with": { "type": "string", "nullable": true }, - "id_in": { + "snapshot_gt": { + "type": "string", + "nullable": true + }, + "snapshot_gte": { + "type": "string", + "nullable": true + }, + "snapshot_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "id_lt": { + "snapshot_lt": { "type": "string", "nullable": true }, - "id_lte": { + "snapshot_lte": { "type": "string", "nullable": true }, - "id_not": { + "snapshot_not": { "type": "string", "nullable": true }, - "id_not_contains": { + "snapshot_not_contains": { "type": "string", "nullable": true }, - "id_not_ends_with": { + "snapshot_not_ends_with": { "type": "string", "nullable": true }, - "id_not_in": { + "snapshot_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "id_not_starts_with": { + "snapshot_not_starts_with": { "type": "string", "nullable": true }, - "id_starts_with": { + "snapshot_starts_with": { "type": "string", "nullable": true }, - "local_created_at": { + "started_at": { "type": "string", "nullable": true }, - "local_created_at_gt": { + "started_at_gt": { "type": "string", "nullable": true }, - "local_created_at_gte": { + "started_at_gte": { "type": "string", "nullable": true }, - "local_created_at_in": { + "started_at_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "local_created_at_lt": { - "type": "string", - "nullable": true - }, - "local_created_at_lte": { - "type": "string", - "nullable": true - }, - "local_created_at_not": { - "type": "string", - "nullable": true - }, - "local_created_at_not_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true - }, - "local_id": { - "type": "string", - "nullable": true - }, - "local_id_contains": { - "type": "string", - "nullable": true - }, - "local_id_ends_with": { + "started_at_lt": { "type": "string", "nullable": true }, - "local_id_gt": { + "started_at_lte": { "type": "string", "nullable": true }, - "local_id_gte": { + "started_at_not": { "type": "string", "nullable": true }, - "local_id_in": { + "started_at_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "local_id_lt": { - "type": "string", - "nullable": true - }, - "local_id_lte": { - "type": "string", - "nullable": true - }, - "local_id_not": { - "type": "string", - "nullable": true - }, - "local_id_not_contains": { - "type": "string", - "nullable": true - }, - "local_id_not_ends_with": { - "type": "string", + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/TaskStatus" + } + ], "nullable": true }, - "local_id_not_in": { + "status_in": { "items": { - "type": "string" + "$ref": "#/components/schemas/TaskStatus" }, "type": "array", "nullable": true }, - "local_id_not_starts_with": { - "type": "string", - "nullable": true - }, - "local_id_starts_with": { - "type": "string", - "nullable": true - }, - "method": { + "status_not": { "allOf": [ { - "$ref": "#/components/schemas/BackupExecutionMethod" + "$ref": "#/components/schemas/TaskStatus" } ], "nullable": true }, - "method_in": { + "status_not_in": { "items": { - "$ref": "#/components/schemas/BackupExecutionMethod" + "$ref": "#/components/schemas/TaskStatus" }, "type": "array", "nullable": true }, - "method_not": { + "type": { "allOf": [ { - "$ref": "#/components/schemas/BackupExecutionMethod" + "$ref": "#/components/schemas/TaskType" } ], "nullable": true }, - "method_not_in": { + "type_in": { "items": { - "$ref": "#/components/schemas/BackupExecutionMethod" + "$ref": "#/components/schemas/TaskType" }, "type": "array", "nullable": true }, - "state": { + "type_not": { "allOf": [ { - "$ref": "#/components/schemas/BackupPlanExecutionState" + "$ref": "#/components/schemas/TaskType" } ], "nullable": true }, - "state_in": { + "type_not_in": { "items": { - "$ref": "#/components/schemas/BackupPlanExecutionState" + "$ref": "#/components/schemas/TaskType" }, "type": "array", "nullable": true }, - "state_not": { + "user": { "allOf": [ { - "$ref": "#/components/schemas/BackupPlanExecutionState" + "$ref": "#/components/schemas/UserWhereInput" } ], "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "TaskStatus": { + "enum": [ + "EXECUTING", + "FAILED", + "PAUSED", + "PENDING", + "SUCCESSED" + ], + "type": "string" + }, + "TaskType": { + "enum": [ + "APPLICATION", + "BACKUP", + "HOST_PLUGIN", + "REPLICATION", + "RESOLVER", + "SFS" + ], + "type": "string" + }, + "StopVmInCutoverMigrationParams": { + "properties": { + "force": { + "type": "boolean" + }, + "tasks": { + "$ref": "#/components/schemas/TaskWhereInput" + } + }, + "required": [ + "tasks" + ], + "type": "object" + }, + "StepUnit": { + "enum": [ + "BIT", + "BYTE", + "COUNT", + "PERCENT" + ], + "type": "string" + }, + "NestedStep": { + "properties": { + "current": { + "type": "number", + "format": "double", + "nullable": true }, - "state_not_in": { - "items": { - "$ref": "#/components/schemas/BackupPlanExecutionState" - }, - "type": "array", + "finished": { + "type": "boolean", "nullable": true }, - "status": { + "key": { + "type": "string", + "nullable": true + }, + "per_second": { + "type": "number", + "format": "double", + "nullable": true + }, + "total": { + "type": "number", + "format": "double", + "nullable": true + }, + "unit": { "allOf": [ { - "$ref": "#/components/schemas/BackupPlanExecutionStatus" + "$ref": "#/components/schemas/StepUnit" } ], "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "Task": { + "properties": { + "args": { + "properties": {}, + "type": "object" }, - "status_in": { - "items": { - "$ref": "#/components/schemas/BackupPlanExecutionStatus" - }, - "type": "array", - "nullable": true - }, - "status_not": { + "cluster": { "allOf": [ { - "$ref": "#/components/schemas/BackupPlanExecutionStatus" + "$ref": "#/components/schemas/NestedCluster" } ], "nullable": true }, - "status_not_in": { - "items": { - "$ref": "#/components/schemas/BackupPlanExecutionStatus" - }, - "type": "array", - "nullable": true + "description": { + "type": "string" }, - "success_job_count": { - "type": "integer", - "format": "int32", + "error_code": { + "type": "string", "nullable": true }, - "success_job_count_gt": { - "type": "integer", - "format": "int32", + "error_message": { + "type": "string", "nullable": true }, - "success_job_count_gte": { - "type": "integer", - "format": "int32", + "finished_at": { + "type": "string", "nullable": true }, - "success_job_count_in": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array", - "nullable": true + "id": { + "type": "string" }, - "success_job_count_lt": { - "type": "integer", - "format": "int32", - "nullable": true + "internal": { + "type": "boolean" }, - "success_job_count_lte": { - "type": "integer", - "format": "int32", + "key": { + "type": "string", "nullable": true }, - "success_job_count_not": { - "type": "integer", - "format": "int32", - "nullable": true + "local_created_at": { + "type": "string" }, - "success_job_count_not_in": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array", + "progress": { + "type": "number", + "format": "double" + }, + "resource_id": { + "type": "string", "nullable": true }, - "total_job_count": { - "type": "integer", - "format": "int32", + "resource_mutation": { + "type": "string", "nullable": true }, - "total_job_count_gt": { - "type": "integer", - "format": "int32", + "resource_rollback_error": { + "type": "string", "nullable": true }, - "total_job_count_gte": { + "resource_rollback_retry_count": { "type": "integer", "format": "int32", "nullable": true }, - "total_job_count_in": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array", + "resource_rollbacked": { + "type": "boolean", "nullable": true }, - "total_job_count_lt": { - "type": "integer", - "format": "int32", + "resource_type": { + "type": "string", "nullable": true }, - "total_job_count_lte": { - "type": "integer", - "format": "int32", - "nullable": true + "snapshot": { + "type": "string" }, - "total_job_count_not": { - "type": "integer", - "format": "int32", + "started_at": { + "type": "string", "nullable": true }, - "total_job_count_not_in": { + "status": { + "$ref": "#/components/schemas/TaskStatus" + }, + "steps": { "items": { - "type": "integer", - "format": "int32" + "$ref": "#/components/schemas/NestedStep" }, - "type": "array", - "nullable": true + "type": "array" }, "type": { "allOf": [ { - "$ref": "#/components/schemas/BackupExecutionType" + "$ref": "#/components/schemas/TaskType" } ], "nullable": true }, - "type_in": { - "items": { - "$ref": "#/components/schemas/BackupExecutionType" - }, - "type": "array", - "nullable": true - }, - "type_not": { + "user": { "allOf": [ { - "$ref": "#/components/schemas/BackupExecutionType" + "$ref": "#/components/schemas/NestedUser" } ], "nullable": true - }, - "type_not_in": { - "items": { - "$ref": "#/components/schemas/BackupExecutionType" - }, - "type": "array", - "nullable": true } }, + "required": [ + "args", + "description", + "id", + "internal", + "local_created_at", + "progress", + "snapshot", + "status", + "steps" + ], "type": "object", "additionalProperties": false }, - "BackupExecutionMethod": { - "enum": [ - "AUTO", - "MANUAL" - ], - "type": "string" - }, - "BackupPlanExecutionState": { - "enum": [ - "FAILED", - "PARTLY_FAILED", - "PAUSED", - "PAUSING", - "RUNNING", - "STARTING", - "SUCCEED" - ], - "type": "string" - }, - "BackupExecutionType": { - "enum": [ - "FULL", - "INCREMENTAL" - ], - "type": "string" - }, - "BackupExecutionStatus": { - "enum": [ - "ABORTED", - "FAILED", - "INITIALIZING", - "PAUSED", - "PENDING", - "RUNNING", - "SUCCESS" - ], - "type": "string" - }, - "BackupRestorePointCreation": { - "enum": [ - "AUTO", - "FAILBACK", - "FAILOVER", - "MANUAL" - ], - "type": "string" - }, - "BackupRestorePointType": { - "enum": [ - "FULL", - "INCREMENTAL" - ], - "type": "string" - }, - "BackupStoreStatus": { - "enum": [ - "CONNECTED", - "CONNECTING", - "DISABLED", - "ERROR", - "INIT", - "INIT_ERROR" - ], - "type": "string" - }, - "BackupStoreType": { - "enum": [ - "ISCSI", - "NFS3", - "NFS4" - ], - "type": "string" - }, - "BackupServiceStatus": { - "enum": [ - "ERROR", - "INITIALIZING", - "INSTALLING", - "INSTALL_FAILED", - "RUNNING", - "TERMINATE_FAILED", - "TERMINATING", - "UPGRADE_FAILED", - "UPGRADING" - ], - "type": "string" - }, - "BackupPlanDeleteStrategy": { - "enum": [ - "DELETE_RESTORE_POINT", - "KEEP_RESTORE_POINT" + "AbortMigrateVmAcrossClusterParams": { + "properties": { + "tasks": { + "$ref": "#/components/schemas/TaskWhereInput" + } + }, + "required": [ + "tasks" ], - "type": "string" + "type": "object" }, - "BackupPlanUpdationParams": { + "VmAddFolderParams": { "properties": { "data": { "properties": { - "disconnect_strategy": { - "$ref": "#/components/schemas/BackupPlanDeleteStrategy" - }, - "keep_policy_value": { - "type": "integer", - "format": "int32" - }, - "keep_policy": { - "$ref": "#/components/schemas/BackupPlanKeepPolicy" - }, - "backup_delay_option": { - "$ref": "#/components/schemas/BackupPlanDelayOption" - }, - "window_end": { - "type": "string" - }, - "window_start": { - "type": "string" - }, - "enable_window": { - "type": "boolean" - }, - "full_time_point": { - "$ref": "#/components/schemas/BackupPlanTimePoint" - }, - "full_period": { - "$ref": "#/components/schemas/BackupPlanPeriod" - }, - "full_interval": { - "type": "integer", - "format": "int32" - }, - "incremental_weekdays": { - "items": { - "$ref": "#/components/schemas/WeekdayTypeEnum" - }, - "type": "array" - }, - "incremental_time_points": { - "items": { - "$ref": "#/components/schemas/BackupPlanTimePoint" - }, - "type": "array" - }, - "incremental_interval": { - "type": "integer", - "format": "int32" - }, - "incremental_period": { - "$ref": "#/components/schemas/BackupPlanPeriod" - }, - "snapshot_consistent_type": { - "$ref": "#/components/schemas/ConsistentType" - }, - "compression": { - "type": "boolean" - }, - "vms": { - "$ref": "#/components/schemas/VmWhereInput" - }, - "description": { - "type": "string" - }, - "name": { + "folder_id": { "type": "string" } }, + "required": [ + "folder_id" + ], "type": "object" }, "where": { - "$ref": "#/components/schemas/BackupPlanWhereInput" + "$ref": "#/components/schemas/VmWhereInput" } }, "required": [ @@ -60289,55 +60845,86 @@ ], "type": "object" }, - "DeleteBackupPlan": { + "VmUpdateAdvancedOptionsParams": { "properties": { - "entityAsyncStatus": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" + "data": { + "properties": { + "video_type": { + "$ref": "#/components/schemas/VmVideoType" + }, + "windows_optimize": { + "type": "boolean" + }, + "cpu_model": { + "type": "string" + }, + "clock_offset": { + "$ref": "#/components/schemas/VmClockOffset" } - ], - "nullable": true + }, + "type": "object" }, - "id": { - "type": "string" + "where": { + "$ref": "#/components/schemas/VmWhereInput" } }, "required": [ - "id" + "data", + "where" ], "type": "object" }, - "WithTask_DeleteBackupPlan_": { + "VmUpdateHostOptionsParams": { "properties": { - "task_id": { - "type": "string", - "nullable": true - }, "data": { - "$ref": "#/components/schemas/DeleteBackupPlan" + "properties": { + "ntp_servers": { + "items": { + "type": "string" + }, + "type": "array" + }, + "dns_servers": { + "items": { + "type": "string" + }, + "type": "array" + }, + "hostname": { + "type": "string" + } + }, + "type": "object" + }, + "where": { + "$ref": "#/components/schemas/VmWhereInput" } }, "required": [ - "data" + "data", + "where" ], "type": "object" }, - "BackupPlanDeletionParams": { + "VmResetGuestOsPasswordParams": { "properties": { "data": { "properties": { - "delete_strategy": { - "$ref": "#/components/schemas/BackupPlanDeleteStrategy" + "password": { + "type": "string" + }, + "username": { + "type": "string" } }, "required": [ - "delete_strategy" + "password", + "username" ], "type": "object" }, "where": { - "$ref": "#/components/schemas/BackupPlanWhereInput" + "$ref": "#/components/schemas/VmWhereInput" } }, "required": [ @@ -60346,29 +60933,110 @@ ], "type": "object" }, - "BackupPlanSuspendParams": { + "VmUpdateOwnerParams": { "properties": { + "data": { + "properties": { + "search_for": { + "type": "string", + "enum": [ + "username", + "id" + ] + }, + "value": { + "type": "string" + } + }, + "required": [ + "search_for", + "value" + ], + "type": "object" + }, "where": { - "$ref": "#/components/schemas/BackupPlanWhereInput" + "$ref": "#/components/schemas/VmWhereInput" } }, "required": [ + "data", "where" ], "type": "object" }, - "BackupPlanResumeParams": { + "VmRestrictIoParamsData": { + "properties": { + "max_bandwidth_policy": { + "$ref": "#/components/schemas/VmDiskIoRestrictType" + }, + "max_bandwidth_unit": { + "$ref": "#/components/schemas/BPSUnit" + }, + "max_bandwidth": { + "type": "integer", + "format": "int64" + }, + "max_iops_policy": { + "$ref": "#/components/schemas/VmDiskIoRestrictType" + }, + "max_iops": { + "type": "integer", + "format": "int64" + } + }, + "type": "object" + }, + "VmUpdateEachDiskIoPolicyParams": { + "properties": { + "data": { + "$ref": "#/components/schemas/VmRestrictIoParamsData" + }, + "boot": { + "type": "integer", + "format": "int32" + } + }, + "required": [ + "data", + "boot" + ], + "type": "object" + }, + "VmUpdateIoPolicyParams": { "properties": { + "data": { + "properties": { + "each_disk": { + "items": { + "$ref": "#/components/schemas/VmUpdateEachDiskIoPolicyParams" + }, + "type": "array" + }, + "whole_vm": { + "$ref": "#/components/schemas/VmRestrictIoParamsData" + }, + "io_policy": { + "allOf": [ + { + "$ref": "#/components/schemas/VmDiskIoPolicy" + } + ], + "nullable": true + } + }, + "type": "object" + }, "where": { - "$ref": "#/components/schemas/BackupPlanWhereInput" + "$ref": "#/components/schemas/VmWhereInput" } }, "required": [ + "data", "where" ], "type": "object" }, - "NestedBackupPlan": { + "NestedContentLibraryVmTemplate": { "properties": { "id": { "type": "string" @@ -60384,125 +61052,81 @@ "type": "object", "additionalProperties": false }, - "BackupPlanExecution": { + "VmExportFileType": { + "enum": [ + "OVF", + "QCOW2", + "RAW" + ], + "type": "string" + }, + "VmExportFileFile": { "properties": { - "backup_plan": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedBackupPlan" - } - ], - "nullable": true - }, - "deletable_flag_marked": { - "type": "boolean", - "nullable": true + "md5": { + "type": "string" }, - "duration": { + "fileSize": { "type": "integer", - "format": "int32", - "nullable": true - }, - "entityAsyncStatus": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" - } - ], - "nullable": true - }, - "executed_at": { - "type": "string", - "nullable": true - }, - "id": { - "type": "string" + "format": "int64" }, - "local_created_at": { + "fileSecret": { "type": "string" }, - "local_id": { + "fileUUID": { "type": "string" }, - "method": { - "$ref": "#/components/schemas/BackupExecutionMethod" - }, - "state": { - "allOf": [ - { - "$ref": "#/components/schemas/BackupPlanExecutionState" - } - ], - "nullable": true - }, - "status": { - "$ref": "#/components/schemas/BackupPlanExecutionStatus" - }, - "success_job_count": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "total_job_count": { - "type": "integer", - "format": "int32", - "nullable": true - }, "type": { - "$ref": "#/components/schemas/BackupExecutionType" + "$ref": "#/components/schemas/VmExportFileType" + }, + "fileName": { + "type": "string" } }, "required": [ - "id", - "local_created_at", - "local_id", - "method", - "status", - "type" + "md5", + "fileSize", + "fileSecret", + "fileUUID", + "type", + "fileName" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "WithTask_BackupPlanExecution_": { + "NestedVmVolume": { "properties": { - "task_id": { - "type": "string", - "nullable": true + "id": { + "type": "string" }, - "data": { - "$ref": "#/components/schemas/BackupPlanExecution" + "name": { + "type": "string" } }, "required": [ - "data" + "id", + "name" ], - "type": "object" + "type": "object", + "additionalProperties": false }, - "BackupPlanExecuteParams": { + "VmExportFile": { "properties": { - "data": { - "properties": { - "type": { - "$ref": "#/components/schemas/BackupExecutionType" + "content_library_vm_template": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedContentLibraryVmTemplate" } - }, - "required": [ - "type" ], - "type": "object" + "nullable": true + }, + "createdAt": { + "type": "string" + }, + "damaged": { + "type": "boolean" + }, + "data_port_id": { + "type": "string" }, - "where": { - "$ref": "#/components/schemas/BackupPlanWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "BackupRestoreExecution": { - "properties": { "entityAsyncStatus": { "allOf": [ { @@ -60511,28 +61135,58 @@ ], "nullable": true }, + "files": { + "items": { + "$ref": "#/components/schemas/VmExportFileFile" + }, + "type": "array" + }, "id": { "type": "string" }, - "name": { + "storage_cluster_id": { "type": "string" + }, + "type": { + "$ref": "#/components/schemas/VmExportFileType" + }, + "vm": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedVm" + } + ], + "nullable": true + }, + "vm_volume": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedVmVolume" + } + ], + "nullable": true } }, "required": [ + "createdAt", + "damaged", + "data_port_id", + "files", "id", - "name" + "storage_cluster_id", + "type" ], "type": "object", "additionalProperties": false }, - "WithTask_BackupRestoreExecution_": { + "WithTask_VmExportFile_": { "properties": { "task_id": { "type": "string", "nullable": true }, "data": { - "$ref": "#/components/schemas/BackupRestoreExecution" + "$ref": "#/components/schemas/VmExportFile" } }, "required": [ @@ -60540,62 +61194,27 @@ ], "type": "object" }, - "BackupRestoreExecutionNetworkMapping": { + "VmExportParamsData": { "properties": { - "src_vlan_id": { - "type": "string" - }, - "dst_vlan_id": { - "type": "string" + "keep_mac": { + "type": "boolean" }, - "__typename": { - "type": "string", - "enum": [ - "BackupRestoreExecutionNetworkMapping" - ], - "nullable": false + "type": { + "$ref": "#/components/schemas/VmExportFileType" } }, "required": [ - "src_vlan_id", - "dst_vlan_id" + "type" ], "type": "object" }, - "BackupRestorePointRebuildParams": { + "VmExportParams": { "properties": { "data": { - "properties": { - "rebuild_network_mapping": { - "items": { - "$ref": "#/components/schemas/BackupRestoreExecutionNetworkMapping" - }, - "type": "array" - }, - "rebuild_target_host_id": { - "type": "string" - }, - "rebuild_target_cluster_id": { - "type": "string" - }, - "rebuild_name": { - "type": "string" - }, - "startup_after_restore": { - "type": "boolean" - } - }, - "required": [ - "rebuild_network_mapping", - "rebuild_target_host_id", - "rebuild_target_cluster_id", - "rebuild_name", - "startup_after_restore" - ], - "type": "object" + "$ref": "#/components/schemas/VmExportParamsData" }, "where": { - "$ref": "#/components/schemas/BackupRestorePointWhereInput" + "$ref": "#/components/schemas/VmWhereInput" } }, "required": [ @@ -60604,2104 +61223,2644 @@ ], "type": "object" }, - "BackupRestorePointRestoreInPlaceParams": { + "VmdkDiskModify": { "properties": { - "data": { - "properties": { - "startup_after_restore": { - "type": "boolean" - } - }, - "required": [ - "startup_after_restore" - ], - "type": "object" + "elf_storage_policy": { + "$ref": "#/components/schemas/VmVolumeElfStoragePolicyType" }, - "where": { - "$ref": "#/components/schemas/BackupRestorePointWhereInput" + "bus": { + "$ref": "#/components/schemas/Bus" + }, + "volume_name": { + "type": "string" + }, + "boot": { + "type": "integer", + "format": "int32" + }, + "vmdk_name": { + "type": "string" } }, "required": [ - "data", - "where" + "vmdk_name" ], "type": "object" }, - "DeleteBackupRestorePoint": { + "VmdkCdromModify": { "properties": { - "entityAsyncStatus": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" - } - ], - "nullable": true + "removed": { + "type": "boolean" }, - "id": { + "content_library_image_id": { + "type": "string" + }, + "elf_image_id": { "type": "string" + }, + "boot": { + "type": "integer", + "format": "int32" + }, + "index": { + "type": "integer", + "format": "int32" } }, "required": [ - "id" + "index" ], "type": "object" }, - "WithTask_DeleteBackupRestorePoint-Array_": { + "OvfDiskOperate": { "properties": { - "task_id": { - "type": "string", - "nullable": true + "new_disks": { + "$ref": "#/components/schemas/VmDiskParams" }, - "data": { + "modify_cd_roms": { "items": { - "$ref": "#/components/schemas/DeleteBackupRestorePoint" + "$ref": "#/components/schemas/VmdkCdromModify" + }, + "type": "array" + }, + "modify_vmdk_disks": { + "items": { + "$ref": "#/components/schemas/VmdkDiskModify" }, "type": "array" } }, - "required": [ - "data" - ], - "type": "object" - }, - "BackupRestorePointDeletionParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/BackupRestorePointWhereInput" - } - }, - "required": [ - "where" - ], "type": "object" }, - "NestedCapacity": { + "VmImportNicParams": { "properties": { - "column": { - "type": "integer", - "format": "int32", - "nullable": true + "subnet_mask": { + "type": "string" }, - "row": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "NestedClusterTopo": { - "properties": { - "id": { + "gateway": { "type": "string" }, - "name": { + "ip_address": { "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "type": "object", - "additionalProperties": false - }, - "Direction": { - "enum": [ - "HORIZONTAL", - "VERTICAL" - ], - "type": "string" - }, - "BrickPhaseEnum": { - "enum": [ - "BACKWARD", - "FORWARD" - ], - "type": "string" - }, - "NestedBrickDiskLayout": { - "properties": { - "column": { - "type": "integer", - "format": "int32" - }, - "direction": { - "$ref": "#/components/schemas/Direction" - }, - "phase": { - "$ref": "#/components/schemas/BrickPhaseEnum" }, - "row": { - "type": "integer", - "format": "int32" - } - }, - "required": [ - "column", - "direction", - "phase", - "row" - ], - "type": "object", - "additionalProperties": false - }, - "NestedNodeTopo": { - "properties": { - "id": { + "nic_id": { "type": "string" }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "type": "object", - "additionalProperties": false - }, - "PowerPosition": { - "enum": [ - "LEFT", - "MIDDLE", - "RIGHT" - ], - "type": "string" - }, - "NestedBrickPower": { - "properties": { - "id": { + "connect_vlan_id": { "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object", - "additionalProperties": false - }, - "NestedRackTopo": { - "properties": { - "id": { + }, + "mirror": { + "type": "boolean" + }, + "model": { + "$ref": "#/components/schemas/VmNicModel" + }, + "enabled": { + "type": "boolean" + }, + "mac_address": { "type": "string" }, - "name": { + "local_id": { "type": "string" } }, "required": [ - "id", - "name" + "connect_vlan_id" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "NestedTagPosition": { + "VmImportParams": { "properties": { - "column": { + "max_bandwidth_policy": { + "$ref": "#/components/schemas/VmDiskIoRestrictType" + }, + "max_bandwidth_unit": { + "$ref": "#/components/schemas/BPSUnit" + }, + "max_bandwidth": { "type": "integer", - "format": "int32" + "format": "int64" }, - "row": { + "max_iops_policy": { + "$ref": "#/components/schemas/VmDiskIoRestrictType" + }, + "max_iops": { + "type": "integer", + "format": "int64" + }, + "io_policy": { + "$ref": "#/components/schemas/VmDiskIoPolicy" + }, + "vcpu": { "type": "integer", "format": "int32" }, - "tag": { - "type": "string" - } - }, - "required": [ - "column", - "row", - "tag" - ], - "type": "object", - "additionalProperties": false - }, - "BrickTopo": { - "properties": { - "capacity": { - "$ref": "#/components/schemas/NestedCapacity" + "status": { + "$ref": "#/components/schemas/VmStatus" }, - "cluster": { - "$ref": "#/components/schemas/NestedCluster" + "ha": { + "type": "boolean" }, - "cluster_topo": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedClusterTopo" - } - ], - "nullable": true + "vm_nics": { + "items": { + "$ref": "#/components/schemas/VmImportNicParams" + }, + "type": "array" }, - "disk_layout": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedBrickDiskLayout" - } - ], - "nullable": true + "disk_operate": { + "$ref": "#/components/schemas/OvfDiskOperate" }, - "height": { + "memory_unit": { + "$ref": "#/components/schemas/ByteUnit" + }, + "memory": { + "type": "integer", + "format": "int64" + }, + "cpu_cores": { "type": "integer", "format": "int32" }, - "id": { - "type": "string" + "cpu_sockets": { + "type": "integer", + "format": "int32" }, - "local_id": { + "guest_os_type": { + "$ref": "#/components/schemas/VmGuestsOperationSystem" + }, + "folder_id": { "type": "string" }, - "model": { - "type": "string", - "nullable": true + "description": { + "type": "string" }, "name": { "type": "string" }, - "node_topoes": { - "items": { - "$ref": "#/components/schemas/NestedNodeTopo" - }, - "type": "array", - "nullable": true - }, - "position": { - "type": "integer", - "format": "int32" - }, - "power_layout": { - "allOf": [ - { - "$ref": "#/components/schemas/Direction" - } - ], - "nullable": true + "host_id": { + "type": "string" }, - "power_position": { - "allOf": [ - { - "$ref": "#/components/schemas/PowerPosition" - } - ], - "nullable": true + "cluster_id": { + "type": "string" }, - "powers": { + "upload_tasks": { "items": { - "$ref": "#/components/schemas/NestedBrickPower" + "type": "string" }, - "type": "array", - "nullable": true + "type": "array" }, - "rack_topo": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedRackTopo" - } - ], - "nullable": true + "owner_id": { + "type": "string" }, - "tag_position_in_brick": { - "items": { - "$ref": "#/components/schemas/NestedTagPosition" - }, - "type": "array", - "nullable": true + "parsed_ovf": { + "$ref": "#/components/schemas/ParsedOVF" } }, "required": [ - "capacity", - "cluster", - "height", - "id", - "local_id", "name", - "position" - ], - "type": "object", - "additionalProperties": false - }, - "WithTask_BrickTopo_": { - "properties": { - "task_id": { - "type": "string", - "nullable": true - }, - "data": { - "$ref": "#/components/schemas/BrickTopo" - } - }, - "required": [ - "data" + "cluster_id", + "upload_tasks", + "parsed_ovf" ], "type": "object" }, - "NodeTopoWhereInput": { + "NestedGpuDriverInfo": { "properties": { - "AND": { - "items": { - "$ref": "#/components/schemas/NodeTopoWhereInput" - }, - "type": "array", - "nullable": true - }, - "NOT": { - "items": { - "$ref": "#/components/schemas/NodeTopoWhereInput" - }, - "type": "array", - "nullable": true - }, - "OR": { - "items": { - "$ref": "#/components/schemas/NodeTopoWhereInput" - }, - "type": "array", - "nullable": true - }, - "brick_topo": { - "allOf": [ - { - "$ref": "#/components/schemas/BrickTopoWhereInput" - } - ], - "nullable": true - }, - "cluster": { - "allOf": [ - { - "$ref": "#/components/schemas/ClusterWhereInput" - } - ], - "nullable": true - }, - "cluster_topo": { - "allOf": [ - { - "$ref": "#/components/schemas/ClusterTopoWhereInput" - } - ], - "nullable": true - }, - "host": { - "allOf": [ - { - "$ref": "#/components/schemas/HostWhereInput" - } - ], - "nullable": true - }, - "id": { + "filename": { "type": "string", "nullable": true }, - "id_contains": { + "name": { "type": "string", "nullable": true }, - "id_ends_with": { + "rhelversion": { "type": "string", "nullable": true }, - "id_gt": { + "srcversion": { "type": "string", "nullable": true }, - "id_gte": { + "supported": { "type": "string", "nullable": true }, - "id_in": { - "items": { - "type": "string" - }, - "type": "array", + "vermagic": { + "type": "string", "nullable": true }, - "id_lt": { + "version": { "type": "string", "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "NestedVgpuType": { + "properties": { + "framebuffer": { + "type": "number", + "format": "double", + "nullable": true }, - "id_lte": { - "type": "string", + "max_instance": { + "type": "integer", + "format": "int32", "nullable": true }, - "id_not": { + "max_resolution": { "type": "string", "nullable": true }, - "id_not_contains": { + "name": { "type": "string", "nullable": true }, - "id_not_ends_with": { + "vgpu_type_id": { "type": "string", "nullable": true - }, - "id_not_in": { - "items": { - "type": "string" - }, - "type": "array", + } + }, + "type": "object", + "additionalProperties": false + }, + "VmGpuDetail": { + "properties": { + "vgpu_instance_on_vm_num": { + "type": "integer", + "format": "int32", "nullable": true }, - "id_not_starts_with": { - "type": "string", + "vgpu_instance_num": { + "type": "integer", + "format": "int32", "nullable": true }, - "id_starts_with": { + "user_vgpu_type_name": { "type": "string", "nullable": true }, - "local_id": { + "user_vgpu_type_id": { "type": "string", "nullable": true }, - "local_id_contains": { - "type": "string", + "user_usage": { + "allOf": [ + { + "$ref": "#/components/schemas/GpuDeviceUsage" + } + ], "nullable": true }, - "local_id_ends_with": { - "type": "string", - "nullable": true + "status": { + "$ref": "#/components/schemas/GpuDeviceStatus" }, - "local_id_gt": { - "type": "string", - "nullable": true + "name": { + "type": "string" }, - "local_id_gte": { - "type": "string", - "nullable": true + "model": { + "type": "string" }, - "local_id_in": { + "mdev_supported_types": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedVgpuType" }, "type": "array", "nullable": true }, - "local_id_lt": { - "type": "string", - "nullable": true - }, - "local_id_lte": { - "type": "string", - "nullable": true - }, - "local_id_not": { - "type": "string", - "nullable": true - }, - "local_id_not_contains": { - "type": "string", - "nullable": true + "local_id": { + "type": "string" }, - "local_id_not_ends_with": { - "type": "string", - "nullable": true + "local_created_at": { + "type": "string" }, - "local_id_not_in": { + "labels": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedLabel" }, "type": "array", "nullable": true }, - "local_id_not_starts_with": { - "type": "string", + "is_nvidia_vfs_supported": { + "type": "boolean", "nullable": true }, - "local_id_starts_with": { - "type": "string", + "is_nvidia_vfs_enabled": { + "type": "boolean", "nullable": true }, - "name": { - "type": "string", + "is_nvidia_tools_ready": { + "type": "boolean", "nullable": true }, - "name_contains": { - "type": "string", - "nullable": true + "id": { + "type": "string" }, - "name_ends_with": { - "type": "string", - "nullable": true + "host": { + "$ref": "#/components/schemas/NestedHost" }, - "name_gt": { - "type": "string", + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], "nullable": true }, - "name_gte": { - "type": "string", + "driver_info": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedGpuDriverInfo" + } + ], "nullable": true }, - "name_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true + "description": { + "type": "string" }, - "name_lt": { - "type": "string", - "nullable": true + "bus_location": { + "type": "string" }, - "name_lte": { - "type": "string", - "nullable": true + "brand": { + "type": "string" }, - "name_not": { - "type": "string", + "available_vgpus_num": { + "type": "integer", + "format": "int32", "nullable": true }, - "name_not_contains": { - "type": "string", - "nullable": true - }, - "name_not_ends_with": { - "type": "string", - "nullable": true - }, - "name_not_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true - }, - "name_not_starts_with": { - "type": "string", - "nullable": true - }, - "name_starts_with": { - "type": "string", + "assigned_vgpus_num": { + "type": "integer", + "format": "int32", "nullable": true } }, - "type": "object", - "additionalProperties": false + "required": [ + "status", + "name", + "model", + "local_id", + "local_created_at", + "id", + "host", + "description", + "bus_location", + "brand" + ], + "type": "object" }, - "BrickTopoWhereInput": { + "VmGpuInfo": { "properties": { - "AND": { - "items": { - "$ref": "#/components/schemas/BrickTopoWhereInput" - }, - "type": "array", - "nullable": true - }, - "NOT": { + "gpu_devices": { "items": { - "$ref": "#/components/schemas/BrickTopoWhereInput" + "$ref": "#/components/schemas/VmGpuDetail" }, - "type": "array", - "nullable": true + "type": "array" }, - "OR": { - "items": { - "$ref": "#/components/schemas/BrickTopoWhereInput" - }, - "type": "array", - "nullable": true + "name": { + "type": "string" }, - "cluster": { - "allOf": [ - { - "$ref": "#/components/schemas/ClusterWhereInput" - } - ], - "nullable": true + "local_id": { + "type": "string" }, - "cluster_topo": { - "allOf": [ - { - "$ref": "#/components/schemas/ClusterTopoWhereInput" - } - ], + "id": { + "type": "string" + } + }, + "required": [ + "gpu_devices", + "name", + "local_id", + "id" + ], + "type": "object" + }, + "VmOrderByInput": { + "enum": [ + "bios_uuid_ASC", + "bios_uuid_DESC", + "clock_offset_ASC", + "clock_offset_DESC", + "cloud_init_supported_ASC", + "cloud_init_supported_DESC", + "cpu_ASC", + "cpu_DESC", + "cpu_model_ASC", + "cpu_model_DESC", + "cpu_usage_ASC", + "cpu_usage_DESC", + "deleted_at_ASC", + "deleted_at_DESC", + "description_ASC", + "description_DESC", + "dns_servers_ASC", + "dns_servers_DESC", + "entityAsyncStatus_ASC", + "entityAsyncStatus_DESC", + "firmware_ASC", + "firmware_DESC", + "guest_cpu_model_ASC", + "guest_cpu_model_DESC", + "guest_os_type_ASC", + "guest_os_type_DESC", + "guest_size_usage_ASC", + "guest_size_usage_DESC", + "guest_used_size_ASC", + "guest_used_size_DESC", + "ha_ASC", + "ha_DESC", + "hostname_ASC", + "hostname_DESC", + "id_ASC", + "id_DESC", + "in_recycle_bin_ASC", + "in_recycle_bin_DESC", + "internal_ASC", + "internal_DESC", + "io_policy_ASC", + "io_policy_DESC", + "ips_ASC", + "ips_DESC", + "kernel_info_ASC", + "kernel_info_DESC", + "last_shutdown_time_ASC", + "last_shutdown_time_DESC", + "local_created_at_ASC", + "local_created_at_DESC", + "local_id_ASC", + "local_id_DESC", + "logical_size_bytes_ASC", + "logical_size_bytes_DESC", + "max_bandwidth_ASC", + "max_bandwidth_DESC", + "max_bandwidth_policy_ASC", + "max_bandwidth_policy_DESC", + "max_iops_ASC", + "max_iops_DESC", + "max_iops_policy_ASC", + "max_iops_policy_DESC", + "memory_ASC", + "memory_DESC", + "memory_usage_ASC", + "memory_usage_DESC", + "name_ASC", + "name_DESC", + "nested_virtualization_ASC", + "nested_virtualization_DESC", + "node_ip_ASC", + "node_ip_DESC", + "original_name_ASC", + "original_name_DESC", + "os_ASC", + "os_DESC", + "protected_ASC", + "protected_DESC", + "provisioned_size_ASC", + "provisioned_size_DESC", + "size_ASC", + "size_DESC", + "status_ASC", + "status_DESC", + "unique_logical_size_ASC", + "unique_logical_size_DESC", + "unique_size_ASC", + "unique_size_DESC", + "vcpu_ASC", + "vcpu_DESC", + "video_type_ASC", + "video_type_DESC", + "vm_tools_status_ASC", + "vm_tools_status_DESC", + "vm_tools_version_ASC", + "vm_tools_version_DESC", + "vm_usage_ASC", + "vm_usage_DESC", + "win_opt_ASC", + "win_opt_DESC" + ], + "type": "string" + }, + "GetVmsRequestBody": { + "properties": { + "after": { + "type": "string", "nullable": true }, - "height": { - "type": "integer", - "format": "int32", + "before": { + "type": "string", "nullable": true }, - "height_gt": { + "first": { "type": "integer", "format": "int32", "nullable": true }, - "height_gte": { + "last": { "type": "integer", "format": "int32", "nullable": true }, - "height_in": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array", + "orderBy": { + "allOf": [ + { + "$ref": "#/components/schemas/VmOrderByInput" + } + ], "nullable": true }, - "height_lt": { + "skip": { "type": "integer", "format": "int32", "nullable": true }, - "height_lte": { - "type": "integer", - "format": "int32", + "where": { + "allOf": [ + { + "$ref": "#/components/schemas/VmWhereInput" + } + ], "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "VmVncInfo": { + "properties": { + "vm": { + "$ref": "#/components/schemas/Vm" }, - "height_not": { - "type": "integer", - "format": "int32", - "nullable": true + "terminal": { + "type": "string" }, - "height_not_in": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array", - "nullable": true + "redirect": { + "type": "string" }, - "id": { - "type": "string", - "nullable": true + "direct": { + "type": "string" }, - "id_contains": { + "cluster_ip": { + "type": "string" + } + }, + "required": [ + "vm", + "terminal", + "redirect", + "cluster_ip" + ], + "type": "object" + }, + "VmWhereUniqueInput": { + "properties": { + "id": { "type": "string", "nullable": true }, - "id_ends_with": { + "local_id": { "type": "string", "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "GetVmVncInfoParams": { + "properties": { + "vm": { + "$ref": "#/components/schemas/VmWhereUniqueInput" + } + }, + "required": [ + "vm" + ], + "type": "object" + }, + "VmUpdateVpcNicParams": { + "properties": { + "data": { + "properties": { + "vpc_nic": { + "$ref": "#/components/schemas/UpdateVpcNicPayloads" + } + }, + "required": [ + "vpc_nic" + ], + "type": "object" }, - "id_gt": { - "type": "string", - "nullable": true + "where": { + "$ref": "#/components/schemas/VmNicWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "ContentLibraryVmTemplate": { + "properties": { + "architecture": { + "$ref": "#/components/schemas/Architecture" }, - "id_gte": { - "type": "string", - "nullable": true + "cloud_init_supported": { + "type": "boolean" }, - "id_in": { + "clusters": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedCluster" }, "type": "array", "nullable": true }, - "id_lt": { - "type": "string", - "nullable": true - }, - "id_lte": { - "type": "string", - "nullable": true + "createdAt": { + "type": "string" }, - "id_not": { - "type": "string", - "nullable": true + "description": { + "type": "string" }, - "id_not_contains": { - "type": "string", + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], "nullable": true }, - "id_not_ends_with": { - "type": "string", - "nullable": true + "id": { + "type": "string" }, - "id_not_in": { + "labels": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedLabel" }, "type": "array", "nullable": true }, - "id_not_starts_with": { - "type": "string", - "nullable": true - }, - "id_starts_with": { - "type": "string", - "nullable": true - }, - "local_id": { - "type": "string", - "nullable": true + "memory": { + "type": "integer", + "format": "int64" }, - "local_id_contains": { - "type": "string", - "nullable": true + "name": { + "type": "string" }, - "local_id_ends_with": { + "os": { "type": "string", "nullable": true }, - "local_id_gt": { - "type": "string", - "nullable": true + "size": { + "type": "integer", + "format": "int64" }, - "local_id_gte": { - "type": "string", - "nullable": true + "vcpu": { + "type": "integer", + "format": "int32" }, - "local_id_in": { + "vm_template_uuids": { "items": { "type": "string" }, - "type": "array", - "nullable": true - }, - "local_id_lt": { - "type": "string", - "nullable": true - }, - "local_id_lte": { - "type": "string", - "nullable": true - }, - "local_id_not": { - "type": "string", - "nullable": true - }, - "local_id_not_contains": { - "type": "string", - "nullable": true - }, - "local_id_not_ends_with": { - "type": "string", - "nullable": true + "type": "array" }, - "local_id_not_in": { + "vm_templates": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedVmTemplate" }, "type": "array", "nullable": true - }, - "local_id_not_starts_with": { - "type": "string", - "nullable": true - }, - "local_id_starts_with": { + } + }, + "required": [ + "architecture", + "cloud_init_supported", + "createdAt", + "description", + "id", + "memory", + "name", + "size", + "vcpu", + "vm_template_uuids" + ], + "type": "object", + "additionalProperties": false + }, + "WithTask_ContentLibraryVmTemplate_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "model": { - "type": "string", - "nullable": true + "data": { + "$ref": "#/components/schemas/ContentLibraryVmTemplate" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "ContentLibraryVmTemplateCreationParams": { + "properties": { + "clusters": { + "$ref": "#/components/schemas/ClusterWhereInput" }, - "model_contains": { - "type": "string", - "nullable": true + "cloud_init_supported": { + "type": "boolean" }, - "model_ends_with": { - "type": "string", - "nullable": true + "vm": { + "$ref": "#/components/schemas/VmWhereUniqueInput" }, - "model_gt": { - "type": "string", - "nullable": true + "description": { + "type": "string" }, - "model_gte": { - "type": "string", - "nullable": true + "name": { + "type": "string" + } + }, + "required": [ + "clusters", + "vm", + "name" + ], + "type": "object" + }, + "ContentLibraryVmTemplateUpdationParamsData": { + "properties": { + "clusters": { + "$ref": "#/components/schemas/ClusterWhereInput" }, - "model_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true + "cloud_init_supported": { + "type": "boolean" }, - "model_lt": { - "type": "string", - "nullable": true + "description": { + "type": "string" }, - "model_lte": { - "type": "string", - "nullable": true - }, - "model_not": { - "type": "string", - "nullable": true + "name": { + "type": "string" + } + }, + "type": "object" + }, + "ContentLibraryVmTemplateUpdationParams": { + "properties": { + "data": { + "$ref": "#/components/schemas/ContentLibraryVmTemplateUpdationParamsData" }, - "model_not_contains": { - "type": "string", - "nullable": true + "where": { + "$ref": "#/components/schemas/ContentLibraryVmTemplateWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "ContentLibraryVmTemplateUpdationClusterParamsData": { + "properties": { + "clusters": { + "$ref": "#/components/schemas/ClusterWhereInput" + } + }, + "required": [ + "clusters" + ], + "type": "object" + }, + "ContentLibraryVmTemplateUpdationClusterParams": { + "properties": { + "data": { + "$ref": "#/components/schemas/ContentLibraryVmTemplateUpdationClusterParamsData" }, - "model_not_ends_with": { + "where": { + "$ref": "#/components/schemas/ContentLibraryVmTemplateWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "DeleteContentLibraryVmTemplate": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "WithTask_DeleteContentLibraryVmTemplate_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "model_not_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true + "data": { + "$ref": "#/components/schemas/DeleteContentLibraryVmTemplate" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "ContentLibraryVmTemplateDeletionParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/ContentLibraryVmTemplateWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "ContentLibraryVmTemplateExportParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/ContentLibraryVmTemplateWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "ContentLibraryVmdkCdromModify": { + "properties": { + "enabled": { + "type": "boolean" }, - "model_not_starts_with": { - "type": "string", - "nullable": true + "removed": { + "type": "boolean" }, - "model_starts_with": { - "type": "string", - "nullable": true + "boot": { + "type": "integer", + "format": "int32" }, - "name": { - "type": "string", - "nullable": true + "index": { + "type": "integer", + "format": "int32" + } + }, + "required": [ + "index" + ], + "type": "object" + }, + "ContentLibraryVmdkCdromMount": { + "properties": { + "enabled": { + "type": "boolean" }, - "name_contains": { - "type": "string", - "nullable": true + "boot": { + "type": "integer", + "format": "int32" + } + }, + "type": "object" + }, + "ContentLibraryVmTemplateOvfDiskOperate": { + "properties": { + "mount_new_cd_roms": { + "items": { + "$ref": "#/components/schemas/ContentLibraryVmdkCdromMount" + }, + "type": "array" }, - "name_ends_with": { - "type": "string", - "nullable": true + "modify_cd_roms": { + "items": { + "$ref": "#/components/schemas/ContentLibraryVmdkCdromModify" + }, + "type": "array" }, - "name_gt": { - "type": "string", - "nullable": true + "modify_vmdk_disks": { + "items": { + "$ref": "#/components/schemas/VmdkDiskModify" + }, + "type": "array" + } + }, + "type": "object" + }, + "ContentLibraryImportVmNic": { + "properties": { + "mirror": { + "type": "boolean" }, - "name_gte": { - "type": "string", - "nullable": true + "model": { + "$ref": "#/components/schemas/VmNicModel" }, - "name_in": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "model" + ], + "type": "object" + }, + "ContentLibraryVmTemplateImportParams": { + "properties": { + "vm_nics": { "items": { - "type": "string" + "$ref": "#/components/schemas/ContentLibraryImportVmNic" }, - "type": "array", - "nullable": true - }, - "name_lt": { - "type": "string", - "nullable": true + "type": "array" }, - "name_lte": { - "type": "string", - "nullable": true + "disk_operate": { + "$ref": "#/components/schemas/ContentLibraryVmTemplateOvfDiskOperate" }, - "name_not": { - "type": "string", - "nullable": true + "ha": { + "type": "boolean" }, - "name_not_contains": { - "type": "string", - "nullable": true + "memory_unit": { + "$ref": "#/components/schemas/ByteUnit" }, - "name_not_ends_with": { - "type": "string", - "nullable": true + "memory": { + "type": "integer", + "format": "int64" }, - "name_not_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true + "vcpu": { + "type": "integer", + "format": "int32" }, - "name_not_starts_with": { - "type": "string", - "nullable": true + "cpu_cores": { + "type": "integer", + "format": "int32" }, - "name_starts_with": { - "type": "string", - "nullable": true + "cpu_sockets": { + "type": "integer", + "format": "int32" }, - "node_topoes_every": { - "allOf": [ - { - "$ref": "#/components/schemas/NodeTopoWhereInput" - } - ], - "nullable": true + "description": { + "type": "string" }, - "node_topoes_none": { - "allOf": [ - { - "$ref": "#/components/schemas/NodeTopoWhereInput" - } - ], - "nullable": true + "name": { + "type": "string" }, - "node_topoes_some": { - "allOf": [ - { - "$ref": "#/components/schemas/NodeTopoWhereInput" - } - ], - "nullable": true + "upload_tasks": { + "items": { + "type": "string" + }, + "type": "array" }, - "position": { - "type": "integer", - "format": "int32", - "nullable": true + "parsed_ovf": { + "$ref": "#/components/schemas/ParsedOVF" }, - "position_gt": { - "type": "integer", - "format": "int32", - "nullable": true + "cluster_id": { + "type": "string" + } + }, + "required": [ + "name", + "upload_tasks", + "parsed_ovf", + "cluster_id" + ], + "type": "object" + }, + "NestedOrganization": { + "properties": { + "id": { + "type": "string" }, - "position_gte": { + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "Datacenter": { + "properties": { + "cluster_num": { "type": "integer", "format": "int32", "nullable": true }, - "position_in": { + "clusters": { "items": { - "type": "integer", - "format": "int32" + "$ref": "#/components/schemas/NestedCluster" }, "type": "array", "nullable": true }, - "position_lt": { + "failure_data_space": { "type": "integer", - "format": "int32", + "format": "int64", "nullable": true }, - "position_lte": { + "host_num": { "type": "integer", "format": "int32", "nullable": true }, - "position_not": { - "type": "integer", - "format": "int32", - "nullable": true + "id": { + "type": "string" }, - "position_not_in": { + "labels": { "items": { - "type": "integer", - "format": "int32" + "$ref": "#/components/schemas/NestedLabel" }, "type": "array", "nullable": true }, - "power_layout": { - "allOf": [ - { - "$ref": "#/components/schemas/Direction" - } - ], - "nullable": true + "name": { + "type": "string" }, - "power_layout_in": { - "items": { - "$ref": "#/components/schemas/Direction" - }, - "type": "array", - "nullable": true + "organization": { + "$ref": "#/components/schemas/NestedOrganization" }, - "power_layout_not": { - "allOf": [ - { - "$ref": "#/components/schemas/Direction" - } - ], + "total_cpu_hz": { + "type": "integer", + "format": "int64", "nullable": true }, - "power_layout_not_in": { - "items": { - "$ref": "#/components/schemas/Direction" - }, - "type": "array", + "total_data_capacity": { + "type": "integer", + "format": "int64", "nullable": true }, - "power_position": { - "allOf": [ - { - "$ref": "#/components/schemas/PowerPosition" - } - ], + "total_memory_bytes": { + "type": "integer", + "format": "int64", "nullable": true }, - "power_position_in": { - "items": { - "$ref": "#/components/schemas/PowerPosition" - }, - "type": "array", + "used_cpu_hz": { + "type": "number", + "format": "double", "nullable": true }, - "power_position_not": { - "allOf": [ - { - "$ref": "#/components/schemas/PowerPosition" - } - ], + "used_data_space": { + "type": "integer", + "format": "int64", "nullable": true }, - "power_position_not_in": { - "items": { - "$ref": "#/components/schemas/PowerPosition" - }, - "type": "array", + "used_memory_bytes": { + "type": "number", + "format": "double", "nullable": true }, - "rack_topo": { - "allOf": [ - { - "$ref": "#/components/schemas/RackTopoWhereInput" - } - ], + "vm_num": { + "type": "integer", + "format": "int32", "nullable": true } }, + "required": [ + "id", + "name", + "organization" + ], "type": "object", "additionalProperties": false }, - "ClusterTopoWhereInput": { + "WithTask_Datacenter_": { "properties": { - "AND": { - "items": { - "$ref": "#/components/schemas/ClusterTopoWhereInput" - }, - "type": "array", - "nullable": true - }, - "NOT": { - "items": { - "$ref": "#/components/schemas/ClusterTopoWhereInput" - }, - "type": "array", - "nullable": true - }, - "OR": { - "items": { - "$ref": "#/components/schemas/ClusterTopoWhereInput" - }, - "type": "array", - "nullable": true - }, - "brick_topoes_every": { - "allOf": [ - { - "$ref": "#/components/schemas/BrickTopoWhereInput" - } - ], + "task_id": { + "type": "string", "nullable": true }, - "brick_topoes_none": { - "allOf": [ - { - "$ref": "#/components/schemas/BrickTopoWhereInput" - } - ], - "nullable": true + "data": { + "$ref": "#/components/schemas/Datacenter" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "DatacenterCreationParams": { + "properties": { + "clusters": { + "$ref": "#/components/schemas/ClusterWhereInput" }, - "brick_topoes_some": { - "allOf": [ - { - "$ref": "#/components/schemas/BrickTopoWhereInput" - } - ], - "nullable": true + "organization_id": { + "type": "string" }, - "cluster": { - "allOf": [ - { + "name": { + "type": "string" + } + }, + "required": [ + "organization_id", + "name" + ], + "type": "object" + }, + "DatacenterUpdationParams": { + "properties": { + "data": { + "properties": { + "clusters": { "$ref": "#/components/schemas/ClusterWhereInput" + }, + "name": { + "type": "string" } - ], - "nullable": true - }, - "id": { - "type": "string", - "nullable": true + }, + "type": "object" }, - "id_contains": { - "type": "string", - "nullable": true - }, - "id_ends_with": { + "where": { + "$ref": "#/components/schemas/DatacenterWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "DatacenterWhereUniqueInput": { + "properties": { + "id": { "type": "string", "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "AddClustersToDatacenterParams": { + "properties": { + "data": { + "properties": { + "clusters": { + "$ref": "#/components/schemas/ClusterWhereInput" + } + }, + "type": "object" }, - "id_gt": { - "type": "string", - "nullable": true + "where": { + "$ref": "#/components/schemas/DatacenterWhereUniqueInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "RemoveClustersFromDatacenterParams": { + "properties": { + "data": { + "properties": { + "clusters": { + "$ref": "#/components/schemas/ClusterWhereInput" + } + }, + "type": "object" }, - "id_gte": { + "where": { + "$ref": "#/components/schemas/DatacenterWhereUniqueInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "DeleteDatacenter": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "WithTask_DeleteDatacenter_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "id_in": { - "items": { - "type": "string" - }, - "type": "array", + "data": { + "$ref": "#/components/schemas/DeleteDatacenter" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "DatacenterDeletionParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/DatacenterWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "NestedDiskFailureInformation": { + "properties": { + "chunk_checksum_error": { + "type": "boolean", "nullable": true }, - "id_lt": { - "type": "string", + "chunk_errflag": { + "type": "boolean", "nullable": true }, - "id_lte": { - "type": "string", + "chunk_io_error": { + "type": "boolean", "nullable": true }, - "id_not": { - "type": "string", + "chunk_warnflag": { + "type": "boolean", "nullable": true }, - "id_not_contains": { - "type": "string", + "iostat_latency": { + "type": "boolean", "nullable": true }, - "id_not_ends_with": { - "type": "string", + "iostat_latency_ms": { + "type": "integer", + "format": "int64", "nullable": true }, - "id_not_in": { - "items": { - "type": "string" - }, - "type": "array", + "smart_check": { + "type": "boolean", "nullable": true - }, - "id_not_starts_with": { + } + }, + "type": "object", + "additionalProperties": false + }, + "PartitionUsage": { + "enum": [ + "BOOT", + "CACHE", + "EFI_SYSTEM", + "JOURNAL", + "METAD", + "PARTITION", + "SWAP", + "SYSTEM", + "UNMOUNTED", + "UNPARTED", + "ZOOKEEPER" + ], + "type": "string" + }, + "NestedPartition": { + "properties": { + "name": { "type": "string", "nullable": true }, - "id_starts_with": { + "path": { "type": "string", "nullable": true }, - "local_id": { - "type": "string", - "nullable": true + "size": { + "type": "integer", + "format": "int64" }, - "local_id_contains": { - "type": "string", - "nullable": true + "usage": { + "$ref": "#/components/schemas/PartitionUsage" }, - "local_id_ends_with": { - "type": "string", - "nullable": true + "used_size": { + "type": "integer", + "format": "int64" + } + }, + "required": [ + "size", + "usage", + "used_size" + ], + "type": "object", + "additionalProperties": false + }, + "NestedPmemDimm": { + "properties": { + "id": { + "type": "string" }, - "local_id_gt": { - "type": "string", + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "Disk": { + "properties": { + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], "nullable": true }, - "local_id_gte": { - "type": "string", + "failure_information": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedDiskFailureInformation" + } + ], "nullable": true }, - "local_id_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true + "firmware": { + "type": "string" }, - "local_id_lt": { - "type": "string", + "function": { + "allOf": [ + { + "$ref": "#/components/schemas/DiskFunction" + } + ], "nullable": true }, - "local_id_lte": { - "type": "string", + "health_status": { + "allOf": [ + { + "$ref": "#/components/schemas/DiskHealthStatus" + } + ], "nullable": true }, - "local_id_not": { - "type": "string", - "nullable": true + "healthy": { + "type": "boolean" }, - "local_id_not_contains": { - "type": "string", - "nullable": true + "host": { + "$ref": "#/components/schemas/NestedHost" }, - "local_id_not_ends_with": { - "type": "string", - "nullable": true + "id": { + "type": "string" }, - "local_id_not_in": { + "labels": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedLabel" }, "type": "array", "nullable": true }, - "local_id_not_starts_with": { - "type": "string", - "nullable": true - }, - "local_id_starts_with": { - "type": "string", - "nullable": true + "local_id": { + "type": "string" }, - "name": { - "type": "string", - "nullable": true + "model": { + "type": "string" }, - "name_contains": { - "type": "string", - "nullable": true + "mounted": { + "type": "boolean" }, - "name_ends_with": { - "type": "string", - "nullable": true + "name": { + "type": "string" }, - "name_gt": { - "type": "string", + "numa_node": { + "type": "integer", + "format": "int32", "nullable": true }, - "name_gte": { - "type": "string", - "nullable": true + "offline": { + "type": "boolean" }, - "name_in": { + "partitions": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedPartition" }, - "type": "array", - "nullable": true - }, - "name_lt": { - "type": "string", - "nullable": true - }, - "name_lte": { - "type": "string", - "nullable": true + "type": "array" }, - "name_not": { - "type": "string", - "nullable": true + "path": { + "type": "string" }, - "name_not_contains": { + "persistent_memory_type": { "type": "string", "nullable": true }, - "name_not_ends_with": { - "type": "string", + "physical_slot_on_brick": { + "type": "integer", + "format": "int32", "nullable": true }, - "name_not_in": { + "pmem_dimms": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedPmemDimm" }, "type": "array", "nullable": true }, - "name_not_starts_with": { - "type": "string", - "nullable": true - }, - "name_starts_with": { - "type": "string", - "nullable": true - }, - "node_topoes_every": { + "recommended_usage": { "allOf": [ { - "$ref": "#/components/schemas/NodeTopoWhereInput" + "$ref": "#/components/schemas/DiskUsage" } ], "nullable": true }, - "node_topoes_none": { - "allOf": [ - { - "$ref": "#/components/schemas/NodeTopoWhereInput" - } - ], + "remaining_life_percent": { + "type": "integer", + "format": "int32", "nullable": true }, - "node_topoes_some": { - "allOf": [ - { - "$ref": "#/components/schemas/NodeTopoWhereInput" - } - ], - "nullable": true + "serial": { + "type": "string" }, - "zone_topoes_every": { - "allOf": [ - { - "$ref": "#/components/schemas/ZoneTopoWhereInput" - } - ], - "nullable": true + "size": { + "type": "integer", + "format": "int64" }, - "zone_topoes_none": { - "allOf": [ - { - "$ref": "#/components/schemas/ZoneTopoWhereInput" - } - ], - "nullable": true + "type": { + "$ref": "#/components/schemas/DiskType" }, - "zone_topoes_some": { + "usage": { + "$ref": "#/components/schemas/DiskUsage" + }, + "usage_status": { "allOf": [ { - "$ref": "#/components/schemas/ZoneTopoWhereInput" + "$ref": "#/components/schemas/DiskUsageStatus" } ], "nullable": true } }, + "required": [ + "firmware", + "healthy", + "host", + "id", + "local_id", + "model", + "mounted", + "name", + "offline", + "partitions", + "path", + "serial", + "size", + "type", + "usage" + ], "type": "object", "additionalProperties": false }, - "ZoneTopoWhereInput": { + "WithTask_Disk_": { "properties": { - "AND": { - "items": { - "$ref": "#/components/schemas/ZoneTopoWhereInput" - }, - "type": "array", - "nullable": true - }, - "NOT": { - "items": { - "$ref": "#/components/schemas/ZoneTopoWhereInput" - }, - "type": "array", - "nullable": true - }, - "OR": { - "items": { - "$ref": "#/components/schemas/ZoneTopoWhereInput" - }, - "type": "array", + "task_id": { + "type": "string", "nullable": true }, - "cluster": { - "allOf": [ - { - "$ref": "#/components/schemas/ClusterWhereInput" + "data": { + "$ref": "#/components/schemas/Disk" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "DiskMountParams": { + "properties": { + "data": { + "properties": { + "function": { + "$ref": "#/components/schemas/DiskFunction" } + }, + "required": [ + "function" ], - "nullable": true + "type": "object" }, - "cluster_topo": { - "allOf": [ - { - "$ref": "#/components/schemas/ClusterTopoWhereInput" - } - ], - "nullable": true + "where": { + "$ref": "#/components/schemas/DiskWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "DiskUnmountParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/DiskWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "FilterRuleAggregationEnum": { + "enum": [ + "AVG", + "MAX", + "MIN", + "QUANTILE", + "SUM" + ], + "type": "string" + }, + "FilterRuleMetricEnum": { + "enum": [ + "VM_CPU_USAGE", + "VM_MEMORY_USAGE", + "VM_POWEROFF_DAYS", + "VM_POWERON_DAYS", + "VM_READWRITE_IO" + ], + "type": "string" + }, + "FilterRuleOpEnum": { + "enum": [ + "GT", + "GTE", + "LT", + "LTE" + ], + "type": "string" + }, + "NestedFilterRule": { + "properties": { + "aggregation": { + "$ref": "#/components/schemas/FilterRuleAggregationEnum" }, - "id": { - "type": "string", - "nullable": true + "duration": { + "type": "integer", + "format": "int32" }, - "id_contains": { - "type": "string", - "nullable": true + "metric": { + "$ref": "#/components/schemas/FilterRuleMetricEnum" }, - "id_ends_with": { - "type": "string", - "nullable": true + "op": { + "$ref": "#/components/schemas/FilterRuleOpEnum" }, - "id_gt": { - "type": "string", - "nullable": true + "quantile": { + "type": "integer", + "format": "int32" }, - "id_gte": { - "type": "string", + "threshold": { + "type": "number", + "format": "double" + } + }, + "required": [ + "aggregation", + "duration", + "metric", + "op", + "quantile", + "threshold" + ], + "type": "object", + "additionalProperties": false + }, + "EntityFilter": { + "properties": { + "apply_to_all_clusters": { + "type": "boolean", "nullable": true }, - "id_in": { + "clusters": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedCluster" }, "type": "array", "nullable": true }, - "id_lt": { - "type": "string", - "nullable": true + "entity_type": { + "$ref": "#/components/schemas/EntityType" }, - "id_lte": { - "type": "string", - "nullable": true + "exclude_ids": { + "items": { + "type": "string" + }, + "type": "array" }, - "id_not": { - "type": "string", + "exec_failed_cluster": { + "items": { + "$ref": "#/components/schemas/NestedCluster" + }, + "type": "array", "nullable": true }, - "id_not_contains": { - "type": "string", - "nullable": true + "filter_error": { + "items": { + "type": "string" + }, + "type": "array" }, - "id_not_ends_with": { - "type": "string", - "nullable": true + "filter_status": { + "$ref": "#/components/schemas/FilterStatus" }, - "id_not_in": { + "id": { + "type": "string" + }, + "ids": { "items": { "type": "string" }, - "type": "array", - "nullable": true - }, - "id_not_starts_with": { - "type": "string", - "nullable": true + "type": "array" }, - "id_starts_with": { + "last_executed_at": { "type": "string", "nullable": true }, - "local_id": { - "type": "string", - "nullable": true + "name": { + "type": "string" }, - "local_id_contains": { + "preset": { "type": "string", "nullable": true }, - "local_id_ends_with": { + "rules": { + "items": { + "$ref": "#/components/schemas/NestedFilterRule" + }, + "type": "array" + } + }, + "required": [ + "entity_type", + "exclude_ids", + "filter_error", + "filter_status", + "id", + "ids", + "name", + "rules" + ], + "type": "object", + "additionalProperties": false + }, + "WithTask_EntityFilter_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "local_id_gt": { - "type": "string", - "nullable": true + "data": { + "$ref": "#/components/schemas/EntityFilter" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "FilterRuleInput": { + "properties": { + "threshold": { + "type": "number", + "format": "double" }, - "local_id_gte": { - "type": "string", - "nullable": true + "quantile": { + "type": "integer", + "format": "int32" }, - "local_id_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true + "op": { + "$ref": "#/components/schemas/FilterRuleOpEnum" }, - "local_id_lt": { - "type": "string", - "nullable": true + "metric": { + "$ref": "#/components/schemas/FilterRuleMetricEnum" }, - "local_id_lte": { - "type": "string", - "nullable": true + "duration": { + "type": "integer", + "format": "int32" }, - "local_id_not": { - "type": "string", - "nullable": true + "aggregation": { + "$ref": "#/components/schemas/FilterRuleAggregationEnum" + } + }, + "required": [ + "threshold", + "quantile", + "op", + "metric", + "duration", + "aggregation" + ], + "type": "object" + }, + "EntityFilterCreationParams": { + "properties": { + "exclude_vms": { + "$ref": "#/components/schemas/VmWhereInput" }, - "local_id_not_contains": { - "type": "string", - "nullable": true + "clusters": { + "$ref": "#/components/schemas/ClusterWhereInput" }, - "local_id_not_ends_with": { - "type": "string", - "nullable": true + "apply_to_all_clusters": { + "type": "boolean" }, - "local_id_not_in": { + "rules": { "items": { - "type": "string" + "$ref": "#/components/schemas/FilterRuleInput" }, - "type": "array", - "nullable": true - }, - "local_id_not_starts_with": { - "type": "string", - "nullable": true - }, - "local_id_starts_with": { - "type": "string", - "nullable": true + "type": "array" }, - "rack_topoes_every": { - "allOf": [ - { - "$ref": "#/components/schemas/RackTopoWhereInput" + "name": { + "type": "string" + } + }, + "required": [ + "rules", + "name" + ], + "type": "object" + }, + "EntityFilterUpdationParams": { + "properties": { + "data": { + "properties": { + "exclude_vms": { + "$ref": "#/components/schemas/VmWhereInput" + }, + "clusters": { + "$ref": "#/components/schemas/ClusterWhereInput" + }, + "apply_to_all_clusters": { + "type": "boolean" + }, + "rules": { + "items": { + "$ref": "#/components/schemas/FilterRuleInput" + }, + "type": "array" + }, + "name": { + "type": "string" } - ], - "nullable": true + }, + "type": "object" }, - "rack_topoes_none": { - "allOf": [ - { - "$ref": "#/components/schemas/RackTopoWhereInput" - } - ], + "where": { + "$ref": "#/components/schemas/EntityFilterWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "DeleteEntityFilter": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "WithTask_DeleteEntityFilter_": { + "properties": { + "task_id": { + "type": "string", "nullable": true }, - "rack_topoes_some": { - "allOf": [ - { - "$ref": "#/components/schemas/RackTopoWhereInput" - } - ], - "nullable": true + "data": { + "$ref": "#/components/schemas/DeleteEntityFilter" } }, - "type": "object", - "additionalProperties": false + "required": [ + "data" + ], + "type": "object" }, - "RackTopoWhereInput": { + "EntityFilterDeletionParams": { "properties": { - "AND": { - "items": { - "$ref": "#/components/schemas/RackTopoWhereInput" - }, - "type": "array", + "where": { + "$ref": "#/components/schemas/EntityFilterWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "GpuDevice": { + "properties": { + "assigned_vgpus_num": { + "type": "integer", + "format": "int32", "nullable": true }, - "NOT": { - "items": { - "$ref": "#/components/schemas/RackTopoWhereInput" - }, - "type": "array", + "available_vgpus_num": { + "type": "integer", + "format": "int32", "nullable": true }, - "OR": { - "items": { - "$ref": "#/components/schemas/RackTopoWhereInput" - }, - "type": "array", - "nullable": true + "brand": { + "type": "string" }, - "brick_topoes_every": { - "allOf": [ - { - "$ref": "#/components/schemas/BrickTopoWhereInput" - } - ], - "nullable": true + "bus_location": { + "type": "string" }, - "brick_topoes_none": { - "allOf": [ - { - "$ref": "#/components/schemas/BrickTopoWhereInput" - } - ], - "nullable": true + "description": { + "type": "string" }, - "brick_topoes_some": { + "driver_info": { "allOf": [ { - "$ref": "#/components/schemas/BrickTopoWhereInput" + "$ref": "#/components/schemas/NestedGpuDriverInfo" } ], "nullable": true }, - "cluster": { + "entityAsyncStatus": { "allOf": [ { - "$ref": "#/components/schemas/ClusterWhereInput" + "$ref": "#/components/schemas/EntityAsyncStatus" } ], "nullable": true }, - "height": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "height_gt": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "height_gte": { - "type": "integer", - "format": "int32", - "nullable": true + "host": { + "$ref": "#/components/schemas/NestedHost" }, - "height_in": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array", - "nullable": true + "id": { + "type": "string" }, - "height_lt": { - "type": "integer", - "format": "int32", + "is_nvidia_tools_ready": { + "type": "boolean", "nullable": true }, - "height_lte": { - "type": "integer", - "format": "int32", + "is_nvidia_vfs_enabled": { + "type": "boolean", "nullable": true }, - "height_not": { - "type": "integer", - "format": "int32", + "is_nvidia_vfs_supported": { + "type": "boolean", "nullable": true }, - "height_not_in": { + "labels": { "items": { - "type": "integer", - "format": "int32" + "$ref": "#/components/schemas/NestedLabel" }, "type": "array", "nullable": true }, - "id": { - "type": "string", - "nullable": true - }, - "id_contains": { - "type": "string", - "nullable": true - }, - "id_ends_with": { - "type": "string", - "nullable": true - }, - "id_gt": { - "type": "string", - "nullable": true + "local_created_at": { + "type": "string" }, - "id_gte": { - "type": "string", - "nullable": true + "local_id": { + "type": "string" }, - "id_in": { + "mdev_supported_types": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedVgpuType" }, "type": "array", "nullable": true }, - "id_lt": { - "type": "string", - "nullable": true + "model": { + "type": "string" }, - "id_lte": { - "type": "string", + "name": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/GpuDeviceStatus" + }, + "user_usage": { + "allOf": [ + { + "$ref": "#/components/schemas/GpuDeviceUsage" + } + ], "nullable": true }, - "id_not": { + "user_vgpu_type_id": { "type": "string", "nullable": true }, - "id_not_contains": { + "user_vgpu_type_name": { "type": "string", "nullable": true }, - "id_not_ends_with": { - "type": "string", + "vgpu_instance_num": { + "type": "integer", + "format": "int32", "nullable": true }, - "id_not_in": { + "vms": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedVm" }, "type": "array", "nullable": true - }, - "id_not_starts_with": { + } + }, + "required": [ + "brand", + "bus_location", + "description", + "host", + "id", + "local_created_at", + "local_id", + "model", + "name", + "status" + ], + "type": "object", + "additionalProperties": false + }, + "WithTask_GpuDevice_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "id_starts_with": { - "type": "string", - "nullable": true + "data": { + "$ref": "#/components/schemas/GpuDevice" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "GpuDeviceUsageUpdationParams": { + "properties": { + "data": { + "properties": { + "vgpu_spec": { + "type": "string" + }, + "usage": { + "$ref": "#/components/schemas/GpuDeviceUsage" + } + }, + "type": "object" }, - "local_id": { - "type": "string", + "where": { + "$ref": "#/components/schemas/GpuDeviceWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "GpuDeviceDescriptionUpdationParams": { + "properties": { + "data": { + "properties": { + "description": { + "type": "string" + } + }, + "required": [ + "description" + ], + "type": "object" + }, + "where": { + "$ref": "#/components/schemas/GpuDeviceWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "GpuDeviceSriovSwitchParams": { + "properties": { + "data": { + "properties": { + "enable": { + "type": "boolean" + } + }, + "required": [ + "enable" + ], + "type": "object" + }, + "where": { + "$ref": "#/components/schemas/GpuDeviceWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "GpuVmDetail": { + "properties": { + "vgpu_instance_on_vm_num": { + "type": "integer", + "format": "int32" + }, + "win_opt": { + "type": "boolean" + }, + "vm_usage": { + "allOf": [ + { + "$ref": "#/components/schemas/VmUsage" + } + ], "nullable": true }, - "local_id_contains": { + "vm_tools_version": { "type": "string", "nullable": true }, - "local_id_ends_with": { - "type": "string", + "vm_tools_status": { + "$ref": "#/components/schemas/VmToolsStatus" + }, + "vm_placement_group": { + "items": { + "$ref": "#/components/schemas/NestedVmPlacementGroup" + }, + "type": "array", "nullable": true }, - "local_id_gt": { - "type": "string", + "vm_nics": { + "items": { + "$ref": "#/components/schemas/NestedVmNic" + }, + "type": "array", "nullable": true }, - "local_id_gte": { - "type": "string", + "vm_disks": { + "items": { + "$ref": "#/components/schemas/NestedVmDisk" + }, + "type": "array", "nullable": true }, - "local_id_in": { + "video_type": { + "allOf": [ + { + "$ref": "#/components/schemas/VmVideoType" + } + ], + "nullable": true + }, + "vcpu": { + "type": "integer", + "format": "int32" + }, + "usb_devices": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedUsbDevice" }, "type": "array", "nullable": true }, - "local_id_lt": { - "type": "string", + "unique_size": { + "type": "integer", + "format": "int64", "nullable": true }, - "local_id_lte": { - "type": "string", + "status": { + "$ref": "#/components/schemas/VmStatus" + }, + "snapshots": { + "items": { + "$ref": "#/components/schemas/NestedVmSnapshot" + }, + "type": "array", "nullable": true }, - "local_id_not": { - "type": "string", + "snapshot_plan": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedSnapshotPlan" + } + ], "nullable": true }, - "local_id_not_contains": { - "type": "string", + "size": { + "type": "integer", + "format": "int64", "nullable": true }, - "local_id_not_ends_with": { - "type": "string", + "provisioned_size": { + "type": "integer", + "format": "int64", "nullable": true }, - "local_id_not_in": { + "protected": { + "type": "boolean" + }, + "pci_nics": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedNic" }, "type": "array", "nullable": true }, - "local_id_not_starts_with": { + "out_uninstall_usb": { + "items": { + "type": "string" + }, + "type": "array" + }, + "os": { "type": "string", "nullable": true }, - "local_id_starts_with": { + "original_name": { "type": "string", "nullable": true }, + "node_ip": { + "type": "string" + }, + "nested_virtualization": { + "type": "boolean" + }, "name": { - "type": "string", + "type": "string" + }, + "memory_usage": { + "type": "number", + "format": "double", "nullable": true }, - "name_contains": { - "type": "string", + "memory": { + "type": "integer", + "format": "int64" + }, + "max_iops_policy": { + "allOf": [ + { + "$ref": "#/components/schemas/VmDiskIoRestrictType" + } + ], "nullable": true }, - "name_ends_with": { - "type": "string", + "max_iops": { + "type": "integer", + "format": "int32", "nullable": true }, - "name_gt": { + "max_bandwidth_policy": { + "allOf": [ + { + "$ref": "#/components/schemas/VmDiskIoRestrictType" + } + ], + "nullable": true + }, + "max_bandwidth": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "logical_size_bytes": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "local_id": { + "type": "string" + }, + "local_created_at": { "type": "string", "nullable": true }, - "name_gte": { + "last_shutdown_time": { "type": "string", "nullable": true }, - "name_in": { + "labels": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedLabel" }, "type": "array", "nullable": true }, - "name_lt": { + "kernel_info": { "type": "string", "nullable": true }, - "name_lte": { - "type": "string", + "isolation_policy": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedIsolationPolicy" + } + ], "nullable": true }, - "name_not": { - "type": "string", + "ips": { + "type": "string" + }, + "io_policy": { + "allOf": [ + { + "$ref": "#/components/schemas/VmDiskIoPolicy" + } + ], "nullable": true }, - "name_not_contains": { + "internal": { + "type": "boolean" + }, + "in_recycle_bin": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "hostname": { "type": "string", "nullable": true }, - "name_not_ends_with": { + "host": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedHost" + } + ], + "nullable": true + }, + "ha": { + "type": "boolean" + }, + "guest_used_size": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "guest_size_usage": { + "type": "number", + "format": "double", + "nullable": true + }, + "guest_os_type": { + "allOf": [ + { + "$ref": "#/components/schemas/VmGuestsOperationSystem" + } + ], + "nullable": true + }, + "guest_cpu_model": { "type": "string", "nullable": true }, - "name_not_in": { + "gpu_devices": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedGpuDevice" }, "type": "array", "nullable": true }, - "name_not_starts_with": { - "type": "string", + "folder": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedVmFolder" + } + ], "nullable": true }, - "name_starts_with": { - "type": "string", - "nullable": true + "firmware": { + "$ref": "#/components/schemas/VmFirmware" }, - "zone_topo": { + "entityAsyncStatus": { "allOf": [ { - "$ref": "#/components/schemas/ZoneTopoWhereInput" + "$ref": "#/components/schemas/EntityAsyncStatus" } ], "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "BrickTopoCreationParams": { - "properties": { - "tag_position_in_brick": { + }, + "entity_filter_results": { "items": { - "$ref": "#/components/schemas/NestedTagPosition" + "$ref": "#/components/schemas/NestedVmEntityFilterResult" }, "type": "array", "nullable": true }, - "node_topoes": { - "$ref": "#/components/schemas/NodeTopoWhereInput" + "dns_servers": { + "type": "string", + "nullable": true }, - "rack_topo_id": { + "description": { "type": "string" }, - "capacity": { - "$ref": "#/components/schemas/NestedCapacity" + "deleted_at": { + "type": "string", + "nullable": true }, - "cluster_id": { + "cpu_usage": { + "type": "number", + "format": "double", + "nullable": true + }, + "cpu_model": { "type": "string" }, - "height": { - "type": "integer", - "format": "int32" + "cpu": { + "$ref": "#/components/schemas/NestedCpu" }, - "name": { - "type": "string" + "cluster": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedCluster" + } + ], + "nullable": true }, - "position": { - "type": "integer", - "format": "int32" + "cloud_init_supported": { + "type": "boolean", + "nullable": true + }, + "clock_offset": { + "$ref": "#/components/schemas/VmClockOffset" } }, "required": [ - "cluster_id", - "height", + "win_opt", + "vm_tools_status", + "vcpu", + "status", + "protected", + "out_uninstall_usb", + "node_ip", + "nested_virtualization", "name", - "position" + "memory", + "local_id", + "ips", + "internal", + "in_recycle_bin", + "id", + "ha", + "firmware", + "description", + "cpu_model", + "cpu", + "clock_offset" ], "type": "object" }, - "BrickTopoUpdationParams": { + "GpuVmInfo": { "properties": { - "data": { - "properties": { - "tag_position_in_brick": { - "items": { - "$ref": "#/components/schemas/NestedTagPosition" - }, - "type": "array", - "nullable": true - }, - "node_topoes": { - "$ref": "#/components/schemas/NodeTopoWhereInput" - }, - "capacity": { - "$ref": "#/components/schemas/NestedCapacity" - }, - "height": { - "type": "integer", - "format": "int32" - }, - "name": { - "type": "string" - }, - "position": { - "type": "integer", - "format": "int32" - } + "vms": { + "items": { + "$ref": "#/components/schemas/GpuVmDetail" }, - "type": "object" + "type": "array" }, - "where": { - "$ref": "#/components/schemas/BrickTopoWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "BrickTopoMoveParams": { - "properties": { - "data": { - "properties": { - "rack_topo_id": { - "type": "string" - }, - "position": { - "type": "integer", - "format": "int32" + "vgpu_instance_num": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "user_vgpu_type_name": { + "type": "string", + "nullable": true + }, + "user_vgpu_type_id": { + "type": "string", + "nullable": true + }, + "user_usage": { + "allOf": [ + { + "$ref": "#/components/schemas/GpuDeviceUsage" } - }, - "required": [ - "position" ], - "type": "object" + "nullable": true }, - "where": { - "$ref": "#/components/schemas/BrickTopoWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "DeleteBrickTopo": { - "properties": { - "id": { + "status": { + "$ref": "#/components/schemas/GpuDeviceStatus" + }, + "name": { "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "WithTask_DeleteBrickTopo_": { - "properties": { - "task_id": { - "type": "string", + }, + "model": { + "type": "string" + }, + "mdev_supported_types": { + "items": { + "$ref": "#/components/schemas/NestedVgpuType" + }, + "type": "array", "nullable": true }, - "data": { - "$ref": "#/components/schemas/DeleteBrickTopo" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "BrickTopoDeletionParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/BrickTopoWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "UploadResourceType": { - "enum": [ - "CLOUDTOWER_APPLICATION_PACKAGE", - "CLOUDTOWER_K8S_APP_PACKAGE", - "CLUSTER_IMAGE", - "CLUSTER_IMAGE_META", - "CONTENT_LIBRARY_IMAGE", - "ELF_IMAGE", - "EVEROUTE_PACKAGE", - "HOST_PLUGIN_PACKAGE", - "MONITOR_IMAGE", - "OVF", - "SVT_IMAGE", - "VM_VOLUME_QCOW2", - "VM_VOLUME_RAW" - ], - "type": "string" - }, - "UploadTaskStatus": { - "enum": [ - "FAILED", - "INITIALIZING", - "PAUSED", - "SUCCESSED", - "UPLOADING" - ], - "type": "string" - }, - "UploadTask": { - "properties": { - "args": { - "properties": {}, - "type": "object" + "local_id": { + "type": "string" }, - "chunk_size": { - "type": "integer", - "format": "int64" + "local_created_at": { + "type": "string" }, - "current_chunk": { - "type": "integer", - "format": "int32" + "labels": { + "items": { + "$ref": "#/components/schemas/NestedLabel" + }, + "type": "array", + "nullable": true }, - "finished_at": { - "type": "string", + "is_nvidia_vfs_supported": { + "type": "boolean", + "nullable": true + }, + "is_nvidia_vfs_enabled": { + "type": "boolean", + "nullable": true + }, + "is_nvidia_tools_ready": { + "type": "boolean", "nullable": true }, "id": { "type": "string" }, - "resource_type": { - "$ref": "#/components/schemas/UploadResourceType" + "host": { + "$ref": "#/components/schemas/NestedHost" }, - "size": { - "type": "integer", - "format": "int64" + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], + "nullable": true }, - "started_at": { - "type": "string", + "driver_info": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedGpuDriverInfo" + } + ], "nullable": true }, - "status": { - "$ref": "#/components/schemas/UploadTaskStatus" + "description": { + "type": "string" }, - "updatedAt": { + "bus_location": { "type": "string" + }, + "brand": { + "type": "string" + }, + "available_vgpus_num": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "assigned_vgpus_num": { + "type": "integer", + "format": "int32", + "nullable": true } }, "required": [ - "args", - "chunk_size", - "current_chunk", - "id", - "resource_type", - "size", + "vms", "status", - "updatedAt" + "name", + "model", + "local_id", + "local_created_at", + "id", + "host", + "description", + "bus_location", + "brand" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "ByteUnit": { - "type": "string", + "GpuDeviceOrderByInput": { "enum": [ - "B", - "KB", - "MB", - "GB", - "TB", - "PB" - ] - }, - "DeleteCloudTowerApplicationPackage": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" + "assigned_vgpus_num_ASC", + "assigned_vgpus_num_DESC", + "available_vgpus_num_ASC", + "available_vgpus_num_DESC", + "brand_ASC", + "brand_DESC", + "bus_location_ASC", + "bus_location_DESC", + "description_ASC", + "description_DESC", + "driver_info_ASC", + "driver_info_DESC", + "entityAsyncStatus_ASC", + "entityAsyncStatus_DESC", + "id_ASC", + "id_DESC", + "is_nvidia_tools_ready_ASC", + "is_nvidia_tools_ready_DESC", + "is_nvidia_vfs_enabled_ASC", + "is_nvidia_vfs_enabled_DESC", + "is_nvidia_vfs_supported_ASC", + "is_nvidia_vfs_supported_DESC", + "local_created_at_ASC", + "local_created_at_DESC", + "local_id_ASC", + "local_id_DESC", + "mdev_supported_types_ASC", + "mdev_supported_types_DESC", + "model_ASC", + "model_DESC", + "name_ASC", + "name_DESC", + "status_ASC", + "status_DESC", + "user_usage_ASC", + "user_usage_DESC", + "user_vgpu_type_id_ASC", + "user_vgpu_type_id_DESC", + "user_vgpu_type_name_ASC", + "user_vgpu_type_name_DESC", + "vgpu_instance_num_ASC", + "vgpu_instance_num_DESC" ], - "type": "object" + "type": "string" }, - "DeleteCloudTowerApplicationPackageParams": { + "GetGpuDevicesRequestBody": { "properties": { + "after": { + "type": "string", + "nullable": true + }, + "before": { + "type": "string", + "nullable": true + }, + "first": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "last": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "orderBy": { + "allOf": [ + { + "$ref": "#/components/schemas/GpuDeviceOrderByInput" + } + ], + "nullable": true + }, + "skip": { + "type": "integer", + "format": "int32", + "nullable": true + }, "where": { - "$ref": "#/components/schemas/CloudTowerApplicationPackageWhereInput" + "allOf": [ + { + "$ref": "#/components/schemas/GpuDeviceWhereInput" + } + ], + "nullable": true } }, - "required": [ - "where" + "type": "object", + "additionalProperties": false + }, + "MetricType": { + "enum": [ + "BOTTOMK", + "NORMAL", + "TOPK" ], - "type": "object" + "type": "string" }, - "NestedCloudTowerApplicationPackage": { + "GraphType": { + "enum": [ + "AREA", + "STACK" + ], + "type": "string" + }, + "NestedView": { "properties": { "id": { "type": "string" @@ -62717,1619 +63876,1483 @@ "type": "object", "additionalProperties": false }, - "CloudTowerApplication": { + "Graph": { "properties": { - "entityAsyncStatus": { + "cluster": { "allOf": [ { - "$ref": "#/components/schemas/EntityAsyncStatus" + "$ref": "#/components/schemas/NestedCluster" } ], "nullable": true }, - "id": { - "type": "string" - }, - "instanceStatuses": { - "properties": {}, - "type": "object" - }, - "name": { - "type": "string" + "disks": { + "items": { + "$ref": "#/components/schemas/NestedDisk" + }, + "type": "array", + "nullable": true }, - "package": { + "entityAsyncStatus": { "allOf": [ { - "$ref": "#/components/schemas/NestedCloudTowerApplicationPackage" + "$ref": "#/components/schemas/EntityAsyncStatus" } ], "nullable": true }, - "placementSituation": { - "type": "string", + "hosts": { + "items": { + "$ref": "#/components/schemas/NestedHost" + }, + "type": "array", "nullable": true }, - "placementVerb": { - "type": "string", + "id": { + "type": "string" + }, + "instance_ids": { + "items": { + "type": "string" + }, + "type": "array" + }, + "local_id": { + "type": "string" + }, + "luns": { + "items": { + "$ref": "#/components/schemas/NestedIscsiLun" + }, + "type": "array", "nullable": true }, - "resourceVersion": { + "metric_count": { "type": "integer", "format": "int32" }, - "state": { + "metric_name": { + "type": "string" + }, + "metric_type": { + "$ref": "#/components/schemas/MetricType" + }, + "namespaces": { + "items": { + "$ref": "#/components/schemas/NestedNvmfNamespace" + }, + "type": "array", + "nullable": true + }, + "network": { "allOf": [ { - "$ref": "#/components/schemas/CloudTowerApplicationState" + "$ref": "#/components/schemas/NetworkType" } ], "nullable": true }, - "targetPackage": { + "nics": { + "items": { + "$ref": "#/components/schemas/NestedNic" + }, + "type": "array", + "nullable": true + }, + "resource_type": { "type": "string" }, - "user": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedUser" - } - ], + "service": { + "type": "string", "nullable": true }, - "vmSpec": { + "targets": { "properties": {}, "type": "object" - } - }, - "required": [ - "id", - "instanceStatuses", - "name", - "resourceVersion", - "targetPackage", - "vmSpec" - ], - "type": "object", - "additionalProperties": false - }, - "ApplicationVmSpecEnv": { - "properties": { - "value": { - "type": "string" }, - "name": { - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "ApplicationVmSpecNic": { - "properties": { - "vlanId": { + "title": { "type": "string" }, - "mask": { - "type": "string" + "type": { + "$ref": "#/components/schemas/GraphType" }, - "ip": { - "type": "string" + "view": { + "$ref": "#/components/schemas/NestedView" }, - "gateway": { - "type": "string" + "vmNics": { + "items": { + "$ref": "#/components/schemas/NestedVmNic" + }, + "type": "array", + "nullable": true }, - "dhcp": { - "type": "boolean" - } - }, - "type": "object" - }, - "ApplicationVmSpecNetwork": { - "properties": { - "nics": { + "vmVolumes": { "items": { - "$ref": "#/components/schemas/ApplicationVmSpecNic" + "$ref": "#/components/schemas/NestedVmVolume" }, - "type": "array" + "type": "array", + "nullable": true }, - "dns": { + "vms": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedVm" }, - "type": "array" - } - }, - "type": "object" - }, - "ApplicationVmSpecStatus": { - "properties": { - "vmIps": { + "type": "array", + "nullable": true + }, + "witnesses": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedWitness" }, - "type": "array" + "type": "array", + "nullable": true }, - "message": { - "$ref": "#/components/schemas/VmStatus" + "zones": { + "items": { + "$ref": "#/components/schemas/NestedZone" + }, + "type": "array", + "nullable": true } }, - "type": "object" + "required": [ + "id", + "instance_ids", + "local_id", + "metric_count", + "metric_name", + "metric_type", + "resource_type", + "targets", + "title", + "type", + "view" + ], + "type": "object", + "additionalProperties": false }, - "ApplicationVmSpecStorage": { + "WithTask_Graph_": { "properties": { - "size_unit": { - "$ref": "#/components/schemas/ByteUnit" + "task_id": { + "type": "string", + "nullable": true }, - "size": { - "type": "integer", - "format": "int64" + "data": { + "$ref": "#/components/schemas/Graph" } }, + "required": [ + "data" + ], "type": "object" }, - "ApplicationVmSpec": { + "GraphCreationParams": { "properties": { - "vmUsage": { - "$ref": "#/components/schemas/VmUsage" - }, - "storages": { - "items": { - "$ref": "#/components/schemas/ApplicationVmSpecStorage" - }, - "type": "array" - }, - "status": { - "$ref": "#/components/schemas/ApplicationVmSpecStatus" - }, - "publicKeys": { + "instance_ids": { "items": { "type": "string" }, "type": "array" }, "network": { - "$ref": "#/components/schemas/ApplicationVmSpecNetwork" + "$ref": "#/components/schemas/NetworkType" }, - "name": { + "service": { "type": "string" }, - "memory_unit": { - "$ref": "#/components/schemas/ByteUnit" + "metric_type": { + "$ref": "#/components/schemas/MetricType" }, - "memory": { + "metric_count": { "type": "integer", - "format": "int64" + "format": "int32" }, - "internal": { - "type": "boolean" + "type": { + "$ref": "#/components/schemas/GraphType" }, - "image": { + "resource_type": { "type": "string" }, - "host": { + "view_id": { "type": "string" }, - "env": { + "title": { + "type": "string" + }, + "cluster_id": { + "type": "string" + }, + "connect_id": { "items": { - "$ref": "#/components/schemas/ApplicationVmSpecEnv" + "type": "string" }, "type": "array" }, - "cpu": { - "type": "integer", - "format": "int32" - }, - "cluster": { + "metric_name": { "type": "string" - }, - "cloudInitUserData": { - "type": "string" - } - }, - "type": "object" - }, - "ApplicationVmSpecPlacementSituation": { - "enum": [ - "DIFFERENT", - "SAME" - ], - "type": "string" - }, - "ApplicationVmSpecPlacementVerb": { - "enum": [ - "MUST", - "PREFER" - ], - "type": "string" - }, - "ApplicationVmSpecPlacement": { - "properties": { - "verb": { - "$ref": "#/components/schemas/ApplicationVmSpecPlacementVerb" - }, - "situation": { - "$ref": "#/components/schemas/ApplicationVmSpecPlacementSituation" } }, "required": [ - "verb", - "situation" + "type", + "resource_type", + "view_id", + "title", + "cluster_id", + "connect_id", + "metric_name" ], "type": "object" }, - "ApplicationVmSpecAffinityPolicy": { - "enum": [ - "MUST", - "PREFER" - ], - "type": "string" - }, - "ApplicationVmSpecDefinition": { + "GraphWhereInput": { "properties": { - "vmAffinity": { - "$ref": "#/components/schemas/ApplicationVmSpecAffinityPolicy" + "AND": { + "items": { + "$ref": "#/components/schemas/GraphWhereInput" + }, + "type": "array", + "nullable": true }, - "placement": { - "$ref": "#/components/schemas/ApplicationVmSpecPlacement" + "NOT": { + "items": { + "$ref": "#/components/schemas/GraphWhereInput" + }, + "type": "array", + "nullable": true }, - "name": { - "type": "string" + "OR": { + "items": { + "$ref": "#/components/schemas/GraphWhereInput" + }, + "type": "array", + "nullable": true }, - "group": { - "type": "string" + "cluster": { + "allOf": [ + { + "$ref": "#/components/schemas/ClusterWhereInput" + } + ], + "nullable": true }, - "template": { - "$ref": "#/components/schemas/ApplicationVmSpec" + "disks_every": { + "allOf": [ + { + "$ref": "#/components/schemas/DiskWhereInput" + } + ], + "nullable": true }, - "instances": { + "disks_none": { + "allOf": [ + { + "$ref": "#/components/schemas/DiskWhereInput" + } + ], + "nullable": true + }, + "disks_some": { + "allOf": [ + { + "$ref": "#/components/schemas/DiskWhereInput" + } + ], + "nullable": true + }, + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], + "nullable": true + }, + "entityAsyncStatus_in": { "items": { - "$ref": "#/components/schemas/ApplicationVmSpec" + "$ref": "#/components/schemas/EntityAsyncStatus" }, - "type": "array" - } - }, - "type": "object" - }, - "DeployCloudTowerApplicationParams": { - "properties": { - "name": { - "type": "string" + "type": "array", + "nullable": true }, - "targetPackage": { - "type": "string" + "entityAsyncStatus_not": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], + "nullable": true }, - "vmSpec": { - "$ref": "#/components/schemas/ApplicationVmSpecDefinition" - } - }, - "required": [ - "name", - "targetPackage", - "vmSpec" - ], - "type": "object" - }, - "CloudTowerApplicationWhereUniqueInput": { - "properties": { - "id": { - "type": "string", + "entityAsyncStatus_not_in": { + "items": { + "$ref": "#/components/schemas/EntityAsyncStatus" + }, + "type": "array", "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "UpgradeCloudTowerApplicationParams": { - "properties": { - "data": { - "properties": { - "targetPackage": { - "type": "string" + }, + "hosts_every": { + "allOf": [ + { + "$ref": "#/components/schemas/HostWhereInput" } - }, - "required": [ - "targetPackage" ], - "type": "object" + "nullable": true }, - "where": { - "$ref": "#/components/schemas/CloudTowerApplicationWhereUniqueInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "UpdateCloudTowerApplicationVmSpecParams": { - "properties": { - "data": { - "properties": { - "vmSpec": { - "$ref": "#/components/schemas/ApplicationVmSpecDefinition" + "hosts_none": { + "allOf": [ + { + "$ref": "#/components/schemas/HostWhereInput" } - }, - "required": [ - "vmSpec" ], - "type": "object" + "nullable": true }, - "where": { - "$ref": "#/components/schemas/CloudTowerApplicationWhereUniqueInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "UninstallCloudTowerApplicationParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/CloudTowerApplicationWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "NestedApplication": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object", - "additionalProperties": false - }, - "NestedConsistencyGroup": { - "properties": { - "id": { - "type": "string" + "hosts_some": { + "allOf": [ + { + "$ref": "#/components/schemas/HostWhereInput" + } + ], + "nullable": true }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "type": "object", - "additionalProperties": false - }, - "NestedDatacenter": { - "properties": { "id": { - "type": "string" + "type": "string", + "nullable": true }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "type": "object", - "additionalProperties": false - }, - "NestedEverouteCluster": { - "properties": { - "id": { - "type": "string" + "id_contains": { + "type": "string", + "nullable": true }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "type": "object", - "additionalProperties": false - }, - "NestedLabel": { - "properties": { - "id": { - "type": "string" + "id_ends_with": { + "type": "string", + "nullable": true }, - "key": { - "type": "string" + "id_gt": { + "type": "string", + "nullable": true }, - "value": { + "id_gte": { "type": "string", "nullable": true - } - }, - "required": [ - "id", - "key" - ], - "type": "object", - "additionalProperties": false - }, - "MetroCheckStatusEnum": { - "enum": [ - "CRITICAL", - "HEALTHY", - "INFO", - "NOTICE" - ], - "type": "string" - }, - "NestedMetroCheckItem": { - "properties": { - "critical": { + }, + "id_in": { "items": { "type": "string" }, - "type": "array" + "type": "array", + "nullable": true }, - "info": { + "id_lt": { + "type": "string", + "nullable": true + }, + "id_lte": { + "type": "string", + "nullable": true + }, + "id_not": { + "type": "string", + "nullable": true + }, + "id_not_contains": { + "type": "string", + "nullable": true + }, + "id_not_ends_with": { + "type": "string", + "nullable": true + }, + "id_not_in": { "items": { "type": "string" }, - "type": "array" + "type": "array", + "nullable": true }, - "key": { - "type": "string" + "id_not_starts_with": { + "type": "string", + "nullable": true }, - "labels": { - "properties": {}, - "type": "object" + "id_starts_with": { + "type": "string", + "nullable": true }, - "notice": { + "local_id": { + "type": "string", + "nullable": true + }, + "local_id_contains": { + "type": "string", + "nullable": true + }, + "local_id_ends_with": { + "type": "string", + "nullable": true + }, + "local_id_gt": { + "type": "string", + "nullable": true + }, + "local_id_gte": { + "type": "string", + "nullable": true + }, + "local_id_in": { "items": { "type": "string" }, - "type": "array" + "type": "array", + "nullable": true }, - "status": { - "$ref": "#/components/schemas/MetroCheckStatusEnum" - } - }, - "required": [ - "critical", - "info", - "key", - "labels", - "notice", - "status" - ], - "type": "object", - "additionalProperties": false - }, - "NestedMetroCheckResult": { - "properties": { - "critical": { - "type": "integer", - "format": "int32" + "local_id_lt": { + "type": "string", + "nullable": true }, - "info": { - "type": "integer", - "format": "int32" + "local_id_lte": { + "type": "string", + "nullable": true }, - "items": { + "local_id_not": { + "type": "string", + "nullable": true + }, + "local_id_not_contains": { + "type": "string", + "nullable": true + }, + "local_id_not_ends_with": { + "type": "string", + "nullable": true + }, + "local_id_not_in": { "items": { - "$ref": "#/components/schemas/NestedMetroCheckItem" + "type": "string" }, - "type": "array" + "type": "array", + "nullable": true }, - "notice": { - "type": "integer", - "format": "int32" + "local_id_not_starts_with": { + "type": "string", + "nullable": true }, - "status": { - "$ref": "#/components/schemas/MetroCheckStatusEnum" - } - }, - "required": [ - "critical", - "info", - "items", - "notice", - "status" - ], - "type": "object", - "additionalProperties": false - }, - "NestedMetroAvailabilityChecklist": { - "properties": { - "primaryZone": { - "$ref": "#/components/schemas/NestedMetroCheckResult" + "local_id_starts_with": { + "type": "string", + "nullable": true }, - "primaryZoneAndWitness": { - "$ref": "#/components/schemas/NestedMetroCheckResult" + "luns_every": { + "allOf": [ + { + "$ref": "#/components/schemas/IscsiLunWhereInput" + } + ], + "nullable": true }, - "secondaryZone": { - "$ref": "#/components/schemas/NestedMetroCheckResult" + "luns_none": { + "allOf": [ + { + "$ref": "#/components/schemas/IscsiLunWhereInput" + } + ], + "nullable": true }, - "secondaryZoneAndWitness": { - "$ref": "#/components/schemas/NestedMetroCheckResult" + "luns_some": { + "allOf": [ + { + "$ref": "#/components/schemas/IscsiLunWhereInput" + } + ], + "nullable": true }, - "witness": { - "$ref": "#/components/schemas/NestedMetroCheckResult" + "metric_count": { + "type": "integer", + "format": "int32", + "nullable": true }, - "zoneAndZone": { - "$ref": "#/components/schemas/NestedMetroCheckResult" - } - }, - "required": [ - "primaryZone", - "primaryZoneAndWitness", - "secondaryZone", - "secondaryZoneAndWitness", - "witness", - "zoneAndZone" - ], - "type": "object", - "additionalProperties": false - }, - "NestedClusterSettings": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object", - "additionalProperties": false - }, - "NestedVcenterAccount": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object", - "additionalProperties": false - }, - "NestedVds": { - "properties": { - "id": { - "type": "string" + "metric_count_gt": { + "type": "integer", + "format": "int32", + "nullable": true }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "type": "object", - "additionalProperties": false - }, - "NestedVmFolder": { - "properties": { - "id": { - "type": "string" + "metric_count_gte": { + "type": "integer", + "format": "int32", + "nullable": true }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "type": "object", - "additionalProperties": false - }, - "NestedVmTemplate": { - "properties": { - "id": { - "type": "string" + "metric_count_in": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", + "nullable": true }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "type": "object", - "additionalProperties": false - }, - "NestedWitness": { - "properties": { - "id": { - "type": "string" + "metric_count_lt": { + "type": "integer", + "format": "int32", + "nullable": true }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "type": "object", - "additionalProperties": false - }, - "NestedZone": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object", - "additionalProperties": false - }, - "Cluster": { - "properties": { - "application_highest_version": { - "type": "string", + "metric_count_lte": { + "type": "integer", + "format": "int32", "nullable": true }, - "applications": { + "metric_count_not": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "metric_count_not_in": { "items": { - "$ref": "#/components/schemas/NestedApplication" + "type": "integer", + "format": "int32" }, "type": "array", "nullable": true }, - "architecture": { - "$ref": "#/components/schemas/Architecture" + "metric_name": { + "type": "string", + "nullable": true }, - "auto_converge": { - "type": "boolean", + "metric_name_contains": { + "type": "string", "nullable": true }, - "connect_state": { - "$ref": "#/components/schemas/ConnectState" + "metric_name_ends_with": { + "type": "string", + "nullable": true }, - "consistency_groups": { + "metric_name_gt": { + "type": "string", + "nullable": true + }, + "metric_name_gte": { + "type": "string", + "nullable": true + }, + "metric_name_in": { "items": { - "$ref": "#/components/schemas/NestedConsistencyGroup" + "type": "string" }, "type": "array", "nullable": true }, - "current_cpu_model": { + "metric_name_lt": { "type": "string", "nullable": true }, - "datacenters": { + "metric_name_lte": { + "type": "string", + "nullable": true + }, + "metric_name_not": { + "type": "string", + "nullable": true + }, + "metric_name_not_contains": { + "type": "string", + "nullable": true + }, + "metric_name_not_ends_with": { + "type": "string", + "nullable": true + }, + "metric_name_not_in": { "items": { - "$ref": "#/components/schemas/NestedDatacenter" + "type": "string" }, "type": "array", "nullable": true }, - "disconnected_date": { + "metric_name_not_starts_with": { "type": "string", "nullable": true }, - "disconnected_reason": { + "metric_name_starts_with": { + "type": "string", + "nullable": true + }, + "metric_type": { "allOf": [ { - "$ref": "#/components/schemas/ClusterConnectorErrorCode" + "$ref": "#/components/schemas/MetricType" } ], "nullable": true }, - "dns": { + "metric_type_in": { "items": { - "type": "string" + "$ref": "#/components/schemas/MetricType" }, - "type": "array" + "type": "array", + "nullable": true }, - "entityAsyncStatus": { + "metric_type_not": { "allOf": [ { - "$ref": "#/components/schemas/EntityAsyncStatus" + "$ref": "#/components/schemas/MetricType" } ], "nullable": true }, - "everoute_cluster": { + "metric_type_not_in": { + "items": { + "$ref": "#/components/schemas/MetricType" + }, + "type": "array", + "nullable": true + }, + "namespaces_every": { "allOf": [ { - "$ref": "#/components/schemas/NestedEverouteCluster" + "$ref": "#/components/schemas/NvmfNamespaceWhereInput" } ], "nullable": true }, - "failure_data_space": { - "type": "integer", - "format": "int64", + "namespaces_none": { + "allOf": [ + { + "$ref": "#/components/schemas/NvmfNamespaceWhereInput" + } + ], "nullable": true }, - "has_metrox": { - "type": "boolean", + "namespaces_some": { + "allOf": [ + { + "$ref": "#/components/schemas/NvmfNamespaceWhereInput" + } + ], "nullable": true }, - "host_num": { - "type": "integer", - "format": "int32", + "network": { + "allOf": [ + { + "$ref": "#/components/schemas/NetworkType" + } + ], "nullable": true }, - "hosts": { + "network_in": { "items": { - "$ref": "#/components/schemas/NestedHost" + "$ref": "#/components/schemas/NetworkType" }, "type": "array", "nullable": true }, - "hypervisor": { + "network_not": { "allOf": [ { - "$ref": "#/components/schemas/Hypervisor" + "$ref": "#/components/schemas/NetworkType" } ], "nullable": true }, - "id": { - "type": "string" - }, - "ip": { - "type": "string" - }, - "is_all_flash": { - "type": "boolean", - "nullable": true - }, - "iscsi_vip": { - "type": "string", - "nullable": true - }, - "labels": { + "network_not_in": { "items": { - "$ref": "#/components/schemas/NestedLabel" + "$ref": "#/components/schemas/NetworkType" }, "type": "array", "nullable": true }, - "license_expire_date": { - "type": "string", - "nullable": true - }, - "license_serial": { - "type": "string", + "nics_every": { + "allOf": [ + { + "$ref": "#/components/schemas/NicWhereInput" + } + ], "nullable": true }, - "license_sign_date": { - "type": "string", + "nics_none": { + "allOf": [ + { + "$ref": "#/components/schemas/NicWhereInput" + } + ], "nullable": true }, - "license_type": { + "nics_some": { "allOf": [ { - "$ref": "#/components/schemas/LicenseType" + "$ref": "#/components/schemas/NicWhereInput" } ], "nullable": true }, - "local_id": { + "resource_type": { "type": "string", "nullable": true }, - "maintenance_end_date": { + "resource_type_contains": { "type": "string", "nullable": true }, - "maintenance_start_date": { + "resource_type_ends_with": { "type": "string", "nullable": true }, - "management_vip": { + "resource_type_gt": { "type": "string", "nullable": true }, - "max_chunk_num": { - "type": "integer", - "format": "int32", + "resource_type_gte": { + "type": "string", "nullable": true }, - "max_physical_data_capacity": { - "type": "integer", - "format": "int64", + "resource_type_in": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true }, - "max_physical_data_capacity_per_node": { - "type": "integer", - "format": "int64", + "resource_type_lt": { + "type": "string", "nullable": true }, - "metro_availability_checklist": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedMetroAvailabilityChecklist" - } - ], + "resource_type_lte": { + "type": "string", "nullable": true }, - "mgt_gateway": { + "resource_type_not": { "type": "string", "nullable": true }, - "mgt_netmask": { + "resource_type_not_contains": { "type": "string", "nullable": true }, - "migration_data_size": { - "type": "integer", - "format": "int64", + "resource_type_not_ends_with": { + "type": "string", "nullable": true }, - "migration_speed": { - "type": "integer", - "format": "int64", + "resource_type_not_in": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true }, - "name": { - "type": "string" + "resource_type_not_starts_with": { + "type": "string", + "nullable": true }, - "ntp_mode": { - "allOf": [ - { - "$ref": "#/components/schemas/NtpMode" - } - ], + "resource_type_starts_with": { + "type": "string", "nullable": true }, - "ntp_servers": { - "items": { - "type": "string" - }, - "type": "array" + "service": { + "type": "string", + "nullable": true }, - "nvme_over_rdma_enabled": { - "type": "boolean", + "service_contains": { + "type": "string", "nullable": true }, - "nvme_over_tcp_enabled": { - "type": "boolean", + "service_ends_with": { + "type": "string", "nullable": true }, - "nvmf_enabled": { - "type": "boolean", + "service_gt": { + "type": "string", "nullable": true }, - "pmem_enabled": { - "type": "boolean", + "service_gte": { + "type": "string", "nullable": true }, - "provisioned_cpu_cores": { - "type": "integer", - "format": "int32", + "service_in": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true }, - "provisioned_cpu_cores_for_active_vm": { - "type": "integer", - "format": "int32", + "service_lt": { + "type": "string", "nullable": true }, - "provisioned_for_active_vm_ratio": { - "type": "number", - "format": "double", + "service_lte": { + "type": "string", "nullable": true }, - "provisioned_memory_bytes": { - "type": "integer", - "format": "int64", + "service_not": { + "type": "string", "nullable": true }, - "provisioned_ratio": { - "type": "number", - "format": "double", + "service_not_contains": { + "type": "string", "nullable": true }, - "rdma_enabled": { - "type": "boolean", + "service_not_ends_with": { + "type": "string", "nullable": true }, - "recommended_cpu_models": { + "service_not_in": { "items": { "type": "string" }, - "type": "array" + "type": "array", + "nullable": true }, - "recover_data_size": { - "type": "integer", - "format": "int64", + "service_not_starts_with": { + "type": "string", "nullable": true }, - "recover_speed": { - "type": "integer", - "format": "int64", + "service_starts_with": { + "type": "string", "nullable": true }, - "reserved_cpu_cores_for_system_service": { - "type": "integer", - "format": "int32", + "title": { + "type": "string", "nullable": true }, - "running_vm_num": { - "type": "integer", - "format": "int32", + "title_contains": { + "type": "string", "nullable": true }, - "settings": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedClusterSettings" - } - ], + "title_ends_with": { + "type": "string", "nullable": true }, - "software_edition": { - "allOf": [ - { - "$ref": "#/components/schemas/SoftwareEdition" - } - ], + "title_gt": { + "type": "string", "nullable": true }, - "stopped_vm_num": { - "type": "integer", - "format": "int32", + "title_gte": { + "type": "string", "nullable": true }, - "stretch": { - "type": "boolean", + "title_in": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true }, - "suspended_vm_num": { - "type": "integer", - "format": "int32", + "title_lt": { + "type": "string", "nullable": true }, - "total_cache_capacity": { - "type": "integer", - "format": "int64", + "title_lte": { + "type": "string", "nullable": true }, - "total_cpu_cores": { - "type": "integer", - "format": "int32", + "title_not": { + "type": "string", "nullable": true }, - "total_cpu_hz": { - "type": "integer", - "format": "int64", + "title_not_contains": { + "type": "string", "nullable": true }, - "total_cpu_models": { + "title_not_ends_with": { + "type": "string", + "nullable": true + }, + "title_not_in": { "items": { "type": "string" }, - "type": "array" - }, - "total_cpu_sockets": { - "type": "integer", - "format": "int32", + "type": "array", "nullable": true }, - "total_data_capacity": { - "type": "integer", - "format": "int64", + "title_not_starts_with": { + "type": "string", "nullable": true }, - "total_memory_bytes": { - "type": "integer", - "format": "int64", + "title_starts_with": { + "type": "string", "nullable": true }, "type": { - "$ref": "#/components/schemas/ClusterType" + "allOf": [ + { + "$ref": "#/components/schemas/GraphType" + } + ], + "nullable": true }, - "upgrade_tool_version": { - "type": "string", + "type_in": { + "items": { + "$ref": "#/components/schemas/GraphType" + }, + "type": "array", "nullable": true }, - "used_cpu_hz": { - "type": "number", - "format": "double", + "type_not": { + "allOf": [ + { + "$ref": "#/components/schemas/GraphType" + } + ], "nullable": true }, - "used_data_space": { - "type": "integer", - "format": "int64", + "type_not_in": { + "items": { + "$ref": "#/components/schemas/GraphType" + }, + "type": "array", "nullable": true }, - "used_memory_bytes": { - "type": "number", - "format": "double", + "view": { + "allOf": [ + { + "$ref": "#/components/schemas/ViewWhereInput" + } + ], "nullable": true }, - "valid_data_space": { - "type": "integer", - "format": "int64", + "vmNics_every": { + "allOf": [ + { + "$ref": "#/components/schemas/VmNicWhereInput" + } + ], "nullable": true }, - "vcenterAccount": { + "vmNics_none": { "allOf": [ { - "$ref": "#/components/schemas/NestedVcenterAccount" + "$ref": "#/components/schemas/VmNicWhereInput" } ], "nullable": true }, - "vdses": { - "items": { - "$ref": "#/components/schemas/NestedVds" - }, - "type": "array", + "vmNics_some": { + "allOf": [ + { + "$ref": "#/components/schemas/VmNicWhereInput" + } + ], "nullable": true }, - "version": { - "type": "string" - }, - "vhost_enabled": { - "type": "boolean", + "vmVolumes_every": { + "allOf": [ + { + "$ref": "#/components/schemas/VmVolumeWhereInput" + } + ], "nullable": true }, - "vm_folders": { - "items": { - "$ref": "#/components/schemas/NestedVmFolder" - }, - "type": "array", + "vmVolumes_none": { + "allOf": [ + { + "$ref": "#/components/schemas/VmVolumeWhereInput" + } + ], "nullable": true }, - "vm_num": { - "type": "integer", - "format": "int32", + "vmVolumes_some": { + "allOf": [ + { + "$ref": "#/components/schemas/VmVolumeWhereInput" + } + ], "nullable": true }, - "vm_templates": { - "items": { - "$ref": "#/components/schemas/NestedVmTemplate" - }, - "type": "array", + "vms_every": { + "allOf": [ + { + "$ref": "#/components/schemas/VmWhereInput" + } + ], "nullable": true }, - "vms": { - "items": { - "$ref": "#/components/schemas/NestedVm" - }, - "type": "array", + "vms_none": { + "allOf": [ + { + "$ref": "#/components/schemas/VmWhereInput" + } + ], "nullable": true }, - "witness": { + "vms_some": { "allOf": [ { - "$ref": "#/components/schemas/NestedWitness" + "$ref": "#/components/schemas/VmWhereInput" } ], "nullable": true }, - "zones": { - "items": { - "$ref": "#/components/schemas/NestedZone" - }, - "type": "array", - "nullable": true - } - }, - "required": [ - "architecture", - "connect_state", - "dns", - "id", - "ip", - "name", - "ntp_servers", - "recommended_cpu_models", - "total_cpu_models", - "type", - "version" - ], - "type": "object", - "additionalProperties": false - }, - "WithTask_Cluster_": { - "properties": { - "task_id": { - "type": "string", + "witnesses_every": { + "allOf": [ + { + "$ref": "#/components/schemas/WitnessWhereInput" + } + ], "nullable": true }, - "data": { - "$ref": "#/components/schemas/Cluster" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "ClusterCreationParams": { - "properties": { - "datacenter_id": { - "type": "string" - }, - "secondary_zone_datacenter_id": { - "type": "string" - }, - "primary_zone_datacenter_id": { - "type": "string" - }, - "password": { - "type": "string" - }, - "username": { - "type": "string" - }, - "ip": { - "type": "string" - } - }, - "required": [ - "password", - "username", - "ip" - ], - "type": "object" - }, - "ClusterUpdationParams": { - "properties": { - "data": { - "properties": { - "secondary_zone_id": { - "type": "string" - }, - "primary_zone_id": { - "type": "string" - }, - "datacenter_id": { - "type": "string" - }, - "secondary_zone_datacenter_id": { - "type": "string" - }, - "primary_zone_datacenter_id": { - "type": "string" - }, - "password": { - "type": "string" - }, - "username": { - "type": "string" - }, - "ip": { - "type": "string" + "witnesses_none": { + "allOf": [ + { + "$ref": "#/components/schemas/WitnessWhereInput" } - }, - "type": "object" + ], + "nullable": true }, - "where": { - "$ref": "#/components/schemas/ClusterWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "ClusterLicenseUpdationParams": { - "properties": { - "data": { - "properties": { - "license": { - "type": "string" + "witnesses_some": { + "allOf": [ + { + "$ref": "#/components/schemas/WitnessWhereInput" } - }, - "required": [ - "license" ], - "type": "object" - }, - "where": { - "$ref": "#/components/schemas/ClusterWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "MgtIpMapper": { - "properties": { - "ip": { - "type": "string" + "nullable": true }, - "host_id": { - "type": "string" - } - }, - "required": [ - "ip", - "host_id" - ], - "type": "object" - }, - "ClusterNetworkSettingUpdationParams": { - "properties": { - "data": { - "properties": { - "mgt_ip_mapper": { - "items": { - "$ref": "#/components/schemas/MgtIpMapper" - }, - "type": "array" - }, - "mgt_netmask": { - "type": "string" - }, - "mgt_gateway": { - "type": "string" - }, - "ntp_mode": { - "$ref": "#/components/schemas/NtpMode" - }, - "ntp_servers": { - "items": { - "type": "string" - }, - "type": "array" - }, - "dns": { - "items": { - "type": "string" - }, - "type": "array" - }, - "iscsi_vip": { - "type": "string" - }, - "management_vip": { - "type": "string" + "zones_every": { + "allOf": [ + { + "$ref": "#/components/schemas/ZoneWhereInput" } - }, - "type": "object" + ], + "nullable": true }, - "where": { - "$ref": "#/components/schemas/ClusterWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "ClusterVirtualizationUpdationParams": { - "properties": { - "data": { - "properties": { - "auto_converge": { - "type": "boolean" - }, - "current_cpu_model": { - "type": "string" + "zones_none": { + "allOf": [ + { + "$ref": "#/components/schemas/ZoneWhereInput" } - }, - "type": "object" - }, - "where": { - "$ref": "#/components/schemas/ClusterWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "NestedVmRecycleBin": { - "properties": { - "enabled": { - "type": "boolean" + ], + "nullable": true }, - "retain": { - "type": "integer", - "format": "int32" + "zones_some": { + "allOf": [ + { + "$ref": "#/components/schemas/ZoneWhereInput" + } + ], + "nullable": true } }, - "required": [ - "enabled", - "retain" - ], "type": "object", "additionalProperties": false }, - "ClusterSettings": { + "ViewWhereInput": { "properties": { - "cluster": { - "$ref": "#/components/schemas/NestedCluster" + "AND": { + "items": { + "$ref": "#/components/schemas/ViewWhereInput" + }, + "type": "array", + "nullable": true }, - "default_ha": { - "type": "boolean", + "NOT": { + "items": { + "$ref": "#/components/schemas/ViewWhereInput" + }, + "type": "array", "nullable": true }, - "default_storage_policy": { + "OR": { + "items": { + "$ref": "#/components/schemas/ViewWhereInput" + }, + "type": "array", + "nullable": true + }, + "cluster": { "allOf": [ { - "$ref": "#/components/schemas/VmVolumeElfStoragePolicyType" + "$ref": "#/components/schemas/ClusterWhereInput" } ], "nullable": true }, - "enabled_iscsi": { - "type": "boolean", + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], "nullable": true }, - "id": { - "type": "string" + "entityAsyncStatus_in": { + "items": { + "$ref": "#/components/schemas/EntityAsyncStatus" + }, + "type": "array", + "nullable": true }, - "vm_recycle_bin": { + "entityAsyncStatus_not": { "allOf": [ { - "$ref": "#/components/schemas/NestedVmRecycleBin" + "$ref": "#/components/schemas/EntityAsyncStatus" } ], "nullable": true - } - }, - "required": [ - "cluster", - "id" - ], - "type": "object", - "additionalProperties": false - }, - "WithTask_ClusterSettings_": { - "properties": { - "task_id": { - "type": "string", + }, + "entityAsyncStatus_not_in": { + "items": { + "$ref": "#/components/schemas/EntityAsyncStatus" + }, + "type": "array", "nullable": true }, - "data": { - "$ref": "#/components/schemas/ClusterSettings" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "ClusterHaUpdationParams": { - "properties": { - "ha": { - "type": "boolean" + "graphs_every": { + "allOf": [ + { + "$ref": "#/components/schemas/GraphWhereInput" + } + ], + "nullable": true }, - "where": { - "$ref": "#/components/schemas/ClusterWhereInput" - } - }, - "required": [ - "ha", - "where" - ], - "type": "object" - }, - "ClusterEnableIscsiUpdationParams": { - "properties": { - "enable_iscsi": { - "type": "boolean" + "graphs_none": { + "allOf": [ + { + "$ref": "#/components/schemas/GraphWhereInput" + } + ], + "nullable": true + }, + "graphs_some": { + "allOf": [ + { + "$ref": "#/components/schemas/GraphWhereInput" + } + ], + "nullable": true }, - "where": { - "$ref": "#/components/schemas/ClusterWhereInput" - } - }, - "required": [ - "enable_iscsi", - "where" - ], - "type": "object" - }, - "DeleteCluster": { - "properties": { "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "WithTask_DeleteCluster_": { - "properties": { - "task_id": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/DeleteCluster" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "ClusterDeletionParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/ClusterWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "MetaLeader": { - "properties": { - "meta_leader": { - "type": "string" + "id_contains": { + "type": "string", + "nullable": true }, - "cluster_id": { - "type": "string" - } - }, - "required": [ - "meta_leader", - "cluster_id" - ], - "type": "object" - }, - "GetMetaLeaderRequestBody": { - "properties": { - "where": { - "$ref": "#/components/schemas/ClusterWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "NestedIscsiLunSnapshot": { - "properties": { - "id": { - "type": "string" + "id_ends_with": { + "type": "string", + "nullable": true }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "type": "object", - "additionalProperties": false - }, - "NestedNvmfNamespaceSnapshot": { - "properties": { - "id": { - "type": "string" + "id_gt": { + "type": "string", + "nullable": true }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "type": "object", - "additionalProperties": false - }, - "ConsistencyGroupSnapshot": { - "properties": { - "Iscsi_lun_snapshots": { + "id_gte": { + "type": "string", + "nullable": true + }, + "id_in": { "items": { - "$ref": "#/components/schemas/NestedIscsiLunSnapshot" + "type": "string" }, "type": "array", "nullable": true }, - "consistency_group": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedConsistencyGroup" - } - ], + "id_lt": { + "type": "string", "nullable": true }, - "entityAsyncStatus": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" - } - ], + "id_lte": { + "type": "string", "nullable": true }, - "id": { - "type": "string" + "id_not": { + "type": "string", + "nullable": true }, - "labels": { + "id_not_contains": { + "type": "string", + "nullable": true + }, + "id_not_ends_with": { + "type": "string", + "nullable": true + }, + "id_not_in": { "items": { - "$ref": "#/components/schemas/NestedLabel" + "type": "string" }, "type": "array", "nullable": true }, - "local_created_at": { - "type": "string" + "id_not_starts_with": { + "type": "string", + "nullable": true + }, + "id_starts_with": { + "type": "string", + "nullable": true }, "local_id": { - "type": "string" + "type": "string", + "nullable": true + }, + "local_id_contains": { + "type": "string", + "nullable": true + }, + "local_id_ends_with": { + "type": "string", + "nullable": true + }, + "local_id_gt": { + "type": "string", + "nullable": true + }, + "local_id_gte": { + "type": "string", + "nullable": true + }, + "local_id_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, + "local_id_lt": { + "type": "string", + "nullable": true + }, + "local_id_lte": { + "type": "string", + "nullable": true + }, + "local_id_not": { + "type": "string", + "nullable": true + }, + "local_id_not_contains": { + "type": "string", + "nullable": true + }, + "local_id_not_ends_with": { + "type": "string", + "nullable": true + }, + "local_id_not_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, + "local_id_not_starts_with": { + "type": "string", + "nullable": true + }, + "local_id_starts_with": { + "type": "string", + "nullable": true }, "name": { - "type": "string" + "type": "string", + "nullable": true }, - "nvmf_namespace_snapshots": { + "name_contains": { + "type": "string", + "nullable": true + }, + "name_ends_with": { + "type": "string", + "nullable": true + }, + "name_gt": { + "type": "string", + "nullable": true + }, + "name_gte": { + "type": "string", + "nullable": true + }, + "name_in": { "items": { - "$ref": "#/components/schemas/NestedNvmfNamespaceSnapshot" + "type": "string" }, "type": "array", "nullable": true }, - "unique_size": { + "name_lt": { + "type": "string", + "nullable": true + }, + "name_lte": { + "type": "string", + "nullable": true + }, + "name_not": { + "type": "string", + "nullable": true + }, + "name_not_contains": { + "type": "string", + "nullable": true + }, + "name_not_ends_with": { + "type": "string", + "nullable": true + }, + "name_not_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, + "name_not_starts_with": { + "type": "string", + "nullable": true + }, + "name_starts_with": { + "type": "string", + "nullable": true + }, + "time_span": { "type": "integer", - "format": "int64" + "format": "int32", + "nullable": true + }, + "time_span_gt": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "time_span_gte": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "time_span_in": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", + "nullable": true + }, + "time_span_lt": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "time_span_lte": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "time_span_not": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "time_span_not_in": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", + "nullable": true + }, + "time_unit": { + "allOf": [ + { + "$ref": "#/components/schemas/TimeUnit" + } + ], + "nullable": true + }, + "time_unit_in": { + "items": { + "$ref": "#/components/schemas/TimeUnit" + }, + "type": "array", + "nullable": true + }, + "time_unit_not": { + "allOf": [ + { + "$ref": "#/components/schemas/TimeUnit" + } + ], + "nullable": true + }, + "time_unit_not_in": { + "items": { + "$ref": "#/components/schemas/TimeUnit" + }, + "type": "array", + "nullable": true } }, - "required": [ - "id", - "local_created_at", - "local_id", - "name", - "unique_size" - ], "type": "object", "additionalProperties": false }, - "WithTask_ConsistencyGroupSnapshot_": { - "properties": { - "task_id": { - "type": "string", - "nullable": true - }, - "data": { - "$ref": "#/components/schemas/ConsistencyGroupSnapshot" - } - }, - "required": [ - "data" + "TimeUnit": { + "enum": [ + "DAY", + "HOUR", + "MONTH" ], - "type": "object" + "type": "string" }, - "ConsistencyGroupSnapshotCreationParams": { + "GraphUpdationParams": { "properties": { - "consistency_group_id": { - "type": "string" + "data": { + "properties": { + "instance_ids": { + "items": { + "type": "string" + }, + "type": "array" + }, + "luns": { + "$ref": "#/components/schemas/IscsiLunWhereInput" + }, + "vmNics": { + "$ref": "#/components/schemas/VmNicWhereInput" + }, + "nics": { + "$ref": "#/components/schemas/NicWhereInput" + }, + "disks": { + "$ref": "#/components/schemas/DiskWhereInput" + }, + "vmVolumes": { + "$ref": "#/components/schemas/VmVolumeWhereInput" + }, + "vms": { + "$ref": "#/components/schemas/VmWhereInput" + }, + "hosts": { + "$ref": "#/components/schemas/HostWhereInput" + }, + "network": { + "$ref": "#/components/schemas/NetworkType" + }, + "cluster": { + "$ref": "#/components/schemas/ClusterWhereInput" + }, + "service": { + "type": "string" + }, + "metric_type": { + "$ref": "#/components/schemas/MetricType" + }, + "metric_count": { + "type": "integer", + "format": "int32" + }, + "type": { + "$ref": "#/components/schemas/GraphType" + }, + "resource_type": { + "type": "string" + }, + "title": { + "type": "string" + }, + "metric_name": { + "type": "string" + }, + "connect_id": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" }, - "name": { - "type": "string" - } - }, - "required": [ - "consistency_group_id", - "name" - ], - "type": "object" - }, - "ConsistencyGroupSnapshotUpdationParams": { - "properties": { "where": { - "$ref": "#/components/schemas/ConsistencyGroupSnapshotWhereInput" + "$ref": "#/components/schemas/GraphWhereInput" } }, "required": [ @@ -64337,7 +65360,7 @@ ], "type": "object" }, - "DeleteConsistencyGroupSnapshot": { + "DeleteGraph": { "properties": { "id": { "type": "string" @@ -64348,14 +65371,14 @@ ], "type": "object" }, - "WithTask_DeleteConsistencyGroupSnapshot_": { + "WithTask_DeleteGraph_": { "properties": { "task_id": { "type": "string", "nullable": true }, "data": { - "$ref": "#/components/schemas/DeleteConsistencyGroupSnapshot" + "$ref": "#/components/schemas/DeleteGraph" } }, "required": [ @@ -64363,298 +65386,325 @@ ], "type": "object" }, - "ConsistencyGroupSnapshotDeletionParams": { + "GraphDeletionParams": { "properties": { - "data": { - "properties": { - "remain_volume_snapshot": { - "type": "boolean" - } - }, - "required": [ - "remain_volume_snapshot" - ], - "type": "object" - }, "where": { - "$ref": "#/components/schemas/ConsistencyGroupSnapshotWhereInput" + "$ref": "#/components/schemas/GraphWhereInput" } }, "required": [ - "data", "where" ], "type": "object" }, - "NestedConsistencyGroupSnapshot": { + "NestedTask": { "properties": { + "args": { + "properties": {}, + "type": "object" + }, + "description": { + "type": "string" + }, "id": { "type": "string" }, - "name": { + "internal": { + "type": "boolean" + }, + "local_created_at": { + "type": "string" + }, + "progress": { + "type": "number", + "format": "double" + }, + "snapshot": { "type": "string" + }, + "status": { + "$ref": "#/components/schemas/TaskStatus" + }, + "steps": { + "items": { + "$ref": "#/components/schemas/NestedStep" + }, + "type": "array" } }, "required": [ + "args", + "description", "id", - "name" + "internal", + "local_created_at", + "progress", + "snapshot", + "status", + "steps" ], "type": "object", "additionalProperties": false }, - "NestedIscsiLun": { + "BatchHosts": { "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" + "task": { + "$ref": "#/components/schemas/NestedTask" } }, "required": [ - "id", - "name" + "task" ], "type": "object", "additionalProperties": false }, - "NestedNvmfNamespace": { + "WithTask_BatchHosts_": { "properties": { - "id": { - "type": "string" + "task_id": { + "type": "string", + "nullable": true }, - "name": { - "type": "string" + "data": { + "$ref": "#/components/schemas/BatchHosts" } }, "required": [ - "id", - "name" + "data" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "ConsistencyGroup": { + "HostBatchCreateIpmiInput": { "properties": { - "cluster": { - "$ref": "#/components/schemas/NestedCluster" - }, - "consistency_group_snapshots": { - "items": { - "$ref": "#/components/schemas/NestedConsistencyGroupSnapshot" - }, - "type": "array", - "nullable": true + "username": { + "type": "string" }, - "description": { + "password": { "type": "string" }, - "entityAsyncStatus": { + "ip": { + "type": "string" + } + }, + "required": [ + "username", + "password", + "ip" + ], + "type": "object" + }, + "HostBatchCreateDiskInput": { + "properties": { + "type": { "allOf": [ { - "$ref": "#/components/schemas/EntityAsyncStatus" + "$ref": "#/components/schemas/DiskType" } ], "nullable": true }, - "id": { - "type": "string" - }, - "iscsi_luns": { - "items": { - "$ref": "#/components/schemas/NestedIscsiLun" - }, - "type": "array", + "size": { + "type": "number", + "format": "double", "nullable": true }, - "labels": { - "items": { - "$ref": "#/components/schemas/NestedLabel" - }, - "type": "array", + "function": { + "allOf": [ + { + "$ref": "#/components/schemas/DiskFunction" + } + ], "nullable": true }, - "local_created_at": { + "drive": { "type": "string" - }, - "local_id": { + } + }, + "required": [ + "drive" + ], + "type": "object" + }, + "HostBatchCreateIfaceFunction": { + "enum": [ + "ACCESS", + "MANAGEMENT", + "MIGRATION", + "STORAGE", + "VMWARE_ACCESS" + ], + "type": "string" + }, + "HostBatchCreateIfaceInput": { + "properties": { + "netmask": { "type": "string" }, "name": { - "type": "string" - }, - "namespaces": { "items": { - "$ref": "#/components/schemas/NestedNvmfNamespace" + "type": "string" }, - "type": "array", - "nullable": true + "type": "array" }, - "unique_size": { - "type": "integer", - "format": "int64" + "ip": { + "type": "string" + }, + "gateway_ip": { + "type": "string" + }, + "function": { + "$ref": "#/components/schemas/HostBatchCreateIfaceFunction" } }, "required": [ - "cluster", - "description", - "id", - "local_created_at", - "local_id", + "netmask", "name", - "unique_size" + "ip", + "gateway_ip", + "function" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "WithTask_ConsistencyGroup_": { + "ZbsSpec": { + "enum": [ + "normal", + "large" + ], + "type": "string" + }, + "HostVdsConfig": { "properties": { - "task_id": { - "type": "string", - "nullable": true + "nics": { + "items": { + "type": "string" + }, + "type": "array" }, - "data": { - "$ref": "#/components/schemas/ConsistencyGroup" + "name": { + "type": "string" } }, "required": [ - "data" + "nics", + "name" ], "type": "object" }, - "ConsistencyGroupCreationParams": { + "HostCreationParamsData": { "properties": { - "namespaces_ids": { + "vdses": { "items": { - "type": "string" + "$ref": "#/components/schemas/HostVdsConfig" }, "type": "array" }, - "iscsi_luns_ids": { + "zbs_spec": { + "$ref": "#/components/schemas/ZbsSpec" + }, + "ifaces": { "items": { - "type": "string" + "$ref": "#/components/schemas/HostBatchCreateIfaceInput" }, "type": "array" }, - "description": { + "disks": { + "items": { + "$ref": "#/components/schemas/HostBatchCreateDiskInput" + }, + "type": "array" + }, + "platform_password": { "type": "string" }, - "cluster_id": { + "platform_username": { "type": "string" }, - "name": { + "platform_ip": { "type": "string" - } - }, - "required": [ - "namespaces_ids", - "iscsi_luns_ids", - "cluster_id", - "name" - ], - "type": "object" - }, - "ConsistencyGroupUpdationParams": { - "properties": { - "data": { - "properties": { - "remain_volume_snapshot": { - "type": "boolean" - }, - "namespaces_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "iscsi_luns_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "description": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "type": "object" }, - "where": { - "$ref": "#/components/schemas/ConsistencyGroupWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "DeleteConsistencyGroup": { - "properties": { - "id": { + "ipmi": { + "$ref": "#/components/schemas/HostBatchCreateIpmiInput" + }, + "hostname": { + "type": "string" + }, + "host_uuid": { + "type": "string" + }, + "host_ip": { "type": "string" } }, "required": [ - "id" + "ifaces", + "disks", + "hostname", + "host_uuid", + "host_ip" ], "type": "object" }, - "WithTask_DeleteConsistencyGroup_": { + "HostAuthInfo": { "properties": { - "task_id": { - "type": "string", - "nullable": true + "root_user_password": { + "type": "string" }, - "data": { - "$ref": "#/components/schemas/DeleteConsistencyGroup" + "default_user_password": { + "type": "string" } }, - "required": [ - "data" - ], "type": "object" }, - "ConsistencyGroupDeletionParams": { + "HostCreationParams": { "properties": { + "auth_info": { + "$ref": "#/components/schemas/HostAuthInfo" + }, "data": { - "properties": { - "remain_volume_snapshot": { - "type": "boolean" - } + "items": { + "$ref": "#/components/schemas/HostCreationParamsData" }, - "type": "object" + "type": "array" }, - "where": { - "$ref": "#/components/schemas/ConsistencyGroupWhereInput" + "cluster_id": { + "type": "string" } }, "required": [ "data", - "where" + "cluster_id" ], "type": "object" }, - "NestedElfImage": { + "MaintenanceModeEnum": { + "enum": [ + "ENTERING_MAINTENANCE_MODE", + "IN_USE", + "MAINTENANCE_MODE", + "REMOVING" + ], + "type": "string" + }, + "NestedMaintenanceHostState": { "properties": { - "id": { + "enter_maintenance_time": { "type": "string" }, - "name": { + "maintenance_job_id": { "type": "string" + }, + "state": { + "$ref": "#/components/schemas/MaintenanceModeEnum" } }, "required": [ - "id", - "name" + "enter_maintenance_time", + "maintenance_job_id", + "state" ], "type": "object", "additionalProperties": false }, - "NestedVmDisk": { + "NestedIpmi": { "properties": { "id": { "type": "string" @@ -64666,46 +65716,88 @@ "type": "object", "additionalProperties": false }, - "NestedVmSnapshot": { + "NestedVsphereEsxiAccount": { "properties": { "id": { "type": "string" - }, - "name": { - "type": "string" } }, "required": [ - "id", - "name" + "id" ], "type": "object", "additionalProperties": false }, - "ContentLibraryImage": { + "Host": { "properties": { - "clusters": { + "access_ip": { + "type": "string", + "nullable": true + }, + "allocable_cpu_cores_for_vm_exclusive": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "allocatable_memory_bytes": { + "type": "integer", + "format": "int64" + }, + "chunk_id": { + "type": "string" + }, + "cluster": { + "$ref": "#/components/schemas/NestedCluster" + }, + "compatible_cpu_models": { "items": { - "$ref": "#/components/schemas/NestedCluster" + "type": "string" }, - "type": "array", - "nullable": true + "type": "array" }, - "createdAt": { + "cpu_brand": { "type": "string" }, - "description": { + "cpu_fan_speed": { + "items": { + "type": "number", + "format": "double" + }, + "type": "array" + }, + "cpu_fan_speed_unit": { + "allOf": [ + { + "$ref": "#/components/schemas/CpuFanSpeedUnit" + } + ], + "nullable": true + }, + "cpu_hz_per_core": { + "type": "integer", + "format": "int64" + }, + "cpu_model": { "type": "string" }, - "elf_image_uuids": { + "cpu_temperature_celsius": { "items": { - "type": "string" + "type": "integer", + "format": "int32" }, "type": "array" }, - "elf_images": { + "cpu_vendor": { + "type": "string", + "nullable": true + }, + "data_ip": { + "type": "string", + "nullable": true + }, + "disks": { "items": { - "$ref": "#/components/schemas/NestedElfImage" + "$ref": "#/components/schemas/NestedDisk" }, "type": "array", "nullable": true @@ -64718,16 +65810,60 @@ ], "nullable": true }, - "id": { - "type": "string" + "failure_data_space": { + "type": "integer", + "format": "int64" }, - "iscsi_luns": { + "gpu_devices": { "items": { - "$ref": "#/components/schemas/NestedIscsiLun" + "$ref": "#/components/schemas/NestedGpuDevice" }, "type": "array", "nullable": true }, + "hdd_data_capacity": { + "type": "integer", + "format": "int64" + }, + "hdd_disk_count": { + "type": "integer", + "format": "int32" + }, + "host_state": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedMaintenanceHostState" + } + ], + "nullable": true + }, + "hypervisor_ip": { + "type": "string", + "nullable": true + }, + "id": { + "type": "string" + }, + "iommu": { + "allOf": [ + { + "$ref": "#/components/schemas/IommuStatus" + } + ], + "nullable": true + }, + "ipmi": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedIpmi" + } + ], + "nullable": true + }, + "is_os_in_raid1": { + "type": "boolean", + "nullable": true + }, "labels": { "items": { "$ref": "#/components/schemas/NestedLabel" @@ -64735,112 +65871,305 @@ "type": "array", "nullable": true }, - "name": { + "local_id": { "type": "string" }, - "path": { + "lsm_cap_disk_safe_umount": { + "type": "boolean" + }, + "management_ip": { "type": "string" }, - "size": { + "model": { + "type": "string" + }, + "name": { + "type": "string" + }, + "nested_virtualization": { + "type": "boolean" + }, + "nic_count": { "type": "integer", - "format": "int64" + "format": "int32" }, - "vm_disks": { + "nics": { "items": { - "$ref": "#/components/schemas/NestedVmDisk" + "$ref": "#/components/schemas/NestedNic" }, "type": "array", "nullable": true }, - "vm_snapshots": { - "items": { - "$ref": "#/components/schemas/NestedVmSnapshot" - }, - "type": "array", + "node_topo_local_id": { + "type": "string", "nullable": true }, - "vm_templates": { + "os_memory_bytes": { + "type": "integer", + "format": "int64" + }, + "os_version": { + "type": "string", + "nullable": true + }, + "pmem_dimm_capacity": { + "type": "integer", + "format": "int64" + }, + "pmem_dimm_count": { + "type": "integer", + "format": "int32" + }, + "pmem_dimms": { "items": { - "$ref": "#/components/schemas/NestedVmTemplate" + "$ref": "#/components/schemas/NestedPmemDimm" }, "type": "array", "nullable": true - } - }, - "required": [ - "createdAt", - "description", - "elf_image_uuids", - "id", - "name", - "path", - "size" - ], - "type": "object", - "additionalProperties": false - }, - "WithTask_ContentLibraryImage_": { - "properties": { - "task_id": { - "type": "string", - "nullable": true }, - "data": { - "$ref": "#/components/schemas/ContentLibraryImage" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "ContentLibraryImageUpdationParamsData": { - "properties": { - "clusters": { - "$ref": "#/components/schemas/ClusterWhereInput" + "pmem_disk_count": { + "type": "integer", + "format": "int32" }, - "description": { - "type": "string" + "provisioned_cpu_cores": { + "type": "integer", + "format": "int32" }, - "name": { - "type": "string" + "provisioned_memory_bytes": { + "type": "integer", + "format": "int64" + }, + "running_pause_vm_memory_bytes": { + "type": "integer", + "format": "int64" + }, + "running_vm_num": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "scvm_cpu": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "scvm_memory": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "scvm_name": { + "type": "string", + "nullable": true + }, + "serial": { + "type": "string", + "nullable": true + }, + "ssd_data_capacity": { + "type": "integer", + "format": "int64" + }, + "ssd_disk_count": { + "type": "integer", + "format": "int32" + }, + "state": { + "$ref": "#/components/schemas/HostState" + }, + "status": { + "$ref": "#/components/schemas/HostStatus" + }, + "stopped_vm_num": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "suspended_vm_num": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "total_cache_capacity": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "total_cpu_cores": { + "type": "integer", + "format": "int32" + }, + "total_cpu_hz": { + "type": "integer", + "format": "int64" + }, + "total_cpu_sockets": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "total_data_capacity": { + "type": "integer", + "format": "int64" + }, + "total_memory_bytes": { + "type": "integer", + "format": "int64" + }, + "usb_devices": { + "items": { + "$ref": "#/components/schemas/NestedUsbDevice" + }, + "type": "array", + "nullable": true + }, + "used_cpu_hz": { + "type": "number", + "format": "double", + "nullable": true + }, + "used_data_space": { + "type": "integer", + "format": "int64" + }, + "used_memory_bytes": { + "type": "number", + "format": "double", + "nullable": true + }, + "vm_num": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "vmotion_ip": { + "type": "string", + "nullable": true + }, + "vms": { + "items": { + "$ref": "#/components/schemas/NestedVm" + }, + "type": "array", + "nullable": true + }, + "vsphereEsxiAccount": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedVsphereEsxiAccount" + } + ], + "nullable": true + }, + "with_faster_ssd_as_cache": { + "type": "boolean", + "nullable": true + }, + "zone": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedZone" + } + ], + "nullable": true } }, - "type": "object" + "required": [ + "allocatable_memory_bytes", + "chunk_id", + "cluster", + "compatible_cpu_models", + "cpu_brand", + "cpu_fan_speed", + "cpu_hz_per_core", + "cpu_model", + "cpu_temperature_celsius", + "failure_data_space", + "hdd_data_capacity", + "hdd_disk_count", + "id", + "local_id", + "lsm_cap_disk_safe_umount", + "management_ip", + "model", + "name", + "nested_virtualization", + "nic_count", + "os_memory_bytes", + "pmem_dimm_capacity", + "pmem_dimm_count", + "pmem_disk_count", + "provisioned_cpu_cores", + "provisioned_memory_bytes", + "running_pause_vm_memory_bytes", + "ssd_data_capacity", + "ssd_disk_count", + "state", + "status", + "total_cpu_cores", + "total_cpu_hz", + "total_data_capacity", + "total_memory_bytes", + "used_data_space" + ], + "type": "object", + "additionalProperties": false }, - "ContentLibraryImageUpdationParams": { + "WithTask_Host_": { "properties": { - "data": { - "$ref": "#/components/schemas/ContentLibraryImageUpdationParamsData" + "task_id": { + "type": "string", + "nullable": true }, - "where": { - "$ref": "#/components/schemas/ContentLibraryImageWhereInput" + "data": { + "$ref": "#/components/schemas/Host" } }, "required": [ - "data", - "where" + "data" ], "type": "object" }, - "ContentLibraryImageUpdationClusterParamsData": { + "TriggerDiskBlinkParams": { "properties": { - "clusters": { - "$ref": "#/components/schemas/ClusterWhereInput" + "led_status": { + "type": "string", + "enum": [ + "on", + "off" + ] + }, + "disk_name": { + "type": "string" + }, + "host_id": { + "type": "string" } }, "required": [ - "clusters" + "disk_name", + "host_id" ], "type": "object" }, - "ContentLibraryImageUpdationClusterParams": { + "HostUpdationParams": { "properties": { "data": { - "$ref": "#/components/schemas/ContentLibraryImageUpdationClusterParamsData" + "properties": { + "ipmi": { + "$ref": "#/components/schemas/HostBatchCreateIpmiInput" + }, + "scvm_name": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "type": "object" }, "where": { - "$ref": "#/components/schemas/ContentLibraryImageWhereInput" + "$ref": "#/components/schemas/HostWhereInput" } }, "required": [ @@ -64849,245 +66178,294 @@ ], "type": "object" }, - "DeleteContentLibraryImage": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" + "OperateActionEnum": { + "enum": [ + "poweroff", + "reboot" ], - "type": "object" + "type": "string" }, - "WithTask_DeleteContentLibraryImage_": { + "OperateHostPowerData": { "properties": { - "task_id": { - "type": "string", - "nullable": true + "reason": { + "type": "string" }, - "data": { - "$ref": "#/components/schemas/DeleteContentLibraryImage" + "force": { + "type": "boolean" + }, + "action": { + "$ref": "#/components/schemas/OperateActionEnum" } }, "required": [ - "data" + "force", + "action" ], "type": "object" }, - "ContentLibraryImageDeletionParams": { + "OperateHostPowerParams": { "properties": { + "data": { + "$ref": "#/components/schemas/OperateHostPowerData" + }, "where": { - "$ref": "#/components/schemas/ContentLibraryImageWhereInput" + "properties": { + "host_id": { + "type": "string" + } + }, + "required": [ + "host_id" + ], + "type": "object" } }, "required": [ + "data", "where" ], "type": "object" }, - "ContentLibraryImageImportData": { + "EnterMaintenanceModeCheckResult": { "properties": { - "url": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { + "task_id": { "type": "string" - }, - "cluster": { - "$ref": "#/components/schemas/ClusterWhereInput" } }, "required": [ - "url", - "name", - "cluster" + "task_id" ], "type": "object" }, - "ContentLibraryImageImportParams": { + "EnterMaintenanceModeCheckParams": { "properties": { - "data": { - "$ref": "#/components/schemas/ContentLibraryImageImportData" + "where": { + "$ref": "#/components/schemas/HostWhereInput" } }, "required": [ - "data" + "where" ], "type": "object" }, - "OvfCpu": { + "ShutdownVmID": { "properties": { - "sockets": { - "type": "integer", - "format": "int32" - }, - "cores": { - "type": "integer", - "format": "int32" + "vm_uuid": { + "type": "string" } }, "required": [ - "sockets", - "cores" + "vm_uuid" ], "type": "object" }, - "OvfNic": { + "EnterMaintenanceModeResult": { "properties": { - "mac": { - "type": "string" + "shutdownVms": { + "items": { + "$ref": "#/components/schemas/ShutdownVmID" + }, + "type": "array" + }, + "done": { + "type": "boolean" } }, "required": [ - "mac" + "shutdownVms", + "done" ], "type": "object" }, - "OvfDisk": { + "EnterMaintenanceModeResultParams": { "properties": { - "size": { - "type": "integer", - "format": "int64" - }, - "type": { - "$ref": "#/components/schemas/VmDiskType" - }, - "bus": { - "$ref": "#/components/schemas/Bus" - }, - "name": { - "type": "string" + "where": { + "properties": { + "task_id": { + "type": "string" + } + }, + "required": [ + "task_id" + ], + "type": "object" } }, "required": [ - "size", - "type", - "bus", - "name" + "where" ], "type": "object" }, - "ParsedOVF": { + "EnterMaintenanceModeInput": { "properties": { - "firmware": { - "$ref": "#/components/schemas/VmFirmware" - }, - "disks": { + "shutdown_vms": { "items": { - "$ref": "#/components/schemas/OvfDisk" + "type": "string" }, "type": "array" + } + }, + "type": "object" + }, + "EnterMaintenanceModeParams": { + "properties": { + "data": { + "$ref": "#/components/schemas/EnterMaintenanceModeInput" }, - "nics": { - "items": { - "$ref": "#/components/schemas/OvfNic" + "where": { + "properties": { + "host_id": { + "type": "string" + } }, - "type": "array" - }, - "memory": { - "type": "integer", - "format": "int64" - }, - "cpu": { - "$ref": "#/components/schemas/OvfCpu" - }, - "vcpu": { - "type": "integer", - "format": "int32" - }, - "description": { - "type": "string" - }, - "name": { - "type": "string" + "required": [ + "host_id" + ], + "type": "object" } }, "required": [ - "firmware", - "disks", - "nics", - "memory", - "cpu", - "vcpu", - "name" + "data", + "where" ], "type": "object" }, - "ExportFileDownloadLinks": { + "MaintenanceModeVerify": { "properties": { - "link": { - "type": "string" + "reason": { + "type": "string", + "nullable": true }, - "filename": { - "type": "string" + "changed": { + "type": "boolean", + "nullable": true } }, - "required": [ - "link", - "filename" - ], "type": "object" }, - "VmExportFileWhereUniqueInput": { + "MaintenanceModeVmInfo": { "properties": { - "data_port_id": { + "vm_uuid": { "type": "string", "nullable": true }, - "id": { + "vm_state": { + "type": "string", + "nullable": true + }, + "vm_name": { + "type": "string", + "nullable": true + }, + "vm_ha": { + "type": "boolean", + "nullable": true + }, + "verify": { + "allOf": [ + { + "$ref": "#/components/schemas/MaintenanceModeVerify" + } + ], + "nullable": true + }, + "target_host_name": { + "type": "string", + "nullable": true + }, + "state": { "type": "string", "nullable": true } }, - "type": "object", - "additionalProperties": false + "type": "object" }, - "GetExportFileDownloadLinksParams": { + "ExitMaintenanceModeResult": { "properties": { - "where": { - "$ref": "#/components/schemas/VmExportFileWhereUniqueInput" + "offlineMigrateVms": { + "items": { + "$ref": "#/components/schemas/MaintenanceModeVmInfo" + }, + "type": "array" + }, + "liveMigrateVms": { + "items": { + "$ref": "#/components/schemas/MaintenanceModeVmInfo" + }, + "type": "array" + }, + "shutDownVms": { + "items": { + "$ref": "#/components/schemas/MaintenanceModeVmInfo" + }, + "type": "array" } }, "required": [ - "where" + "offlineMigrateVms", + "liveMigrateVms", + "shutDownVms" ], "type": "object" }, - "NestedCpu": { + "ExitMaintenanceModeResultParams": { "properties": { - "cores": { - "type": "integer", - "format": "int32" - }, - "sockets": { - "type": "integer", - "format": "int32" + "where": { + "$ref": "#/components/schemas/HostWhereInput" } }, "required": [ - "cores", - "sockets" + "where" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "NestedVmEntityFilterResult": { + "ExitMaintenanceModeInput": { "properties": { - "id": { - "type": "string" + "poweron_vms": { + "items": { + "type": "string" + }, + "type": "array" + }, + "offline_migrate_back_vms": { + "items": { + "type": "string" + }, + "type": "array" + }, + "live_migrate_back_vms": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ExitMaintenanceModeParams": { + "properties": { + "data": { + "$ref": "#/components/schemas/ExitMaintenanceModeInput" + }, + "where": { + "properties": { + "host_id": { + "type": "string" + } + }, + "required": [ + "host_id" + ], + "type": "object" } }, "required": [ - "id" + "data", + "where" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "NestedGpuDevice": { + "NestedIscsiTarget": { "properties": { "id": { "type": "string" @@ -65103,67 +66481,116 @@ "type": "object", "additionalProperties": false }, - "NestedIsolationPolicy": { + "IscsiLunSnapshot": { "properties": { + "consistency_group_snapshot": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedConsistencyGroupSnapshot" + } + ], + "nullable": true + }, + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], + "nullable": true + }, "id": { "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object", - "additionalProperties": false - }, - "NestedNic": { - "properties": { - "id": { + }, + "iscsi_lun": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedIscsiLun" + } + ], + "nullable": true + }, + "iscsi_target": { + "$ref": "#/components/schemas/NestedIscsiTarget" + }, + "labels": { + "items": { + "$ref": "#/components/schemas/NestedLabel" + }, + "type": "array", + "nullable": true + }, + "local_created_at": { + "type": "string" + }, + "local_id": { "type": "string" }, "name": { "type": "string" + }, + "unique_size": { + "type": "integer", + "format": "int64" } }, "required": [ "id", - "name" + "iscsi_target", + "local_created_at", + "local_id", + "name", + "unique_size" ], "type": "object", "additionalProperties": false }, - "NestedSnapshotPlan": { + "WithTask_IscsiLunSnapshot_": { "properties": { - "id": { - "type": "string" + "task_id": { + "type": "string", + "nullable": true }, - "name": { - "type": "string" + "data": { + "$ref": "#/components/schemas/IscsiLunSnapshot" } }, "required": [ - "id", - "name" + "data" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "NestedUsbDevice": { + "IscsiLunSnapshotCreationEffect": { "properties": { - "id": { + "sync": { + "type": "boolean" + } + }, + "type": "object" + }, + "IscsiLunSnapshotCreationParams": { + "properties": { + "effect": { + "$ref": "#/components/schemas/IscsiLunSnapshotCreationEffect" + }, + "iscsi_target_id": { "type": "string" }, "name": { "type": "string" + }, + "iscsi_lun_id": { + "type": "string" } }, "required": [ - "id", - "name" + "iscsi_target_id", + "name", + "iscsi_lun_id" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "NestedVmNic": { + "DeleteIscsiLunSnapshot": { "properties": { "id": { "type": "string" @@ -65172,169 +66599,140 @@ "required": [ "id" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "NestedVmPlacementGroup": { + "WithTask_DeleteIscsiLunSnapshot_": { "properties": { - "id": { - "type": "string" + "task_id": { + "type": "string", + "nullable": true }, - "name": { - "type": "string" + "data": { + "$ref": "#/components/schemas/DeleteIscsiLunSnapshot" } }, "required": [ - "id", - "name" + "data" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "Vm": { + "IscsiLunSnapshotDeletionParams": { "properties": { - "bios_uuid": { - "type": "string", - "nullable": true - }, - "clock_offset": { - "$ref": "#/components/schemas/VmClockOffset" - }, - "cloud_init_supported": { - "type": "boolean", - "nullable": true + "where": { + "$ref": "#/components/schemas/IscsiLunSnapshotWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "IscsiLun": { + "properties": { + "allowed_initiators": { + "type": "string" }, - "cluster": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedCluster" - } - ], - "nullable": true + "assigned_size": { + "type": "integer", + "format": "int64" }, - "cpu": { - "$ref": "#/components/schemas/NestedCpu" + "bps": { + "type": "integer", + "format": "int64" }, - "cpu_model": { - "type": "string" + "bps_max": { + "type": "integer", + "format": "int64" }, - "cpu_usage": { - "type": "number", - "format": "double", - "nullable": true + "bps_max_length": { + "type": "integer", + "format": "int64" }, - "deleted_at": { - "type": "string", - "nullable": true + "bps_rd": { + "type": "integer", + "format": "int64" }, - "description": { - "type": "string" + "bps_rd_max": { + "type": "integer", + "format": "int64" }, - "dns_servers": { - "type": "string", - "nullable": true + "bps_rd_max_length": { + "type": "integer", + "format": "int64" }, - "entityAsyncStatus": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" - } - ], - "nullable": true + "bps_wr": { + "type": "integer", + "format": "int64" }, - "entity_filter_results": { - "items": { - "$ref": "#/components/schemas/NestedVmEntityFilterResult" - }, - "type": "array", - "nullable": true + "bps_wr_max": { + "type": "integer", + "format": "int64" }, - "firmware": { - "$ref": "#/components/schemas/VmFirmware" + "bps_wr_max_length": { + "type": "integer", + "format": "int64" }, - "folder": { + "consistency_group": { "allOf": [ { - "$ref": "#/components/schemas/NestedVmFolder" + "$ref": "#/components/schemas/NestedConsistencyGroup" } ], "nullable": true }, - "gpu_devices": { - "items": { - "$ref": "#/components/schemas/NestedGpuDevice" - }, - "type": "array", - "nullable": true - }, - "guest_cpu_model": { - "type": "string", - "nullable": true - }, - "guest_os_type": { + "entityAsyncStatus": { "allOf": [ { - "$ref": "#/components/schemas/VmGuestsOperationSystem" + "$ref": "#/components/schemas/EntityAsyncStatus" } ], "nullable": true }, - "guest_size_usage": { - "type": "number", - "format": "double", - "nullable": true + "id": { + "type": "string" }, - "guest_used_size": { + "io_size": { "type": "integer", - "format": "int64", - "nullable": true + "format": "int64" }, - "ha": { - "type": "boolean" + "iops": { + "type": "integer", + "format": "int64" }, - "host": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedHost" - } - ], - "nullable": true + "iops_max": { + "type": "integer", + "format": "int64" }, - "hostname": { - "type": "string", - "nullable": true + "iops_max_length": { + "type": "integer", + "format": "int64" }, - "id": { - "type": "string" + "iops_rd": { + "type": "integer", + "format": "int64" }, - "in_recycle_bin": { - "type": "boolean" + "iops_rd_max": { + "type": "integer", + "format": "int64" }, - "internal": { - "type": "boolean" + "iops_rd_max_length": { + "type": "integer", + "format": "int64" }, - "io_policy": { - "allOf": [ - { - "$ref": "#/components/schemas/VmDiskIoPolicy" - } - ], - "nullable": true + "iops_wr": { + "type": "integer", + "format": "int64" }, - "ips": { - "type": "string" + "iops_wr_max": { + "type": "integer", + "format": "int64" }, - "isolation_policy": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedIsolationPolicy" - } - ], - "nullable": true + "iops_wr_max_length": { + "type": "integer", + "format": "int64" }, - "kernel_info": { - "type": "string", - "nullable": true + "iscsi_target": { + "$ref": "#/components/schemas/NestedIscsiTarget" }, "labels": { "items": { @@ -65343,1032 +66741,843 @@ "type": "array", "nullable": true }, - "last_shutdown_time": { - "type": "string", - "nullable": true - }, "local_created_at": { - "type": "string", - "nullable": true + "type": "string" }, "local_id": { "type": "string" }, - "logical_size_bytes": { + "lun_id": { "type": "integer", - "format": "int64", - "nullable": true + "format": "int32" }, - "max_bandwidth": { + "name": { + "type": "string" + }, + "replica_num": { "type": "integer", - "format": "int64", - "nullable": true + "format": "int32" }, - "max_bandwidth_policy": { - "allOf": [ - { - "$ref": "#/components/schemas/VmDiskIoRestrictType" - } - ], - "nullable": true + "shared_size": { + "type": "integer", + "format": "int64" }, - "max_iops": { + "snapshot_num": { "type": "integer", - "format": "int32", - "nullable": true + "format": "int32" }, - "max_iops_policy": { - "allOf": [ - { - "$ref": "#/components/schemas/VmDiskIoRestrictType" - } - ], - "nullable": true + "stripe_num": { + "type": "integer", + "format": "int32" }, - "memory": { + "stripe_size": { "type": "integer", "format": "int64" }, - "memory_usage": { + "thin_provision": { + "type": "boolean" + }, + "unique_logical_size": { "type": "number", "format": "double", "nullable": true }, - "name": { - "type": "string" - }, - "nested_virtualization": { - "type": "boolean" + "unique_size": { + "type": "integer", + "format": "int64" }, - "node_ip": { + "zbs_volume_id": { "type": "string" - }, - "original_name": { - "type": "string", - "nullable": true - }, - "os": { + } + }, + "required": [ + "allowed_initiators", + "assigned_size", + "bps", + "bps_max", + "bps_max_length", + "bps_rd", + "bps_rd_max", + "bps_rd_max_length", + "bps_wr", + "bps_wr_max", + "bps_wr_max_length", + "id", + "io_size", + "iops", + "iops_max", + "iops_max_length", + "iops_rd", + "iops_rd_max", + "iops_rd_max_length", + "iops_wr", + "iops_wr_max", + "iops_wr_max_length", + "iscsi_target", + "local_created_at", + "local_id", + "lun_id", + "name", + "replica_num", + "shared_size", + "snapshot_num", + "stripe_num", + "stripe_size", + "thin_provision", + "unique_size", + "zbs_volume_id" + ], + "type": "object", + "additionalProperties": false + }, + "WithTask_IscsiLun_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "out_uninstall_usb": { - "items": { - "type": "string" - }, - "type": "array" - }, - "pci_nics": { - "items": { - "$ref": "#/components/schemas/NestedNic" - }, - "type": "array", - "nullable": true + "data": { + "$ref": "#/components/schemas/IscsiLun" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "IscsiLunCommonParams": { + "properties": { + "bps_wr_max_length": { + "type": "integer", + "format": "int64" }, - "protected": { - "type": "boolean" + "bps_wr_max_unit": { + "$ref": "#/components/schemas/BPSUnit" }, - "provisioned_size": { + "bps_wr_max": { "type": "integer", - "format": "int64", - "nullable": true + "format": "int64" }, - "size": { + "bps_rd_max_length": { "type": "integer", - "format": "int64", - "nullable": true + "format": "int64" }, - "snapshot_plan": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedSnapshotPlan" - } - ], - "nullable": true + "bps_rd_max_unit": { + "$ref": "#/components/schemas/BPSUnit" }, - "snapshots": { - "items": { - "$ref": "#/components/schemas/NestedVmSnapshot" - }, - "type": "array", - "nullable": true + "bps_rd_max": { + "type": "integer", + "format": "int64" }, - "status": { - "$ref": "#/components/schemas/VmStatus" + "bps_max_length": { + "type": "integer", + "format": "int64" }, - "unique_logical_size": { - "type": "number", - "format": "double", - "nullable": true + "bps_max_unit": { + "$ref": "#/components/schemas/BPSUnit" }, - "unique_size": { + "bps_max": { "type": "integer", - "format": "int64", - "nullable": true - }, - "usb_devices": { - "items": { - "$ref": "#/components/schemas/NestedUsbDevice" - }, - "type": "array", - "nullable": true + "format": "int64" }, - "vcpu": { + "iops_wr_max_length": { "type": "integer", - "format": "int32" + "format": "int64" }, - "video_type": { - "allOf": [ - { - "$ref": "#/components/schemas/VmVideoType" - } - ], - "nullable": true + "iops_wr_max": { + "type": "integer", + "format": "int64" }, - "vm_disks": { - "items": { - "$ref": "#/components/schemas/NestedVmDisk" - }, - "type": "array", - "nullable": true + "iops_rd_max_length": { + "type": "integer", + "format": "int64" }, - "vm_nics": { - "items": { - "$ref": "#/components/schemas/NestedVmNic" - }, - "type": "array", - "nullable": true + "iops_rd_max": { + "type": "integer", + "format": "int64" }, - "vm_placement_group": { - "items": { - "$ref": "#/components/schemas/NestedVmPlacementGroup" - }, - "type": "array", - "nullable": true + "iops_max_length": { + "type": "integer", + "format": "int64" }, - "vm_tools_status": { - "$ref": "#/components/schemas/VmToolsStatus" + "iops_max": { + "type": "integer", + "format": "int64" }, - "vm_tools_version": { - "type": "string", - "nullable": true + "bps_wr_unit": { + "$ref": "#/components/schemas/BPSUnit" }, - "vm_usage": { - "allOf": [ - { - "$ref": "#/components/schemas/VmUsage" - } - ], - "nullable": true + "bps_wr": { + "type": "integer", + "format": "int64" }, - "win_opt": { - "type": "boolean" - } - }, - "required": [ - "clock_offset", - "cpu", - "cpu_model", - "description", - "firmware", - "ha", - "id", - "in_recycle_bin", - "internal", - "ips", - "local_id", - "memory", - "name", - "nested_virtualization", - "node_ip", - "out_uninstall_usb", - "protected", - "status", - "vcpu", - "vm_tools_status", - "win_opt" - ], - "type": "object", - "additionalProperties": false - }, - "WithTask_Vm_": { - "properties": { - "task_id": { - "type": "string", - "nullable": true + "bps_rd_unit": { + "$ref": "#/components/schemas/BPSUnit" }, - "data": { - "$ref": "#/components/schemas/Vm" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "BPSUnit": { - "type": "string", - "enum": [ - "Bps", - "KBps", - "MBps", - "GBps", - "TBps" - ] - }, - "MountNewCreateDisksParams": { - "properties": { - "max_bandwidth_policy": { - "$ref": "#/components/schemas/VmDiskIoRestrictType" + "bps_rd": { + "type": "integer", + "format": "int64" }, - "max_bandwidth_unit": { + "bps_unit": { "$ref": "#/components/schemas/BPSUnit" }, - "max_bandwidth": { + "bps": { "type": "integer", "format": "int64" }, - "max_iops_policy": { - "$ref": "#/components/schemas/VmDiskIoRestrictType" + "iops_wr": { + "type": "integer", + "format": "int64" }, - "max_iops": { + "iops_rd": { "type": "integer", "format": "int64" }, - "vm_volume": { + "iops": { + "type": "integer", + "format": "int64" + }, + "allowed_initiators": { + "type": "string" + } + }, + "type": "object" + }, + "IscsiLunCreationParams": { + "allOf": [ + { "properties": { - "elf_storage_policy": { - "$ref": "#/components/schemas/VmVolumeElfStoragePolicyType" - }, - "path": { - "type": "string" + "lun_id": { + "type": "integer", + "format": "int32" }, - "size_unit": { + "assigned_size_unit": { "$ref": "#/components/schemas/ByteUnit" }, - "size": { + "assigned_size": { "type": "integer", "format": "int64" }, + "replica_num": { + "type": "integer", + "format": "int32" + }, + "iscsi_target_id": { + "type": "string" + }, "name": { "type": "string" } }, "required": [ - "elf_storage_policy", - "size", + "assigned_size", + "replica_num", + "iscsi_target_id", "name" ], "type": "object" }, - "index": { - "type": "integer", - "format": "int32" - }, - "key": { - "type": "integer", - "format": "int32" + { + "$ref": "#/components/schemas/IscsiLunCommonParams" + } + ] + }, + "IscsiLunUpdationParamsData": { + "allOf": [ + { + "properties": { + "assigned_size_unit": { + "$ref": "#/components/schemas/ByteUnit" + }, + "assigned_size": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + }, + "type": "object" }, - "bus": { - "$ref": "#/components/schemas/Bus" + { + "$ref": "#/components/schemas/IscsiLunCommonParams" + } + ] + }, + "IscsiLunUpdationParams": { + "properties": { + "data": { + "$ref": "#/components/schemas/IscsiLunUpdationParamsData" }, - "boot": { - "type": "integer", - "format": "int32" + "where": { + "$ref": "#/components/schemas/IscsiLunWhereInput" } }, "required": [ - "vm_volume", - "bus", - "boot" + "data", + "where" ], "type": "object" }, - "MountDisksParams": { + "DeleteIscsiLun": { "properties": { - "max_bandwidth_policy": { - "$ref": "#/components/schemas/VmDiskIoRestrictType" - }, - "max_bandwidth_unit": { - "$ref": "#/components/schemas/BPSUnit" - }, - "max_bandwidth": { - "type": "integer", - "format": "int64" - }, - "max_iops_policy": { - "$ref": "#/components/schemas/VmDiskIoRestrictType" - }, - "max_iops": { - "type": "integer", - "format": "int64" - }, - "vm_volume_id": { + "id": { "type": "string" - }, - "index": { - "type": "integer", - "format": "int32" - }, - "key": { - "type": "integer", - "format": "int32" - }, - "bus": { - "$ref": "#/components/schemas/Bus" - }, - "boot": { - "type": "integer", - "format": "int32" } }, "required": [ - "vm_volume_id", - "bus", - "boot" + "id" ], "type": "object" }, - "VmCdRomParams": { + "WithTask_DeleteIscsiLun_": { "properties": { - "content_library_image_id": { - "type": "string" - }, - "elf_image_id": { - "type": "string" - }, - "index": { - "type": "integer", - "format": "int32" - }, - "key": { - "type": "integer", - "format": "int32" + "task_id": { + "type": "string", + "nullable": true }, - "boot": { - "type": "integer", - "format": "int32" + "data": { + "$ref": "#/components/schemas/DeleteIscsiLun" } }, "required": [ - "boot" + "data" ], "type": "object" }, - "VmDiskParams": { + "IscsiLunDeletionParams": { "properties": { - "mount_cd_roms": { - "items": { - "$ref": "#/components/schemas/VmCdRomParams" - }, - "type": "array" - }, - "mount_disks": { - "items": { - "$ref": "#/components/schemas/MountDisksParams" + "data": { + "properties": { + "remove_snapshot": { + "type": "boolean" + } }, - "type": "array" + "required": [ + "remove_snapshot" + ], + "type": "object" }, - "mount_new_create_disks": { - "items": { - "$ref": "#/components/schemas/MountNewCreateDisksParams" - }, - "type": "array" + "where": { + "$ref": "#/components/schemas/IscsiLunWhereInput" } }, + "required": [ + "data", + "where" + ], "type": "object" }, - "BitUnit": { - "type": "string", - "enum": [ - "bit", - "Kb", - "Mb", - "Gb", - "Tb", - "Pb" - ] - }, - "BitPSUnit": { - "type": "string", - "enum": [ - "bps", - "Kbps", - "Mbps", - "Gbps", - "Tbps" - ] - }, - "VmNicQosTraffic": { + "IscsiLunCloneParams": { "properties": { - "rate_limit_unit": { - "$ref": "#/components/schemas/BitPSUnit" - }, - "rate_limit": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "burst_unit": { - "$ref": "#/components/schemas/BitUnit" + "iscsi_target_id": { + "type": "string" }, - "burst": { - "type": "integer", - "format": "int64", - "nullable": true + "name": { + "type": "string" }, - "enabled": { - "type": "boolean" + "snapshot_id": { + "type": "string" } }, "required": [ - "enabled" + "iscsi_target_id", + "name", + "snapshot_id" ], "type": "object" }, - "VmNicQosOption": { + "IscsiLunRollbackParams": { "properties": { - "egress": { - "$ref": "#/components/schemas/VmNicQosTraffic" + "lun_id": { + "type": "string" }, - "ingress": { - "$ref": "#/components/schemas/VmNicQosTraffic" + "snapshot_id": { + "type": "string" } }, + "required": [ + "lun_id", + "snapshot_id" + ], "type": "object" }, - "VpcNicParams": { + "CopyIscsiLunParams": { "properties": { - "ip_addresses": { - "items": { - "type": "string" - }, - "type": "array" - }, - "floating_ip_id": { + "dest_iscsi_target_id": { "type": "string" }, - "vpc_subnet_id": { + "name": { "type": "string" }, - "vpc_id": { + "src_lun_id": { "type": "string" } }, "required": [ - "vpc_subnet_id", - "vpc_id" + "name", + "src_lun_id" ], "type": "object" }, - "VmNicParams": { + "NestedInitiatorChap": { "properties": { - "vpc_nic": { - "$ref": "#/components/schemas/VpcNicParams" - }, - "type": { - "$ref": "#/components/schemas/VmNicType" - }, - "qos": { - "$ref": "#/components/schemas/VmNicQosOption" - }, - "subnet_mask": { - "type": "string" - }, - "gateway": { - "type": "string" - }, - "ip_address": { - "type": "string" - }, - "nic_id": { - "type": "string" - }, - "connect_vlan_id": { - "type": "string" - }, - "mirror": { - "type": "boolean" - }, - "model": { - "$ref": "#/components/schemas/VmNicModel" - }, - "enabled": { - "type": "boolean" - }, - "mac_address": { + "chap_name": { "type": "string" }, - "local_id": { + "chap_secret": { "type": "string" - } - }, - "type": "object" - }, - "VmGpuOperationParams": { - "properties": { - "amount": { - "type": "integer", - "format": "int32" }, - "gpu_id": { + "initiator_iqn": { "type": "string" } }, "required": [ - "gpu_id" + "chap_name", + "chap_secret", + "initiator_iqn" ], - "type": "object" + "type": "object", + "additionalProperties": false }, - "VmOwnerParams": { + "IscsiTarget": { "properties": { - "search_for": { - "type": "string", - "enum": [ - "username", - "id" - ] - }, - "value": { - "type": "string" - } - }, - "required": [ - "value" - ], - "type": "object" - }, - "VmCreationParams": { - "properties": { - "owner": { - "$ref": "#/components/schemas/VmOwnerParams" + "bps": { + "type": "integer", + "format": "int64", + "nullable": true }, - "gpu_devices": { - "items": { - "$ref": "#/components/schemas/VmGpuOperationParams" - }, - "type": "array" + "bps_max": { + "type": "integer", + "format": "int64", + "nullable": true }, - "max_bandwidth_policy": { - "$ref": "#/components/schemas/VmDiskIoRestrictType" + "bps_max_length": { + "type": "integer", + "format": "int64", + "nullable": true }, - "max_bandwidth_unit": { - "$ref": "#/components/schemas/BPSUnit" + "bps_rd": { + "type": "integer", + "format": "int64", + "nullable": true }, - "max_bandwidth": { + "bps_rd_max": { "type": "integer", - "format": "int64" + "format": "int64", + "nullable": true }, - "max_iops_policy": { - "$ref": "#/components/schemas/VmDiskIoRestrictType" + "bps_rd_max_length": { + "type": "integer", + "format": "int64", + "nullable": true }, - "max_iops": { + "bps_wr": { "type": "integer", - "format": "int64" + "format": "int64", + "nullable": true }, - "io_policy": { - "$ref": "#/components/schemas/VmDiskIoPolicy" + "bps_wr_max": { + "type": "integer", + "format": "int64", + "nullable": true }, - "vcpu": { + "bps_wr_max_length": { "type": "integer", - "format": "int32" + "format": "int64", + "nullable": true }, - "status": { - "$ref": "#/components/schemas/VmStatus" + "chap_enabled": { + "type": "boolean" }, - "firmware": { - "$ref": "#/components/schemas/VmFirmware" + "chap_name": { + "type": "string", + "nullable": true }, - "ha": { - "type": "boolean" + "chap_secret": { + "type": "string", + "nullable": true }, - "pci_nics": { - "$ref": "#/components/schemas/NicWhereInput" + "cluster": { + "$ref": "#/components/schemas/NestedCluster" }, - "vm_placement_group": { - "$ref": "#/components/schemas/VmPlacementGroupWhereInput" + "description": { + "type": "string" }, - "vm_nics": { + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], + "nullable": true + }, + "external_use": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "initiator_chaps": { "items": { - "$ref": "#/components/schemas/VmNicParams" + "$ref": "#/components/schemas/NestedInitiatorChap" }, - "type": "array" + "type": "array", + "nullable": true }, - "vm_disks": { - "$ref": "#/components/schemas/VmDiskParams" + "internal": { + "type": "boolean" }, - "memory_unit": { - "$ref": "#/components/schemas/ByteUnit" + "io_size": { + "type": "integer", + "format": "int64", + "nullable": true }, - "memory": { + "iops": { "type": "integer", - "format": "int64" + "format": "int64", + "nullable": true }, - "cpu_cores": { + "iops_max": { "type": "integer", - "format": "int32" + "format": "int64", + "nullable": true }, - "cpu_sockets": { + "iops_max_length": { "type": "integer", - "format": "int32" + "format": "int64", + "nullable": true }, - "guest_os_type": { - "$ref": "#/components/schemas/VmGuestsOperationSystem" + "iops_rd": { + "type": "integer", + "format": "int64", + "nullable": true }, - "folder_id": { - "type": "string" + "iops_rd_max": { + "type": "integer", + "format": "int64", + "nullable": true }, - "description": { + "iops_rd_max_length": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "iops_wr": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "iops_wr_max": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "iops_wr_max_length": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "ip_whitelist": { "type": "string" }, - "name": { + "iqn_name": { "type": "string" }, - "host_id": { + "iqn_whitelist": { "type": "string" }, - "cluster_id": { + "labels": { + "items": { + "$ref": "#/components/schemas/NestedLabel" + }, + "type": "array", + "nullable": true + }, + "local_id": { "type": "string" - } - }, - "required": [ - "status", - "firmware", - "ha", - "vm_nics", - "vm_disks", - "memory", - "cpu_cores", - "cpu_sockets", - "name", - "cluster_id" - ], - "type": "object" - }, - "DiskOperateModifyDisk": { - "properties": { - "vm_volume_id": { + }, + "luns": { + "items": { + "$ref": "#/components/schemas/NestedIscsiLun" + }, + "type": "array", + "nullable": true + }, + "name": { "type": "string" }, - "bus": { - "$ref": "#/components/schemas/Bus" + "replica_num": { + "type": "integer", + "format": "int32" }, - "disk_index": { + "stripe_num": { "type": "integer", "format": "int32" - } - }, - "required": [ - "disk_index" - ], - "type": "object" - }, - "VmDiskOperate": { - "properties": { - "remove_disks": { - "properties": { - "disk_index": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array" - } - }, - "required": [ - "disk_index" - ], - "type": "object" }, - "modify_disks": { - "items": { - "$ref": "#/components/schemas/DiskOperateModifyDisk" - }, - "type": "array" + "stripe_size": { + "type": "integer", + "format": "int64" }, - "new_disks": { - "$ref": "#/components/schemas/VmDiskParams" + "thin_provision": { + "type": "boolean" } }, - "type": "object" - }, - "CloudInitNetworkTypeEnum": { - "enum": [ - "IPV4", - "IPV4_DHCP" + "required": [ + "chap_enabled", + "cluster", + "description", + "external_use", + "id", + "internal", + "ip_whitelist", + "iqn_name", + "iqn_whitelist", + "local_id", + "name", + "replica_num", + "stripe_num", + "stripe_size", + "thin_provision" ], - "type": "string" + "type": "object", + "additionalProperties": false }, - "CloudInitNetWorkRoute": { + "WithTask_IscsiTarget_": { "properties": { - "network": { - "type": "string" - }, - "netmask": { - "type": "string" + "task_id": { + "type": "string", + "nullable": true }, - "gateway": { - "type": "string" + "data": { + "$ref": "#/components/schemas/IscsiTarget" } }, "required": [ - "network", - "netmask", - "gateway" + "data" ], "type": "object" }, - "CloudInitNetWork": { + "IscsiTargetCommonParamsInitiatorChaps": { "properties": { - "routes": { - "items": { - "$ref": "#/components/schemas/CloudInitNetWorkRoute" - }, - "type": "array" - }, - "type": { - "$ref": "#/components/schemas/CloudInitNetworkTypeEnum" - }, - "nic_index": { - "type": "integer", - "format": "int32" + "chap_secret": { + "type": "string" }, - "netmask": { + "chap_name": { "type": "string" }, - "ip_address": { + "initiator_iqn": { "type": "string" } }, "required": [ - "type", - "nic_index" + "chap_secret", + "chap_name", + "initiator_iqn" ], "type": "object" }, - "TemplateCloudInit": { + "IscsiTargetCommonParams": { "properties": { - "user_data": { - "type": "string" - }, - "public_keys": { - "items": { - "type": "string" - }, - "type": "array" - }, - "hostname": { - "type": "string" - }, - "networks": { - "items": { - "$ref": "#/components/schemas/CloudInitNetWork" - }, - "type": "array" + "bps_wr_max_length": { + "type": "integer", + "format": "int64" }, - "nameservers": { - "items": { - "type": "string" - }, - "type": "array" + "bps_wr_max_unit": { + "$ref": "#/components/schemas/BPSUnit" }, - "default_user_password": { - "type": "string" - } - }, - "type": "object" - }, - "VmCreateVmFromTemplateParams": { - "properties": { - "owner": { - "$ref": "#/components/schemas/VmOwnerParams" + "bps_wr_max_size": { + "$ref": "#/components/schemas/BPSUnit", + "deprecated": true }, - "gpu_devices": { - "items": { - "$ref": "#/components/schemas/VmGpuOperationParams" - }, - "type": "array" + "bps_wr_max": { + "type": "integer", + "format": "int64" }, - "cloud_init": { - "$ref": "#/components/schemas/TemplateCloudInit" + "bps_rd_max_length": { + "type": "integer", + "format": "int64" }, - "is_full_copy": { - "type": "boolean" + "bps_rd_max_unit": { + "$ref": "#/components/schemas/BPSUnit" }, - "template_id": { - "type": "string" + "bps_rd_max": { + "type": "integer", + "format": "int64" }, - "max_bandwidth_policy": { - "$ref": "#/components/schemas/VmDiskIoRestrictType" + "bps_max_length": { + "type": "integer", + "format": "int64" }, - "max_bandwidth_unit": { + "bps_max_unit": { "$ref": "#/components/schemas/BPSUnit" }, - "max_bandwidth": { + "bps_max": { "type": "integer", "format": "int64" }, - "max_iops_policy": { - "$ref": "#/components/schemas/VmDiskIoRestrictType" + "iops_wr_max_length": { + "type": "integer", + "format": "int64" }, - "max_iops": { + "iops_wr_max": { "type": "integer", "format": "int64" }, - "io_policy": { - "$ref": "#/components/schemas/VmDiskIoPolicy", - "deprecated": true + "iops_rd_max_length": { + "type": "integer", + "format": "int64" }, - "vcpu": { + "iops_rd_max": { "type": "integer", - "format": "int32" + "format": "int64" }, - "status": { - "$ref": "#/components/schemas/VmStatus" + "iops_max_length": { + "type": "integer", + "format": "int64" }, - "firmware": { - "$ref": "#/components/schemas/VmFirmware" + "iops_max": { + "type": "integer", + "format": "int64" }, - "ha": { - "type": "boolean" + "bps_wr_unit": { + "$ref": "#/components/schemas/BPSUnit" }, - "pci_nics": { - "$ref": "#/components/schemas/NicWhereInput" + "bps_wr": { + "type": "integer", + "format": "int64" }, - "vm_placement_group": { - "$ref": "#/components/schemas/VmPlacementGroupWhereInput" + "bps_rd_unit": { + "$ref": "#/components/schemas/BPSUnit" }, - "vm_nics": { - "items": { - "$ref": "#/components/schemas/VmNicParams" - }, - "type": "array" + "bps_rd": { + "type": "integer", + "format": "int64" }, - "disk_operate": { - "$ref": "#/components/schemas/VmDiskOperate" + "bps_unit": { + "$ref": "#/components/schemas/BPSUnit" }, - "memory_unit": { - "$ref": "#/components/schemas/ByteUnit" + "bps": { + "type": "integer", + "format": "int64" }, - "memory": { + "iops_wr": { "type": "integer", "format": "int64" }, - "cpu_cores": { + "iops_rd": { "type": "integer", - "format": "int32" + "format": "int64" }, - "cpu_sockets": { + "iops": { "type": "integer", - "format": "int32" + "format": "int64" }, - "guest_os_type": { - "$ref": "#/components/schemas/VmGuestsOperationSystem" + "initiator_chaps": { + "items": { + "$ref": "#/components/schemas/IscsiTargetCommonParamsInitiatorChaps" + }, + "type": "array" }, - "folder_id": { + "chap_secret": { "type": "string" }, - "description": { + "chap_name": { "type": "string" }, - "name": { + "chap_enabled": { + "type": "boolean" + }, + "description": { "type": "string" }, - "host_id": { + "iqn_whitelist": { "type": "string" }, - "cluster_id": { + "ip_whitelist": { "type": "string" } }, - "required": [ - "is_full_copy", - "template_id", - "name" - ], "type": "object" }, - "VmCreateVmFromContentLibraryTemplateParams": { - "properties": { - "owner": { - "$ref": "#/components/schemas/VmOwnerParams" - }, - "gpu_devices": { - "items": { - "$ref": "#/components/schemas/VmGpuOperationParams" - }, - "type": "array" - }, - "cloud_init": { - "$ref": "#/components/schemas/TemplateCloudInit" - }, - "is_full_copy": { - "type": "boolean" - }, - "template_id": { - "type": "string" - }, - "max_bandwidth_policy": { - "$ref": "#/components/schemas/VmDiskIoRestrictType" - }, - "max_bandwidth_unit": { - "$ref": "#/components/schemas/BPSUnit" - }, - "max_bandwidth": { - "type": "integer", - "format": "int64" - }, - "max_iops_policy": { - "$ref": "#/components/schemas/VmDiskIoRestrictType" - }, - "max_iops": { - "type": "integer", - "format": "int64" - }, - "io_policy": { - "$ref": "#/components/schemas/VmDiskIoPolicy", - "deprecated": true - }, - "vcpu": { - "type": "integer", - "format": "int32" - }, - "status": { - "$ref": "#/components/schemas/VmStatus" - }, - "firmware": { - "$ref": "#/components/schemas/VmFirmware" - }, - "ha": { - "type": "boolean" - }, - "pci_nics": { - "$ref": "#/components/schemas/NicWhereInput" - }, - "vm_placement_group": { - "$ref": "#/components/schemas/VmPlacementGroupWhereInput" - }, - "vm_nics": { - "items": { - "$ref": "#/components/schemas/VmNicParams" + "IscsiTargetCreationParams": { + "allOf": [ + { + "properties": { + "stripe_size_unit": { + "$ref": "#/components/schemas/ByteUnit" + }, + "stripe_size": { + "type": "integer", + "format": "int64" + }, + "stripe_num": { + "type": "integer", + "format": "int32" + }, + "replica_num": { + "type": "integer", + "format": "int32" + }, + "thin_provision": { + "type": "boolean" + }, + "cluster_id": { + "type": "string" + }, + "name": { + "type": "string" + } }, - "type": "array" - }, - "disk_operate": { - "$ref": "#/components/schemas/VmDiskOperate" - }, - "memory_unit": { - "$ref": "#/components/schemas/ByteUnit" - }, - "memory": { - "type": "integer", - "format": "int64" - }, - "cpu_cores": { - "type": "integer", - "format": "int32" - }, - "cpu_sockets": { - "type": "integer", - "format": "int32" - }, - "guest_os_type": { - "$ref": "#/components/schemas/VmGuestsOperationSystem" - }, - "folder_id": { - "type": "string" - }, - "description": { - "type": "string" - }, - "name": { - "type": "string" + "required": [ + "stripe_size", + "stripe_num", + "replica_num", + "thin_provision", + "cluster_id", + "name" + ], + "type": "object" }, - "host_id": { - "type": "string" + { + "$ref": "#/components/schemas/IscsiTargetCommonParams" + } + ] + }, + "IscsiTargetUpdationParams": { + "properties": { + "data": { + "$ref": "#/components/schemas/IscsiTargetCommonParams" }, - "cluster_id": { + "where": { + "$ref": "#/components/schemas/IscsiTargetWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "DeleteIscsiTarget": { + "properties": { + "id": { "type": "string" } }, "required": [ - "is_full_copy", - "template_id", - "name", - "cluster_id" + "id" ], "type": "object" }, - "WithTask_Vm-Array_": { + "WithTask_DeleteIscsiTarget_": { "properties": { "task_id": { "type": "string", "nullable": true }, "data": { - "items": { - "$ref": "#/components/schemas/Vm" - }, - "type": "array" + "$ref": "#/components/schemas/DeleteIscsiTarget" } }, "required": [ @@ -66376,373 +67585,735 @@ ], "type": "object" }, - "VmCreateVmFromContentLibraryTemplateBatchVmParams": { + "IscsiTargetDeletionParams": { "properties": { - "owner": { - "$ref": "#/components/schemas/VmOwnerParams" - }, - "gpu_devices": { - "items": { - "$ref": "#/components/schemas/VmGpuOperationParams" - }, - "type": "array" - }, - "cloud_init": { - "$ref": "#/components/schemas/TemplateCloudInit" - }, - "is_full_copy": { - "type": "boolean" - }, - "max_bandwidth_policy": { - "$ref": "#/components/schemas/VmDiskIoRestrictType" - }, - "max_bandwidth_unit": { - "$ref": "#/components/schemas/BPSUnit" - }, - "max_bandwidth": { - "type": "integer", - "format": "int64" - }, - "max_iops_policy": { - "$ref": "#/components/schemas/VmDiskIoRestrictType" - }, - "max_iops": { - "type": "integer", - "format": "int64" - }, - "io_policy": { - "$ref": "#/components/schemas/VmDiskIoPolicy", - "deprecated": true - }, - "vcpu": { - "type": "integer", - "format": "int32" + "where": { + "$ref": "#/components/schemas/IscsiTargetWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "NestedContentLibraryImage": { + "properties": { + "id": { + "type": "string" }, - "status": { - "$ref": "#/components/schemas/VmStatus" + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "ElfImage": { + "properties": { + "cluster": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedCluster" + } + ], + "nullable": true }, - "firmware": { - "$ref": "#/components/schemas/VmFirmware" + "content_library_image": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedContentLibraryImage" + } + ], + "nullable": true }, - "ha": { - "type": "boolean" + "description": { + "type": "string" }, - "pci_nics": { - "$ref": "#/components/schemas/NicWhereInput" + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], + "nullable": true }, - "vm_placement_group": { - "$ref": "#/components/schemas/VmPlacementGroupWhereInput" + "id": { + "type": "string" }, - "vm_nics": { + "labels": { "items": { - "$ref": "#/components/schemas/VmNicParams" + "$ref": "#/components/schemas/NestedLabel" }, - "type": "array" - }, - "disk_operate": { - "$ref": "#/components/schemas/VmDiskOperate" - }, - "memory_unit": { - "$ref": "#/components/schemas/ByteUnit" - }, - "memory": { - "type": "integer", - "format": "int64" - }, - "cpu_cores": { - "type": "integer", - "format": "int32" - }, - "cpu_sockets": { - "type": "integer", - "format": "int32" - }, - "guest_os_type": { - "$ref": "#/components/schemas/VmGuestsOperationSystem" + "type": "array", + "nullable": true }, - "folder_id": { + "local_created_at": { "type": "string" }, - "description": { + "local_id": { "type": "string" }, "name": { "type": "string" }, - "host_id": { + "path": { "type": "string" }, - "cluster_id": { - "type": "string" + "size": { + "type": "integer", + "format": "int64" + }, + "vm_disks": { + "items": { + "$ref": "#/components/schemas/NestedVmDisk" + }, + "type": "array", + "nullable": true + }, + "vm_snapshots": { + "items": { + "$ref": "#/components/schemas/NestedVmSnapshot" + }, + "type": "array", + "nullable": true + }, + "vm_templates": { + "items": { + "$ref": "#/components/schemas/NestedVmTemplate" + }, + "type": "array", + "nullable": true } }, "required": [ - "is_full_copy", + "description", + "id", + "local_created_at", + "local_id", "name", - "cluster_id" + "path", + "size" + ], + "type": "object", + "additionalProperties": false + }, + "WithTask_ElfImage_": { + "properties": { + "task_id": { + "type": "string", + "nullable": true + }, + "data": { + "$ref": "#/components/schemas/ElfImage" + } + }, + "required": [ + "data" ], "type": "object" }, - "VmCreateVmFromContentLibraryTemplateBatchParams": { + "ElfImageUpdationParams": { "properties": { - "vms": { - "items": { - "$ref": "#/components/schemas/VmCreateVmFromContentLibraryTemplateBatchVmParams" + "data": { + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + } }, - "type": "array" + "type": "object" }, - "template_id": { - "type": "string" + "where": { + "$ref": "#/components/schemas/ElfImageWhereInput" } }, "required": [ - "vms", - "template_id" + "data", + "where" ], "type": "object" }, - "ConvertVmTemplateToVmParams": { + "DeleteElfImage": { "properties": { - "name": { - "type": "string" - }, - "converted_from_template_id": { + "id": { "type": "string" } }, "required": [ - "name", - "converted_from_template_id" + "id" ], "type": "object" }, - "VmCloneParams": { + "WithTask_DeleteElfImage_": { "properties": { - "owner": { - "$ref": "#/components/schemas/VmOwnerParams" - }, - "gpu_devices": { - "items": { - "$ref": "#/components/schemas/VmGpuOperationParams" - }, - "type": "array" - }, - "is_full_copy": { - "type": "boolean" + "task_id": { + "type": "string", + "nullable": true }, - "src_vm_id": { + "data": { + "$ref": "#/components/schemas/DeleteElfImage" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "ElfImageDeletionParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/ElfImageWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "NestedNamespaceGroup": { + "properties": { + "id": { "type": "string" }, - "max_bandwidth_policy": { - "$ref": "#/components/schemas/VmDiskIoRestrictType" - }, - "max_bandwidth_unit": { - "$ref": "#/components/schemas/BPSUnit" - }, - "max_bandwidth": { - "type": "integer", - "format": "int64" - }, - "max_iops_policy": { - "$ref": "#/components/schemas/VmDiskIoRestrictType" - }, - "max_iops": { - "type": "integer", - "format": "int64" - }, - "io_policy": { - "$ref": "#/components/schemas/VmDiskIoPolicy", - "deprecated": true - }, - "vcpu": { - "type": "integer", - "format": "int32" - }, - "status": { - "$ref": "#/components/schemas/VmStatus" - }, - "firmware": { - "$ref": "#/components/schemas/VmFirmware" - }, - "ha": { - "type": "boolean" - }, - "pci_nics": { - "$ref": "#/components/schemas/NicWhereInput" - }, - "vm_placement_group": { - "$ref": "#/components/schemas/VmPlacementGroupWhereInput" - }, - "vm_nics": { - "items": { - "$ref": "#/components/schemas/VmNicParams" - }, - "type": "array" - }, - "vm_disks": { - "$ref": "#/components/schemas/VmDiskParams" - }, - "memory_unit": { - "$ref": "#/components/schemas/ByteUnit" - }, - "memory": { - "type": "integer", - "format": "int64" - }, - "cpu_cores": { - "type": "integer", - "format": "int32" - }, - "cpu_sockets": { - "type": "integer", - "format": "int32" - }, - "guest_os_type": { - "$ref": "#/components/schemas/VmGuestsOperationSystem" - }, - "folder_id": { + "name": { "type": "string" - }, - "description": { + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "NestedNfsExport": { + "properties": { + "id": { "type": "string" }, "name": { "type": "string" - }, - "host_id": { + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "NestedNfsInode": { + "properties": { + "id": { "type": "string" }, - "cluster_id": { + "name": { "type": "string" } }, "required": [ - "src_vm_id", + "id", "name" ], - "type": "object" + "type": "object", + "additionalProperties": false }, - "VmRebuildParams": { + "NestedNvmfSubsystem": { "properties": { - "owner": { - "$ref": "#/components/schemas/VmOwnerParams" + "id": { + "type": "string" }, - "gpu_devices": { - "items": { - "$ref": "#/components/schemas/VmGpuOperationParams" - }, - "type": "array" + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "NestedSecurityPolicy": { + "properties": { + "id": { + "type": "string" }, - "is_full_copy": { - "type": "boolean" + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "NestedVlan": { + "properties": { + "id": { + "type": "string" }, - "rebuild_from_snapshot_id": { + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "NestedVmVolumeSnapshot": { + "properties": { + "id": { "type": "string" }, - "max_bandwidth_policy": { - "$ref": "#/components/schemas/VmDiskIoRestrictType" + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "Label": { + "properties": { + "cluster_num": { + "type": "integer", + "format": "int32", + "nullable": true }, - "max_bandwidth_unit": { - "$ref": "#/components/schemas/BPSUnit" + "clusters": { + "items": { + "$ref": "#/components/schemas/NestedCluster" + }, + "type": "array", + "nullable": true }, - "max_bandwidth": { + "consistency_group_num": { "type": "integer", - "format": "int64" - }, - "max_iops_policy": { - "$ref": "#/components/schemas/VmDiskIoRestrictType" + "format": "int32", + "nullable": true }, - "max_iops": { + "consistency_group_snapshot_num": { "type": "integer", - "format": "int64" + "format": "int32", + "nullable": true }, - "io_policy": { - "$ref": "#/components/schemas/VmDiskIoPolicy", - "deprecated": true + "consistency_group_snapshots": { + "items": { + "$ref": "#/components/schemas/NestedConsistencyGroupSnapshot" + }, + "type": "array", + "nullable": true }, - "vcpu": { + "consistency_groups": { + "items": { + "$ref": "#/components/schemas/NestedConsistencyGroup" + }, + "type": "array", + "nullable": true + }, + "content_library_image_num": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, - "status": { - "$ref": "#/components/schemas/VmStatus" + "content_library_images": { + "items": { + "$ref": "#/components/schemas/NestedContentLibraryImage" + }, + "type": "array", + "nullable": true }, - "firmware": { - "$ref": "#/components/schemas/VmFirmware" + "content_library_vm_template_num": { + "type": "integer", + "format": "int32", + "nullable": true }, - "ha": { - "type": "boolean" + "content_library_vm_templates": { + "items": { + "$ref": "#/components/schemas/NestedContentLibraryVmTemplate" + }, + "type": "array", + "nullable": true }, - "pci_nics": { - "$ref": "#/components/schemas/NicWhereInput" + "createdAt": { + "type": "string" }, - "vm_placement_group": { - "$ref": "#/components/schemas/VmPlacementGroupWhereInput" + "datacenter_num": { + "type": "integer", + "format": "int32", + "nullable": true }, - "vm_nics": { + "datacenters": { "items": { - "$ref": "#/components/schemas/VmNicParams" + "$ref": "#/components/schemas/NestedDatacenter" }, - "type": "array" + "type": "array", + "nullable": true }, - "vm_disks": { - "$ref": "#/components/schemas/VmDiskParams" + "disk_num": { + "type": "integer", + "format": "int32", + "nullable": true }, - "memory_unit": { - "$ref": "#/components/schemas/ByteUnit" + "disks": { + "items": { + "$ref": "#/components/schemas/NestedDisk" + }, + "type": "array", + "nullable": true }, - "memory": { + "elf_image_num": { "type": "integer", - "format": "int64" + "format": "int32", + "nullable": true }, - "cpu_cores": { + "elf_images": { + "items": { + "$ref": "#/components/schemas/NestedElfImage" + }, + "type": "array", + "nullable": true + }, + "gpu_device_num": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, - "cpu_sockets": { + "gpu_devices": { + "items": { + "$ref": "#/components/schemas/NestedGpuDevice" + }, + "type": "array", + "nullable": true + }, + "host_num": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, - "guest_os_type": { - "$ref": "#/components/schemas/VmGuestsOperationSystem" + "hosts": { + "items": { + "$ref": "#/components/schemas/NestedHost" + }, + "type": "array", + "nullable": true }, - "folder_id": { + "id": { "type": "string" }, - "description": { - "type": "string" + "iscsi_lun_num": { + "type": "integer", + "format": "int32", + "nullable": true }, - "name": { + "iscsi_lun_snapshot_num": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "iscsi_lun_snapshots": { + "items": { + "$ref": "#/components/schemas/NestedIscsiLunSnapshot" + }, + "type": "array", + "nullable": true + }, + "iscsi_luns": { + "items": { + "$ref": "#/components/schemas/NestedIscsiLun" + }, + "type": "array", + "nullable": true + }, + "iscsi_target_num": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "iscsi_targets": { + "items": { + "$ref": "#/components/schemas/NestedIscsiTarget" + }, + "type": "array", + "nullable": true + }, + "isolation_policies": { + "items": { + "$ref": "#/components/schemas/NestedIsolationPolicy" + }, + "type": "array", + "nullable": true + }, + "isolation_policy_num": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "key": { "type": "string" }, - "host_id": { + "namespace_group_num": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "namespace_groups": { + "items": { + "$ref": "#/components/schemas/NestedNamespaceGroup" + }, + "type": "array", + "nullable": true + }, + "nfs_export_num": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "nfs_exports": { + "items": { + "$ref": "#/components/schemas/NestedNfsExport" + }, + "type": "array", + "nullable": true + }, + "nfs_inode_num": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "nfs_inodes": { + "items": { + "$ref": "#/components/schemas/NestedNfsInode" + }, + "type": "array", + "nullable": true + }, + "nic_num": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "nics": { + "items": { + "$ref": "#/components/schemas/NestedNic" + }, + "type": "array", + "nullable": true + }, + "nvmf_namespace_num": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "nvmf_namespace_snapshot_num": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "nvmf_namespace_snapshots": { + "items": { + "$ref": "#/components/schemas/NestedNvmfNamespaceSnapshot" + }, + "type": "array", + "nullable": true + }, + "nvmf_namespaces": { + "items": { + "$ref": "#/components/schemas/NestedNvmfNamespace" + }, + "type": "array", + "nullable": true + }, + "nvmf_subsystem_num": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "nvmf_subsystems": { + "items": { + "$ref": "#/components/schemas/NestedNvmfSubsystem" + }, + "type": "array", + "nullable": true + }, + "security_policies": { + "items": { + "$ref": "#/components/schemas/NestedSecurityPolicy" + }, + "type": "array", + "nullable": true + }, + "security_policy_num": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "system_vlan_num": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "total_num": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "value": { + "type": "string", + "nullable": true + }, + "vds_num": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "vdses": { + "items": { + "$ref": "#/components/schemas/NestedVds" + }, + "type": "array", + "nullable": true + }, + "vlans": { + "items": { + "$ref": "#/components/schemas/NestedVlan" + }, + "type": "array", + "nullable": true + }, + "vm_num": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "vm_snapshot_num": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "vm_snapshots": { + "items": { + "$ref": "#/components/schemas/NestedVmSnapshot" + }, + "type": "array", + "nullable": true + }, + "vm_template_num": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "vm_templates": { + "items": { + "$ref": "#/components/schemas/NestedVmTemplate" + }, + "type": "array", + "nullable": true + }, + "vm_vlan_num": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "vm_volume_num": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "vm_volume_snapshot_num": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "vm_volume_snapshots": { + "items": { + "$ref": "#/components/schemas/NestedVmVolumeSnapshot" + }, + "type": "array", + "nullable": true + }, + "vm_volumes": { + "items": { + "$ref": "#/components/schemas/NestedVmVolume" + }, + "type": "array", + "nullable": true + }, + "vms": { + "items": { + "$ref": "#/components/schemas/NestedVm" + }, + "type": "array", + "nullable": true + } + }, + "required": [ + "createdAt", + "id", + "key" + ], + "type": "object", + "additionalProperties": false + }, + "WithTask_Label_": { + "properties": { + "task_id": { + "type": "string", + "nullable": true + }, + "data": { + "$ref": "#/components/schemas/Label" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "LabelCreationParams": { + "properties": { + "value": { "type": "string" }, - "cluster_id": { + "key": { "type": "string" } }, "required": [ - "rebuild_from_snapshot_id", - "name" + "key" ], "type": "object" }, - "VmRollbackParams": { + "LabelUpdationParams": { "properties": { "data": { "properties": { - "snapshot_id": { + "value": { + "type": "string" + }, + "key": { "type": "string" } }, - "required": [ - "snapshot_id" - ], "type": "object" }, "where": { - "$ref": "#/components/schemas/VmWhereInput" + "$ref": "#/components/schemas/LabelWhereInput" } }, "required": [ @@ -66751,43 +68322,102 @@ ], "type": "object" }, - "VmUpdateParams": { + "AddLabelsToResourcesParams": { "properties": { "data": { "properties": { - "vcpu": { - "type": "integer", - "format": "int32" + "gpu_devices": { + "$ref": "#/components/schemas/GpuDeviceWhereInput" }, - "ha": { - "type": "boolean" + "content_library_vm_templates": { + "$ref": "#/components/schemas/ContentLibraryVmTemplateWhereInput" }, - "memory_unit": { - "$ref": "#/components/schemas/ByteUnit" + "content_library_images": { + "$ref": "#/components/schemas/ContentLibraryImageWhereInput" }, - "memory": { - "type": "integer", - "format": "int64" + "isolation_policies": { + "$ref": "#/components/schemas/IsolationPolicyWhereInput" }, - "cpu_cores": { - "type": "integer", - "format": "int32" + "security_policies": { + "$ref": "#/components/schemas/SecurityPolicyWhereInput" }, - "cpu_sockets": { - "type": "integer", - "format": "int32" + "vms": { + "$ref": "#/components/schemas/VmWhereInput" }, - "description": { - "type": "string" + "vm_volume_snapshots": { + "$ref": "#/components/schemas/VmVolumeSnapshotWhereInput" }, - "name": { - "type": "string" + "vm_volumes": { + "$ref": "#/components/schemas/VmVolumeWhereInput" + }, + "vm_templates": { + "$ref": "#/components/schemas/VmTemplateWhereInput" + }, + "vm_snapshots": { + "$ref": "#/components/schemas/VmSnapshotWhereInput" + }, + "vlans": { + "$ref": "#/components/schemas/VlanWhereInput" + }, + "vdses": { + "$ref": "#/components/schemas/VdsWhereInput" + }, + "nvmf_subsystems": { + "$ref": "#/components/schemas/NvmfSubsystemWhereInput" + }, + "nvmf_namespace_snapshots": { + "$ref": "#/components/schemas/NvmfNamespaceSnapshotWhereInput" + }, + "nvmf_namespaces": { + "$ref": "#/components/schemas/NvmfNamespaceWhereInput" + }, + "nics": { + "$ref": "#/components/schemas/NicWhereInput" + }, + "nfs_inodes": { + "$ref": "#/components/schemas/NfsInodeWhereInput" + }, + "nfs_exports": { + "$ref": "#/components/schemas/NfsExportWhereInput" + }, + "namespace_groups": { + "$ref": "#/components/schemas/NamespaceGroupWhereInput" + }, + "iscsi_targets": { + "$ref": "#/components/schemas/IscsiTargetWhereInput" + }, + "iscsi_lun_snapshots": { + "$ref": "#/components/schemas/IscsiLunSnapshotWhereInput" + }, + "iscsi_luns": { + "$ref": "#/components/schemas/IscsiLunWhereInput" + }, + "hosts": { + "$ref": "#/components/schemas/HostWhereInput" + }, + "elf_images": { + "$ref": "#/components/schemas/ElfImageWhereInput" + }, + "disks": { + "$ref": "#/components/schemas/DiskWhereInput" + }, + "datacenters": { + "$ref": "#/components/schemas/DatacenterWhereInput" + }, + "consistency_group_snapshots": { + "$ref": "#/components/schemas/ConsistencyGroupSnapshotWhereInput" + }, + "consistency_groups": { + "$ref": "#/components/schemas/ConsistencyGroupWhereInput" + }, + "clusters": { + "$ref": "#/components/schemas/ClusterWhereInput" } }, "type": "object" }, "where": { - "$ref": "#/components/schemas/VmWhereInput" + "$ref": "#/components/schemas/LabelWhereInput" } }, "required": [ @@ -66796,7 +68426,10 @@ ], "type": "object" }, - "DeleteVm": { + "RemoveLabelsFromResourcesParams": { + "$ref": "#/components/schemas/AddLabelsToResourcesParams" + }, + "DeleteLabel": { "properties": { "id": { "type": "string" @@ -66807,14 +68440,14 @@ ], "type": "object" }, - "WithTask_DeleteVm_": { + "WithTask_DeleteLabel_": { "properties": { "task_id": { "type": "string", "nullable": true }, "data": { - "$ref": "#/components/schemas/DeleteVm" + "$ref": "#/components/schemas/DeleteLabel" } }, "required": [ @@ -66822,10 +68455,10 @@ ], "type": "object" }, - "VmOperateParams": { + "LabelDeletionParams": { "properties": { "where": { - "$ref": "#/components/schemas/VmWhereInput" + "$ref": "#/components/schemas/LabelWhereInput" } }, "required": [ @@ -66833,1107 +68466,632 @@ ], "type": "object" }, - "VmDeleteParams": { + "License": { "properties": { - "effect": { - "properties": { - "include_snapshots": { - "type": "boolean" - } - }, - "type": "object" + "expire_date": { + "type": "string" }, - "where": { - "$ref": "#/components/schemas/VmWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "VmStartParams": { - "properties": { - "data": { - "properties": { - "host_id": { - "type": "string" - } - }, - "required": [ - "host_id" - ], - "type": "object" + "id": { + "type": "string" }, - "where": { - "$ref": "#/components/schemas/VmWhereInput" + "license_serial": { + "type": "string" + }, + "maintenance_end_date": { + "type": "string", + "nullable": true + }, + "maintenance_start_date": { + "type": "string", + "nullable": true + }, + "max_chunk_num": { + "type": "integer", + "format": "int32" + }, + "max_cluster_num": { + "type": "integer", + "format": "int32" + }, + "sign_date": { + "type": "string" + }, + "software_edition": { + "$ref": "#/components/schemas/SoftwareEdition" + }, + "type": { + "$ref": "#/components/schemas/LicenseType" } }, "required": [ - "where" + "expire_date", + "id", + "license_serial", + "max_chunk_num", + "max_cluster_num", + "sign_date", + "software_edition", + "type" ], - "type": "object" + "type": "object", + "additionalProperties": false }, - "VmAddDiskParams": { + "WithTask_License_": { "properties": { - "data": { - "properties": { - "max_bandwidth_policy": { - "$ref": "#/components/schemas/VmDiskIoRestrictType" - }, - "max_bandwidth_unit": { - "$ref": "#/components/schemas/BPSUnit" - }, - "max_bandwidth": { - "type": "integer", - "format": "int64" - }, - "max_iops_policy": { - "$ref": "#/components/schemas/VmDiskIoRestrictType" - }, - "max_iops": { - "type": "integer", - "format": "int64" - }, - "io_policy": { - "$ref": "#/components/schemas/VmDiskIoPolicy" - }, - "vm_disks": { - "properties": { - "mount_disks": { - "items": { - "$ref": "#/components/schemas/MountDisksParams" - }, - "type": "array" - }, - "mount_new_create_disks": { - "items": { - "$ref": "#/components/schemas/MountNewCreateDisksParams" - }, - "type": "array" - } - }, - "type": "object" - } - }, - "required": [ - "vm_disks" - ], - "type": "object" + "task_id": { + "type": "string", + "nullable": true }, - "where": { - "$ref": "#/components/schemas/VmWhereInput" + "data": { + "$ref": "#/components/schemas/License" } }, "required": [ - "data", - "where" + "data" ], "type": "object" }, - "VmUpdateDiskParams": { + "LicenseUpdationParams": { "properties": { "data": { "properties": { - "content_library_image_id": { - "type": "string", - "nullable": true - }, - "elf_image_id": { - "type": "string", - "nullable": true - }, - "vm_volume_id": { - "type": "string" - }, - "vm_disk_id": { + "license": { "type": "string" - }, - "bus": { - "$ref": "#/components/schemas/Bus" } }, "required": [ - "vm_disk_id" + "license" ], "type": "object" - }, - "where": { - "$ref": "#/components/schemas/VmWhereInput" } }, "required": [ - "data", - "where" + "data" ], "type": "object" }, - "VmExpandVmDiskParams": { + "LogCollectionStatus": { + "enum": [ + "EXECUTING", + "FAILED", + "STOPPING", + "SUCCESSED" + ], + "type": "string" + }, + "LogCollection": { "properties": { - "size_unit": { - "$ref": "#/components/schemas/ByteUnit" + "cluster": { + "$ref": "#/components/schemas/NestedCluster" + }, + "groups": { + "items": { + "type": "string" + }, + "type": "array" + }, + "hosts": { + "items": { + "$ref": "#/components/schemas/NestedHost" + }, + "type": "array", + "nullable": true + }, + "id": { + "type": "string" + }, + "local_id": { + "type": "string" + }, + "log_ended_at": { + "type": "string" + }, + "log_started_at": { + "type": "string" + }, + "owner": { + "type": "string" + }, + "path": { + "type": "string" + }, + "progress": { + "type": "number", + "format": "double" + }, + "service_groups": { + "properties": {}, + "type": "object", + "nullable": true + }, + "services": { + "items": { + "type": "string" + }, + "type": "array" }, "size": { "type": "integer", "format": "int64" }, - "where": { - "$ref": "#/components/schemas/VmDiskWhereInput" + "started_at": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/LogCollectionStatus" + }, + "witness": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedWitness" + } + ], + "nullable": true } }, "required": [ + "cluster", + "groups", + "id", + "local_id", + "log_ended_at", + "log_started_at", + "owner", + "path", + "progress", + "services", "size", - "where" + "started_at", + "status" ], - "type": "object" + "type": "object", + "additionalProperties": false }, - "VmRemoveDiskParams": { + "WithTask_LogCollection_": { "properties": { - "data": { - "properties": { - "disk_ids": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "disk_ids" - ], - "type": "object" + "task_id": { + "type": "string", + "nullable": true }, - "where": { - "$ref": "#/components/schemas/VmWhereInput" + "data": { + "$ref": "#/components/schemas/LogCollection" } }, "required": [ - "data", - "where" + "data" ], "type": "object" }, - "VmAddCdRomParams": { + "LogCollectionServiceGroupParams": { "properties": { - "data": { - "properties": { - "vm_cd_roms": { - "items": { - "$ref": "#/components/schemas/VmCdRomParams" - }, - "type": "array" - } + "services": { + "items": { + "type": "string" }, - "required": [ - "vm_cd_roms" - ], - "type": "object" + "type": "array" }, - "where": { - "$ref": "#/components/schemas/VmWhereInput" + "group_name": { + "type": "string" } }, "required": [ - "data", - "where" + "group_name" ], "type": "object" }, - "VmRemoveCdRomParams": { + "LogCollectionCreationParams": { "properties": { - "data": { - "properties": { - "cd_rom_ids": { - "items": { - "type": "string" - }, - "type": "array" - } + "witness_id": { + "type": "string" + }, + "service_groups": { + "items": { + "$ref": "#/components/schemas/LogCollectionServiceGroupParams" }, - "required": [ - "cd_rom_ids" - ], - "type": "object" + "type": "array" }, - "where": { - "$ref": "#/components/schemas/VmWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "VmEjectCdRomParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/VmDiskWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "VmToggleCdRomDisableParams": { - "properties": { - "disabled": { - "type": "boolean" + "log_ended_at": { + "type": "string", + "format": "date-time" }, - "where": { - "$ref": "#/components/schemas/VmDiskWhereInput" + "log_started_at": { + "type": "string", + "format": "date-time" + }, + "cluster_id": { + "type": "string" + }, + "hosts": { + "$ref": "#/components/schemas/HostWhereInput" } }, "required": [ - "disabled", - "where" + "log_ended_at", + "log_started_at", + "cluster_id", + "hosts" ], "type": "object" }, - "VmAddNicParams": { + "LogCollectionWhereInput": { "properties": { - "data": { - "properties": { - "vm_nics": { - "items": { - "$ref": "#/components/schemas/VmNicParams" - }, - "type": "array" - } + "AND": { + "items": { + "$ref": "#/components/schemas/LogCollectionWhereInput" }, - "required": [ - "vm_nics" - ], - "type": "object" + "type": "array", + "nullable": true }, - "where": { - "$ref": "#/components/schemas/VmWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "UpdateVpcNicPayloads": { - "properties": { - "floating_ip_id": { - "type": "string", + "NOT": { + "items": { + "$ref": "#/components/schemas/LogCollectionWhereInput" + }, + "type": "array", "nullable": true }, - "ip_addresses": { + "OR": { "items": { - "type": "string" + "$ref": "#/components/schemas/LogCollectionWhereInput" }, - "type": "array" + "type": "array", + "nullable": true }, - "vpc_subnet_id": { - "type": "string" - } - }, - "type": "object" - }, - "VmUpdateNicParams": { - "properties": { - "data": { - "properties": { - "vpc_nic": { - "$ref": "#/components/schemas/UpdateVpcNicPayloads" - }, - "subnet_mask": { - "type": "string" - }, - "gateway": { - "type": "string" - }, - "ip_address": { - "type": "string" - }, - "nic_id": { - "type": "string" - }, - "connect_vlan_id": { - "type": "string" - }, - "mirror": { - "type": "boolean" - }, - "model": { - "$ref": "#/components/schemas/VmNicModel" - }, - "enabled": { - "type": "boolean" - }, - "mac_address": { - "type": "string" - }, - "nic_index": { - "type": "integer", - "format": "int32" - } - }, - "required": [ - "nic_index" - ], - "type": "object" - }, - "where": { - "$ref": "#/components/schemas/VmWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "VmUpdateNicBasicInfoParams": { - "properties": { - "data": { - "properties": { - "subnet_mask": { - "type": "string" - }, - "gateway": { - "type": "string" - }, - "ip_address": { - "type": "string" - } - }, - "type": "object" - }, - "where": { - "$ref": "#/components/schemas/VmNicWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "VmUpdateNicAdvanceInfoParams": { - "properties": { - "data": { - "properties": { - "mirror": { - "type": "boolean" - }, - "enabled": { - "type": "boolean" - }, - "mac_address": { - "type": "string" - }, - "nic_id": { - "type": "string" - }, - "connect_vlan_id": { - "type": "string" - } - }, - "type": "object" - }, - "where": { - "$ref": "#/components/schemas/VmNicWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "VmUpdateNicQosOptionsParams": { - "properties": { - "data": { - "properties": { - "qos": { - "$ref": "#/components/schemas/VmNicQosOption" - } - }, - "type": "object" - }, - "where": { - "$ref": "#/components/schemas/VmNicWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "VmOperatePciNicParams": { - "properties": { - "data": { - "properties": { - "pci_nics": { - "$ref": "#/components/schemas/NicWhereInput" - } - }, - "type": "object" - }, - "where": { - "$ref": "#/components/schemas/VmWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "VmRemoveNicParams": { - "properties": { - "data": { - "properties": { - "nic_index": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array" - } - }, - "required": [ - "nic_index" - ], - "type": "object" - }, - "where": { - "$ref": "#/components/schemas/VmWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "VmRemoveNicByWhereParams": { - "properties": { - "effect": { - "properties": { - "vm_ids": { - "items": { - "type": "string" - }, - "type": "array", - "minItems": 1 - } - }, - "type": "object" - }, - "where": { - "$ref": "#/components/schemas/VmNicWhereInput" - } - }, - "required": [ - "effect", - "where" - ], - "type": "object" - }, - "VmAddGpuDeviceParams": { - "properties": { - "data": { - "items": { - "$ref": "#/components/schemas/VmGpuOperationParams" - }, - "type": "array", - "minItems": 1 - }, - "where": { - "$ref": "#/components/schemas/VmWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "VmRemoveGpuDeviceParams": { - "properties": { - "data": { - "items": { - "$ref": "#/components/schemas/VmGpuOperationParams" - }, - "type": "array", - "minItems": 1 - }, - "where": { - "$ref": "#/components/schemas/VmWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "InstallVmtoolsParams": { - "properties": { - "data": { - "properties": { - "svt_image_id": { - "type": "string" - }, - "cd_rom_id": { - "type": "string" + "cluster": { + "allOf": [ + { + "$ref": "#/components/schemas/ClusterWhereInput" } - }, - "required": [ - "svt_image_id", - "cd_rom_id" ], - "type": "object", - "deprecated": true + "nullable": true }, - "where": { - "$ref": "#/components/schemas/VmWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "VmMigrateParams": { - "properties": { - "data": { - "properties": { - "host_id": { - "type": "string" + "hosts_every": { + "allOf": [ + { + "$ref": "#/components/schemas/HostWhereInput" } - }, - "required": [ - "host_id" ], - "type": "object" - }, - "where": { - "$ref": "#/components/schemas/VmWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "MigrateType": { - "enum": [ - "COLD_MIGRATE", - "CUTOVER_MIGRATE", - "LIVE_MIGRATE" - ], - "type": "string" - }, - "VlanMapping": { - "properties": { - "src_vlan_local_id": { - "type": "string" - }, - "dest_vlan_local_id": { - "type": "string" - } - }, - "required": [ - "src_vlan_local_id", - "dest_vlan_local_id" - ], - "type": "object" - }, - "MigrateVmConfig": { - "properties": { - "remove_unmovable_devices": { - "type": "boolean" - }, - "new_name": { - "type": "string" - }, - "network_mapping": { - "items": { - "$ref": "#/components/schemas/VlanMapping" - }, - "type": "array" - }, - "migrate_type": { - "$ref": "#/components/schemas/MigrateType" - }, - "elf_storage_policy": { - "$ref": "#/components/schemas/VmVolumeElfStoragePolicyType" + "nullable": true }, - "delete_src_vm": { - "type": "boolean" - } - }, - "required": [ - "network_mapping", - "migrate_type", - "elf_storage_policy" - ], - "type": "object" - }, - "VmMigrateAcrossClusterParams": { - "properties": { - "data": { - "properties": { - "vm_config": { - "$ref": "#/components/schemas/MigrateVmConfig" - }, - "cluster_id": { - "type": "string" - }, - "host_id": { - "type": "string" + "hosts_none": { + "allOf": [ + { + "$ref": "#/components/schemas/HostWhereInput" } - }, - "required": [ - "vm_config", - "cluster_id" ], - "type": "object" - }, - "where": { - "$ref": "#/components/schemas/VmWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "TaskWhereInput": { - "properties": { - "AND": { - "items": { - "$ref": "#/components/schemas/TaskWhereInput" - }, - "type": "array", - "nullable": true - }, - "NOT": { - "items": { - "$ref": "#/components/schemas/TaskWhereInput" - }, - "type": "array", - "nullable": true - }, - "OR": { - "items": { - "$ref": "#/components/schemas/TaskWhereInput" - }, - "type": "array", "nullable": true }, - "cluster": { + "hosts_some": { "allOf": [ { - "$ref": "#/components/schemas/ClusterWhereInput" + "$ref": "#/components/schemas/HostWhereInput" } ], "nullable": true }, - "description": { + "id": { "type": "string", "nullable": true }, - "description_contains": { + "id_contains": { "type": "string", "nullable": true }, - "description_ends_with": { + "id_ends_with": { "type": "string", "nullable": true }, - "description_gt": { + "id_gt": { "type": "string", "nullable": true }, - "description_gte": { + "id_gte": { "type": "string", "nullable": true }, - "description_in": { + "id_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "description_lt": { + "id_lt": { "type": "string", "nullable": true }, - "description_lte": { + "id_lte": { "type": "string", "nullable": true }, - "description_not": { + "id_not": { "type": "string", "nullable": true }, - "description_not_contains": { + "id_not_contains": { "type": "string", "nullable": true }, - "description_not_ends_with": { + "id_not_ends_with": { "type": "string", "nullable": true }, - "description_not_in": { + "id_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "description_not_starts_with": { + "id_not_starts_with": { "type": "string", "nullable": true }, - "description_starts_with": { + "id_starts_with": { "type": "string", "nullable": true }, - "error_code": { + "local_id": { "type": "string", "nullable": true }, - "error_code_contains": { + "local_id_contains": { "type": "string", "nullable": true }, - "error_code_ends_with": { + "local_id_ends_with": { "type": "string", "nullable": true }, - "error_code_gt": { + "local_id_gt": { "type": "string", "nullable": true }, - "error_code_gte": { + "local_id_gte": { "type": "string", "nullable": true }, - "error_code_in": { + "local_id_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "error_code_lt": { + "local_id_lt": { "type": "string", "nullable": true }, - "error_code_lte": { + "local_id_lte": { "type": "string", "nullable": true }, - "error_code_not": { + "local_id_not": { "type": "string", "nullable": true }, - "error_code_not_contains": { + "local_id_not_contains": { "type": "string", "nullable": true }, - "error_code_not_ends_with": { + "local_id_not_ends_with": { "type": "string", "nullable": true }, - "error_code_not_in": { + "local_id_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "error_code_not_starts_with": { - "type": "string", - "nullable": true - }, - "error_code_starts_with": { - "type": "string", - "nullable": true - }, - "error_message": { + "local_id_not_starts_with": { "type": "string", "nullable": true }, - "error_message_contains": { + "local_id_starts_with": { "type": "string", "nullable": true }, - "error_message_ends_with": { + "log_ended_at": { "type": "string", "nullable": true }, - "error_message_gt": { + "log_ended_at_gt": { "type": "string", "nullable": true }, - "error_message_gte": { + "log_ended_at_gte": { "type": "string", "nullable": true }, - "error_message_in": { + "log_ended_at_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "error_message_lt": { - "type": "string", - "nullable": true - }, - "error_message_lte": { - "type": "string", - "nullable": true - }, - "error_message_not": { + "log_ended_at_lt": { "type": "string", "nullable": true }, - "error_message_not_contains": { + "log_ended_at_lte": { "type": "string", "nullable": true }, - "error_message_not_ends_with": { + "log_ended_at_not": { "type": "string", "nullable": true }, - "error_message_not_in": { + "log_ended_at_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "error_message_not_starts_with": { - "type": "string", - "nullable": true - }, - "error_message_starts_with": { - "type": "string", - "nullable": true - }, - "finished_at": { + "log_started_at": { "type": "string", "nullable": true }, - "finished_at_gt": { + "log_started_at_gt": { "type": "string", "nullable": true }, - "finished_at_gte": { + "log_started_at_gte": { "type": "string", "nullable": true }, - "finished_at_in": { + "log_started_at_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "finished_at_lt": { + "log_started_at_lt": { "type": "string", "nullable": true }, - "finished_at_lte": { + "log_started_at_lte": { "type": "string", "nullable": true }, - "finished_at_not": { + "log_started_at_not": { "type": "string", "nullable": true }, - "finished_at_not_in": { + "log_started_at_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "id": { + "owner": { "type": "string", "nullable": true }, - "id_contains": { + "owner_contains": { "type": "string", "nullable": true }, - "id_ends_with": { + "owner_ends_with": { "type": "string", "nullable": true }, - "id_gt": { + "owner_gt": { "type": "string", "nullable": true }, - "id_gte": { + "owner_gte": { "type": "string", "nullable": true }, - "id_in": { + "owner_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "id_lt": { + "owner_lt": { "type": "string", "nullable": true }, - "id_lte": { + "owner_lte": { "type": "string", "nullable": true }, - "id_not": { + "owner_not": { "type": "string", "nullable": true }, - "id_not_contains": { + "owner_not_contains": { "type": "string", "nullable": true }, - "id_not_ends_with": { + "owner_not_ends_with": { "type": "string", "nullable": true }, - "id_not_in": { + "owner_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "id_not_starts_with": { - "type": "string", - "nullable": true - }, - "id_starts_with": { - "type": "string", - "nullable": true - }, - "internal": { - "type": "boolean", - "nullable": true - }, - "internal_not": { - "type": "boolean", - "nullable": true - }, - "key": { - "type": "string", - "nullable": true - }, - "key_contains": { - "type": "string", - "nullable": true - }, - "key_ends_with": { - "type": "string", - "nullable": true - }, - "key_gt": { + "owner_not_starts_with": { "type": "string", "nullable": true }, - "key_gte": { + "owner_starts_with": { "type": "string", "nullable": true }, - "key_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true - }, - "key_lt": { + "path": { "type": "string", "nullable": true }, - "key_lte": { + "path_contains": { "type": "string", "nullable": true }, - "key_not": { + "path_ends_with": { "type": "string", "nullable": true }, - "key_not_contains": { + "path_gt": { "type": "string", "nullable": true }, - "key_not_ends_with": { + "path_gte": { "type": "string", "nullable": true }, - "key_not_in": { + "path_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "key_not_starts_with": { + "path_lt": { "type": "string", "nullable": true }, - "key_starts_with": { + "path_lte": { "type": "string", "nullable": true }, - "local_created_at": { + "path_not": { "type": "string", "nullable": true }, - "local_created_at_gt": { + "path_not_contains": { "type": "string", "nullable": true }, - "local_created_at_gte": { + "path_not_ends_with": { "type": "string", "nullable": true }, - "local_created_at_in": { + "path_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "local_created_at_lt": { - "type": "string", - "nullable": true - }, - "local_created_at_lte": { + "path_not_starts_with": { "type": "string", "nullable": true }, - "local_created_at_not": { + "path_starts_with": { "type": "string", "nullable": true }, - "local_created_at_not_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true - }, "progress": { "type": "number", "format": "double", @@ -67980,896 +69138,938 @@ "type": "array", "nullable": true }, - "resource_id": { - "type": "string", - "nullable": true - }, - "resource_id_contains": { - "type": "string", - "nullable": true - }, - "resource_id_ends_with": { - "type": "string", + "size": { + "type": "integer", + "format": "int64", "nullable": true }, - "resource_id_gt": { - "type": "string", + "size_gt": { + "type": "integer", + "format": "int64", "nullable": true }, - "resource_id_gte": { - "type": "string", + "size_gte": { + "type": "integer", + "format": "int64", "nullable": true }, - "resource_id_in": { + "size_in": { "items": { - "type": "string" + "type": "integer", + "format": "int64" }, "type": "array", "nullable": true }, - "resource_id_lt": { - "type": "string", - "nullable": true - }, - "resource_id_lte": { - "type": "string", - "nullable": true - }, - "resource_id_not": { - "type": "string", + "size_lt": { + "type": "integer", + "format": "int64", "nullable": true }, - "resource_id_not_contains": { - "type": "string", + "size_lte": { + "type": "integer", + "format": "int64", "nullable": true }, - "resource_id_not_ends_with": { - "type": "string", + "size_not": { + "type": "integer", + "format": "int64", "nullable": true }, - "resource_id_not_in": { + "size_not_in": { "items": { - "type": "string" + "type": "integer", + "format": "int64" }, "type": "array", "nullable": true }, - "resource_id_not_starts_with": { + "started_at": { "type": "string", "nullable": true }, - "resource_id_starts_with": { + "started_at_gt": { "type": "string", "nullable": true }, - "resource_mutation": { + "started_at_gte": { "type": "string", "nullable": true }, - "resource_mutation_contains": { - "type": "string", + "started_at_in": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true }, - "resource_mutation_ends_with": { + "started_at_lt": { "type": "string", "nullable": true }, - "resource_mutation_gt": { + "started_at_lte": { "type": "string", "nullable": true }, - "resource_mutation_gte": { + "started_at_not": { "type": "string", "nullable": true }, - "resource_mutation_in": { + "started_at_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "resource_mutation_lt": { - "type": "string", - "nullable": true - }, - "resource_mutation_lte": { - "type": "string", - "nullable": true - }, - "resource_mutation_not": { - "type": "string", + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/LogCollectionStatus" + } + ], "nullable": true }, - "resource_mutation_not_contains": { - "type": "string", + "status_in": { + "items": { + "$ref": "#/components/schemas/LogCollectionStatus" + }, + "type": "array", "nullable": true }, - "resource_mutation_not_ends_with": { - "type": "string", + "status_not": { + "allOf": [ + { + "$ref": "#/components/schemas/LogCollectionStatus" + } + ], "nullable": true }, - "resource_mutation_not_in": { + "status_not_in": { "items": { - "type": "string" + "$ref": "#/components/schemas/LogCollectionStatus" }, "type": "array", "nullable": true }, - "resource_mutation_not_starts_with": { - "type": "string", + "witness": { + "allOf": [ + { + "$ref": "#/components/schemas/WitnessWhereInput" + } + ], "nullable": true - }, - "resource_mutation_starts_with": { + } + }, + "type": "object", + "additionalProperties": false + }, + "ForceStopLogCollectionParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/LogCollectionWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "DeleteLogCollection": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "WithTask_DeleteLogCollection_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "resource_rollback_error": { + "data": { + "$ref": "#/components/schemas/DeleteLogCollection" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "LogCollectionDeletionParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/LogCollectionWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "MetricLabel": { + "properties": { + "to_hostname": { "type": "string", "nullable": true }, - "resource_rollback_error_contains": { + "serial_number": { "type": "string", "nullable": true }, - "resource_rollback_error_ends_with": { + "pool": { "type": "string", "nullable": true }, - "resource_rollback_error_gt": { + "name": { "type": "string", "nullable": true }, - "resource_rollback_error_gte": { + "metric_name": { "type": "string", "nullable": true }, - "resource_rollback_error_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true - }, - "resource_rollback_error_lt": { + "job": { "type": "string", "nullable": true }, - "resource_rollback_error_lte": { + "instance": { "type": "string", "nullable": true }, - "resource_rollback_error_not": { + "_zone": { "type": "string", "nullable": true }, - "resource_rollback_error_not_contains": { + "_witness": { "type": "string", "nullable": true }, - "resource_rollback_error_not_ends_with": { + "_volume": { "type": "string", "nullable": true }, - "resource_rollback_error_not_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true - }, - "resource_rollback_error_not_starts_with": { + "_vm": { "type": "string", "nullable": true }, - "resource_rollback_error_starts_with": { + "_to_uuid": { "type": "string", "nullable": true }, - "resource_rollback_retry_count": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "resource_rollback_retry_count_gt": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "resource_rollback_retry_count_gte": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "resource_rollback_retry_count_in": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array", - "nullable": true - }, - "resource_rollback_retry_count_lt": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "resource_rollback_retry_count_lte": { - "type": "integer", - "format": "int32", + "_service": { + "type": "string", "nullable": true }, - "resource_rollback_retry_count_not": { - "type": "integer", - "format": "int32", + "_scvm": { + "type": "string", "nullable": true }, - "resource_rollback_retry_count_not_in": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array", + "_network": { + "type": "string", "nullable": true }, - "resource_rollbacked": { - "type": "boolean", + "_mac": { + "type": "string", "nullable": true }, - "resource_rollbacked_not": { - "type": "boolean", + "_host": { + "type": "string", "nullable": true }, - "resource_type": { + "_esxi_uuid": { "type": "string", "nullable": true }, - "resource_type_contains": { + "_device": { "type": "string", "nullable": true }, - "resource_type_ends_with": { + "_cluster": { "type": "string", "nullable": true }, - "resource_type_gt": { + "_chunk": { "type": "string", "nullable": true }, - "resource_type_gte": { + "__typename": { "type": "string", + "enum": [ + "MetricLabel" + ], + "nullable": false + } + }, + "type": "object" + }, + "DataPoint": { + "properties": { + "v": { + "type": "number", + "format": "double", "nullable": true }, - "resource_type_in": { + "t": { + "type": "number", + "format": "double" + }, + "__typename": { + "type": "string", + "enum": [ + "DataPoint" + ], + "nullable": false + } + }, + "required": [ + "t" + ], + "type": "object" + }, + "MetricStream": { + "properties": { + "points": { "items": { - "type": "string" + "$ref": "#/components/schemas/DataPoint" }, "type": "array", "nullable": true }, - "resource_type_lt": { - "type": "string", - "nullable": true + "labels": { + "$ref": "#/components/schemas/MetricLabel" }, - "resource_type_lte": { + "__typename": { "type": "string", + "enum": [ + "MetricStream" + ], + "nullable": false + } + }, + "required": [ + "labels" + ], + "type": "object" + }, + "MetricSample": { + "properties": { + "point": { + "allOf": [ + { + "$ref": "#/components/schemas/DataPoint" + } + ], "nullable": true }, - "resource_type_not": { - "type": "string", - "nullable": true + "labels": { + "$ref": "#/components/schemas/MetricLabel" }, - "resource_type_not_contains": { + "__typename": { "type": "string", - "nullable": true + "enum": [ + "MetricSample" + ], + "nullable": false + } + }, + "required": [ + "labels" + ], + "type": "object" + }, + "MetricUnit": { + "enum": [ + "COUNT", + "DATA_RATE_BIT", + "DATA_RATE_BYTE", + "DATA_SIZE", + "FREQUENCY", + "LOAD", + "PERCENT", + "RATIO", + "TEMPERATURE", + "TIME" + ], + "type": "string" + }, + "Metric": { + "properties": { + "unit": { + "$ref": "#/components/schemas/MetricUnit" }, - "resource_type_not_ends_with": { - "type": "string", - "nullable": true + "step": { + "type": "integer", + "format": "int32" }, - "resource_type_not_in": { + "samples": { "items": { - "type": "string" + "$ref": "#/components/schemas/MetricSample" }, "type": "array", "nullable": true }, - "resource_type_not_starts_with": { - "type": "string", - "nullable": true - }, - "resource_type_starts_with": { - "type": "string", + "sample_streams": { + "items": { + "$ref": "#/components/schemas/MetricStream" + }, + "type": "array", "nullable": true }, - "snapshot": { - "type": "string", - "nullable": true + "dropped": { + "type": "boolean" }, - "snapshot_contains": { + "__typename": { "type": "string", - "nullable": true - }, - "snapshot_ends_with": { - "type": "string", - "nullable": true - }, - "snapshot_gt": { + "enum": [ + "Metric" + ], + "nullable": false + } + }, + "required": [ + "unit", + "step", + "dropped" + ], + "type": "object" + }, + "WithTask_Metric_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "snapshot_gte": { - "type": "string", - "nullable": true + "data": { + "$ref": "#/components/schemas/Metric" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "GetVmMetricInput": { + "properties": { + "range": { + "type": "string" }, - "snapshot_in": { + "metrics": { "items": { "type": "string" }, - "type": "array", - "nullable": true - }, - "snapshot_lt": { - "type": "string", - "nullable": true - }, - "snapshot_lte": { - "type": "string", - "nullable": true - }, - "snapshot_not": { - "type": "string", - "nullable": true - }, - "snapshot_not_contains": { - "type": "string", - "nullable": true + "type": "array" }, - "snapshot_not_ends_with": { - "type": "string", - "nullable": true + "vms": { + "$ref": "#/components/schemas/VmWhereInput" + } + }, + "required": [ + "range", + "metrics", + "vms" + ], + "type": "object" + }, + "GetVmNetWorkMetricInput": { + "properties": { + "range": { + "type": "string" }, - "snapshot_not_in": { + "metrics": { "items": { "type": "string" }, - "type": "array", - "nullable": true - }, - "snapshot_not_starts_with": { - "type": "string", - "nullable": true - }, - "snapshot_starts_with": { - "type": "string", - "nullable": true + "type": "array" }, - "started_at": { - "type": "string", - "nullable": true + "nics": { + "$ref": "#/components/schemas/VmNicWhereInput" }, - "started_at_gt": { - "type": "string", - "nullable": true + "vms": { + "$ref": "#/components/schemas/VmWhereInput" + } + }, + "required": [ + "range", + "metrics", + "vms" + ], + "type": "object" + }, + "GetDiskMetricInput": { + "properties": { + "range": { + "type": "string" }, - "started_at_gte": { - "type": "string", - "nullable": true + "disks": { + "$ref": "#/components/schemas/DiskWhereInput" }, - "started_at_in": { + "metrics": { "items": { "type": "string" }, - "type": "array", - "nullable": true - }, - "started_at_lt": { - "type": "string", - "nullable": true - }, - "started_at_lte": { - "type": "string", - "nullable": true - }, - "started_at_not": { - "type": "string", - "nullable": true + "type": "array" + } + }, + "required": [ + "range", + "disks", + "metrics" + ], + "type": "object" + }, + "GetVmVolumeMetricInput": { + "properties": { + "range": { + "type": "string" }, - "started_at_not_in": { + "metrics": { "items": { "type": "string" }, - "type": "array", - "nullable": true - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/TaskStatus" - } - ], - "nullable": true - }, - "status_in": { - "items": { - "$ref": "#/components/schemas/TaskStatus" - }, - "type": "array", - "nullable": true + "type": "array" }, - "status_not": { - "allOf": [ - { - "$ref": "#/components/schemas/TaskStatus" - } - ], - "nullable": true + "vmVolumes": { + "$ref": "#/components/schemas/VmVolumeWhereInput" + } + }, + "required": [ + "range", + "metrics", + "vmVolumes" + ], + "type": "object" + }, + "GetLunMetricInput": { + "properties": { + "range": { + "type": "string" }, - "status_not_in": { - "items": { - "$ref": "#/components/schemas/TaskStatus" - }, - "type": "array", - "nullable": true + "hosts": { + "$ref": "#/components/schemas/HostWhereInput" }, - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/TaskType" - } - ], - "nullable": true + "luns": { + "$ref": "#/components/schemas/IscsiLunWhereInput" }, - "type_in": { + "metrics": { "items": { - "$ref": "#/components/schemas/TaskType" + "type": "string" }, - "type": "array", - "nullable": true + "type": "array" + } + }, + "required": [ + "range", + "luns", + "metrics" + ], + "type": "object" + }, + "GetNvmfNamespaceMetricInput": { + "properties": { + "hosts": { + "$ref": "#/components/schemas/HostWhereInput" }, - "type_not": { - "allOf": [ - { - "$ref": "#/components/schemas/TaskType" - } - ], - "nullable": true + "nvmfNamespaces": { + "$ref": "#/components/schemas/NvmfNamespaceWhereInput" }, - "type_not_in": { + "metrics": { "items": { - "$ref": "#/components/schemas/TaskType" + "type": "string" }, - "type": "array", - "nullable": true + "type": "array" }, - "user": { - "allOf": [ - { - "$ref": "#/components/schemas/UserWhereInput" - } - ], - "nullable": true + "range": { + "type": "string" } }, - "type": "object", - "additionalProperties": false - }, - "TaskStatus": { - "enum": [ - "EXECUTING", - "FAILED", - "PAUSED", - "PENDING", - "SUCCESSED" - ], - "type": "string" - }, - "TaskType": { - "enum": [ - "APPLICATION", - "BACKUP", - "HOST_PLUGIN", - "REPLICATION", - "RESOLVER", - "SFS" + "required": [ + "nvmfNamespaces", + "metrics", + "range" ], - "type": "string" + "type": "object" }, - "StopVmInCutoverMigrationParams": { + "GetClusterMetricInput": { "properties": { - "force": { - "type": "boolean" + "range": { + "type": "string" }, - "tasks": { - "$ref": "#/components/schemas/TaskWhereInput" + "clusters": { + "$ref": "#/components/schemas/ClusterWhereInput" + }, + "metrics": { + "items": { + "type": "string" + }, + "type": "array" } }, "required": [ - "tasks" + "range", + "clusters", + "metrics" ], "type": "object" }, - "StepUnit": { - "enum": [ - "BIT", - "BYTE", - "COUNT", - "PERCENT" - ], - "type": "string" - }, - "NestedStep": { + "GetHostMetricInput": { "properties": { - "current": { - "type": "number", - "format": "double", - "nullable": true - }, - "finished": { - "type": "boolean", - "nullable": true - }, - "key": { - "type": "string", - "nullable": true - }, - "per_second": { - "type": "number", - "format": "double", - "nullable": true + "range": { + "type": "string" }, - "total": { - "type": "number", - "format": "double", - "nullable": true + "hosts": { + "$ref": "#/components/schemas/HostWhereInput" }, - "unit": { - "allOf": [ - { - "$ref": "#/components/schemas/StepUnit" - } - ], - "nullable": true + "metrics": { + "items": { + "type": "string" + }, + "type": "array" } }, - "type": "object", - "additionalProperties": false + "required": [ + "range", + "hosts", + "metrics" + ], + "type": "object" }, - "Task": { + "GetHostNetworkMetricInput": { "properties": { - "args": { - "properties": {}, - "type": "object" - }, - "cluster": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedCluster" - } - ], - "nullable": true - }, - "description": { - "type": "string" - }, - "error_code": { - "type": "string", - "nullable": true - }, - "error_message": { - "type": "string", - "nullable": true - }, - "finished_at": { - "type": "string", - "nullable": true - }, - "id": { - "type": "string" - }, - "internal": { - "type": "boolean" - }, - "key": { - "type": "string", - "nullable": true + "hosts": { + "$ref": "#/components/schemas/HostWhereInput" }, - "local_created_at": { + "range": { "type": "string" }, - "progress": { - "type": "number", - "format": "double" - }, - "resource_id": { - "type": "string", - "nullable": true - }, - "resource_mutation": { - "type": "string", - "nullable": true - }, - "resource_rollback_error": { - "type": "string", - "nullable": true - }, - "resource_rollback_retry_count": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "resource_rollbacked": { - "type": "boolean", - "nullable": true - }, - "resource_type": { - "type": "string", - "nullable": true + "nics": { + "$ref": "#/components/schemas/NicWhereInput" }, - "snapshot": { + "metrics": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "hosts", + "range", + "metrics" + ], + "type": "object" + }, + "GetHostServiceMetricInput": { + "properties": { + "range": { "type": "string" }, - "started_at": { - "type": "string", - "nullable": true - }, - "status": { - "$ref": "#/components/schemas/TaskStatus" + "hosts": { + "$ref": "#/components/schemas/HostWhereInput" }, - "steps": { + "services": { "items": { - "$ref": "#/components/schemas/NestedStep" + "type": "string" }, "type": "array" }, - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/TaskType" - } - ], - "nullable": true - }, - "user": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedUser" - } - ], - "nullable": true + "metrics": { + "items": { + "type": "string" + }, + "type": "array" } }, "required": [ - "args", - "description", - "id", - "internal", - "local_created_at", - "progress", - "snapshot", - "status", - "steps" + "range", + "hosts", + "services", + "metrics" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "AbortMigrateVmAcrossClusterParams": { + "GetScvmMetricInput": { "properties": { - "tasks": { - "$ref": "#/components/schemas/TaskWhereInput" + "range": { + "type": "string" + }, + "hosts": { + "$ref": "#/components/schemas/HostWhereInput" + }, + "metrics": { + "items": { + "type": "string" + }, + "type": "array" } }, "required": [ - "tasks" + "range", + "hosts", + "metrics" ], "type": "object" }, - "VmAddFolderParams": { + "GetScvmNetworkInput": { "properties": { - "data": { - "properties": { - "folder_id": { - "type": "string" - } - }, - "required": [ - "folder_id" - ], - "type": "object" + "range": { + "type": "string" }, - "where": { - "$ref": "#/components/schemas/VmWhereInput" + "hosts": { + "$ref": "#/components/schemas/HostWhereInput" + }, + "nics": { + "$ref": "#/components/schemas/NicWhereInput" + }, + "metrics": { + "items": { + "type": "string" + }, + "type": "array" } }, "required": [ - "data", - "where" + "range", + "hosts", + "metrics" ], "type": "object" }, - "VmUpdateAdvancedOptionsParams": { + "GetScvmServiceMetricInput": { "properties": { - "data": { - "properties": { - "video_type": { - "$ref": "#/components/schemas/VmVideoType" - }, - "windows_optimize": { - "type": "boolean" - }, - "cpu_model": { - "type": "string" - }, - "clock_offset": { - "$ref": "#/components/schemas/VmClockOffset" - } + "range": { + "type": "string" + }, + "hosts": { + "$ref": "#/components/schemas/HostWhereInput" + }, + "services": { + "items": { + "type": "string" }, - "type": "object" + "type": "array" }, - "where": { - "$ref": "#/components/schemas/VmWhereInput" + "metrics": { + "items": { + "type": "string" + }, + "type": "array" } }, "required": [ - "data", - "where" + "range", + "hosts", + "services", + "metrics" ], "type": "object" }, - "VmUpdateHostOptionsParams": { + "GetSCVMDiskMetricInput": { "properties": { - "data": { - "properties": { - "ntp_servers": { - "items": { - "type": "string" - }, - "type": "array" - }, - "dns_servers": { - "items": { - "type": "string" - }, - "type": "array" - }, - "hostname": { - "type": "string" - } - }, - "type": "object" + "range": { + "type": "string" }, - "where": { - "$ref": "#/components/schemas/VmWhereInput" + "disks": { + "$ref": "#/components/schemas/DiskWhereInput" + }, + "metrics": { + "items": { + "type": "string" + }, + "type": "array" } }, "required": [ - "data", - "where" + "range", + "disks", + "metrics" ], "type": "object" }, - "VmResetGuestOsPasswordParams": { + "GetZoneMetricInput": { "properties": { - "data": { - "properties": { - "password": { - "type": "string" - }, - "username": { - "type": "string" - } + "range": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "primary-to-secondary", + "secondary-to-primary" + ] + }, + "clusters": { + "$ref": "#/components/schemas/ClusterWhereInput" + }, + "metrics": { + "items": { + "type": "string" }, - "required": [ - "password", - "username" - ], - "type": "object" + "type": "array" + } + }, + "required": [ + "range", + "type", + "clusters", + "metrics" + ], + "type": "object" + }, + "GetWitnessMetricInput": { + "properties": { + "range": { + "type": "string" }, - "where": { - "$ref": "#/components/schemas/VmWhereInput" + "clusters": { + "$ref": "#/components/schemas/ClusterWhereInput" + }, + "metrics": { + "items": { + "type": "string" + }, + "type": "array" } }, "required": [ - "data", - "where" + "range", + "clusters", + "metrics" ], "type": "object" }, - "VmUpdateOwnerParams": { + "GetTopNMetricInput": { "properties": { - "data": { - "properties": { - "search_for": { - "type": "string", - "enum": [ - "username", - "id" - ] - }, - "value": { - "type": "string" - } + "metrics": { + "items": { + "type": "string" }, - "required": [ - "search_for", - "value" - ], - "type": "object" + "type": "array" }, - "where": { - "$ref": "#/components/schemas/VmWhereInput" + "clusters": { + "$ref": "#/components/schemas/ClusterWhereInput" + }, + "type": { + "type": "string", + "enum": [ + "top", + "bottom" + ] + }, + "n": { + "type": "integer", + "format": "int32" + }, + "range": { + "type": "string" } }, "required": [ - "data", - "where" + "metrics", + "clusters", + "type", + "n", + "range" ], "type": "object" }, - "VmRestrictIoParamsData": { + "NamespaceGroup": { "properties": { - "max_bandwidth_policy": { - "$ref": "#/components/schemas/VmDiskIoRestrictType" + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], + "nullable": true }, - "max_bandwidth_unit": { - "$ref": "#/components/schemas/BPSUnit" + "id": { + "type": "string" }, - "max_bandwidth": { - "type": "integer", - "format": "int64" + "labels": { + "items": { + "$ref": "#/components/schemas/NestedLabel" + }, + "type": "array", + "nullable": true }, - "max_iops_policy": { - "$ref": "#/components/schemas/VmDiskIoRestrictType" + "local_create_time": { + "type": "string" }, - "max_iops": { - "type": "integer", - "format": "int64" + "local_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "namespaces": { + "items": { + "$ref": "#/components/schemas/NestedNvmfNamespace" + }, + "type": "array", + "nullable": true + }, + "nvmf_subsystem": { + "$ref": "#/components/schemas/NestedNvmfSubsystem" } }, - "type": "object" + "required": [ + "id", + "local_create_time", + "local_id", + "name", + "nvmf_subsystem" + ], + "type": "object", + "additionalProperties": false }, - "VmUpdateEachDiskIoPolicyParams": { + "WithTask_NamespaceGroup_": { "properties": { + "task_id": { + "type": "string", + "nullable": true + }, "data": { - "$ref": "#/components/schemas/VmRestrictIoParamsData" + "$ref": "#/components/schemas/NamespaceGroup" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "NamespaceGroupCreationParams": { + "properties": { + "nvmf_subsystem_id": { + "type": "string" }, - "boot": { - "type": "integer", - "format": "int32" + "name": { + "type": "string" } }, "required": [ - "data", - "boot" + "nvmf_subsystem_id", + "name" ], "type": "object" }, - "VmUpdateIoPolicyParams": { + "NamespaceGroupUpdationParams": { "properties": { "data": { "properties": { - "each_disk": { - "items": { - "$ref": "#/components/schemas/VmUpdateEachDiskIoPolicyParams" - }, - "type": "array" - }, - "whole_vm": { - "$ref": "#/components/schemas/VmRestrictIoParamsData" - }, - "io_policy": { - "allOf": [ - { - "$ref": "#/components/schemas/VmDiskIoPolicy" - } - ], - "nullable": true + "name": { + "type": "string" } }, "type": "object" }, "where": { - "$ref": "#/components/schemas/VmWhereInput" + "$ref": "#/components/schemas/NamespaceGroupWhereInput" } }, "required": [ @@ -68878,95 +70078,49 @@ ], "type": "object" }, - "NestedContentLibraryVmTemplate": { + "DeleteNamespaceGroup": { "properties": { "id": { "type": "string" - }, - "name": { - "type": "string" } }, "required": [ - "id", - "name" - ], - "type": "object", - "additionalProperties": false - }, - "VmExportFileType": { - "enum": [ - "OVF", - "QCOW2", - "RAW" + "id" ], - "type": "string" + "type": "object" }, - "VmExportFileFile": { + "WithTask_DeleteNamespaceGroup_": { "properties": { - "md5": { - "type": "string" - }, - "fileSize": { - "type": "integer", - "format": "int64" - }, - "fileSecret": { - "type": "string" - }, - "fileUUID": { - "type": "string" - }, - "type": { - "$ref": "#/components/schemas/VmExportFileType" + "task_id": { + "type": "string", + "nullable": true }, - "fileName": { - "type": "string" + "data": { + "$ref": "#/components/schemas/DeleteNamespaceGroup" } }, "required": [ - "md5", - "fileSize", - "fileSecret", - "fileUUID", - "type", - "fileName" + "data" ], "type": "object" }, - "NestedVmVolume": { + "NamespaceGroupDeletionParams": { "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" + "where": { + "$ref": "#/components/schemas/NamespaceGroupWhereInput" } }, "required": [ - "id", - "name" + "where" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "VmExportFile": { + "NfsExport": { "properties": { - "content_library_vm_template": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedContentLibraryVmTemplate" - } - ], - "nullable": true - }, - "createdAt": { - "type": "string" - }, - "damaged": { - "type": "boolean" + "cluster": { + "$ref": "#/components/schemas/NestedCluster" }, - "data_port_id": { + "description": { "type": "string" }, "entityAsyncStatus": { @@ -68977,58 +70131,69 @@ ], "nullable": true }, - "files": { + "export_inode_id": { + "type": "string" + }, + "id": { + "type": "string" + }, + "inodes": { "items": { - "$ref": "#/components/schemas/VmExportFileFile" + "$ref": "#/components/schemas/NestedNfsInode" }, - "type": "array" + "type": "array", + "nullable": true }, - "id": { + "internal": { + "type": "boolean" + }, + "ip_whitelist": { "type": "string" }, - "storage_cluster_id": { + "labels": { + "items": { + "$ref": "#/components/schemas/NestedLabel" + }, + "type": "array", + "nullable": true + }, + "local_id": { "type": "string" }, - "type": { - "$ref": "#/components/schemas/VmExportFileType" + "name": { + "type": "string" }, - "vm": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedVm" - } - ], - "nullable": true + "replica_num": { + "type": "integer", + "format": "int32" }, - "vm_volume": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedVmVolume" - } - ], - "nullable": true + "thin_provision": { + "type": "boolean" } }, "required": [ - "createdAt", - "damaged", - "data_port_id", - "files", + "cluster", + "description", + "export_inode_id", "id", - "storage_cluster_id", - "type" + "internal", + "ip_whitelist", + "local_id", + "name", + "replica_num", + "thin_provision" ], "type": "object", "additionalProperties": false }, - "WithTask_VmExportFile_": { + "WithTask_NfsExport_": { "properties": { "task_id": { "type": "string", "nullable": true }, "data": { - "$ref": "#/components/schemas/VmExportFile" + "$ref": "#/components/schemas/NfsExport" } }, "required": [ @@ -69036,292 +70201,400 @@ ], "type": "object" }, - "VmExportParamsData": { + "NfsExportCreationParams": { "properties": { - "keep_mac": { + "cluster_id": { + "type": "string" + }, + "ip_whitelist": { + "type": "string" + }, + "thin_provision": { "type": "boolean" }, - "type": { - "$ref": "#/components/schemas/VmExportFileType" + "replica_num": { + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string" } }, "required": [ - "type" + "cluster_id", + "thin_provision", + "replica_num", + "name" ], "type": "object" }, - "VmExportParams": { + "NfsExportUpdationParams": { "properties": { "data": { - "$ref": "#/components/schemas/VmExportParamsData" + "properties": { + "ip_whitelist": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "type": "object" }, "where": { - "$ref": "#/components/schemas/VmWhereInput" + "$ref": "#/components/schemas/NfsExportWhereInput" } }, "required": [ - "data", "where" ], "type": "object" }, - "VmdkDiskModify": { + "DeleteNfsExport": { "properties": { - "elf_storage_policy": { - "$ref": "#/components/schemas/VmVolumeElfStoragePolicyType" - }, - "bus": { - "$ref": "#/components/schemas/Bus" - }, - "volume_name": { - "type": "string" - }, - "boot": { - "type": "integer", - "format": "int32" - }, - "vmdk_name": { + "id": { "type": "string" } }, "required": [ - "vmdk_name" + "id" ], "type": "object" }, - "VmdkCdromModify": { + "WithTask_DeleteNfsExport_": { "properties": { - "removed": { - "type": "boolean" - }, - "content_library_image_id": { - "type": "string" - }, - "elf_image_id": { - "type": "string" - }, - "boot": { - "type": "integer", - "format": "int32" + "task_id": { + "type": "string", + "nullable": true }, - "index": { - "type": "integer", - "format": "int32" + "data": { + "$ref": "#/components/schemas/DeleteNfsExport" } }, "required": [ - "index" + "data" ], "type": "object" }, - "OvfDiskOperate": { + "NfsExportDeletionParams": { "properties": { - "new_disks": { - "$ref": "#/components/schemas/VmDiskParams" - }, - "modify_cd_roms": { - "items": { - "$ref": "#/components/schemas/VmdkCdromModify" - }, - "type": "array" - }, - "modify_vmdk_disks": { - "items": { - "$ref": "#/components/schemas/VmdkDiskModify" - }, - "type": "array" + "where": { + "$ref": "#/components/schemas/NfsExportWhereInput" } }, + "required": [ + "where" + ], "type": "object" }, - "VmImportNicParams": { + "Nic": { "properties": { - "subnet_mask": { - "type": "string" + "driver": { + "type": "string", + "nullable": true }, - "gateway": { - "type": "string" + "driver_state": { + "allOf": [ + { + "$ref": "#/components/schemas/NicDriverState" + } + ], + "nullable": true }, - "ip_address": { - "type": "string" + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], + "nullable": true }, - "nic_id": { - "type": "string" + "gateway_ip": { + "type": "string", + "nullable": true }, - "connect_vlan_id": { + "host": { + "$ref": "#/components/schemas/NestedHost" + }, + "ibdev": { + "type": "string", + "nullable": true + }, + "id": { "type": "string" }, - "mirror": { - "type": "boolean" + "iommu_status": { + "allOf": [ + { + "$ref": "#/components/schemas/IommuStatus" + } + ], + "nullable": true }, - "model": { - "$ref": "#/components/schemas/VmNicModel" + "ip_address": { + "type": "string", + "nullable": true }, - "enabled": { - "type": "boolean" + "is_sriov": { + "type": "boolean", + "nullable": true }, - "mac_address": { - "type": "string" + "labels": { + "items": { + "$ref": "#/components/schemas/NestedLabel" + }, + "type": "array", + "nullable": true }, "local_id": { "type": "string" - } - }, - "required": [ - "connect_vlan_id" - ], - "type": "object" - }, - "VmImportParams": { - "properties": { - "max_bandwidth_policy": { - "$ref": "#/components/schemas/VmDiskIoRestrictType" }, - "max_bandwidth_unit": { - "$ref": "#/components/schemas/BPSUnit" - }, - "max_bandwidth": { - "type": "integer", - "format": "int64" - }, - "max_iops_policy": { - "$ref": "#/components/schemas/VmDiskIoRestrictType" + "mac_address": { + "type": "string" }, - "max_iops": { + "max_vf_num": { "type": "integer", - "format": "int64" + "format": "int32", + "nullable": true }, - "io_policy": { - "$ref": "#/components/schemas/VmDiskIoPolicy" + "model": { + "type": "string", + "nullable": true }, - "vcpu": { + "mtu": { "type": "integer", "format": "int32" }, - "status": { - "$ref": "#/components/schemas/VmStatus" + "name": { + "type": "string" }, - "ha": { - "type": "boolean" + "nic_uuid": { + "type": "string", + "nullable": true }, - "vm_nics": { - "items": { - "$ref": "#/components/schemas/VmImportNicParams" - }, - "type": "array" + "physical": { + "type": "boolean" }, - "disk_operate": { - "$ref": "#/components/schemas/OvfDiskOperate" + "rdma_enabled": { + "type": "boolean", + "nullable": true }, - "memory_unit": { - "$ref": "#/components/schemas/ByteUnit" + "running": { + "type": "boolean" }, - "memory": { + "speed": { "type": "integer", - "format": "int64" + "format": "int64", + "nullable": true }, - "cpu_cores": { - "type": "integer", - "format": "int32" + "subnet_mask": { + "type": "string", + "nullable": true }, - "cpu_sockets": { + "total_vf_num": { "type": "integer", - "format": "int32" - }, - "guest_os_type": { - "$ref": "#/components/schemas/VmGuestsOperationSystem" + "format": "int32", + "nullable": true }, - "folder_id": { - "type": "string" + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/NetworkType" + } + ], + "nullable": true }, - "description": { - "type": "string" + "up": { + "type": "boolean" }, - "name": { - "type": "string" + "used_vf_num": { + "type": "integer", + "format": "int32", + "nullable": true }, - "host_id": { - "type": "string" + "user_usage": { + "allOf": [ + { + "$ref": "#/components/schemas/NicUserUsage" + } + ], + "nullable": true }, - "cluster_id": { - "type": "string" + "vds": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedVds" + } + ], + "nullable": true }, - "upload_tasks": { + "vms": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedVm" }, - "type": "array" - }, - "owner_id": { - "type": "string" - }, - "parsed_ovf": { - "$ref": "#/components/schemas/ParsedOVF" + "type": "array", + "nullable": true } }, "required": [ + "host", + "id", + "local_id", + "mac_address", + "mtu", "name", - "cluster_id", - "upload_tasks", - "parsed_ovf" + "physical", + "running", + "up" ], - "type": "object" + "type": "object", + "additionalProperties": false }, - "NestedGpuDriverInfo": { + "WithTask_Nic_": { "properties": { - "filename": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "rhelversion": { + "task_id": { "type": "string", "nullable": true }, - "srcversion": { - "type": "string", - "nullable": true + "data": { + "$ref": "#/components/schemas/Nic" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "NicUpdationParams": { + "properties": { + "data": { + "properties": { + "nic_user_usage": { + "$ref": "#/components/schemas/NicUserUsage" + }, + "total_vf_num": { + "type": "integer", + "format": "int32" + }, + "mtu": { + "type": "integer", + "format": "int32" + } + }, + "type": "object" }, - "supported": { - "type": "string", - "nullable": true + "where": { + "$ref": "#/components/schemas/NicWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "NestedBrickTopo": { + "properties": { + "id": { + "type": "string" }, - "vermagic": { - "type": "string", + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "NestedPosition": { + "properties": { + "column": { + "type": "integer", + "format": "int32", "nullable": true }, - "version": { - "type": "string", + "row": { + "type": "integer", + "format": "int32", "nullable": true } }, "type": "object", "additionalProperties": false }, - "NestedVgpuType": { + "NodeTopo": { "properties": { - "framebuffer": { - "type": "number", - "format": "double", + "brick_topo": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedBrickTopo" + } + ], "nullable": true }, - "max_instance": { - "type": "integer", - "format": "int32", + "cluster": { + "$ref": "#/components/schemas/NestedCluster" + }, + "cluster_topo": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedClusterTopo" + } + ], "nullable": true }, - "max_resolution": { + "host": { + "$ref": "#/components/schemas/NestedHost" + }, + "id": { + "type": "string" + }, + "local_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "position": { + "$ref": "#/components/schemas/NestedPosition" + } + }, + "required": [ + "cluster", + "host", + "id", + "local_id", + "name", + "position" + ], + "type": "object", + "additionalProperties": false + }, + "WithTask_NodeTopo_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "name": { + "data": { + "$ref": "#/components/schemas/NodeTopo" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "NodeTopoWhereUniqueInput": { + "properties": { + "id": { "type": "string", "nullable": true }, - "vgpu_type_id": { + "local_id": { "type": "string", "nullable": true } @@ -69329,401 +70602,247 @@ "type": "object", "additionalProperties": false }, - "VmGpuDetail": { + "Position": { "properties": { - "vgpu_instance_on_vm_num": { + "row": { "type": "integer", "format": "int32", "nullable": true }, - "vgpu_instance_num": { + "column": { "type": "integer", "format": "int32", "nullable": true }, - "user_vgpu_type_name": { + "__typename": { "type": "string", - "nullable": true + "enum": [ + "position" + ], + "nullable": false + } + }, + "type": "object" + }, + "NodeTopoUpdationParamsData": { + "properties": { + "cluster_topo_id": { + "type": "string" }, - "user_vgpu_type_id": { - "type": "string", - "nullable": true + "position": { + "$ref": "#/components/schemas/Position" }, - "user_usage": { + "brick_topo_id": { + "type": "string" + } + }, + "type": "object" + }, + "NodeTopUpdationParam": { + "properties": { + "data": { + "$ref": "#/components/schemas/NodeTopoUpdationParamsData" + }, + "where": { + "$ref": "#/components/schemas/NodeTopoWhereUniqueInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "NodeTopoUpdationParams": { + "items": { + "$ref": "#/components/schemas/NodeTopUpdationParam" + }, + "type": "array" + }, + "NvmfNamespaceSnapshot": { + "properties": { + "consistency_group_snapshot": { "allOf": [ { - "$ref": "#/components/schemas/GpuDeviceUsage" + "$ref": "#/components/schemas/NestedConsistencyGroupSnapshot" } ], "nullable": true }, - "status": { - "$ref": "#/components/schemas/GpuDeviceStatus" - }, - "name": { - "type": "string" + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], + "nullable": true }, - "model": { + "id": { "type": "string" }, - "mdev_supported_types": { + "labels": { "items": { - "$ref": "#/components/schemas/NestedVgpuType" + "$ref": "#/components/schemas/NestedLabel" }, "type": "array", "nullable": true }, + "local_created_at": { + "type": "string" + }, "local_id": { "type": "string" }, - "local_created_at": { + "name": { "type": "string" }, - "labels": { - "items": { - "$ref": "#/components/schemas/NestedLabel" - }, - "type": "array", - "nullable": true - }, - "is_nvidia_vfs_supported": { - "type": "boolean", - "nullable": true - }, - "is_nvidia_vfs_enabled": { - "type": "boolean", - "nullable": true - }, - "is_nvidia_tools_ready": { - "type": "boolean", - "nullable": true - }, - "id": { - "type": "string" - }, - "host": { - "$ref": "#/components/schemas/NestedHost" - }, - "entityAsyncStatus": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" - } - ], - "nullable": true - }, - "driver_info": { + "nvmf_namespace": { "allOf": [ { - "$ref": "#/components/schemas/NestedGpuDriverInfo" + "$ref": "#/components/schemas/NestedNvmfNamespace" } ], "nullable": true }, - "description": { - "type": "string" - }, - "bus_location": { - "type": "string" - }, - "brand": { - "type": "string" + "nvmf_subsystem": { + "$ref": "#/components/schemas/NestedNvmfSubsystem" }, - "available_vgpus_num": { + "unique_size": { "type": "integer", - "format": "int32", + "format": "int64" + } + }, + "required": [ + "id", + "local_created_at", + "local_id", + "name", + "nvmf_subsystem", + "unique_size" + ], + "type": "object", + "additionalProperties": false + }, + "WithTask_NvmfNamespaceSnapshot_": { + "properties": { + "task_id": { + "type": "string", "nullable": true }, - "assigned_vgpus_num": { - "type": "integer", - "format": "int32", - "nullable": true + "data": { + "$ref": "#/components/schemas/NvmfNamespaceSnapshot" } }, "required": [ - "status", - "name", - "model", - "local_id", - "local_created_at", - "id", - "host", - "description", - "bus_location", - "brand" + "data" ], "type": "object" }, - "VmGpuInfo": { + "NvmfNamespaceSnapshotCreationParams": { "properties": { - "gpu_devices": { - "items": { - "$ref": "#/components/schemas/VmGpuDetail" - }, - "type": "array" - }, - "name": { + "nvmf_subsystem_id": { "type": "string" }, - "local_id": { + "name": { "type": "string" }, - "id": { + "nvmf_namespace_id": { "type": "string" } }, "required": [ - "gpu_devices", + "nvmf_subsystem_id", "name", - "local_id", - "id" + "nvmf_namespace_id" ], "type": "object" }, - "VmOrderByInput": { - "enum": [ - "bios_uuid_ASC", - "bios_uuid_DESC", - "clock_offset_ASC", - "clock_offset_DESC", - "cloud_init_supported_ASC", - "cloud_init_supported_DESC", - "cpu_ASC", - "cpu_DESC", - "cpu_model_ASC", - "cpu_model_DESC", - "cpu_usage_ASC", - "cpu_usage_DESC", - "deleted_at_ASC", - "deleted_at_DESC", - "description_ASC", - "description_DESC", - "dns_servers_ASC", - "dns_servers_DESC", - "entityAsyncStatus_ASC", - "entityAsyncStatus_DESC", - "firmware_ASC", - "firmware_DESC", - "guest_cpu_model_ASC", - "guest_cpu_model_DESC", - "guest_os_type_ASC", - "guest_os_type_DESC", - "guest_size_usage_ASC", - "guest_size_usage_DESC", - "guest_used_size_ASC", - "guest_used_size_DESC", - "ha_ASC", - "ha_DESC", - "hostname_ASC", - "hostname_DESC", - "id_ASC", - "id_DESC", - "in_recycle_bin_ASC", - "in_recycle_bin_DESC", - "internal_ASC", - "internal_DESC", - "io_policy_ASC", - "io_policy_DESC", - "ips_ASC", - "ips_DESC", - "kernel_info_ASC", - "kernel_info_DESC", - "last_shutdown_time_ASC", - "last_shutdown_time_DESC", - "local_created_at_ASC", - "local_created_at_DESC", - "local_id_ASC", - "local_id_DESC", - "logical_size_bytes_ASC", - "logical_size_bytes_DESC", - "max_bandwidth_ASC", - "max_bandwidth_DESC", - "max_bandwidth_policy_ASC", - "max_bandwidth_policy_DESC", - "max_iops_ASC", - "max_iops_DESC", - "max_iops_policy_ASC", - "max_iops_policy_DESC", - "memory_ASC", - "memory_DESC", - "memory_usage_ASC", - "memory_usage_DESC", - "name_ASC", - "name_DESC", - "nested_virtualization_ASC", - "nested_virtualization_DESC", - "node_ip_ASC", - "node_ip_DESC", - "original_name_ASC", - "original_name_DESC", - "os_ASC", - "os_DESC", - "protected_ASC", - "protected_DESC", - "provisioned_size_ASC", - "provisioned_size_DESC", - "size_ASC", - "size_DESC", - "status_ASC", - "status_DESC", - "unique_logical_size_ASC", - "unique_logical_size_DESC", - "unique_size_ASC", - "unique_size_DESC", - "vcpu_ASC", - "vcpu_DESC", - "video_type_ASC", - "video_type_DESC", - "vm_tools_status_ASC", - "vm_tools_status_DESC", - "vm_tools_version_ASC", - "vm_tools_version_DESC", - "vm_usage_ASC", - "vm_usage_DESC", - "win_opt_ASC", - "win_opt_DESC" - ], - "type": "string" - }, - "GetVmsRequestBody": { - "properties": { - "after": { - "type": "string", - "nullable": true - }, - "before": { - "type": "string", - "nullable": true - }, - "first": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "last": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "orderBy": { - "allOf": [ - { - "$ref": "#/components/schemas/VmOrderByInput" - } - ], - "nullable": true - }, - "skip": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "where": { - "allOf": [ - { - "$ref": "#/components/schemas/VmWhereInput" - } - ], - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "VmVncInfo": { + "DeleteNvmfNamespaceSnapshot": { "properties": { - "vm": { - "$ref": "#/components/schemas/Vm" - }, - "terminal": { - "type": "string" - }, - "redirect": { - "type": "string" - }, - "direct": { - "type": "string" - }, - "cluster_ip": { + "id": { "type": "string" } }, "required": [ - "vm", - "terminal", - "redirect", - "cluster_ip" + "id" ], "type": "object" }, - "VmWhereUniqueInput": { + "WithTask_DeleteNvmfNamespaceSnapshot_": { "properties": { - "id": { + "task_id": { "type": "string", "nullable": true }, - "local_id": { - "type": "string", - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "GetVmVncInfoParams": { - "properties": { - "vm": { - "$ref": "#/components/schemas/VmWhereUniqueInput" + "data": { + "$ref": "#/components/schemas/DeleteNvmfNamespaceSnapshot" } }, "required": [ - "vm" + "data" ], "type": "object" }, - "VmUpdateVpcNicParams": { + "NvmfNamespaceSnapshotDeletionParams": { "properties": { - "data": { - "properties": { - "vpc_nic": { - "$ref": "#/components/schemas/UpdateVpcNicPayloads" - } - }, - "required": [ - "vpc_nic" - ], - "type": "object" - }, "where": { - "$ref": "#/components/schemas/VmNicWhereInput" + "$ref": "#/components/schemas/NvmfNamespaceSnapshotWhereInput" } }, "required": [ - "data", "where" ], "type": "object" }, - "ContentLibraryVmTemplate": { + "NvmfNamespace": { "properties": { - "architecture": { - "$ref": "#/components/schemas/Architecture" + "assigned_size": { + "type": "integer", + "format": "int64" }, - "cloud_init_supported": { - "type": "boolean" + "bps": { + "type": "integer", + "format": "int64" }, - "clusters": { - "items": { - "$ref": "#/components/schemas/NestedCluster" - }, - "type": "array", - "nullable": true + "bps_max": { + "type": "integer", + "format": "int64" }, - "createdAt": { - "type": "string" + "bps_max_length": { + "type": "integer", + "format": "int64" }, - "description": { - "type": "string" + "bps_rd": { + "type": "integer", + "format": "int64" + }, + "bps_rd_max": { + "type": "integer", + "format": "int64" + }, + "bps_rd_max_length": { + "type": "integer", + "format": "int64" + }, + "bps_wr": { + "type": "integer", + "format": "int64" + }, + "bps_wr_max": { + "type": "integer", + "format": "int64" + }, + "bps_wr_max_length": { + "type": "integer", + "format": "int64" + }, + "consistency_group": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedConsistencyGroup" + } + ], + "nullable": true }, "entityAsyncStatus": { "allOf": [ @@ -69736,6 +70855,49 @@ "id": { "type": "string" }, + "io_size": { + "type": "integer", + "format": "int64" + }, + "iops": { + "type": "integer", + "format": "int64" + }, + "iops_max": { + "type": "integer", + "format": "int64" + }, + "iops_max_length": { + "type": "integer", + "format": "int64" + }, + "iops_rd": { + "type": "integer", + "format": "int64" + }, + "iops_rd_max": { + "type": "integer", + "format": "int64" + }, + "iops_rd_max_length": { + "type": "integer", + "format": "int64" + }, + "iops_wr": { + "type": "integer", + "format": "int64" + }, + "iops_wr_max": { + "type": "integer", + "format": "int64" + }, + "iops_wr_max_length": { + "type": "integer", + "format": "int64" + }, + "is_shared": { + "type": "boolean" + }, "labels": { "items": { "$ref": "#/components/schemas/NestedLabel" @@ -69743,144 +70905,297 @@ "type": "array", "nullable": true }, - "memory": { - "type": "integer", - "format": "int64" + "local_created_at": { + "type": "string" + }, + "local_id": { + "type": "string" }, "name": { "type": "string" }, - "os": { - "type": "string", + "namespace_group": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedNamespaceGroup" + } + ], "nullable": true }, - "size": { + "namespace_id": { "type": "integer", - "format": "int64" + "format": "int32" }, - "vcpu": { + "nqn_whitelist": { + "type": "string" + }, + "nvmf_subsystem": { + "$ref": "#/components/schemas/NestedNvmfSubsystem" + }, + "replica_num": { "type": "integer", "format": "int32" }, - "vm_template_uuids": { - "items": { - "type": "string" - }, - "type": "array" + "shared_size": { + "type": "integer", + "format": "int64" }, - "vm_templates": { - "items": { - "$ref": "#/components/schemas/NestedVmTemplate" - }, - "type": "array", - "nullable": true - } - }, - "required": [ - "architecture", - "cloud_init_supported", - "createdAt", - "description", - "id", - "memory", - "name", - "size", - "vcpu", - "vm_template_uuids" - ], - "type": "object", - "additionalProperties": false - }, - "WithTask_ContentLibraryVmTemplate_": { - "properties": { - "task_id": { - "type": "string", - "nullable": true + "snapshot_num": { + "type": "integer", + "format": "int32" }, - "data": { - "$ref": "#/components/schemas/ContentLibraryVmTemplate" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "ContentLibraryVmTemplateCreationParams": { - "properties": { - "clusters": { - "$ref": "#/components/schemas/ClusterWhereInput" + "stripe_num": { + "type": "integer", + "format": "int32" }, - "cloud_init_supported": { + "stripe_size": { + "type": "integer", + "format": "int64" + }, + "thin_provision": { "type": "boolean" }, - "vm": { - "$ref": "#/components/schemas/VmWhereUniqueInput" + "unique_logical_size": { + "type": "number", + "format": "double", + "nullable": true }, - "description": { - "type": "string" + "unique_size": { + "type": "integer", + "format": "int64" }, - "name": { + "zbs_volume_id": { "type": "string" } }, "required": [ - "clusters", - "vm", - "name" + "assigned_size", + "bps", + "bps_max", + "bps_max_length", + "bps_rd", + "bps_rd_max", + "bps_rd_max_length", + "bps_wr", + "bps_wr_max", + "bps_wr_max_length", + "id", + "io_size", + "iops", + "iops_max", + "iops_max_length", + "iops_rd", + "iops_rd_max", + "iops_rd_max_length", + "iops_wr", + "iops_wr_max", + "iops_wr_max_length", + "is_shared", + "local_created_at", + "local_id", + "name", + "namespace_id", + "nqn_whitelist", + "nvmf_subsystem", + "replica_num", + "shared_size", + "snapshot_num", + "stripe_num", + "stripe_size", + "thin_provision", + "unique_size", + "zbs_volume_id" + ], + "type": "object", + "additionalProperties": false + }, + "WithTask_NvmfNamespace_": { + "properties": { + "task_id": { + "type": "string", + "nullable": true + }, + "data": { + "$ref": "#/components/schemas/NvmfNamespace" + } + }, + "required": [ + "data" ], "type": "object" }, - "ContentLibraryVmTemplateUpdationParamsData": { + "NvmfNamespaceCommonParams": { "properties": { - "clusters": { - "$ref": "#/components/schemas/ClusterWhereInput" + "bps_wr_max_length": { + "type": "integer", + "format": "int64" }, - "cloud_init_supported": { - "type": "boolean" + "bps_wr_max_unit": { + "$ref": "#/components/schemas/BPSUnit" }, - "description": { - "type": "string" + "bps_wr_max": { + "type": "integer", + "format": "int64" }, - "name": { + "bps_rd_max_length": { + "type": "integer", + "format": "int64" + }, + "bps_rd_max_unit": { + "$ref": "#/components/schemas/BPSUnit" + }, + "bps_rd_max": { + "type": "integer", + "format": "int64" + }, + "bps_max_length": { + "type": "integer", + "format": "int64" + }, + "bps_max_unit": { + "$ref": "#/components/schemas/BPSUnit" + }, + "bps_max": { + "type": "integer", + "format": "int64" + }, + "iops_wr_max_length": { + "type": "integer", + "format": "int64" + }, + "iops_wr_max": { + "type": "integer", + "format": "int64" + }, + "iops_rd_max_length": { + "type": "integer", + "format": "int64" + }, + "iops_rd_max": { + "type": "integer", + "format": "int64" + }, + "iops_max_length": { + "type": "integer", + "format": "int64" + }, + "iops_max": { + "type": "integer", + "format": "int64" + }, + "bps_wr_unit": { + "$ref": "#/components/schemas/BPSUnit" + }, + "bps_wr": { + "type": "integer", + "format": "int64" + }, + "bps_rd_unit": { + "$ref": "#/components/schemas/BPSUnit" + }, + "bps_rd": { + "type": "integer", + "format": "int64" + }, + "bps_unit": { + "$ref": "#/components/schemas/BPSUnit" + }, + "bps": { + "type": "integer", + "format": "int64" + }, + "iops_wr": { + "type": "integer", + "format": "int64" + }, + "iops_rd": { + "type": "integer", + "format": "int64" + }, + "iops": { + "type": "integer", + "format": "int64" + }, + "nqn_whitelist": { "type": "string" } }, "type": "object" }, - "ContentLibraryVmTemplateUpdationParams": { - "properties": { - "data": { - "$ref": "#/components/schemas/ContentLibraryVmTemplateUpdationParamsData" + "NvmfNamespaceCreationParams": { + "allOf": [ + { + "properties": { + "namespace_id": { + "type": "integer", + "format": "int32" + }, + "group_id": { + "type": "string" + }, + "is_shared": { + "type": "boolean" + }, + "assigned_size_unit": { + "$ref": "#/components/schemas/ByteUnit" + }, + "assigned_size": { + "type": "integer", + "format": "int64" + }, + "replica_num": { + "type": "integer", + "format": "int32" + }, + "nvmf_subsystem_id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "assigned_size", + "replica_num", + "nvmf_subsystem_id", + "name" + ], + "type": "object" }, - "where": { - "$ref": "#/components/schemas/ContentLibraryVmTemplateWhereInput" + { + "$ref": "#/components/schemas/NvmfNamespaceCommonParams" } - }, - "required": [ - "data", - "where" - ], - "type": "object" + ] }, - "ContentLibraryVmTemplateUpdationClusterParamsData": { - "properties": { - "clusters": { - "$ref": "#/components/schemas/ClusterWhereInput" + "NvmfNamespaceUpdationParamsData": { + "allOf": [ + { + "properties": { + "assigned_size_unit": { + "$ref": "#/components/schemas/ByteUnit" + }, + "assigned_size": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/NvmfNamespaceCommonParams" } - }, - "required": [ - "clusters" - ], - "type": "object" + ] }, - "ContentLibraryVmTemplateUpdationClusterParams": { + "NvmfNamespaceUpdationParams": { "properties": { "data": { - "$ref": "#/components/schemas/ContentLibraryVmTemplateUpdationClusterParamsData" + "$ref": "#/components/schemas/NvmfNamespaceUpdationParamsData" }, "where": { - "$ref": "#/components/schemas/ContentLibraryVmTemplateWhereInput" + "$ref": "#/components/schemas/NvmfNamespaceWhereInput" } }, "required": [ @@ -69889,7 +71204,7 @@ ], "type": "object" }, - "DeleteContentLibraryVmTemplate": { + "DeleteNvmfNamespace": { "properties": { "id": { "type": "string" @@ -69900,14 +71215,14 @@ ], "type": "object" }, - "WithTask_DeleteContentLibraryVmTemplate_": { + "WithTask_DeleteNvmfNamespace_": { "properties": { "task_id": { "type": "string", "nullable": true }, "data": { - "$ref": "#/components/schemas/DeleteContentLibraryVmTemplate" + "$ref": "#/components/schemas/DeleteNvmfNamespace" } }, "required": [ @@ -69915,270 +71230,269 @@ ], "type": "object" }, - "ContentLibraryVmTemplateDeletionParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/ContentLibraryVmTemplateWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "ContentLibraryVmTemplateExportParams": { + "NvmfNamespaceDeletionParams": { "properties": { + "data": { + "properties": { + "remove_snapshot": { + "type": "boolean" + } + }, + "required": [ + "remove_snapshot" + ], + "type": "object" + }, "where": { - "$ref": "#/components/schemas/ContentLibraryVmTemplateWhereInput" + "$ref": "#/components/schemas/NvmfNamespaceWhereInput" } }, "required": [ + "data", "where" ], "type": "object" }, - "ContentLibraryVmdkCdromModify": { + "NvmfNamespaceCloneParams": { "properties": { - "enabled": { - "type": "boolean" + "namespace_group_id": { + "type": "string" }, - "removed": { - "type": "boolean" + "nvmf_subsystem_id": { + "type": "string" }, - "boot": { - "type": "integer", - "format": "int32" + "name": { + "type": "string" }, - "index": { - "type": "integer", - "format": "int32" + "snapshot_id": { + "type": "string" } }, "required": [ - "index" + "nvmf_subsystem_id", + "name", + "snapshot_id" ], "type": "object" }, - "ContentLibraryVmdkCdromMount": { - "properties": { - "enabled": { - "type": "boolean" - }, - "boot": { - "type": "integer", - "format": "int32" - } - }, - "type": "object" - }, - "ContentLibraryVmTemplateOvfDiskOperate": { - "properties": { - "mount_new_cd_roms": { - "items": { - "$ref": "#/components/schemas/ContentLibraryVmdkCdromMount" - }, - "type": "array" - }, - "modify_cd_roms": { - "items": { - "$ref": "#/components/schemas/ContentLibraryVmdkCdromModify" - }, - "type": "array" - }, - "modify_vmdk_disks": { - "items": { - "$ref": "#/components/schemas/VmdkDiskModify" - }, - "type": "array" - } - }, - "type": "object" - }, - "ContentLibraryImportVmNic": { + "NvmfNamespaceRollbackParams": { "properties": { - "mirror": { - "type": "boolean" - }, - "model": { - "$ref": "#/components/schemas/VmNicModel" + "namespace_id": { + "type": "string" }, - "enabled": { - "type": "boolean" + "snapshot_id": { + "type": "string" } }, "required": [ - "model" + "namespace_id", + "snapshot_id" ], "type": "object" }, - "ContentLibraryVmTemplateImportParams": { + "NvmfSubsystem": { "properties": { - "vm_nics": { - "items": { - "$ref": "#/components/schemas/ContentLibraryImportVmNic" - }, - "type": "array" + "bps": { + "type": "integer", + "format": "int64", + "nullable": true }, - "disk_operate": { - "$ref": "#/components/schemas/ContentLibraryVmTemplateOvfDiskOperate" + "bps_max": { + "type": "integer", + "format": "int64", + "nullable": true }, - "ha": { - "type": "boolean" + "bps_max_length": { + "type": "integer", + "format": "int64", + "nullable": true }, - "memory_unit": { - "$ref": "#/components/schemas/ByteUnit" + "bps_rd": { + "type": "integer", + "format": "int64", + "nullable": true }, - "memory": { + "bps_rd_max": { "type": "integer", - "format": "int64" + "format": "int64", + "nullable": true }, - "vcpu": { + "bps_rd_max_length": { "type": "integer", - "format": "int32" + "format": "int64", + "nullable": true }, - "cpu_cores": { + "bps_wr": { "type": "integer", - "format": "int32" + "format": "int64", + "nullable": true }, - "cpu_sockets": { + "bps_wr_max": { "type": "integer", - "format": "int32" + "format": "int64", + "nullable": true }, - "description": { - "type": "string" + "bps_wr_max_length": { + "type": "integer", + "format": "int64", + "nullable": true }, - "name": { + "cluster": { + "$ref": "#/components/schemas/NestedCluster" + }, + "description": { "type": "string" }, - "upload_tasks": { - "items": { - "type": "string" - }, - "type": "array" + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], + "nullable": true }, - "parsed_ovf": { - "$ref": "#/components/schemas/ParsedOVF" + "external_use": { + "type": "boolean" }, - "cluster_id": { - "type": "string" - } - }, - "required": [ - "name", - "upload_tasks", - "parsed_ovf", - "cluster_id" - ], - "type": "object" - }, - "NestedOrganization": { - "properties": { "id": { "type": "string" }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "type": "object", - "additionalProperties": false - }, - "Datacenter": { - "properties": { - "cluster_num": { + "internal": { + "type": "boolean" + }, + "io_size": { "type": "integer", - "format": "int32", + "format": "int64", "nullable": true }, - "clusters": { - "items": { - "$ref": "#/components/schemas/NestedCluster" - }, - "type": "array", + "iops": { + "type": "integer", + "format": "int64", "nullable": true }, - "failure_data_space": { + "iops_max": { "type": "integer", "format": "int64", "nullable": true }, - "host_num": { + "iops_max_length": { "type": "integer", - "format": "int32", + "format": "int64", "nullable": true }, - "id": { - "type": "string" - }, - "labels": { - "items": { - "$ref": "#/components/schemas/NestedLabel" - }, - "type": "array", + "iops_rd": { + "type": "integer", + "format": "int64", "nullable": true }, - "name": { - "type": "string" - }, - "organization": { - "$ref": "#/components/schemas/NestedOrganization" - }, - "total_cpu_hz": { + "iops_rd_max": { "type": "integer", "format": "int64", "nullable": true }, - "total_data_capacity": { + "iops_rd_max_length": { "type": "integer", "format": "int64", "nullable": true }, - "total_memory_bytes": { + "iops_wr": { "type": "integer", "format": "int64", "nullable": true }, - "used_cpu_hz": { - "type": "number", - "format": "double", + "iops_wr_max": { + "type": "integer", + "format": "int64", "nullable": true }, - "used_data_space": { + "iops_wr_max_length": { "type": "integer", "format": "int64", "nullable": true }, - "used_memory_bytes": { - "type": "number", - "format": "double", - "nullable": true + "ip_whitelist": { + "type": "string" }, - "vm_num": { - "type": "integer", - "format": "int32", - "nullable": true + "labels": { + "items": { + "$ref": "#/components/schemas/NestedLabel" + }, + "type": "array", + "nullable": true + }, + "local_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "namespace_groups": { + "items": { + "$ref": "#/components/schemas/NestedNamespaceGroup" + }, + "type": "array", + "nullable": true + }, + "namespaces": { + "items": { + "$ref": "#/components/schemas/NestedNvmfNamespace" + }, + "type": "array", + "nullable": true + }, + "nqn_name": { + "type": "string" + }, + "nqn_whitelist": { + "type": "string" + }, + "policy": { + "$ref": "#/components/schemas/NvmfSubsystemPolicyType" + }, + "replica_num": { + "type": "integer", + "format": "int32" + }, + "stripe_num": { + "type": "integer", + "format": "int32" + }, + "stripe_size": { + "type": "integer", + "format": "int64" + }, + "thin_provision": { + "type": "boolean" } }, "required": [ + "cluster", + "description", + "external_use", "id", + "internal", + "ip_whitelist", + "local_id", "name", - "organization" + "nqn_name", + "nqn_whitelist", + "policy", + "replica_num", + "stripe_num", + "stripe_size", + "thin_provision" ], "type": "object", "additionalProperties": false }, - "WithTask_Datacenter_": { + "WithTask_NvmfSubsystem_": { "properties": { "task_id": { "type": "string", "nullable": true }, "data": { - "$ref": "#/components/schemas/Datacenter" + "$ref": "#/components/schemas/NvmfSubsystem" } }, "required": [ @@ -70186,39 +71500,165 @@ ], "type": "object" }, - "DatacenterCreationParams": { + "NvmfSubsystemCommonParams": { "properties": { - "clusters": { - "$ref": "#/components/schemas/ClusterWhereInput" + "bps_wr_max_length": { + "type": "integer", + "format": "int64" }, - "organization_id": { + "bps_wr_max_unit": { + "$ref": "#/components/schemas/BPSUnit" + }, + "bps_wr_max": { + "type": "integer", + "format": "int64" + }, + "bps_rd_max_length": { + "type": "integer", + "format": "int64" + }, + "bps_rd_max_unit": { + "$ref": "#/components/schemas/BPSUnit" + }, + "bps_rd_max": { + "type": "integer", + "format": "int64" + }, + "bps_max_length": { + "type": "integer", + "format": "int64" + }, + "bps_max_unit": { + "$ref": "#/components/schemas/BPSUnit" + }, + "bps_max": { + "type": "integer", + "format": "int64" + }, + "iops_wr_max_length": { + "type": "integer", + "format": "int64" + }, + "iops_wr_max": { + "type": "integer", + "format": "int64" + }, + "iops_rd_max_length": { + "type": "integer", + "format": "int64" + }, + "iops_rd_max": { + "type": "integer", + "format": "int64" + }, + "iops_max_length": { + "type": "integer", + "format": "int64" + }, + "iops_max": { + "type": "integer", + "format": "int64" + }, + "bps_wr_unit": { + "$ref": "#/components/schemas/BPSUnit" + }, + "bps_wr": { + "type": "integer", + "format": "int64" + }, + "bps_rd_unit": { + "$ref": "#/components/schemas/BPSUnit" + }, + "bps_rd": { + "type": "integer", + "format": "int64" + }, + "bps_unit": { + "$ref": "#/components/schemas/BPSUnit" + }, + "bps": { + "type": "integer", + "format": "int64" + }, + "iops_wr": { + "type": "integer", + "format": "int64" + }, + "iops_rd": { + "type": "integer", + "format": "int64" + }, + "iops": { + "type": "integer", + "format": "int64" + }, + "description": { "type": "string" }, - "name": { + "nqn_whitelist": { + "type": "string" + }, + "ip_whitelist": { "type": "string" } }, - "required": [ - "organization_id", - "name" - ], "type": "object" }, - "DatacenterUpdationParams": { - "properties": { - "data": { + "NvmfSubsystemCreationParams": { + "allOf": [ + { "properties": { - "clusters": { - "$ref": "#/components/schemas/ClusterWhereInput" + "replica_num": { + "type": "integer", + "format": "int32" + }, + "thin_provision": { + "type": "boolean" + }, + "stripe_size_unit": { + "$ref": "#/components/schemas/ByteUnit" + }, + "stripe_size": { + "type": "integer", + "format": "int64" + }, + "stripe_num": { + "type": "integer", + "format": "int32" + }, + "policy": { + "$ref": "#/components/schemas/NvmfSubsystemPolicyType" + }, + "cluster_id": { + "type": "string" }, "name": { "type": "string" } }, + "required": [ + "replica_num", + "thin_provision", + "stripe_size", + "stripe_num", + "policy", + "cluster_id", + "name" + ], "type": "object" }, + { + "$ref": "#/components/schemas/NvmfSubsystemCommonParams" + } + ] + }, + "NvmfSubsystemUpdationParams": { + "properties": { + "data": { + "$ref": "#/components/schemas/NvmfSubsystemCommonParams" + }, "where": { - "$ref": "#/components/schemas/DatacenterWhereInput" + "$ref": "#/components/schemas/NvmfSubsystemWhereInput" } }, "required": [ @@ -70227,48 +71667,104 @@ ], "type": "object" }, - "DatacenterWhereUniqueInput": { + "DeleteNvmfSubsystem": { "properties": { "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "WithTask_DeleteNvmfSubsystem_": { + "properties": { + "task_id": { "type": "string", "nullable": true + }, + "data": { + "$ref": "#/components/schemas/DeleteNvmfSubsystem" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "NvmfSubsystemDeletionParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/NvmfSubsystemWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "Organization": { + "properties": { + "datacenters": { + "items": { + "$ref": "#/components/schemas/NestedDatacenter" + }, + "type": "array", + "nullable": true + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" } }, + "required": [ + "id", + "name" + ], "type": "object", "additionalProperties": false }, - "AddClustersToDatacenterParams": { + "WithTask_Organization_": { "properties": { - "data": { - "properties": { - "clusters": { - "$ref": "#/components/schemas/ClusterWhereInput" - } - }, - "type": "object" + "task_id": { + "type": "string", + "nullable": true }, - "where": { - "$ref": "#/components/schemas/DatacenterWhereUniqueInput" + "data": { + "$ref": "#/components/schemas/Organization" } }, "required": [ - "data", - "where" + "data" ], "type": "object" }, - "RemoveClustersFromDatacenterParams": { + "OrganizationCreationParams": { + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "OrganizationUpdationParams": { "properties": { "data": { "properties": { - "clusters": { - "$ref": "#/components/schemas/ClusterWhereInput" + "name": { + "type": "string" } }, "type": "object" }, "where": { - "$ref": "#/components/schemas/DatacenterWhereUniqueInput" + "$ref": "#/components/schemas/OrganizationWhereInput" } }, "required": [ @@ -70277,7 +71773,7 @@ ], "type": "object" }, - "DeleteDatacenter": { + "DeleteOrganization": { "properties": { "id": { "type": "string" @@ -70288,14 +71784,14 @@ ], "type": "object" }, - "WithTask_DeleteDatacenter_": { + "WithTask_DeleteOrganization_": { "properties": { "task_id": { "type": "string", "nullable": true }, "data": { - "$ref": "#/components/schemas/DeleteDatacenter" + "$ref": "#/components/schemas/DeleteOrganization" } }, "required": [ @@ -70303,10 +71799,10 @@ ], "type": "object" }, - "DatacenterDeletionParams": { + "OrganizationDeletionParams": { "properties": { "where": { - "$ref": "#/components/schemas/DatacenterWhereInput" + "$ref": "#/components/schemas/OrganizationWhereInput" } }, "required": [ @@ -70314,264 +71810,271 @@ ], "type": "object" }, - "NestedDiskFailureInformation": { + "NestedZoneTopo": { "properties": { - "chunk_checksum_error": { - "type": "boolean", + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object", + "additionalProperties": false + }, + "RackTopo": { + "properties": { + "brick_topoes": { + "items": { + "$ref": "#/components/schemas/NestedBrickTopo" + }, + "type": "array", "nullable": true }, - "chunk_errflag": { - "type": "boolean", - "nullable": true + "cluster": { + "$ref": "#/components/schemas/NestedCluster" }, - "chunk_io_error": { - "type": "boolean", - "nullable": true + "height": { + "type": "integer", + "format": "int32" }, - "chunk_warnflag": { - "type": "boolean", - "nullable": true + "id": { + "type": "string" }, - "iostat_latency": { - "type": "boolean", - "nullable": true + "local_id": { + "type": "string" }, - "iostat_latency_ms": { - "type": "integer", - "format": "int64", - "nullable": true + "name": { + "type": "string" }, - "smart_check": { - "type": "boolean", - "nullable": true + "zone_topo": { + "$ref": "#/components/schemas/NestedZoneTopo" } }, + "required": [ + "cluster", + "height", + "id", + "local_id", + "name", + "zone_topo" + ], "type": "object", "additionalProperties": false }, - "PartitionUsage": { - "enum": [ - "BOOT", - "CACHE", - "EFI_SYSTEM", - "JOURNAL", - "METAD", - "PARTITION", - "SWAP", - "SYSTEM", - "UNMOUNTED", - "UNPARTED", - "ZOOKEEPER" - ], - "type": "string" - }, - "NestedPartition": { + "WithTask_RackTopo_": { "properties": { - "name": { - "type": "string", - "nullable": true - }, - "path": { + "task_id": { "type": "string", "nullable": true }, - "size": { - "type": "integer", - "format": "int64" - }, - "usage": { - "$ref": "#/components/schemas/PartitionUsage" - }, - "used_size": { - "type": "integer", - "format": "int64" + "data": { + "$ref": "#/components/schemas/RackTopo" } }, "required": [ - "size", - "usage", - "used_size" + "data" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "NestedPmemDimm": { + "RackTopoCreationParams": { "properties": { - "id": { + "brick_topoes": { + "$ref": "#/components/schemas/BrickTopoWhereInput" + }, + "cluster_id": { + "type": "string" + }, + "zone_topo_id": { "type": "string" }, + "height": { + "type": "integer", + "format": "int32" + }, "name": { "type": "string" } }, "required": [ - "id", + "cluster_id", + "zone_topo_id", + "height", "name" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "Disk": { + "RackTopoUpdationParams": { "properties": { - "entityAsyncStatus": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" - } - ], - "nullable": true - }, - "failure_information": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedDiskFailureInformation" + "data": { + "properties": { + "brick_topoes": { + "$ref": "#/components/schemas/BrickTopoWhereInput" + }, + "cluster_id": { + "type": "string" + }, + "zone_topo_id": { + "type": "string" + }, + "height": { + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string" } - ], - "nullable": true + }, + "type": "object" }, - "firmware": { + "where": { + "$ref": "#/components/schemas/RackTopoWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "DeleteRackTopo": { + "properties": { + "id": { "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "WithTask_DeleteRackTopo_": { + "properties": { + "task_id": { + "type": "string", + "nullable": true }, - "function": { - "allOf": [ - { - "$ref": "#/components/schemas/DiskFunction" - } - ], + "data": { + "$ref": "#/components/schemas/DeleteRackTopo" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "RackTopoDeletionParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/RackTopoWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "AccessMode": { + "enum": [ + "ALLOW", + "DENY", + "NONE" + ], + "type": "string" + }, + "PasswordComplexity": { + "enum": [ + "HIGH", + "LOW", + "MIDDLE" + ], + "type": "string" + }, + "NestedAuthSettings": { + "properties": { + "access_list": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true }, - "health_status": { + "access_mode": { "allOf": [ { - "$ref": "#/components/schemas/DiskHealthStatus" + "$ref": "#/components/schemas/AccessMode" } ], "nullable": true }, - "healthy": { - "type": "boolean" - }, - "host": { - "$ref": "#/components/schemas/NestedHost" - }, - "id": { - "type": "string" - }, - "labels": { - "items": { - "$ref": "#/components/schemas/NestedLabel" - }, - "type": "array", + "enable_single_session_login": { + "type": "boolean", "nullable": true }, - "local_id": { - "type": "string" - }, - "model": { - "type": "string" - }, - "mounted": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "numa_node": { + "login_miss_num_threshold": { "type": "integer", "format": "int32", "nullable": true }, - "offline": { - "type": "boolean" - }, - "partitions": { - "items": { - "$ref": "#/components/schemas/NestedPartition" - }, - "type": "array" - }, - "path": { - "type": "string" - }, - "persistent_memory_type": { - "type": "string", - "nullable": true - }, - "physical_slot_on_brick": { + "login_miss_time_threshold": { "type": "integer", "format": "int32", "nullable": true }, - "pmem_dimms": { - "items": { - "$ref": "#/components/schemas/NestedPmemDimm" - }, - "type": "array", - "nullable": true - }, - "recommended_usage": { + "password_complexity": { "allOf": [ { - "$ref": "#/components/schemas/DiskUsage" + "$ref": "#/components/schemas/PasswordComplexity" } ], "nullable": true }, - "remaining_life_percent": { + "password_expire_days": { "type": "integer", "format": "int32", "nullable": true }, - "serial": { - "type": "string" - }, - "size": { + "session_max_age": { "type": "integer", - "format": "int64" - }, - "type": { - "$ref": "#/components/schemas/DiskType" - }, - "usage": { - "$ref": "#/components/schemas/DiskUsage" - }, - "usage_status": { + "format": "int32", + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "GlobalSettings": { + "properties": { + "auth": { "allOf": [ { - "$ref": "#/components/schemas/DiskUsageStatus" + "$ref": "#/components/schemas/NestedAuthSettings" } ], "nullable": true + }, + "id": { + "type": "string" + }, + "vm_recycle_bin": { + "$ref": "#/components/schemas/NestedVmRecycleBin" } }, "required": [ - "firmware", - "healthy", - "host", "id", - "local_id", - "model", - "mounted", - "name", - "offline", - "partitions", - "path", - "serial", - "size", - "type", - "usage" + "vm_recycle_bin" ], "type": "object", "additionalProperties": false }, - "WithTask_Disk_": { + "WithTask_GlobalSettings_": { "properties": { "task_id": { "type": "string", "nullable": true }, "data": { - "$ref": "#/components/schemas/Disk" + "$ref": "#/components/schemas/GlobalSettings" } }, "required": [ @@ -70579,21 +72082,42 @@ ], "type": "object" }, - "DiskMountParams": { + "GlobalRecycleBinUpdationParams": { + "properties": { + "retain": { + "type": "integer", + "format": "int32" + }, + "enabled": { + "type": "boolean" + } + }, + "required": [ + "retain", + "enabled" + ], + "type": "object" + }, + "ClusterRecycleBinCreationParams": { "properties": { "data": { "properties": { - "function": { - "$ref": "#/components/schemas/DiskFunction" + "retain": { + "type": "integer", + "format": "int32" + }, + "enabled": { + "type": "boolean" } }, "required": [ - "function" + "retain", + "enabled" ], "type": "object" }, "where": { - "$ref": "#/components/schemas/DiskWhereInput" + "$ref": "#/components/schemas/ClusterWhereInput" } }, "required": [ @@ -70602,131 +72126,179 @@ ], "type": "object" }, - "DiskUnmountParams": { + "ClusterRecycleBinUpdationParams": { "properties": { + "data": { + "properties": { + "retain": { + "type": "integer", + "format": "int32" + }, + "enabled": { + "type": "boolean" + } + }, + "required": [ + "retain", + "enabled" + ], + "type": "object" + }, "where": { - "$ref": "#/components/schemas/DiskWhereInput" + "$ref": "#/components/schemas/ClusterWhereInput" } }, "required": [ + "data", "where" ], "type": "object" }, - "FilterRuleAggregationEnum": { - "enum": [ - "AVG", - "MAX", - "MIN", - "QUANTILE", - "SUM" + "DeleteClusterRecycleBin": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" ], - "type": "string" + "type": "object" }, - "FilterRuleMetricEnum": { - "enum": [ - "VM_CPU_USAGE", - "VM_MEMORY_USAGE", - "VM_POWEROFF_DAYS", - "VM_POWERON_DAYS", - "VM_READWRITE_IO" + "WithTask_DeleteClusterRecycleBin_": { + "properties": { + "task_id": { + "type": "string", + "nullable": true + }, + "data": { + "$ref": "#/components/schemas/DeleteClusterRecycleBin" + } + }, + "required": [ + "data" ], - "type": "string" + "type": "object" }, - "FilterRuleOpEnum": { - "enum": [ - "GT", - "GTE", - "LT", - "LTE" + "ClusterRecycleBinDeletionParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/ClusterWhereInput" + } + }, + "required": [ + "where" ], - "type": "string" + "type": "object" }, - "NestedFilterRule": { + "NestedExecutePlan": { "properties": { - "aggregation": { - "$ref": "#/components/schemas/FilterRuleAggregationEnum" - }, - "duration": { - "type": "integer", - "format": "int32" + "enabled": { + "type": "boolean" }, - "metric": { - "$ref": "#/components/schemas/FilterRuleMetricEnum" + "id": { + "type": "string" }, - "op": { - "$ref": "#/components/schemas/FilterRuleOpEnum" + "period": { + "type": "string" }, - "quantile": { + "retain": { "type": "integer", "format": "int32" }, - "threshold": { - "type": "number", - "format": "double" + "start_at": { + "type": "string" } }, "required": [ - "aggregation", - "duration", - "metric", - "op", - "quantile", - "threshold" + "enabled", + "id", + "period", + "retain", + "start_at" ], "type": "object", "additionalProperties": false }, - "EntityFilter": { + "ReportResourceInputEnum": { + "enum": [ + "ALERT", + "ALL", + "CLUSTER", + "DATA_CENTER", + "DISK", + "ELF_IMAGE", + "ENTITY_FILTERS", + "GLOBAL_ALERT_RULE", + "HOST", + "TASK", + "VDS", + "VLAN", + "VM", + "VM_TEMPLATE" + ], + "type": "string" + }, + "NestedResourceMeta": { "properties": { - "apply_to_all_clusters": { - "type": "boolean", - "nullable": true - }, - "clusters": { - "items": { - "$ref": "#/components/schemas/NestedCluster" - }, - "type": "array", - "nullable": true - }, - "entity_type": { - "$ref": "#/components/schemas/EntityType" - }, - "exclude_ids": { + "fields": { "items": { "type": "string" }, "type": "array" }, - "exec_failed_cluster": { - "items": { - "$ref": "#/components/schemas/NestedCluster" - }, - "type": "array", - "nullable": true - }, - "filter_error": { - "items": { - "type": "string" - }, - "type": "array" + "filter": { + "properties": {}, + "type": "object" }, - "filter_status": { - "$ref": "#/components/schemas/FilterStatus" + "name": { + "type": "string" }, + "type": { + "$ref": "#/components/schemas/ReportResourceInputEnum" + } + }, + "required": [ + "fields", + "filter", + "name", + "type" + ], + "type": "object", + "additionalProperties": false + }, + "NestedReportTask": { + "properties": { "id": { "type": "string" }, - "ids": { + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "ReportTemplate": { + "properties": { + "createdAt": { + "type": "string" + }, + "description": { + "type": "string" + }, + "execute_plan": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedExecutePlan" }, "type": "array" }, - "last_executed_at": { - "type": "string", - "nullable": true + "id": { + "type": "string" }, "name": { "type": "string" @@ -70735,34 +72307,44 @@ "type": "string", "nullable": true }, - "rules": { + "resource_meta": { "items": { - "$ref": "#/components/schemas/NestedFilterRule" + "$ref": "#/components/schemas/NestedResourceMeta" }, "type": "array" + }, + "task_num": { + "type": "integer", + "format": "int32" + }, + "tasks": { + "items": { + "$ref": "#/components/schemas/NestedReportTask" + }, + "type": "array", + "nullable": true } }, "required": [ - "entity_type", - "exclude_ids", - "filter_error", - "filter_status", + "createdAt", + "description", + "execute_plan", "id", - "ids", "name", - "rules" + "resource_meta", + "task_num" ], "type": "object", "additionalProperties": false }, - "WithTask_EntityFilter_": { + "WithTask_ReportTemplate_": { "properties": { "task_id": { "type": "string", "nullable": true }, "data": { - "$ref": "#/components/schemas/EntityFilter" + "$ref": "#/components/schemas/ReportTemplate" } }, "required": [ @@ -70770,2439 +72352,2053 @@ ], "type": "object" }, - "FilterRuleInput": { + "ExecutePlan": { "properties": { - "threshold": { - "type": "number", - "format": "double" + "start_at": { + "type": "string" }, - "quantile": { + "retain": { "type": "integer", "format": "int32" }, - "op": { - "$ref": "#/components/schemas/FilterRuleOpEnum" + "period": { + "type": "string" }, - "metric": { - "$ref": "#/components/schemas/FilterRuleMetricEnum" + "id": { + "type": "string" }, - "duration": { - "type": "integer", - "format": "int32" + "enabled": { + "type": "boolean" }, - "aggregation": { - "$ref": "#/components/schemas/FilterRuleAggregationEnum" + "__typename": { + "type": "string", + "enum": [ + "ExecutePlan" + ], + "nullable": false } }, "required": [ - "threshold", - "quantile", - "op", - "metric", - "duration", - "aggregation" + "start_at", + "retain", + "period", + "id", + "enabled" ], "type": "object" }, - "EntityFilterCreationParams": { + "ResourceMeta": { "properties": { - "exclude_vms": { - "$ref": "#/components/schemas/VmWhereInput" - }, - "clusters": { - "$ref": "#/components/schemas/ClusterWhereInput" + "type": { + "$ref": "#/components/schemas/ReportResourceInputEnum" }, - "apply_to_all_clusters": { - "type": "boolean" + "name": { + "type": "string" }, - "rules": { + "filter": {}, + "fields": { "items": { - "$ref": "#/components/schemas/FilterRuleInput" + "type": "string" }, "type": "array" }, - "name": { - "type": "string" + "__typename": { + "type": "string", + "enum": [ + "ResourceMeta" + ], + "nullable": false } }, "required": [ - "rules", - "name" + "type", + "name", + "filter", + "fields" ], "type": "object" }, - "EntityFilterUpdationParams": { + "ReportTemplateCreationParams": { "properties": { - "data": { - "properties": { - "exclude_vms": { - "$ref": "#/components/schemas/VmWhereInput" - }, - "clusters": { - "$ref": "#/components/schemas/ClusterWhereInput" - }, - "apply_to_all_clusters": { - "type": "boolean" - }, - "rules": { - "items": { - "$ref": "#/components/schemas/FilterRuleInput" - }, - "type": "array" - }, - "name": { - "type": "string" - } + "resource_meta": { + "items": { + "$ref": "#/components/schemas/ResourceMeta" }, - "type": "object" + "type": "array" }, - "where": { - "$ref": "#/components/schemas/EntityFilterWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "DeleteEntityFilter": { - "properties": { - "id": { + "execute_plan": { + "items": { + "$ref": "#/components/schemas/ExecutePlan" + }, + "type": "array" + }, + "description": { "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "WithTask_DeleteEntityFilter_": { - "properties": { - "task_id": { - "type": "string", - "nullable": true }, - "data": { - "$ref": "#/components/schemas/DeleteEntityFilter" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "EntityFilterDeletionParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/EntityFilterWhereInput" + "name": { + "type": "string" } }, "required": [ - "where" + "resource_meta", + "execute_plan", + "name" ], "type": "object" }, - "GpuDevice": { + "ReportTemplateWhereInput": { "properties": { - "assigned_vgpus_num": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "available_vgpus_num": { - "type": "integer", - "format": "int32", + "AND": { + "items": { + "$ref": "#/components/schemas/ReportTemplateWhereInput" + }, + "type": "array", "nullable": true }, - "brand": { - "type": "string" - }, - "bus_location": { - "type": "string" - }, - "description": { - "type": "string" - }, - "driver_info": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedGpuDriverInfo" - } - ], + "NOT": { + "items": { + "$ref": "#/components/schemas/ReportTemplateWhereInput" + }, + "type": "array", "nullable": true }, - "entityAsyncStatus": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" - } - ], + "OR": { + "items": { + "$ref": "#/components/schemas/ReportTemplateWhereInput" + }, + "type": "array", "nullable": true }, - "host": { - "$ref": "#/components/schemas/NestedHost" - }, - "id": { - "type": "string" - }, - "is_nvidia_tools_ready": { - "type": "boolean", + "createdAt": { + "type": "string", "nullable": true }, - "is_nvidia_vfs_enabled": { - "type": "boolean", + "createdAt_gt": { + "type": "string", "nullable": true }, - "is_nvidia_vfs_supported": { - "type": "boolean", + "createdAt_gte": { + "type": "string", "nullable": true }, - "labels": { + "createdAt_in": { "items": { - "$ref": "#/components/schemas/NestedLabel" + "type": "string" }, "type": "array", "nullable": true }, - "local_created_at": { - "type": "string" + "createdAt_lt": { + "type": "string", + "nullable": true }, - "local_id": { - "type": "string" + "createdAt_lte": { + "type": "string", + "nullable": true }, - "mdev_supported_types": { + "createdAt_not": { + "type": "string", + "nullable": true + }, + "createdAt_not_in": { "items": { - "$ref": "#/components/schemas/NestedVgpuType" + "type": "string" }, "type": "array", "nullable": true }, - "model": { - "type": "string" - }, - "name": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/GpuDeviceStatus" + "description": { + "type": "string", + "nullable": true }, - "user_usage": { - "allOf": [ - { - "$ref": "#/components/schemas/GpuDeviceUsage" - } - ], + "description_contains": { + "type": "string", "nullable": true }, - "user_vgpu_type_id": { + "description_ends_with": { "type": "string", "nullable": true }, - "user_vgpu_type_name": { + "description_gt": { "type": "string", "nullable": true }, - "vgpu_instance_num": { - "type": "integer", - "format": "int32", + "description_gte": { + "type": "string", "nullable": true }, - "vms": { + "description_in": { "items": { - "$ref": "#/components/schemas/NestedVm" + "type": "string" }, "type": "array", "nullable": true - } - }, - "required": [ - "brand", - "bus_location", - "description", - "host", - "id", - "local_created_at", - "local_id", - "model", - "name", - "status" - ], - "type": "object", - "additionalProperties": false - }, - "WithTask_GpuDevice_": { - "properties": { - "task_id": { + }, + "description_lt": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/GpuDevice" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "GpuDeviceUsageUpdationParams": { - "properties": { - "data": { - "properties": { - "vgpu_spec": { - "type": "string" - }, - "usage": { - "$ref": "#/components/schemas/GpuDeviceUsage" - } - }, - "type": "object" - }, - "where": { - "$ref": "#/components/schemas/GpuDeviceWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "GpuDeviceDescriptionUpdationParams": { - "properties": { - "data": { - "properties": { - "description": { - "type": "string" - } - }, - "required": [ - "description" - ], - "type": "object" - }, - "where": { - "$ref": "#/components/schemas/GpuDeviceWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "GpuDeviceSriovSwitchParams": { - "properties": { - "data": { - "properties": { - "enable": { - "type": "boolean" - } - }, - "required": [ - "enable" - ], - "type": "object" - }, - "where": { - "$ref": "#/components/schemas/GpuDeviceWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "GpuVmDetail": { - "properties": { - "vgpu_instance_on_vm_num": { - "type": "integer", - "format": "int32" - }, - "win_opt": { - "type": "boolean" + "description_lte": { + "type": "string", + "nullable": true }, - "vm_usage": { - "allOf": [ - { - "$ref": "#/components/schemas/VmUsage" - } - ], + "description_not": { + "type": "string", "nullable": true }, - "vm_tools_version": { + "description_not_contains": { "type": "string", "nullable": true }, - "vm_tools_status": { - "$ref": "#/components/schemas/VmToolsStatus" + "description_not_ends_with": { + "type": "string", + "nullable": true }, - "vm_placement_group": { + "description_not_in": { "items": { - "$ref": "#/components/schemas/NestedVmPlacementGroup" + "type": "string" }, "type": "array", "nullable": true }, - "vm_nics": { - "items": { - "$ref": "#/components/schemas/NestedVmNic" - }, - "type": "array", + "description_not_starts_with": { + "type": "string", "nullable": true }, - "vm_disks": { - "items": { - "$ref": "#/components/schemas/NestedVmDisk" - }, - "type": "array", + "description_starts_with": { + "type": "string", "nullable": true }, - "video_type": { - "allOf": [ - { - "$ref": "#/components/schemas/VmVideoType" - } - ], + "id": { + "type": "string", "nullable": true }, - "vcpu": { - "type": "integer", - "format": "int32" + "id_contains": { + "type": "string", + "nullable": true }, - "usb_devices": { - "items": { - "$ref": "#/components/schemas/NestedUsbDevice" - }, - "type": "array", + "id_ends_with": { + "type": "string", "nullable": true }, - "unique_size": { - "type": "integer", - "format": "int64", + "id_gt": { + "type": "string", "nullable": true }, - "status": { - "$ref": "#/components/schemas/VmStatus" + "id_gte": { + "type": "string", + "nullable": true }, - "snapshots": { + "id_in": { "items": { - "$ref": "#/components/schemas/NestedVmSnapshot" + "type": "string" }, "type": "array", "nullable": true }, - "snapshot_plan": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedSnapshotPlan" - } - ], + "id_lt": { + "type": "string", "nullable": true }, - "size": { - "type": "integer", - "format": "int64", + "id_lte": { + "type": "string", "nullable": true }, - "provisioned_size": { - "type": "integer", - "format": "int64", + "id_not": { + "type": "string", "nullable": true }, - "protected": { - "type": "boolean" + "id_not_contains": { + "type": "string", + "nullable": true }, - "pci_nics": { - "items": { - "$ref": "#/components/schemas/NestedNic" - }, - "type": "array", + "id_not_ends_with": { + "type": "string", "nullable": true }, - "out_uninstall_usb": { + "id_not_in": { "items": { "type": "string" }, - "type": "array" + "type": "array", + "nullable": true }, - "os": { + "id_not_starts_with": { "type": "string", "nullable": true }, - "original_name": { + "id_starts_with": { "type": "string", "nullable": true }, - "node_ip": { - "type": "string" - }, - "nested_virtualization": { - "type": "boolean" - }, "name": { - "type": "string" + "type": "string", + "nullable": true }, - "memory_usage": { - "type": "number", - "format": "double", + "name_contains": { + "type": "string", "nullable": true }, - "memory": { - "type": "integer", - "format": "int64" + "name_ends_with": { + "type": "string", + "nullable": true }, - "max_iops_policy": { - "allOf": [ - { - "$ref": "#/components/schemas/VmDiskIoRestrictType" - } - ], + "name_gt": { + "type": "string", "nullable": true }, - "max_iops": { - "type": "integer", - "format": "int32", + "name_gte": { + "type": "string", "nullable": true }, - "max_bandwidth_policy": { - "allOf": [ - { - "$ref": "#/components/schemas/VmDiskIoRestrictType" - } - ], + "name_in": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true }, - "max_bandwidth": { - "type": "integer", - "format": "int64", + "name_lt": { + "type": "string", "nullable": true }, - "logical_size_bytes": { - "type": "integer", - "format": "int64", + "name_lte": { + "type": "string", "nullable": true }, - "local_id": { - "type": "string" + "name_not": { + "type": "string", + "nullable": true }, - "local_created_at": { + "name_not_contains": { "type": "string", "nullable": true }, - "last_shutdown_time": { + "name_not_ends_with": { "type": "string", "nullable": true }, - "labels": { + "name_not_in": { "items": { - "$ref": "#/components/schemas/NestedLabel" + "type": "string" }, "type": "array", "nullable": true }, - "kernel_info": { + "name_not_starts_with": { "type": "string", "nullable": true }, - "isolation_policy": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedIsolationPolicy" - } - ], + "name_starts_with": { + "type": "string", "nullable": true }, - "ips": { - "type": "string" - }, - "io_policy": { - "allOf": [ - { - "$ref": "#/components/schemas/VmDiskIoPolicy" - } - ], + "preset": { + "type": "string", "nullable": true }, - "internal": { - "type": "boolean" - }, - "in_recycle_bin": { - "type": "boolean" + "preset_contains": { + "type": "string", + "nullable": true }, - "id": { - "type": "string" + "preset_ends_with": { + "type": "string", + "nullable": true }, - "hostname": { + "preset_gt": { "type": "string", "nullable": true }, - "host": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedHost" - } - ], + "preset_gte": { + "type": "string", "nullable": true }, - "ha": { - "type": "boolean" + "preset_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true }, - "guest_used_size": { - "type": "integer", - "format": "int64", + "preset_lt": { + "type": "string", "nullable": true }, - "guest_size_usage": { - "type": "number", - "format": "double", + "preset_lte": { + "type": "string", "nullable": true }, - "guest_os_type": { - "allOf": [ - { - "$ref": "#/components/schemas/VmGuestsOperationSystem" - } - ], + "preset_not": { + "type": "string", "nullable": true }, - "guest_cpu_model": { + "preset_not_contains": { "type": "string", "nullable": true }, - "gpu_devices": { + "preset_not_ends_with": { + "type": "string", + "nullable": true + }, + "preset_not_in": { "items": { - "$ref": "#/components/schemas/NestedGpuDevice" + "type": "string" }, "type": "array", "nullable": true }, - "folder": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedVmFolder" - } - ], + "preset_not_starts_with": { + "type": "string", "nullable": true }, - "firmware": { - "$ref": "#/components/schemas/VmFirmware" + "preset_starts_with": { + "type": "string", + "nullable": true }, - "entityAsyncStatus": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" - } - ], + "task_num": { + "type": "integer", + "format": "int32", "nullable": true }, - "entity_filter_results": { + "task_num_gt": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "task_num_gte": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "task_num_in": { "items": { - "$ref": "#/components/schemas/NestedVmEntityFilterResult" + "type": "integer", + "format": "int32" }, "type": "array", "nullable": true }, - "dns_servers": { - "type": "string", + "task_num_lt": { + "type": "integer", + "format": "int32", "nullable": true }, - "description": { - "type": "string" - }, - "deleted_at": { - "type": "string", + "task_num_lte": { + "type": "integer", + "format": "int32", "nullable": true }, - "cpu_usage": { - "type": "number", - "format": "double", + "task_num_not": { + "type": "integer", + "format": "int32", "nullable": true }, - "cpu_model": { - "type": "string" - }, - "cpu": { - "$ref": "#/components/schemas/NestedCpu" + "task_num_not_in": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", + "nullable": true }, - "cluster": { + "tasks_every": { "allOf": [ { - "$ref": "#/components/schemas/NestedCluster" + "$ref": "#/components/schemas/ReportTaskWhereInput" } ], "nullable": true }, - "cloud_init_supported": { - "type": "boolean", + "tasks_none": { + "allOf": [ + { + "$ref": "#/components/schemas/ReportTaskWhereInput" + } + ], "nullable": true }, - "clock_offset": { - "$ref": "#/components/schemas/VmClockOffset" + "tasks_some": { + "allOf": [ + { + "$ref": "#/components/schemas/ReportTaskWhereInput" + } + ], + "nullable": true } }, - "required": [ - "win_opt", - "vm_tools_status", - "vcpu", - "status", - "protected", - "out_uninstall_usb", - "node_ip", - "nested_virtualization", - "name", - "memory", - "local_id", - "ips", - "internal", - "in_recycle_bin", - "id", - "ha", - "firmware", - "description", - "cpu_model", - "cpu", - "clock_offset" - ], - "type": "object" + "type": "object", + "additionalProperties": false }, - "GpuVmInfo": { + "ReportTaskWhereInput": { "properties": { - "vms": { + "AND": { "items": { - "$ref": "#/components/schemas/GpuVmDetail" + "$ref": "#/components/schemas/ReportTaskWhereInput" }, - "type": "array" + "type": "array", + "nullable": true }, - "vgpu_instance_num": { - "type": "integer", - "format": "int32", + "NOT": { + "items": { + "$ref": "#/components/schemas/ReportTaskWhereInput" + }, + "type": "array", "nullable": true }, - "user_vgpu_type_name": { - "type": "string", + "OR": { + "items": { + "$ref": "#/components/schemas/ReportTaskWhereInput" + }, + "type": "array", "nullable": true }, - "user_vgpu_type_id": { + "createdAt": { "type": "string", "nullable": true }, - "user_usage": { - "allOf": [ - { - "$ref": "#/components/schemas/GpuDeviceUsage" - } - ], + "createdAt_gt": { + "type": "string", "nullable": true }, - "status": { - "$ref": "#/components/schemas/GpuDeviceStatus" - }, - "name": { - "type": "string" - }, - "model": { - "type": "string" + "createdAt_gte": { + "type": "string", + "nullable": true }, - "mdev_supported_types": { + "createdAt_in": { "items": { - "$ref": "#/components/schemas/NestedVgpuType" + "type": "string" }, "type": "array", "nullable": true }, - "local_id": { - "type": "string" + "createdAt_lt": { + "type": "string", + "nullable": true }, - "local_created_at": { - "type": "string" + "createdAt_lte": { + "type": "string", + "nullable": true }, - "labels": { + "createdAt_not": { + "type": "string", + "nullable": true + }, + "createdAt_not_in": { "items": { - "$ref": "#/components/schemas/NestedLabel" + "type": "string" }, "type": "array", "nullable": true }, - "is_nvidia_vfs_supported": { - "type": "boolean", + "id": { + "type": "string", "nullable": true }, - "is_nvidia_vfs_enabled": { - "type": "boolean", + "id_contains": { + "type": "string", "nullable": true }, - "is_nvidia_tools_ready": { - "type": "boolean", + "id_ends_with": { + "type": "string", "nullable": true }, - "id": { - "type": "string" - }, - "host": { - "$ref": "#/components/schemas/NestedHost" - }, - "entityAsyncStatus": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" - } - ], + "id_gt": { + "type": "string", "nullable": true }, - "driver_info": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedGpuDriverInfo" - } - ], + "id_gte": { + "type": "string", "nullable": true }, - "description": { - "type": "string" - }, - "bus_location": { - "type": "string" + "id_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true }, - "brand": { - "type": "string" + "id_lt": { + "type": "string", + "nullable": true }, - "available_vgpus_num": { - "type": "integer", - "format": "int32", + "id_lte": { + "type": "string", "nullable": true }, - "assigned_vgpus_num": { - "type": "integer", - "format": "int32", + "id_not": { + "type": "string", "nullable": true - } - }, - "required": [ - "vms", - "status", - "name", - "model", - "local_id", - "local_created_at", - "id", - "host", - "description", - "bus_location", - "brand" - ], - "type": "object" - }, - "GpuDeviceOrderByInput": { - "enum": [ - "assigned_vgpus_num_ASC", - "assigned_vgpus_num_DESC", - "available_vgpus_num_ASC", - "available_vgpus_num_DESC", - "brand_ASC", - "brand_DESC", - "bus_location_ASC", - "bus_location_DESC", - "description_ASC", - "description_DESC", - "driver_info_ASC", - "driver_info_DESC", - "entityAsyncStatus_ASC", - "entityAsyncStatus_DESC", - "id_ASC", - "id_DESC", - "is_nvidia_tools_ready_ASC", - "is_nvidia_tools_ready_DESC", - "is_nvidia_vfs_enabled_ASC", - "is_nvidia_vfs_enabled_DESC", - "is_nvidia_vfs_supported_ASC", - "is_nvidia_vfs_supported_DESC", - "local_created_at_ASC", - "local_created_at_DESC", - "local_id_ASC", - "local_id_DESC", - "mdev_supported_types_ASC", - "mdev_supported_types_DESC", - "model_ASC", - "model_DESC", - "name_ASC", - "name_DESC", - "status_ASC", - "status_DESC", - "user_usage_ASC", - "user_usage_DESC", - "user_vgpu_type_id_ASC", - "user_vgpu_type_id_DESC", - "user_vgpu_type_name_ASC", - "user_vgpu_type_name_DESC", - "vgpu_instance_num_ASC", - "vgpu_instance_num_DESC" - ], - "type": "string" - }, - "GetGpuDevicesRequestBody": { - "properties": { - "after": { + }, + "id_not_contains": { "type": "string", "nullable": true }, - "before": { + "id_not_ends_with": { "type": "string", "nullable": true }, - "first": { - "type": "integer", - "format": "int32", + "id_not_in": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true }, - "last": { - "type": "integer", - "format": "int32", + "id_not_starts_with": { + "type": "string", "nullable": true }, - "orderBy": { - "allOf": [ - { - "$ref": "#/components/schemas/GpuDeviceOrderByInput" - } - ], + "id_starts_with": { + "type": "string", "nullable": true }, - "skip": { - "type": "integer", - "format": "int32", + "internal": { + "type": "boolean", "nullable": true }, - "where": { - "allOf": [ - { - "$ref": "#/components/schemas/GpuDeviceWhereInput" - } - ], + "internal_not": { + "type": "boolean", "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "MetricType": { - "enum": [ - "BOTTOMK", - "NORMAL", - "TOPK" - ], - "type": "string" - }, - "GraphType": { - "enum": [ - "AREA", - "STACK" - ], - "type": "string" - }, - "NestedView": { - "properties": { - "id": { - "type": "string" }, "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "type": "object", - "additionalProperties": false - }, - "Graph": { - "properties": { - "cluster": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedCluster" - } - ], + "type": "string", "nullable": true }, - "disks": { - "items": { - "$ref": "#/components/schemas/NestedDisk" - }, - "type": "array", + "name_contains": { + "type": "string", "nullable": true }, - "entityAsyncStatus": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" - } - ], + "name_ends_with": { + "type": "string", "nullable": true }, - "hosts": { - "items": { - "$ref": "#/components/schemas/NestedHost" - }, - "type": "array", + "name_gt": { + "type": "string", "nullable": true }, - "id": { - "type": "string" + "name_gte": { + "type": "string", + "nullable": true }, - "instance_ids": { + "name_in": { "items": { "type": "string" }, - "type": "array" - }, - "local_id": { - "type": "string" - }, - "luns": { - "items": { - "$ref": "#/components/schemas/NestedIscsiLun" - }, "type": "array", "nullable": true }, - "metric_count": { - "type": "integer", - "format": "int32" + "name_lt": { + "type": "string", + "nullable": true }, - "metric_name": { - "type": "string" + "name_lte": { + "type": "string", + "nullable": true }, - "metric_type": { - "$ref": "#/components/schemas/MetricType" + "name_not": { + "type": "string", + "nullable": true }, - "namespaces": { - "items": { - "$ref": "#/components/schemas/NestedNvmfNamespace" - }, - "type": "array", + "name_not_contains": { + "type": "string", "nullable": true }, - "network": { - "allOf": [ - { - "$ref": "#/components/schemas/NetworkType" - } - ], + "name_not_ends_with": { + "type": "string", "nullable": true }, - "nics": { + "name_not_in": { "items": { - "$ref": "#/components/schemas/NestedNic" + "type": "string" }, "type": "array", "nullable": true }, - "resource_type": { - "type": "string" - }, - "service": { + "name_not_starts_with": { "type": "string", "nullable": true }, - "targets": { - "properties": {}, - "type": "object" - }, - "title": { - "type": "string" - }, - "type": { - "$ref": "#/components/schemas/GraphType" - }, - "view": { - "$ref": "#/components/schemas/NestedView" - }, - "vmNics": { - "items": { - "$ref": "#/components/schemas/NestedVmNic" - }, - "type": "array", + "name_starts_with": { + "type": "string", "nullable": true }, - "vmVolumes": { - "items": { - "$ref": "#/components/schemas/NestedVmVolume" - }, - "type": "array", + "plan_id": { + "type": "string", "nullable": true }, - "vms": { - "items": { - "$ref": "#/components/schemas/NestedVm" - }, - "type": "array", + "plan_id_contains": { + "type": "string", "nullable": true }, - "witnesses": { - "items": { - "$ref": "#/components/schemas/NestedWitness" - }, - "type": "array", + "plan_id_ends_with": { + "type": "string", "nullable": true }, - "zones": { - "items": { - "$ref": "#/components/schemas/NestedZone" - }, - "type": "array", + "plan_id_gt": { + "type": "string", "nullable": true - } - }, - "required": [ - "id", - "instance_ids", - "local_id", - "metric_count", - "metric_name", - "metric_type", - "resource_type", - "targets", - "title", - "type", - "view" - ], - "type": "object", - "additionalProperties": false - }, - "WithTask_Graph_": { - "properties": { - "task_id": { + }, + "plan_id_gte": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/Graph" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "GraphCreationParams": { - "properties": { - "instance_ids": { + "plan_id_in": { "items": { "type": "string" }, - "type": "array" - }, - "network": { - "$ref": "#/components/schemas/NetworkType" - }, - "service": { - "type": "string" - }, - "metric_type": { - "$ref": "#/components/schemas/MetricType" - }, - "metric_count": { - "type": "integer", - "format": "int32" - }, - "type": { - "$ref": "#/components/schemas/GraphType" - }, - "resource_type": { - "type": "string" - }, - "view_id": { - "type": "string" + "type": "array", + "nullable": true }, - "title": { - "type": "string" + "plan_id_lt": { + "type": "string", + "nullable": true }, - "cluster_id": { - "type": "string" + "plan_id_lte": { + "type": "string", + "nullable": true }, - "connect_id": { - "items": { - "type": "string" - }, - "type": "array" + "plan_id_not": { + "type": "string", + "nullable": true }, - "metric_name": { - "type": "string" - } - }, - "required": [ - "type", - "resource_type", - "view_id", - "title", - "cluster_id", - "connect_id", - "metric_name" - ], - "type": "object" - }, - "GraphWhereInput": { - "properties": { - "AND": { - "items": { - "$ref": "#/components/schemas/GraphWhereInput" - }, - "type": "array", + "plan_id_not_contains": { + "type": "string", "nullable": true }, - "NOT": { - "items": { - "$ref": "#/components/schemas/GraphWhereInput" - }, - "type": "array", + "plan_id_not_ends_with": { + "type": "string", "nullable": true }, - "OR": { + "plan_id_not_in": { "items": { - "$ref": "#/components/schemas/GraphWhereInput" + "type": "string" }, "type": "array", "nullable": true }, - "cluster": { - "allOf": [ - { - "$ref": "#/components/schemas/ClusterWhereInput" - } - ], - "nullable": true - }, - "disks_every": { - "allOf": [ - { - "$ref": "#/components/schemas/DiskWhereInput" - } - ], - "nullable": true - }, - "disks_none": { - "allOf": [ - { - "$ref": "#/components/schemas/DiskWhereInput" - } - ], + "plan_id_not_starts_with": { + "type": "string", "nullable": true }, - "disks_some": { - "allOf": [ - { - "$ref": "#/components/schemas/DiskWhereInput" - } - ], + "plan_id_starts_with": { + "type": "string", "nullable": true }, - "entityAsyncStatus": { + "status": { "allOf": [ { - "$ref": "#/components/schemas/EntityAsyncStatus" + "$ref": "#/components/schemas/TaskStatus" } ], "nullable": true }, - "entityAsyncStatus_in": { + "status_in": { "items": { - "$ref": "#/components/schemas/EntityAsyncStatus" + "$ref": "#/components/schemas/TaskStatus" }, "type": "array", "nullable": true }, - "entityAsyncStatus_not": { + "status_not": { "allOf": [ { - "$ref": "#/components/schemas/EntityAsyncStatus" + "$ref": "#/components/schemas/TaskStatus" } ], "nullable": true }, - "entityAsyncStatus_not_in": { + "status_not_in": { "items": { - "$ref": "#/components/schemas/EntityAsyncStatus" + "$ref": "#/components/schemas/TaskStatus" }, "type": "array", "nullable": true }, - "hosts_every": { - "allOf": [ - { - "$ref": "#/components/schemas/HostWhereInput" - } - ], - "nullable": true - }, - "hosts_none": { + "template": { "allOf": [ { - "$ref": "#/components/schemas/HostWhereInput" + "$ref": "#/components/schemas/ReportTemplateWhereInput" } ], "nullable": true - }, - "hosts_some": { - "allOf": [ - { - "$ref": "#/components/schemas/HostWhereInput" + } + }, + "type": "object", + "additionalProperties": false + }, + "ReportTemplateUpdationParams": { + "properties": { + "data": { + "properties": { + "resource_meta": { + "items": { + "$ref": "#/components/schemas/ResourceMeta" + }, + "type": "array" + }, + "execute_plan": { + "items": { + "$ref": "#/components/schemas/ExecutePlan" + }, + "type": "array" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" } - ], - "nullable": true - }, - "id": { - "type": "string", - "nullable": true - }, - "id_contains": { - "type": "string", - "nullable": true - }, - "id_ends_with": { - "type": "string", - "nullable": true - }, - "id_gt": { - "type": "string", - "nullable": true - }, - "id_gte": { - "type": "string", - "nullable": true - }, - "id_in": { - "items": { - "type": "string" }, - "type": "array", - "nullable": true - }, - "id_lt": { - "type": "string", - "nullable": true - }, - "id_lte": { - "type": "string", - "nullable": true - }, - "id_not": { - "type": "string", - "nullable": true - }, - "id_not_contains": { - "type": "string", - "nullable": true + "type": "object" }, - "id_not_ends_with": { - "type": "string", - "nullable": true + "where": { + "$ref": "#/components/schemas/ReportTemplateWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "NestedReportTemplate": { + "properties": { + "id": { + "type": "string" }, - "id_not_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "ReportTask": { + "properties": { + "createdAt": { + "type": "string" }, - "id_not_starts_with": { - "type": "string", - "nullable": true + "id": { + "type": "string" }, - "id_starts_with": { - "type": "string", - "nullable": true + "internal": { + "type": "boolean" }, - "local_id": { - "type": "string", - "nullable": true + "name": { + "type": "string" }, - "local_id_contains": { + "plan_id": { "type": "string", "nullable": true }, - "local_id_ends_with": { - "type": "string", - "nullable": true + "status": { + "$ref": "#/components/schemas/TaskStatus" }, - "local_id_gt": { + "template": { + "$ref": "#/components/schemas/NestedReportTemplate" + } + }, + "required": [ + "createdAt", + "id", + "internal", + "name", + "status", + "template" + ], + "type": "object", + "additionalProperties": false + }, + "WithTask_ReportTask_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "local_id_gte": { + "data": { + "$ref": "#/components/schemas/ReportTask" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "ReporteTemplateGenerationParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/ReportTemplateWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "DeleteReportTemplate": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "WithTask_DeleteReportTemplate_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "local_id_in": { + "data": { + "$ref": "#/components/schemas/DeleteReportTemplate" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "ReportTemplateDeletionParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/ReportTemplateWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "UserRoleNext": { + "properties": { + "actions": { "items": { "type": "string" }, - "type": "array", - "nullable": true - }, - "local_id_lt": { - "type": "string", - "nullable": true + "type": "array" }, - "local_id_lte": { - "type": "string", - "nullable": true + "id": { + "type": "string" }, - "local_id_not": { - "type": "string", - "nullable": true + "name": { + "type": "string" }, - "local_id_not_contains": { - "type": "string", - "nullable": true + "platform": { + "$ref": "#/components/schemas/UserRolePlatform" }, - "local_id_not_ends_with": { - "type": "string", + "preset": { + "allOf": [ + { + "$ref": "#/components/schemas/UserRolePreset" + } + ], "nullable": true }, - "local_id_not_in": { + "users": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedUser" }, "type": "array", "nullable": true - }, - "local_id_not_starts_with": { - "type": "string", - "nullable": true - }, - "local_id_starts_with": { + } + }, + "required": [ + "actions", + "id", + "name", + "platform" + ], + "type": "object", + "additionalProperties": false + }, + "WithTask_UserRoleNext_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "luns_every": { - "allOf": [ - { - "$ref": "#/components/schemas/IscsiLunWhereInput" - } - ], - "nullable": true - }, - "luns_none": { - "allOf": [ - { - "$ref": "#/components/schemas/IscsiLunWhereInput" - } - ], - "nullable": true - }, - "luns_some": { - "allOf": [ - { - "$ref": "#/components/schemas/IscsiLunWhereInput" - } - ], + "data": { + "$ref": "#/components/schemas/UserRoleNext" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "ROLE_ACTION": { + "enum": [ + "*", + "MANAGE_DATA_CENTER", + "MANAGE_CLUSTER_CONNECTION", + "MANAGE_STORAGE_CLUSTER_CONNECTION", + "MANAGE_HOST", + "MANAGE_NIC_MTU", + "MANAGE_DISK", + "MANAGE_HARDWARE_TOPO", + "MANAGE_USB_DEVICE", + "MANAGE_GPU_DEVICE", + "MANAGE_VDS", + "MANAGE_VLAN", + "MANAGE_SYSTEM_VLAN", + "MANAGE_ISCSI_DATA_STORE", + "MANAGE_NFS_DATA_STORE", + "MANAGE_NVMF_DATA_STORE", + "CREATE_VM", + "UPDATE_VM", + "DELETE_VM", + "UPDATE_VM_ADVANCED_SETTING", + "UPDATE_VM_GUEST", + "VM_OPERATION_OPEN_TERMINAL", + "VM_OPERATION_MIGRATE", + "VM_OPERATION_VM_FOLDER", + "VM_OPERATION_VM_POWER", + "VM_OPERATION_CLONE", + "VM_OPERATION_INSTALL_TOOLS", + "VM_IMPORT_EXPORT", + "CREATE_VM_TEMPLATE", + "MANAGE_VM_TEMPLATE", + "VM_TEMPLATE_IMPORT_EXPORT", + "MANAGE_VM_SNAPSHOT", + "MANAGE_VM_VOLUME", + "VM_VOLUME_IMPORT_EXPORT", + "MANAGE_ISO", + "DOWNLOAD_ISO", + "QUERY_SENSITIVE_RESOURCE_LIST", + "QUERY_SENSITIVE_RESOURCE", + "MANAGE_SENSITIVE_RESOURCE", + "MANAGE_VM_PLACEMENT_GROUP", + "MANAGE_SNAPSHOT_PLAN", + "MANAGE_ALERT", + "MANAGE_MONITOR_VIEW", + "MANAGE_ENTITY_FILTER", + "MANAGE_CLUSTER_BASIC_INFO", + "MANAGE_CLUSTER_LICENCE", + "MANAGE_CLUSTER_SNMP_TRANSPORT", + "MANAGE_SNMP_TRAP", + "MANAGE_CLUSTER_VIP", + "MANAGE_CLUSTER_MANAGEMENT_IP", + "MANAGE_DNS_SERVER", + "MANAGE_NTP_SERVER", + "MANAGE_IPMI", + "MANAGE_CLUSTER_VM_CPU_MODEL", + "MANAGE_CLUSTER_VM_TOOLS", + "MANAGE_CLUSTER_HOT_MIGRATION", + "MANAGE_CLUSTER_HA", + "MANAGE_SSL_CERTIFICATE", + "MANAGE_LOG_COLLECTION", + "MANAGE_SYSLOG", + "MANAGE_LOG_FIND", + "MANAGE_LABEL", + "MANAGE_USER_AND_ROLE", + "MANAGE_PASSWORD_SETTINGS", + "MANAGE_ACCESS_CONTROL", + "MANAGE_SESSION_EXPIRATION", + "MANAGE_VCENTER_ASSOCIATION", + "MANAGE_ESXI_ASSOCIATION", + "MANAGE_AUDIT_LOG", + "MANAGE_ALERT_EMAIL_SETTING", + "MANAGE_SMTP_SERVER", + "MANAGE_UPGRADE_CENTER", + "MANAGE_VM_RECYCLE_BIN_SETTING", + "MANAGE_REPORT", + "MANAGE_SHARING_VM_TOOLS", + "MANAGE_ADVANCED_MONITOR", + "MANAGE_THIRD_PARTY_DRIVER", + "MANAGE_ORGANIZATION_NAME", + "MANAGE_CLOUD_TOWER_LICENSE", + "MANAGE_CONSISTENCY_GROUP", + "MANAGE_NIC", + "MANAGE_CLUSTER_ISCSI", + "MANAGE_BACKUP_LICENSE", + "MANAGE_BACKUP_PACKAGE", + "MANAGE_BACKUP_SERVICE", + "MANAGE_BACKUP_STORE_REPOSITORY", + "MANAGE_BACKUP_PLAN", + "MANAGE_BACKUP_TASK", + "MANAGE_BACKUP_RESTORE_POINT", + "MANAGE_BACKUP_RESTORE_POINT_TASK", + "MANAGE_SECURITY_POLICY", + "MANAGE_SECURITY_GROUP", + "ISOLATE_VM", + "MANAGE_EVEROUTE_LICENSE", + "MANAGE_EVEROUTE_PACKAGE", + "DEPLOY_EVEROUTE_CLUSTER", + "UNDEPLOY_EVEROUTE_CLUSTER", + "UPDATE_EVEROUTE_CLUSTER", + "UPGRADE_EVEROUTE_CLUSTER", + "MANAGE_EVEROUTE_NETWORK_POLICY_RULE_SERVICE", + "MANAGE_EVEROUTE_CLUSTER_ASSOCIATION", + "MANAGE_EVEROUTE_CLUSTER_GLOBAL_POLICY", + "MANAGE_MICRO_SEGMENTATION", + "MANAGE_LOAD_BALANCER_RESOURCE", + "MANAGE_LOAD_BALANCER", + "MANAGE_LOAD_BALANCER_VNET_BOND", + "MANAGE_VIRTUAL_PRIVATE_CLOUD_SERVICE", + "MANAGE_VIRTUAL_PRIVATE_CLOUD_CLUSTER_BINDING", + "MANAGE_VIRTUAL_PRIVATE_CLOUD_EDGE_GATEWAY", + "MANAGE_VIRTUAL_PRIVATE_CLOUD_EXTERNAL_SUBNET", + "MANAGE_VIRTUAL_PRIVATE_CLOUD_BASIC_RESOURCE", + "MANAGE_VIRTUAL_PRIVATE_CLOUD_SECURITY_GROUP", + "MANAGE_VIRTUAL_PRIVATE_CLOUD_SECURITY_POLICY", + "MANAGE_VIRTUAL_PRIVATE_CLOUD_ISOLATION_POLICY", + "MANAGE_VIRTUAL_PRIVATE_CLOUD_FLOATING_IP", + "MANAGE_VIRTUAL_PRIVATE_CLOUD_ROUTER_GATEWAY", + "MANAGE_VIRTUAL_PRIVATE_CLOUD_NAT_GATEWAY", + "MANAGE_VIRTUAL_PRIVATE_CLOUD_LAYER2_GATEWAY", + "MANAGE_VIRTUAL_PRIVATE_CLOUD_PEERING", + "MANAGE_VIRTUAL_PRIVATE_CLOUD_LOAD_BALANCER_RESOURCE", + "MANAGE_LDAP_AD_CONFIG", + "MANAGE_MFA_CONFIG", + "MANAGE_DEFAULT_LOGIN_OPTION", + "MANAGE_CLUSTER_STORAGE_POLICY", + "MANAGE_SKS_SERVICE", + "MANAGE_SKS_LICENSE", + "CONFIGURE_SKS_SERVICE", + "CREATE_SKS_WORKLOAD_CLUSTER", + "DELETE_SKS_WORKLOAD_CLUSTER", + "UPDATE_SKS_WORKLOAD_CLUSTER", + "MANAGE_CONTAINER_REGISTRY", + "DOWNLOAD_SKS_WORKLOAD_CLUSTER_KUBECONFIG", + "DOWNLOAD_SKS_WORKLOAD_SPEC_FILE", + "MANAGE_SKS_WORKLOAD_CLUSTER_RECONCILE", + "MANAGE_OBSERVABILITY_PACKAGE", + "MANAGE_OBSERVABILITY_SERVICE", + "CONFIG_DYNAMIC_RESOURCE_SCHEDULE", + "GENERATE_DRS_PROPOSALS", + "APPLY_DRS_PROPOSAL", + "MANAGE_AGENT_MESH", + "MANAGE_REPLICATION_SERVICE", + "MANAGE_REPLICATION_RESTORE_POINT", + "MANAGE_REPLICATION_PLAN", + "MANAGE_REPLICATION_TASK", + "MANAGE_REPLICATION_FAULT_TASK", + "MANAGE_REPLICA_OBJECT", + "MANAGE_CLUSTER_PRIORITIZED", + "SMTX_INSPECTOR", + "MANAGE_SFS_LICENSE", + "MANAGE_SFS_IMAGE", + "MANAGE_SFS_FILE_STORAGE_CLUSTER", + "MANAGE_SFS_FILE_SYSTEM_CONFIG", + "MANAGE_SFS_FILE_SYSTEM_ACCESSIBILITY", + "MANAGE_SFS_SNAPSHOT", + "MANAGE_CLOUDTOWER_SNMP_TRANSPORT", + "MANAGE_CLOUD_TOWER_NTP", + "MANAGE_CLOUDTOWER_WEBHOOK_NOTIFIER", + "MANAGE_API_KEY" + ], + "type": "string" + }, + "RoleCreationParams": { + "properties": { + "actions": { + "items": { + "$ref": "#/components/schemas/ROLE_ACTION" + }, + "type": "array" + }, + "name": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "actions", + "name" + ], + "type": "object" + }, + "RoleUpdationParams": { + "properties": { + "data": { + "properties": { + "actions": { + "items": { + "$ref": "#/components/schemas/ROLE_ACTION" + }, + "type": "array" + }, + "name": { + "type": "string", + "minLength": 1 + } + }, + "type": "object" + }, + "where": { + "$ref": "#/components/schemas/UserRoleNextWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "DeleteRole": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "WithTask_DeleteRole_": { + "properties": { + "task_id": { + "type": "string", "nullable": true }, - "metric_count": { - "type": "integer", - "format": "int32", + "data": { + "$ref": "#/components/schemas/DeleteRole" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "RoleDeletionParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/UserRoleNextWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "NestedLabelGroup": { + "properties": { + "labels": { + "items": { + "$ref": "#/components/schemas/NestedLabel" + }, + "type": "array" + } + }, + "required": [ + "labels" + ], + "type": "object", + "additionalProperties": false + }, + "SecurityGroup": { + "properties": { + "description": { + "type": "string", "nullable": true }, - "metric_count_gt": { - "type": "integer", - "format": "int32", + "everoute_cluster": { + "$ref": "#/components/schemas/NestedEverouteCluster" + }, + "id": { + "type": "string" + }, + "isolation_policies": { + "items": { + "$ref": "#/components/schemas/NestedIsolationPolicy" + }, + "type": "array", "nullable": true }, - "metric_count_gte": { - "type": "integer", - "format": "int32", + "label_groups": { + "items": { + "$ref": "#/components/schemas/NestedLabelGroup" + }, + "type": "array", "nullable": true }, - "metric_count_in": { + "name": { + "type": "string" + }, + "security_policies": { "items": { - "type": "integer", - "format": "int32" + "$ref": "#/components/schemas/NestedSecurityPolicy" }, "type": "array", "nullable": true }, - "metric_count_lt": { - "type": "integer", - "format": "int32", + "vms": { + "items": { + "$ref": "#/components/schemas/NestedVm" + }, + "type": "array", + "nullable": true + } + }, + "required": [ + "everoute_cluster", + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "WithTask_SecurityGroup_": { + "properties": { + "task_id": { + "type": "string", "nullable": true }, - "metric_count_lte": { - "type": "integer", - "format": "int32", + "data": { + "$ref": "#/components/schemas/SecurityGroup" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "SecurityGroupCreateParams": { + "properties": { + "vms": { + "$ref": "#/components/schemas/VmWhereInput" + }, + "label_groups": { + "items": { + "$ref": "#/components/schemas/LabelWhereInput" + }, + "type": "array", + "minItems": 1 + }, + "description": { + "type": "string" + }, + "everoute_cluster_id": { + "type": "string" + }, + "name": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "everoute_cluster_id", + "name" + ], + "type": "object" + }, + "DeleteSecurityGroup": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "WithTask_DeleteSecurityGroup_": { + "properties": { + "task_id": { + "type": "string", "nullable": true }, - "metric_count_not": { - "type": "integer", - "format": "int32", + "data": { + "$ref": "#/components/schemas/DeleteSecurityGroup" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "SecurityGroupWhereInput": { + "properties": { + "AND": { + "items": { + "$ref": "#/components/schemas/SecurityGroupWhereInput" + }, + "type": "array", "nullable": true }, - "metric_count_not_in": { + "NOT": { "items": { - "type": "integer", - "format": "int32" + "$ref": "#/components/schemas/SecurityGroupWhereInput" }, "type": "array", "nullable": true }, - "metric_name": { + "OR": { + "items": { + "$ref": "#/components/schemas/SecurityGroupWhereInput" + }, + "type": "array", + "nullable": true + }, + "description": { "type": "string", "nullable": true }, - "metric_name_contains": { + "description_contains": { "type": "string", "nullable": true }, - "metric_name_ends_with": { + "description_ends_with": { "type": "string", "nullable": true }, - "metric_name_gt": { + "description_gt": { "type": "string", "nullable": true }, - "metric_name_gte": { + "description_gte": { "type": "string", "nullable": true }, - "metric_name_in": { + "description_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "metric_name_lt": { + "description_lt": { "type": "string", "nullable": true }, - "metric_name_lte": { + "description_lte": { "type": "string", "nullable": true }, - "metric_name_not": { + "description_not": { "type": "string", "nullable": true }, - "metric_name_not_contains": { + "description_not_contains": { "type": "string", "nullable": true }, - "metric_name_not_ends_with": { + "description_not_ends_with": { "type": "string", "nullable": true }, - "metric_name_not_in": { + "description_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "metric_name_not_starts_with": { + "description_not_starts_with": { "type": "string", "nullable": true }, - "metric_name_starts_with": { + "description_starts_with": { "type": "string", "nullable": true }, - "metric_type": { + "everoute_cluster": { "allOf": [ { - "$ref": "#/components/schemas/MetricType" + "$ref": "#/components/schemas/EverouteClusterWhereInput" } ], "nullable": true }, - "metric_type_in": { + "id": { + "type": "string", + "nullable": true + }, + "id_contains": { + "type": "string", + "nullable": true + }, + "id_ends_with": { + "type": "string", + "nullable": true + }, + "id_gt": { + "type": "string", + "nullable": true + }, + "id_gte": { + "type": "string", + "nullable": true + }, + "id_in": { "items": { - "$ref": "#/components/schemas/MetricType" + "type": "string" }, "type": "array", "nullable": true }, - "metric_type_not": { - "allOf": [ - { - "$ref": "#/components/schemas/MetricType" - } - ], + "id_lt": { + "type": "string", "nullable": true }, - "metric_type_not_in": { + "id_lte": { + "type": "string", + "nullable": true + }, + "id_not": { + "type": "string", + "nullable": true + }, + "id_not_contains": { + "type": "string", + "nullable": true + }, + "id_not_ends_with": { + "type": "string", + "nullable": true + }, + "id_not_in": { "items": { - "$ref": "#/components/schemas/MetricType" + "type": "string" }, "type": "array", "nullable": true }, - "namespaces_every": { + "id_not_starts_with": { + "type": "string", + "nullable": true + }, + "id_starts_with": { + "type": "string", + "nullable": true + }, + "isolation_policies_every": { "allOf": [ { - "$ref": "#/components/schemas/NvmfNamespaceWhereInput" + "$ref": "#/components/schemas/IsolationPolicyWhereInput" } ], "nullable": true }, - "namespaces_none": { - "allOf": [ - { - "$ref": "#/components/schemas/NvmfNamespaceWhereInput" - } - ], - "nullable": true - }, - "namespaces_some": { - "allOf": [ - { - "$ref": "#/components/schemas/NvmfNamespaceWhereInput" - } - ], - "nullable": true - }, - "network": { - "allOf": [ - { - "$ref": "#/components/schemas/NetworkType" - } - ], - "nullable": true - }, - "network_in": { - "items": { - "$ref": "#/components/schemas/NetworkType" - }, - "type": "array", - "nullable": true - }, - "network_not": { - "allOf": [ - { - "$ref": "#/components/schemas/NetworkType" - } - ], - "nullable": true - }, - "network_not_in": { - "items": { - "$ref": "#/components/schemas/NetworkType" - }, - "type": "array", - "nullable": true - }, - "nics_every": { - "allOf": [ - { - "$ref": "#/components/schemas/NicWhereInput" - } - ], - "nullable": true - }, - "nics_none": { + "isolation_policies_none": { "allOf": [ { - "$ref": "#/components/schemas/NicWhereInput" + "$ref": "#/components/schemas/IsolationPolicyWhereInput" } ], "nullable": true }, - "nics_some": { + "isolation_policies_some": { "allOf": [ { - "$ref": "#/components/schemas/NicWhereInput" + "$ref": "#/components/schemas/IsolationPolicyWhereInput" } ], "nullable": true }, - "resource_type": { - "type": "string", - "nullable": true - }, - "resource_type_contains": { - "type": "string", - "nullable": true - }, - "resource_type_ends_with": { - "type": "string", - "nullable": true - }, - "resource_type_gt": { - "type": "string", - "nullable": true - }, - "resource_type_gte": { - "type": "string", - "nullable": true - }, - "resource_type_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true - }, - "resource_type_lt": { - "type": "string", - "nullable": true - }, - "resource_type_lte": { - "type": "string", - "nullable": true - }, - "resource_type_not": { - "type": "string", - "nullable": true - }, - "resource_type_not_contains": { - "type": "string", - "nullable": true - }, - "resource_type_not_ends_with": { - "type": "string", - "nullable": true - }, - "resource_type_not_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true - }, - "resource_type_not_starts_with": { - "type": "string", - "nullable": true - }, - "resource_type_starts_with": { - "type": "string", - "nullable": true - }, - "service": { - "type": "string", - "nullable": true - }, - "service_contains": { - "type": "string", - "nullable": true - }, - "service_ends_with": { - "type": "string", - "nullable": true - }, - "service_gt": { - "type": "string", - "nullable": true - }, - "service_gte": { - "type": "string", - "nullable": true - }, - "service_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true - }, - "service_lt": { - "type": "string", - "nullable": true - }, - "service_lte": { - "type": "string", - "nullable": true - }, - "service_not": { - "type": "string", - "nullable": true - }, - "service_not_contains": { - "type": "string", - "nullable": true - }, - "service_not_ends_with": { - "type": "string", - "nullable": true - }, - "service_not_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true - }, - "service_not_starts_with": { - "type": "string", - "nullable": true - }, - "service_starts_with": { - "type": "string", - "nullable": true - }, - "title": { + "name": { "type": "string", "nullable": true }, - "title_contains": { + "name_contains": { "type": "string", "nullable": true }, - "title_ends_with": { + "name_ends_with": { "type": "string", "nullable": true }, - "title_gt": { + "name_gt": { "type": "string", "nullable": true }, - "title_gte": { + "name_gte": { "type": "string", "nullable": true }, - "title_in": { + "name_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "title_lt": { + "name_lt": { "type": "string", "nullable": true }, - "title_lte": { + "name_lte": { "type": "string", "nullable": true }, - "title_not": { + "name_not": { "type": "string", "nullable": true }, - "title_not_contains": { + "name_not_contains": { "type": "string", "nullable": true }, - "title_not_ends_with": { + "name_not_ends_with": { "type": "string", "nullable": true }, - "title_not_in": { + "name_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "title_not_starts_with": { + "name_not_starts_with": { "type": "string", "nullable": true }, - "title_starts_with": { + "name_starts_with": { "type": "string", "nullable": true }, - "type": { + "security_policies_every": { "allOf": [ { - "$ref": "#/components/schemas/GraphType" + "$ref": "#/components/schemas/SecurityPolicyWhereInput" } ], "nullable": true }, - "type_in": { - "items": { - "$ref": "#/components/schemas/GraphType" - }, - "type": "array", - "nullable": true - }, - "type_not": { + "security_policies_none": { "allOf": [ { - "$ref": "#/components/schemas/GraphType" + "$ref": "#/components/schemas/SecurityPolicyWhereInput" } ], "nullable": true }, - "type_not_in": { - "items": { - "$ref": "#/components/schemas/GraphType" - }, - "type": "array", - "nullable": true - }, - "view": { + "security_policies_some": { "allOf": [ { - "$ref": "#/components/schemas/ViewWhereInput" + "$ref": "#/components/schemas/SecurityPolicyWhereInput" } ], "nullable": true }, - "vmNics_every": { + "vms_every": { "allOf": [ { - "$ref": "#/components/schemas/VmNicWhereInput" + "$ref": "#/components/schemas/VmWhereInput" } ], "nullable": true }, - "vmNics_none": { + "vms_none": { "allOf": [ { - "$ref": "#/components/schemas/VmNicWhereInput" + "$ref": "#/components/schemas/VmWhereInput" } ], "nullable": true }, - "vmNics_some": { + "vms_some": { "allOf": [ { - "$ref": "#/components/schemas/VmNicWhereInput" + "$ref": "#/components/schemas/VmWhereInput" } ], "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "SecurityGroupDeleteParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/SecurityGroupWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "SecurityGroupUpdateParams": { + "properties": { + "label_groups": { + "items": { + "$ref": "#/components/schemas/LabelWhereInput" + }, + "type": "array" }, - "vmVolumes_every": { - "allOf": [ - { - "$ref": "#/components/schemas/VmVolumeWhereInput" - } - ], - "nullable": true + "vms": { + "$ref": "#/components/schemas/VmWhereInput" }, - "vmVolumes_none": { - "allOf": [ - { - "$ref": "#/components/schemas/VmVolumeWhereInput" - } - ], - "nullable": true + "description": { + "type": "string" }, - "vmVolumes_some": { - "allOf": [ - { - "$ref": "#/components/schemas/VmVolumeWhereInput" - } - ], - "nullable": true + "name": { + "type": "string" + } + }, + "type": "object" + }, + "SecurityGroupUpdateBody": { + "properties": { + "data": { + "$ref": "#/components/schemas/SecurityGroupUpdateParams" }, - "vms_every": { + "where": { + "$ref": "#/components/schemas/SecurityGroupWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "NestedSecurityGroup": { + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "NestedSecurityPolicyApply": { + "properties": { + "communicable": { + "type": "boolean" + }, + "security_group": { "allOf": [ { - "$ref": "#/components/schemas/VmWhereInput" + "$ref": "#/components/schemas/NestedSecurityGroup" } ], "nullable": true }, - "vms_none": { - "allOf": [ - { - "$ref": "#/components/schemas/VmWhereInput" - } - ], + "security_group_id": { + "type": "string", "nullable": true }, - "vms_some": { - "allOf": [ - { - "$ref": "#/components/schemas/VmWhereInput" - } - ], + "selector": { + "items": { + "$ref": "#/components/schemas/NestedLabel" + }, + "type": "array" + }, + "selector_ids": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "communicable", + "selector", + "selector_ids" + ], + "type": "object", + "additionalProperties": false + }, + "NetworkPolicyRulePortProtocol": { + "enum": [ + "ALG", + "ICMP", + "IPIP", + "TCP", + "UDP" + ], + "type": "string" + }, + "NestedNetworkPolicyRulePort": { + "properties": { + "port": { + "type": "string", "nullable": true }, - "witnesses_every": { - "allOf": [ - { - "$ref": "#/components/schemas/WitnessWhereInput" - } - ], + "protocol": { + "$ref": "#/components/schemas/NetworkPolicyRulePortProtocol" + } + }, + "required": [ + "protocol" + ], + "type": "object", + "additionalProperties": false + }, + "NetworkPolicyRuleType": { + "enum": [ + "ALL", + "IP_BLOCK", + "SECURITY_GROUP", + "SELECTOR" + ], + "type": "string" + }, + "NestedNetworkPolicyRule": { + "properties": { + "ip_block": { + "type": "string", "nullable": true }, - "witnesses_none": { - "allOf": [ - { - "$ref": "#/components/schemas/WitnessWhereInput" - } - ], + "ports": { + "items": { + "$ref": "#/components/schemas/NestedNetworkPolicyRulePort" + }, + "type": "array", "nullable": true }, - "witnesses_some": { + "security_group": { "allOf": [ { - "$ref": "#/components/schemas/WitnessWhereInput" + "$ref": "#/components/schemas/NestedSecurityGroup" } ], "nullable": true }, - "zones_every": { - "allOf": [ - { - "$ref": "#/components/schemas/ZoneWhereInput" - } - ], + "security_group_id": { + "type": "string", "nullable": true }, - "zones_none": { - "allOf": [ - { - "$ref": "#/components/schemas/ZoneWhereInput" - } - ], + "selector": { + "items": { + "$ref": "#/components/schemas/NestedLabel" + }, + "type": "array", "nullable": true }, - "zones_some": { - "allOf": [ - { - "$ref": "#/components/schemas/ZoneWhereInput" - } - ], + "selector_ids": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true + }, + "type": { + "$ref": "#/components/schemas/NetworkPolicyRuleType" } }, + "required": [ + "type" + ], "type": "object", "additionalProperties": false }, - "ViewWhereInput": { + "SecurityPolicy": { "properties": { - "AND": { + "apply_to": { "items": { - "$ref": "#/components/schemas/ViewWhereInput" + "$ref": "#/components/schemas/NestedSecurityPolicyApply" }, - "type": "array", - "nullable": true + "type": "array" }, - "NOT": { + "description": { + "type": "string" + }, + "egress": { "items": { - "$ref": "#/components/schemas/ViewWhereInput" + "$ref": "#/components/schemas/NestedNetworkPolicyRule" }, "type": "array", "nullable": true }, - "OR": { + "everoute_cluster": { + "$ref": "#/components/schemas/NestedEverouteCluster" + }, + "id": { + "type": "string" + }, + "ingress": { "items": { - "$ref": "#/components/schemas/ViewWhereInput" + "$ref": "#/components/schemas/NestedNetworkPolicyRule" }, "type": "array", "nullable": true }, - "cluster": { - "allOf": [ - { - "$ref": "#/components/schemas/ClusterWhereInput" - } - ], - "nullable": true + "name": { + "type": "string" }, - "entityAsyncStatus": { + "policy_mode": { "allOf": [ { - "$ref": "#/components/schemas/EntityAsyncStatus" + "$ref": "#/components/schemas/PolicyMode" } ], "nullable": true - }, - "entityAsyncStatus_in": { - "items": { - "$ref": "#/components/schemas/EntityAsyncStatus" - }, - "type": "array", - "nullable": true - }, - "entityAsyncStatus_not": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" - } - ], - "nullable": true - }, - "entityAsyncStatus_not_in": { - "items": { - "$ref": "#/components/schemas/EntityAsyncStatus" - }, - "type": "array", - "nullable": true - }, - "graphs_every": { - "allOf": [ - { - "$ref": "#/components/schemas/GraphWhereInput" - } - ], - "nullable": true - }, - "graphs_none": { - "allOf": [ - { - "$ref": "#/components/schemas/GraphWhereInput" - } - ], - "nullable": true - }, - "graphs_some": { - "allOf": [ - { - "$ref": "#/components/schemas/GraphWhereInput" - } - ], - "nullable": true - }, - "id": { - "type": "string", - "nullable": true - }, - "id_contains": { - "type": "string", - "nullable": true - }, - "id_ends_with": { - "type": "string", - "nullable": true - }, - "id_gt": { + } + }, + "required": [ + "apply_to", + "description", + "everoute_cluster", + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "WithTask_SecurityPolicy_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "id_gte": { - "type": "string", - "nullable": true + "data": { + "$ref": "#/components/schemas/SecurityPolicy" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "SecurityPolicyApplyToInputTarget": { + "properties": { + "security_groups": { + "$ref": "#/components/schemas/SecurityGroupWhereInput" }, - "id_in": { + "label_groups": { "items": { - "type": "string" + "$ref": "#/components/schemas/LabelWhereInput" }, - "type": "array", - "nullable": true - }, - "id_lt": { - "type": "string", - "nullable": true - }, - "id_lte": { - "type": "string", - "nullable": true - }, - "id_not": { - "type": "string", - "nullable": true - }, - "id_not_contains": { - "type": "string", - "nullable": true - }, - "id_not_ends_with": { - "type": "string", - "nullable": true + "type": "array" + } + }, + "type": "object" + }, + "SecurityPolicyApplyToInput": { + "properties": { + "communicable": { + "type": "boolean" }, - "id_not_in": { + "target": { + "$ref": "#/components/schemas/SecurityPolicyApplyToInputTarget" + } + }, + "required": [ + "target" + ], + "type": "object" + }, + "IPSecurityPolicy": { + "properties": { + "except_ip_block": { "items": { "type": "string" }, - "type": "array", - "nullable": true - }, - "id_not_starts_with": { - "type": "string", - "nullable": true - }, - "id_starts_with": { - "type": "string", - "nullable": true - }, - "local_id": { - "type": "string", - "nullable": true - }, - "local_id_contains": { - "type": "string", - "nullable": true - }, - "local_id_ends_with": { - "type": "string", - "nullable": true - }, - "local_id_gt": { - "type": "string", - "nullable": true + "type": "array" }, - "local_id_gte": { - "type": "string", - "nullable": true + "ip_block": { + "type": "string" + } + }, + "required": [ + "ip_block" + ], + "type": "object" + }, + "SecurityPolicyIngressEgressInputTarget": { + "properties": { + "security_groups": { + "$ref": "#/components/schemas/SecurityGroupWhereInput" }, - "local_id_in": { + "ips": { "items": { - "type": "string" + "$ref": "#/components/schemas/IPSecurityPolicy" }, - "type": "array", - "nullable": true - }, - "local_id_lt": { - "type": "string", - "nullable": true - }, - "local_id_lte": { - "type": "string", - "nullable": true - }, - "local_id_not": { - "type": "string", - "nullable": true - }, - "local_id_not_contains": { - "type": "string", - "nullable": true - }, - "local_id_not_ends_with": { - "type": "string", - "nullable": true + "type": "array" }, - "local_id_not_in": { + "label_groups": { "items": { - "type": "string" + "$ref": "#/components/schemas/LabelWhereInput" }, - "type": "array", - "nullable": true - }, - "local_id_not_starts_with": { - "type": "string", - "nullable": true - }, - "local_id_starts_with": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "name_contains": { - "type": "string", - "nullable": true - }, - "name_ends_with": { - "type": "string", - "nullable": true - }, - "name_gt": { - "type": "string", - "nullable": true + "type": "array" + } + }, + "type": "object" + }, + "NetworkPolicyRulePortInput": { + "properties": { + "protocol": { + "$ref": "#/components/schemas/NetworkPolicyRulePortProtocol" }, - "name_gte": { - "type": "string", - "nullable": true + "port": { + "type": "string" + } + }, + "required": [ + "protocol" + ], + "type": "object" + }, + "SecurityPolicyIngressEgressInput": { + "properties": { + "type": { + "$ref": "#/components/schemas/NetworkPolicyRuleType" }, - "name_in": { + "ports": { "items": { - "type": "string" + "$ref": "#/components/schemas/NetworkPolicyRulePortInput" }, - "type": "array", - "nullable": true - }, - "name_lt": { - "type": "string", - "nullable": true - }, - "name_lte": { - "type": "string", - "nullable": true - }, - "name_not": { - "type": "string", - "nullable": true - }, - "name_not_contains": { - "type": "string", - "nullable": true - }, - "name_not_ends_with": { - "type": "string", - "nullable": true + "type": "array" }, - "name_not_in": { + "target": { + "$ref": "#/components/schemas/SecurityPolicyIngressEgressInputTarget" + } + }, + "type": "object" + }, + "SecurityPolicyCreateParams": { + "properties": { + "ingress": { "items": { - "type": "string" + "$ref": "#/components/schemas/SecurityPolicyIngressEgressInput" }, - "type": "array", - "nullable": true - }, - "name_not_starts_with": { - "type": "string", - "nullable": true - }, - "name_starts_with": { - "type": "string", - "nullable": true - }, - "time_span": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "time_span_gt": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "time_span_gte": { - "type": "integer", - "format": "int32", - "nullable": true + "type": "array" }, - "time_span_in": { + "egress": { "items": { - "type": "integer", - "format": "int32" + "$ref": "#/components/schemas/SecurityPolicyIngressEgressInput" }, - "type": "array", - "nullable": true - }, - "time_span_lt": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "time_span_lte": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "time_span_not": { - "type": "integer", - "format": "int32", - "nullable": true + "type": "array" }, - "time_span_not_in": { + "apply_to": { "items": { - "type": "integer", - "format": "int32" + "$ref": "#/components/schemas/SecurityPolicyApplyToInput" }, "type": "array", - "nullable": true - }, - "time_unit": { - "allOf": [ - { - "$ref": "#/components/schemas/TimeUnit" - } - ], - "nullable": true + "minItems": 1 }, - "time_unit_in": { - "items": { - "$ref": "#/components/schemas/TimeUnit" - }, - "type": "array", - "nullable": true + "policy_mode": { + "$ref": "#/components/schemas/PolicyMode" }, - "time_unit_not": { - "allOf": [ - { - "$ref": "#/components/schemas/TimeUnit" - } - ], - "nullable": true + "everoute_cluster_id": { + "type": "string" }, - "time_unit_not_in": { - "items": { - "$ref": "#/components/schemas/TimeUnit" - }, - "type": "array", - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "TimeUnit": { - "enum": [ - "DAY", - "HOUR", - "MONTH" - ], - "type": "string" - }, - "GraphUpdationParams": { - "properties": { - "data": { - "properties": { - "instance_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "luns": { - "$ref": "#/components/schemas/IscsiLunWhereInput" - }, - "vmNics": { - "$ref": "#/components/schemas/VmNicWhereInput" - }, - "nics": { - "$ref": "#/components/schemas/NicWhereInput" - }, - "disks": { - "$ref": "#/components/schemas/DiskWhereInput" - }, - "vmVolumes": { - "$ref": "#/components/schemas/VmVolumeWhereInput" - }, - "vms": { - "$ref": "#/components/schemas/VmWhereInput" - }, - "hosts": { - "$ref": "#/components/schemas/HostWhereInput" - }, - "network": { - "$ref": "#/components/schemas/NetworkType" - }, - "cluster": { - "$ref": "#/components/schemas/ClusterWhereInput" - }, - "service": { - "type": "string" - }, - "metric_type": { - "$ref": "#/components/schemas/MetricType" - }, - "metric_count": { - "type": "integer", - "format": "int32" - }, - "type": { - "$ref": "#/components/schemas/GraphType" - }, - "resource_type": { - "type": "string" - }, - "title": { - "type": "string" - }, - "metric_name": { - "type": "string" - }, - "connect_id": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" + "description": { + "type": "string" }, - "where": { - "$ref": "#/components/schemas/GraphWhereInput" + "name": { + "type": "string", + "minLength": 1 } }, "required": [ - "where" + "everoute_cluster_id", + "name" ], "type": "object" }, - "DeleteGraph": { + "DeleteSecurityPolicy": { "properties": { "id": { "type": "string" @@ -73213,14 +74409,14 @@ ], "type": "object" }, - "WithTask_DeleteGraph_": { + "WithTask_DeleteSecurityPolicy_": { "properties": { "task_id": { "type": "string", "nullable": true }, "data": { - "$ref": "#/components/schemas/DeleteGraph" + "$ref": "#/components/schemas/DeleteSecurityPolicy" } }, "required": [ @@ -73228,10 +74424,10 @@ ], "type": "object" }, - "GraphDeletionParams": { + "SecurityPolicyDeleteParams": { "properties": { "where": { - "$ref": "#/components/schemas/GraphWhereInput" + "$ref": "#/components/schemas/SecurityPolicyWhereInput" } }, "required": [ @@ -73239,326 +74435,312 @@ ], "type": "object" }, - "NestedTask": { + "SecurityPolicyUpdateParams": { "properties": { - "args": { - "properties": {}, - "type": "object" - }, - "description": { - "type": "string" + "ingress": { + "items": { + "$ref": "#/components/schemas/SecurityPolicyIngressEgressInput" + }, + "type": "array" }, - "id": { - "type": "string" + "egress": { + "items": { + "$ref": "#/components/schemas/SecurityPolicyIngressEgressInput" + }, + "type": "array" }, - "internal": { - "type": "boolean" - }, - "local_created_at": { - "type": "string" - }, - "progress": { - "type": "number", - "format": "double" - }, - "snapshot": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/TaskStatus" - }, - "steps": { + "apply_to": { "items": { - "$ref": "#/components/schemas/NestedStep" + "$ref": "#/components/schemas/SecurityPolicyApplyToInput" }, "type": "array" + }, + "policy_mode": { + "$ref": "#/components/schemas/PolicyMode" } }, - "required": [ - "args", - "description", - "id", - "internal", - "local_created_at", - "progress", - "snapshot", - "status", - "steps" - ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "BatchHosts": { + "SecurityPolicyUpdateBody": { "properties": { - "task": { - "$ref": "#/components/schemas/NestedTask" + "data": { + "$ref": "#/components/schemas/SecurityPolicyUpdateParams" + }, + "where": { + "$ref": "#/components/schemas/SecurityPolicyWhereInput" } }, "required": [ - "task" + "data", + "where" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "WithTask_BatchHosts_": { + "UpdatePassrodSecurityParams": { "properties": { - "task_id": { - "type": "string", - "nullable": true + "password_expire_days": { + "type": "integer", + "format": "int32" }, - "data": { - "$ref": "#/components/schemas/BatchHosts" + "password_complexity": { + "$ref": "#/components/schemas/PasswordComplexity" + }, + "login_miss_time_threshold": { + "type": "integer", + "format": "int32" + }, + "login_miss_num_threshold": { + "type": "integer", + "format": "int32" + } + }, + "type": "object" + }, + "UpdateAccessRestrictionParams": { + "properties": { + "access_list": { + "items": { + "type": "string" + }, + "type": "array" + }, + "access_mode": { + "$ref": "#/components/schemas/AccessMode" } }, "required": [ - "data" + "access_list", + "access_mode" ], "type": "object" }, - "HostBatchCreateIpmiInput": { + "UpdateSessionTimeoutParams": { "properties": { - "username": { - "type": "string" - }, - "password": { - "type": "string" - }, - "ip": { - "type": "string" + "session_max_age": { + "type": "integer", + "format": "int32" } }, "required": [ - "username", - "password", - "ip" + "session_max_age" ], "type": "object" }, - "HostBatchCreateDiskInput": { + "NestedSnapshotPlanTask": { "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/DiskType" - } - ], - "nullable": true - }, - "size": { - "type": "number", - "format": "double", - "nullable": true - }, - "function": { - "allOf": [ - { - "$ref": "#/components/schemas/DiskFunction" - } - ], - "nullable": true - }, - "drive": { + "id": { "type": "string" } }, "required": [ - "drive" + "id" ], - "type": "object" + "type": "object", + "additionalProperties": false }, - "HostBatchCreateIfaceFunction": { + "ProtectSnapshotStatus": { "enum": [ - "ACCESS", - "MANAGEMENT", - "MIGRATION", - "STORAGE", - "VMWARE_ACCESS" + "PROTECT_SNAPSHOT_STATUS_CREATED", + "PROTECT_SNAPSHOT_STATUS_CREATING", + "PROTECT_SNAPSHOT_STATUS_DELETED", + "PROTECT_SNAPSHOT_STATUS_FAILED" ], "type": "string" }, - "HostBatchCreateIfaceInput": { + "NestedSnapshotGroupVmDiskInfo": { "properties": { - "netmask": { - "type": "string" - }, - "name": { - "items": { - "type": "string" - }, - "type": "array" - }, - "ip": { - "type": "string" - }, - "gateway_ip": { + "disk_id": { "type": "string" }, - "function": { - "$ref": "#/components/schemas/HostBatchCreateIfaceFunction" + "disk_snapshot_status": { + "$ref": "#/components/schemas/ProtectSnapshotStatus" } }, "required": [ - "netmask", - "name", - "ip", - "gateway_ip", - "function" - ], - "type": "object" - }, - "ZbsSpec": { - "enum": [ - "normal", - "large" + "disk_id", + "disk_snapshot_status" ], - "type": "string" + "type": "object", + "additionalProperties": false }, - "HostVdsConfig": { + "NestedSnapshotGroupVmInfo": { "properties": { - "nics": { + "disks": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedSnapshotGroupVmDiskInfo" }, "type": "array" }, - "name": { + "vm_id": { + "type": "string" + }, + "vm_name": { "type": "string" + }, + "vm_snapshot_status": { + "$ref": "#/components/schemas/ProtectSnapshotStatus" } }, "required": [ - "nics", - "name" + "disks", + "vm_id", + "vm_name", + "vm_snapshot_status" ], - "type": "object" + "type": "object", + "additionalProperties": false }, - "HostCreationParamsData": { + "SnapshotGroup": { "properties": { - "vdses": { - "items": { - "$ref": "#/components/schemas/HostVdsConfig" - }, - "type": "array" + "cluster": { + "$ref": "#/components/schemas/NestedCluster" }, - "zbs_spec": { - "$ref": "#/components/schemas/ZbsSpec" + "deleted": { + "type": "boolean" }, - "ifaces": { - "items": { - "$ref": "#/components/schemas/HostBatchCreateIfaceInput" - }, - "type": "array" + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], + "nullable": true }, - "disks": { - "items": { - "$ref": "#/components/schemas/HostBatchCreateDiskInput" - }, - "type": "array" + "estimated_recycling_time": { + "type": "string", + "nullable": true }, - "platform_password": { + "id": { "type": "string" }, - "platform_username": { + "internal": { + "type": "boolean", + "nullable": true + }, + "keep": { + "type": "boolean" + }, + "local_created_at": { "type": "string" }, - "platform_ip": { + "local_id": { "type": "string" }, - "ipmi": { - "$ref": "#/components/schemas/HostBatchCreateIpmiInput" + "logical_size_bytes": { + "type": "integer", + "format": "int64" }, - "hostname": { + "name": { "type": "string" }, - "host_uuid": { - "type": "string" + "object_num": { + "type": "integer", + "format": "int32" }, - "host_ip": { - "type": "string" + "snapshotPlanTask": { + "$ref": "#/components/schemas/NestedSnapshotPlanTask" + }, + "vm_info": { + "items": { + "$ref": "#/components/schemas/NestedSnapshotGroupVmInfo" + }, + "type": "array" + }, + "vm_snapshots": { + "items": { + "$ref": "#/components/schemas/NestedVmSnapshot" + }, + "type": "array", + "nullable": true } }, "required": [ - "ifaces", - "disks", - "hostname", - "host_uuid", - "host_ip" + "cluster", + "deleted", + "id", + "keep", + "local_created_at", + "local_id", + "logical_size_bytes", + "name", + "object_num", + "snapshotPlanTask", + "vm_info" ], - "type": "object" + "type": "object", + "additionalProperties": false }, - "HostAuthInfo": { + "WithTask_SnapshotGroup_": { "properties": { - "root_user_password": { - "type": "string" + "task_id": { + "type": "string", + "nullable": true }, - "default_user_password": { - "type": "string" + "data": { + "$ref": "#/components/schemas/SnapshotGroup" } }, + "required": [ + "data" + ], "type": "object" }, - "HostCreationParams": { + "SnapshotGroupRollbackParams": { "properties": { - "auth_info": { - "$ref": "#/components/schemas/HostAuthInfo" - }, - "data": { - "items": { - "$ref": "#/components/schemas/HostCreationParamsData" - }, - "type": "array" - }, - "cluster_id": { - "type": "string" + "where": { + "$ref": "#/components/schemas/SnapshotGroupWhereInput" } }, "required": [ - "data", - "cluster_id" + "where" ], "type": "object" }, - "MaintenanceModeEnum": { - "enum": [ - "ENTERING_MAINTENANCE_MODE", - "IN_USE", - "MAINTENANCE_MODE", - "REMOVING" - ], - "type": "string" - }, - "NestedMaintenanceHostState": { + "SnapshotGroupCloneParam": { "properties": { - "enter_maintenance_time": { + "from_source_vm_id": { "type": "string" }, - "maintenance_job_id": { + "to_cloned_vm_name": { "type": "string" - }, - "state": { - "$ref": "#/components/schemas/MaintenanceModeEnum" } }, "required": [ - "enter_maintenance_time", - "maintenance_job_id", - "state" + "from_source_vm_id", + "to_cloned_vm_name" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "NestedIpmi": { + "SnapshotGroupCloneParams": { "properties": { + "clone": { + "items": { + "$ref": "#/components/schemas/SnapshotGroupCloneParam" + }, + "type": "array" + }, "id": { "type": "string" } }, "required": [ + "clone", "id" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "NestedVsphereEsxiAccount": { + "SnapshotGroupKeepParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/SnapshotGroupWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "DeleteSnapshotGroup": { "properties": { "id": { "type": "string" @@ -73567,326 +74749,147 @@ "required": [ "id" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "Host": { + "WithTask_DeleteSnapshotGroup_": { "properties": { - "access_ip": { + "task_id": { "type": "string", "nullable": true }, - "allocable_cpu_cores_for_vm_exclusive": { + "data": { + "$ref": "#/components/schemas/DeleteSnapshotGroup" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "SnapshotGroupDeletionParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/SnapshotGroupWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "SnapshotPlan": { + "properties": { + "auto_delete_num": { "type": "integer", - "format": "int32", - "nullable": true + "format": "int32" }, - "allocatable_memory_bytes": { + "auto_execute_num": { "type": "integer", - "format": "int64" - }, - "chunk_id": { - "type": "string" + "format": "int32" }, "cluster": { "$ref": "#/components/schemas/NestedCluster" }, - "compatible_cpu_models": { - "items": { - "type": "string" - }, - "type": "array" - }, - "cpu_brand": { + "description": { "type": "string" }, - "cpu_fan_speed": { - "items": { - "type": "number", - "format": "double" - }, - "type": "array" + "end_time": { + "type": "string", + "nullable": true }, - "cpu_fan_speed_unit": { + "entityAsyncStatus": { "allOf": [ { - "$ref": "#/components/schemas/CpuFanSpeedUnit" + "$ref": "#/components/schemas/EntityAsyncStatus" } ], "nullable": true }, - "cpu_hz_per_core": { - "type": "integer", - "format": "int64" - }, - "cpu_model": { - "type": "string" + "exec_h_m": { + "properties": {}, + "type": "object", + "nullable": true }, - "cpu_temperature_celsius": { + "execute_intervals": { "items": { "type": "integer", "format": "int32" }, "type": "array" }, - "cpu_vendor": { - "type": "string", - "nullable": true - }, - "data_ip": { - "type": "string", - "nullable": true + "execute_plan_type": { + "$ref": "#/components/schemas/SnapshotPlanExecuteType" }, - "disks": { + "execution_tasks": { "items": { - "$ref": "#/components/schemas/NestedDisk" + "$ref": "#/components/schemas/NestedSnapshotPlanTask" }, "type": "array", "nullable": true }, - "entityAsyncStatus": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" - } - ], + "healthy": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "last_execute_end_time": { + "type": "string", "nullable": true }, - "failure_data_space": { - "type": "integer", - "format": "int64" + "last_execute_status": { + "$ref": "#/components/schemas/SnapshotPlanExecuteStatus" }, - "gpu_devices": { - "items": { - "$ref": "#/components/schemas/NestedGpuDevice" - }, - "type": "array", + "last_execute_time": { + "type": "string", "nullable": true }, - "hdd_data_capacity": { + "local_id": { + "type": "string" + }, + "logical_size_bytes": { "type": "integer", "format": "int64" }, - "hdd_disk_count": { + "manual_delete_num": { "type": "integer", "format": "int32" }, - "host_state": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedMaintenanceHostState" - } - ], - "nullable": true + "manual_execute_num": { + "type": "integer", + "format": "int32" }, - "hypervisor_ip": { - "type": "string", - "nullable": true - }, - "id": { - "type": "string" - }, - "iommu": { - "allOf": [ - { - "$ref": "#/components/schemas/IommuStatus" - } - ], - "nullable": true - }, - "ipmi": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedIpmi" - } - ], - "nullable": true - }, - "is_os_in_raid1": { - "type": "boolean", - "nullable": true - }, - "labels": { - "items": { - "$ref": "#/components/schemas/NestedLabel" - }, - "type": "array", - "nullable": true - }, - "local_id": { - "type": "string" - }, - "lsm_cap_disk_safe_umount": { + "mirror": { "type": "boolean" }, - "management_ip": { - "type": "string" - }, - "model": { - "type": "string" - }, "name": { "type": "string" }, - "nested_virtualization": { - "type": "boolean" - }, - "nic_count": { - "type": "integer", - "format": "int32" - }, - "nics": { - "items": { - "$ref": "#/components/schemas/NestedNic" - }, - "type": "array", - "nullable": true - }, - "node_topo_local_id": { - "type": "string", - "nullable": true - }, - "os_memory_bytes": { - "type": "integer", - "format": "int64" - }, - "os_version": { + "next_execute_time": { "type": "string", "nullable": true }, - "pmem_dimm_capacity": { - "type": "integer", - "format": "int64" - }, - "pmem_dimm_count": { - "type": "integer", - "format": "int32" - }, - "pmem_dimms": { - "items": { - "$ref": "#/components/schemas/NestedPmemDimm" - }, - "type": "array", - "nullable": true - }, - "pmem_disk_count": { - "type": "integer", - "format": "int32" - }, - "provisioned_cpu_cores": { + "object_num": { "type": "integer", "format": "int32" }, - "provisioned_memory_bytes": { - "type": "integer", - "format": "int64" - }, - "running_pause_vm_memory_bytes": { - "type": "integer", - "format": "int64" - }, - "running_vm_num": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "scvm_cpu": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "scvm_memory": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "scvm_name": { - "type": "string", - "nullable": true - }, - "serial": { - "type": "string", - "nullable": true - }, - "ssd_data_capacity": { + "physical_size_bytes": { "type": "integer", "format": "int64" }, - "ssd_disk_count": { + "remain_snapshot_num": { "type": "integer", "format": "int32" }, - "state": { - "$ref": "#/components/schemas/HostState" - }, - "status": { - "$ref": "#/components/schemas/HostStatus" - }, - "stopped_vm_num": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "suspended_vm_num": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "total_cache_capacity": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "total_cpu_cores": { + "snapshot_group_num": { "type": "integer", "format": "int32" }, - "total_cpu_hz": { - "type": "integer", - "format": "int64" - }, - "total_cpu_sockets": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "total_data_capacity": { - "type": "integer", - "format": "int64" - }, - "total_memory_bytes": { - "type": "integer", - "format": "int64" - }, - "usb_devices": { - "items": { - "$ref": "#/components/schemas/NestedUsbDevice" - }, - "type": "array", - "nullable": true - }, - "used_cpu_hz": { - "type": "number", - "format": "double", - "nullable": true - }, - "used_data_space": { - "type": "integer", - "format": "int64" - }, - "used_memory_bytes": { - "type": "number", - "format": "double", - "nullable": true - }, - "vm_num": { - "type": "integer", - "format": "int32", - "nullable": true + "start_time": { + "type": "string" }, - "vmotion_ip": { - "type": "string", - "nullable": true + "status": { + "$ref": "#/components/schemas/SnapshotPlanStatus" }, "vms": { "items": { @@ -73894,77 +74897,42 @@ }, "type": "array", "nullable": true - }, - "vsphereEsxiAccount": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedVsphereEsxiAccount" - } - ], - "nullable": true - }, - "with_faster_ssd_as_cache": { - "type": "boolean", - "nullable": true - }, - "zone": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedZone" - } - ], - "nullable": true } }, "required": [ - "allocatable_memory_bytes", - "chunk_id", + "auto_delete_num", + "auto_execute_num", "cluster", - "compatible_cpu_models", - "cpu_brand", - "cpu_fan_speed", - "cpu_hz_per_core", - "cpu_model", - "cpu_temperature_celsius", - "failure_data_space", - "hdd_data_capacity", - "hdd_disk_count", + "description", + "execute_intervals", + "execute_plan_type", + "healthy", "id", + "last_execute_status", "local_id", - "lsm_cap_disk_safe_umount", - "management_ip", - "model", + "logical_size_bytes", + "manual_delete_num", + "manual_execute_num", + "mirror", "name", - "nested_virtualization", - "nic_count", - "os_memory_bytes", - "pmem_dimm_capacity", - "pmem_dimm_count", - "pmem_disk_count", - "provisioned_cpu_cores", - "provisioned_memory_bytes", - "running_pause_vm_memory_bytes", - "ssd_data_capacity", - "ssd_disk_count", - "state", - "status", - "total_cpu_cores", - "total_cpu_hz", - "total_data_capacity", - "total_memory_bytes", - "used_data_space" + "object_num", + "physical_size_bytes", + "remain_snapshot_num", + "snapshot_group_num", + "start_time", + "status" ], "type": "object", "additionalProperties": false }, - "WithTask_Host_": { + "WithTask_SnapshotPlan_": { "properties": { "task_id": { "type": "string", "nullable": true }, "data": { - "$ref": "#/components/schemas/Host" + "$ref": "#/components/schemas/SnapshotPlan" } }, "required": [ @@ -73972,38 +74940,85 @@ ], "type": "object" }, - "TriggerDiskBlinkParams": { + "SnapshotPlanCreationParams": { "properties": { - "led_status": { - "type": "string", - "enum": [ - "on", - "off" - ] + "vm_ids": { + "items": { + "type": "string" + }, + "type": "array" }, - "disk_name": { + "execute_intervals": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array" + }, + "execute_plan_type": { + "$ref": "#/components/schemas/SnapshotPlanExecuteType" + }, + "exec_h_m": { "type": "string" }, - "host_id": { + "end_time": { + "type": "string" + }, + "start_time": { + "type": "string" + }, + "remain_snapshot_num": { + "type": "integer", + "format": "int32" + }, + "cluster_id": { + "type": "string" + }, + "name": { "type": "string" } }, "required": [ - "disk_name", - "host_id" + "vm_ids", + "execute_intervals", + "execute_plan_type", + "start_time", + "remain_snapshot_num", + "cluster_id", + "name" ], "type": "object" }, - "HostUpdationParams": { + "SnapshotPlanUpdationParams": { "properties": { "data": { "properties": { - "ipmi": { - "$ref": "#/components/schemas/HostBatchCreateIpmiInput" + "vm_ids": { + "items": { + "type": "string" + }, + "type": "array" }, - "scvm_name": { + "execute_intervals": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array" + }, + "execute_plan_type": { + "$ref": "#/components/schemas/SnapshotPlanExecuteType" + }, + "exec_h_m": { "type": "string" }, + "end_time": { + "type": "string" + }, + "remain_snapshot_num": { + "type": "integer", + "format": "int32" + }, "name": { "type": "string" } @@ -74011,78 +75026,44 @@ "type": "object" }, "where": { - "$ref": "#/components/schemas/HostWhereInput" + "$ref": "#/components/schemas/SnapshotPlanWhereInput" } }, "required": [ - "data", "where" ], "type": "object" }, - "OperateActionEnum": { - "enum": [ - "poweroff", - "reboot" - ], - "type": "string" - }, - "OperateHostPowerData": { + "DeleteSnapshotPlan": { "properties": { - "reason": { + "id": { "type": "string" - }, - "force": { - "type": "boolean" - }, - "action": { - "$ref": "#/components/schemas/OperateActionEnum" - } - }, - "required": [ - "force", - "action" - ], - "type": "object" - }, - "OperateHostPowerParams": { - "properties": { - "data": { - "$ref": "#/components/schemas/OperateHostPowerData" - }, - "where": { - "properties": { - "host_id": { - "type": "string" - } - }, - "required": [ - "host_id" - ], - "type": "object" } }, "required": [ - "data", - "where" + "id" ], "type": "object" }, - "EnterMaintenanceModeCheckResult": { + "WithTask_DeleteSnapshotPlan_": { "properties": { "task_id": { - "type": "string" + "type": "string", + "nullable": true + }, + "data": { + "$ref": "#/components/schemas/DeleteSnapshotPlan" } }, "required": [ - "task_id" + "data" ], "type": "object" }, - "EnterMaintenanceModeCheckParams": { + "SnapshotPlanDeletionParams": { "properties": { "where": { - "$ref": "#/components/schemas/HostWhereInput" + "$ref": "#/components/schemas/SnapshotPlanWhereInput" } }, "required": [ @@ -74090,248 +75071,102 @@ ], "type": "object" }, - "ShutdownVmID": { - "properties": { - "vm_uuid": { - "type": "string" - } - }, - "required": [ - "vm_uuid" - ], - "type": "object" - }, - "EnterMaintenanceModeResult": { - "properties": { - "shutdownVms": { - "items": { - "$ref": "#/components/schemas/ShutdownVmID" - }, - "type": "array" - }, - "done": { - "type": "boolean" - } - }, - "required": [ - "shutdownVms", - "done" - ], - "type": "object" - }, - "EnterMaintenanceModeResultParams": { + "SnapshotPlanExecutionParams": { "properties": { - "where": { + "data": { "properties": { - "task_id": { + "task_name": { "type": "string" } }, "required": [ - "task_id" + "task_name" ], "type": "object" + }, + "where": { + "$ref": "#/components/schemas/SnapshotPlanWhereInput" } }, "required": [ + "data", "where" ], "type": "object" }, - "EnterMaintenanceModeInput": { + "SnapshotPlanSuspendedParams": { "properties": { - "shutdown_vms": { - "items": { - "type": "string" - }, - "type": "array" + "where": { + "$ref": "#/components/schemas/SnapshotPlanWhereInput" } }, + "required": [ + "where" + ], "type": "object" }, - "EnterMaintenanceModeParams": { + "SnapshotPlanResumeParams": { "properties": { - "data": { - "$ref": "#/components/schemas/EnterMaintenanceModeInput" - }, "where": { - "properties": { - "host_id": { - "type": "string" - } - }, - "required": [ - "host_id" - ], - "type": "object" + "$ref": "#/components/schemas/SnapshotPlanWhereInput" } }, "required": [ - "data", "where" ], "type": "object" }, - "MaintenanceModeVerify": { + "SnmpAuthProtocol": { + "enum": [ + "MD5", + "SHA" + ], + "type": "string" + }, + "SnmpPrivacyProtocol": { + "enum": [ + "AES", + "DES" + ], + "type": "string" + }, + "SnmpProtocol": { + "enum": [ + "TCP", + "UDP" + ], + "type": "string" + }, + "SnmpVersion": { + "enum": [ + "V2C", + "V3" + ], + "type": "string" + }, + "SnmpTransport": { "properties": { - "reason": { + "auth_pass_phrase": { "type": "string", "nullable": true }, - "changed": { - "type": "boolean", - "nullable": true - } - }, - "type": "object" - }, - "MaintenanceModeVmInfo": { - "properties": { - "vm_uuid": { - "type": "string", - "nullable": true - }, - "vm_state": { - "type": "string", - "nullable": true - }, - "vm_name": { - "type": "string", - "nullable": true - }, - "vm_ha": { - "type": "boolean", - "nullable": true - }, - "verify": { + "auth_protocol": { "allOf": [ { - "$ref": "#/components/schemas/MaintenanceModeVerify" + "$ref": "#/components/schemas/SnmpAuthProtocol" } ], "nullable": true }, - "target_host_name": { - "type": "string", - "nullable": true + "cluster": { + "$ref": "#/components/schemas/NestedCluster" }, - "state": { + "community": { "type": "string", "nullable": true - } - }, - "type": "object" - }, - "ExitMaintenanceModeResult": { - "properties": { - "offlineMigrateVms": { - "items": { - "$ref": "#/components/schemas/MaintenanceModeVmInfo" - }, - "type": "array" - }, - "liveMigrateVms": { - "items": { - "$ref": "#/components/schemas/MaintenanceModeVmInfo" - }, - "type": "array" - }, - "shutDownVms": { - "items": { - "$ref": "#/components/schemas/MaintenanceModeVmInfo" - }, - "type": "array" - } - }, - "required": [ - "offlineMigrateVms", - "liveMigrateVms", - "shutDownVms" - ], - "type": "object" - }, - "ExitMaintenanceModeResultParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/HostWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "ExitMaintenanceModeInput": { - "properties": { - "poweron_vms": { - "items": { - "type": "string" - }, - "type": "array" - }, - "offline_migrate_back_vms": { - "items": { - "type": "string" - }, - "type": "array" - }, - "live_migrate_back_vms": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ExitMaintenanceModeParams": { - "properties": { - "data": { - "$ref": "#/components/schemas/ExitMaintenanceModeInput" - }, - "where": { - "properties": { - "host_id": { - "type": "string" - } - }, - "required": [ - "host_id" - ], - "type": "object" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "NestedIscsiTarget": { - "properties": { - "id": { - "type": "string" }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "type": "object", - "additionalProperties": false - }, - "IscsiLunSnapshot": { - "properties": { - "consistency_group_snapshot": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedConsistencyGroupSnapshot" - } - ], - "nullable": true + "disabled": { + "type": "boolean" }, "entityAsyncStatus": { "allOf": [ @@ -74344,57 +75179,60 @@ "id": { "type": "string" }, - "iscsi_lun": { + "local_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "port": { + "type": "integer", + "format": "int32" + }, + "privacy_pass_phrase": { + "type": "string", + "nullable": true + }, + "privacy_protocol": { "allOf": [ { - "$ref": "#/components/schemas/NestedIscsiLun" + "$ref": "#/components/schemas/SnmpPrivacyProtocol" } ], "nullable": true }, - "iscsi_target": { - "$ref": "#/components/schemas/NestedIscsiTarget" + "protocol": { + "$ref": "#/components/schemas/SnmpProtocol" }, - "labels": { - "items": { - "$ref": "#/components/schemas/NestedLabel" - }, - "type": "array", + "username": { + "type": "string", "nullable": true }, - "local_created_at": { - "type": "string" - }, - "local_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "unique_size": { - "type": "integer", - "format": "int64" + "version": { + "$ref": "#/components/schemas/SnmpVersion" } }, "required": [ + "cluster", + "disabled", "id", - "iscsi_target", - "local_created_at", "local_id", "name", - "unique_size" + "port", + "protocol", + "version" ], "type": "object", "additionalProperties": false }, - "WithTask_IscsiLunSnapshot_": { + "WithTask_SnmpTransport_": { "properties": { "task_id": { "type": "string", "nullable": true }, "data": { - "$ref": "#/components/schemas/IscsiLunSnapshot" + "$ref": "#/components/schemas/SnmpTransport" } }, "required": [ @@ -74402,997 +75240,771 @@ ], "type": "object" }, - "IscsiLunSnapshotCreationEffect": { + "SnmpTransportCreationParams": { "properties": { - "sync": { + "disabled": { "type": "boolean" - } - }, - "type": "object" - }, - "IscsiLunSnapshotCreationParams": { - "properties": { - "effect": { - "$ref": "#/components/schemas/IscsiLunSnapshotCreationEffect" }, - "iscsi_target_id": { + "privacy_protocol": { + "$ref": "#/components/schemas/SnmpPrivacyProtocol" + }, + "privacy_pass_phrase": { + "type": "string" + }, + "auth_protocol": { + "$ref": "#/components/schemas/SnmpAuthProtocol" + }, + "auth_pass_phrase": { + "type": "string" + }, + "username": { "type": "string" }, + "community": { + "type": "string" + }, + "port": { + "type": "integer", + "format": "int32" + }, + "protocol": { + "$ref": "#/components/schemas/SnmpProtocol" + }, + "version": { + "$ref": "#/components/schemas/SnmpVersion" + }, "name": { "type": "string" }, - "iscsi_lun_id": { + "cluster_id": { "type": "string" } }, "required": [ - "iscsi_target_id", + "port", + "protocol", + "version", "name", - "iscsi_lun_id" - ], - "type": "object" - }, - "DeleteIscsiLunSnapshot": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" + "cluster_id" ], "type": "object" }, - "WithTask_DeleteIscsiLunSnapshot_": { + "SnmpTransportWhereInput": { "properties": { - "task_id": { + "AND": { + "items": { + "$ref": "#/components/schemas/SnmpTransportWhereInput" + }, + "type": "array", + "nullable": true + }, + "NOT": { + "items": { + "$ref": "#/components/schemas/SnmpTransportWhereInput" + }, + "type": "array", + "nullable": true + }, + "OR": { + "items": { + "$ref": "#/components/schemas/SnmpTransportWhereInput" + }, + "type": "array", + "nullable": true + }, + "auth_pass_phrase": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/DeleteIscsiLunSnapshot" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "IscsiLunSnapshotDeletionParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/IscsiLunSnapshotWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "IscsiLun": { - "properties": { - "allowed_initiators": { - "type": "string" + "auth_pass_phrase_contains": { + "type": "string", + "nullable": true }, - "assigned_size": { - "type": "integer", - "format": "int64" + "auth_pass_phrase_ends_with": { + "type": "string", + "nullable": true }, - "bps": { - "type": "integer", - "format": "int64" + "auth_pass_phrase_gt": { + "type": "string", + "nullable": true }, - "bps_max": { - "type": "integer", - "format": "int64" + "auth_pass_phrase_gte": { + "type": "string", + "nullable": true }, - "bps_max_length": { - "type": "integer", - "format": "int64" + "auth_pass_phrase_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true }, - "bps_rd": { - "type": "integer", - "format": "int64" + "auth_pass_phrase_lt": { + "type": "string", + "nullable": true }, - "bps_rd_max": { - "type": "integer", - "format": "int64" + "auth_pass_phrase_lte": { + "type": "string", + "nullable": true }, - "bps_rd_max_length": { - "type": "integer", - "format": "int64" + "auth_pass_phrase_not": { + "type": "string", + "nullable": true }, - "bps_wr": { - "type": "integer", - "format": "int64" + "auth_pass_phrase_not_contains": { + "type": "string", + "nullable": true }, - "bps_wr_max": { - "type": "integer", - "format": "int64" + "auth_pass_phrase_not_ends_with": { + "type": "string", + "nullable": true }, - "bps_wr_max_length": { - "type": "integer", - "format": "int64" + "auth_pass_phrase_not_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true }, - "consistency_group": { + "auth_pass_phrase_not_starts_with": { + "type": "string", + "nullable": true + }, + "auth_pass_phrase_starts_with": { + "type": "string", + "nullable": true + }, + "auth_protocol": { "allOf": [ { - "$ref": "#/components/schemas/NestedConsistencyGroup" + "$ref": "#/components/schemas/SnmpAuthProtocol" } ], "nullable": true }, - "entityAsyncStatus": { + "auth_protocol_in": { + "items": { + "$ref": "#/components/schemas/SnmpAuthProtocol" + }, + "type": "array", + "nullable": true + }, + "auth_protocol_not": { "allOf": [ { - "$ref": "#/components/schemas/EntityAsyncStatus" + "$ref": "#/components/schemas/SnmpAuthProtocol" } ], "nullable": true }, - "id": { - "type": "string" + "auth_protocol_not_in": { + "items": { + "$ref": "#/components/schemas/SnmpAuthProtocol" + }, + "type": "array", + "nullable": true }, - "io_size": { - "type": "integer", - "format": "int64" + "cluster": { + "allOf": [ + { + "$ref": "#/components/schemas/ClusterWhereInput" + } + ], + "nullable": true }, - "iops": { - "type": "integer", - "format": "int64" + "community": { + "type": "string", + "nullable": true }, - "iops_max": { - "type": "integer", - "format": "int64" + "community_contains": { + "type": "string", + "nullable": true }, - "iops_max_length": { - "type": "integer", - "format": "int64" + "community_ends_with": { + "type": "string", + "nullable": true }, - "iops_rd": { - "type": "integer", - "format": "int64" + "community_gt": { + "type": "string", + "nullable": true }, - "iops_rd_max": { - "type": "integer", - "format": "int64" + "community_gte": { + "type": "string", + "nullable": true }, - "iops_rd_max_length": { - "type": "integer", - "format": "int64" + "community_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true }, - "iops_wr": { - "type": "integer", - "format": "int64" + "community_lt": { + "type": "string", + "nullable": true }, - "iops_wr_max": { - "type": "integer", - "format": "int64" + "community_lte": { + "type": "string", + "nullable": true }, - "iops_wr_max_length": { - "type": "integer", - "format": "int64" + "community_not": { + "type": "string", + "nullable": true }, - "iscsi_target": { - "$ref": "#/components/schemas/NestedIscsiTarget" + "community_not_contains": { + "type": "string", + "nullable": true }, - "labels": { + "community_not_ends_with": { + "type": "string", + "nullable": true + }, + "community_not_in": { "items": { - "$ref": "#/components/schemas/NestedLabel" + "type": "string" }, "type": "array", "nullable": true }, - "local_created_at": { - "type": "string" + "community_not_starts_with": { + "type": "string", + "nullable": true }, - "local_id": { - "type": "string" + "community_starts_with": { + "type": "string", + "nullable": true }, - "lun_id": { - "type": "integer", - "format": "int32" + "disabled": { + "type": "boolean", + "nullable": true }, - "name": { - "type": "string" + "disabled_not": { + "type": "boolean", + "nullable": true }, - "replica_num": { - "type": "integer", - "format": "int32" + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], + "nullable": true }, - "shared_size": { - "type": "integer", - "format": "int64" + "entityAsyncStatus_in": { + "items": { + "$ref": "#/components/schemas/EntityAsyncStatus" + }, + "type": "array", + "nullable": true }, - "snapshot_num": { - "type": "integer", - "format": "int32" + "entityAsyncStatus_not": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], + "nullable": true }, - "stripe_num": { - "type": "integer", - "format": "int32" + "entityAsyncStatus_not_in": { + "items": { + "$ref": "#/components/schemas/EntityAsyncStatus" + }, + "type": "array", + "nullable": true }, - "stripe_size": { - "type": "integer", - "format": "int64" + "id": { + "type": "string", + "nullable": true }, - "thin_provision": { - "type": "boolean" + "id_contains": { + "type": "string", + "nullable": true }, - "unique_logical_size": { - "type": "number", - "format": "double", + "id_ends_with": { + "type": "string", "nullable": true }, - "unique_size": { - "type": "integer", - "format": "int64" + "id_gt": { + "type": "string", + "nullable": true }, - "zbs_volume_id": { - "type": "string" - } - }, - "required": [ - "allowed_initiators", - "assigned_size", - "bps", - "bps_max", - "bps_max_length", - "bps_rd", - "bps_rd_max", - "bps_rd_max_length", - "bps_wr", - "bps_wr_max", - "bps_wr_max_length", - "id", - "io_size", - "iops", - "iops_max", - "iops_max_length", - "iops_rd", - "iops_rd_max", - "iops_rd_max_length", - "iops_wr", - "iops_wr_max", - "iops_wr_max_length", - "iscsi_target", - "local_created_at", - "local_id", - "lun_id", - "name", - "replica_num", - "shared_size", - "snapshot_num", - "stripe_num", - "stripe_size", - "thin_provision", - "unique_size", - "zbs_volume_id" - ], - "type": "object", - "additionalProperties": false - }, - "WithTask_IscsiLun_": { - "properties": { - "task_id": { + "id_gte": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/IscsiLun" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "IscsiLunCommonParams": { - "properties": { - "bps_wr_max_length": { - "type": "integer", - "format": "int64" + "id_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true }, - "bps_wr_max_unit": { - "$ref": "#/components/schemas/BPSUnit" + "id_lt": { + "type": "string", + "nullable": true }, - "bps_wr_max": { - "type": "integer", - "format": "int64" + "id_lte": { + "type": "string", + "nullable": true }, - "bps_rd_max_length": { - "type": "integer", - "format": "int64" + "id_not": { + "type": "string", + "nullable": true }, - "bps_rd_max_unit": { - "$ref": "#/components/schemas/BPSUnit" + "id_not_contains": { + "type": "string", + "nullable": true }, - "bps_rd_max": { - "type": "integer", - "format": "int64" + "id_not_ends_with": { + "type": "string", + "nullable": true }, - "bps_max_length": { - "type": "integer", - "format": "int64" + "id_not_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true }, - "bps_max_unit": { - "$ref": "#/components/schemas/BPSUnit" + "id_not_starts_with": { + "type": "string", + "nullable": true }, - "bps_max": { - "type": "integer", - "format": "int64" + "id_starts_with": { + "type": "string", + "nullable": true }, - "iops_wr_max_length": { - "type": "integer", - "format": "int64" + "local_id": { + "type": "string", + "nullable": true }, - "iops_wr_max": { - "type": "integer", - "format": "int64" + "local_id_contains": { + "type": "string", + "nullable": true }, - "iops_rd_max_length": { - "type": "integer", - "format": "int64" + "local_id_ends_with": { + "type": "string", + "nullable": true }, - "iops_rd_max": { - "type": "integer", - "format": "int64" + "local_id_gt": { + "type": "string", + "nullable": true }, - "iops_max_length": { - "type": "integer", - "format": "int64" + "local_id_gte": { + "type": "string", + "nullable": true }, - "iops_max": { - "type": "integer", - "format": "int64" + "local_id_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true }, - "bps_wr_unit": { - "$ref": "#/components/schemas/BPSUnit" + "local_id_lt": { + "type": "string", + "nullable": true }, - "bps_wr": { - "type": "integer", - "format": "int64" + "local_id_lte": { + "type": "string", + "nullable": true }, - "bps_rd_unit": { - "$ref": "#/components/schemas/BPSUnit" + "local_id_not": { + "type": "string", + "nullable": true }, - "bps_rd": { - "type": "integer", - "format": "int64" + "local_id_not_contains": { + "type": "string", + "nullable": true }, - "bps_unit": { - "$ref": "#/components/schemas/BPSUnit" + "local_id_not_ends_with": { + "type": "string", + "nullable": true }, - "bps": { - "type": "integer", - "format": "int64" + "local_id_not_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true }, - "iops_wr": { - "type": "integer", - "format": "int64" + "local_id_not_starts_with": { + "type": "string", + "nullable": true }, - "iops_rd": { - "type": "integer", - "format": "int64" + "local_id_starts_with": { + "type": "string", + "nullable": true }, - "iops": { - "type": "integer", - "format": "int64" + "name": { + "type": "string", + "nullable": true }, - "allowed_initiators": { - "type": "string" - } - }, - "type": "object" - }, - "IscsiLunCreationParams": { - "allOf": [ - { - "properties": { - "lun_id": { - "type": "integer", - "format": "int32" - }, - "assigned_size_unit": { - "$ref": "#/components/schemas/ByteUnit" - }, - "assigned_size": { - "type": "integer", - "format": "int64" - }, - "replica_num": { - "type": "integer", - "format": "int32" - }, - "iscsi_target_id": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": [ - "assigned_size", - "replica_num", - "iscsi_target_id", - "name" - ], - "type": "object" + "name_contains": { + "type": "string", + "nullable": true }, - { - "$ref": "#/components/schemas/IscsiLunCommonParams" - } - ] - }, - "IscsiLunUpdationParamsData": { - "allOf": [ - { - "properties": { - "assigned_size_unit": { - "$ref": "#/components/schemas/ByteUnit" - }, - "assigned_size": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - } - }, - "type": "object" + "name_ends_with": { + "type": "string", + "nullable": true }, - { - "$ref": "#/components/schemas/IscsiLunCommonParams" - } - ] - }, - "IscsiLunUpdationParams": { - "properties": { - "data": { - "$ref": "#/components/schemas/IscsiLunUpdationParamsData" + "name_gt": { + "type": "string", + "nullable": true }, - "where": { - "$ref": "#/components/schemas/IscsiLunWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "DeleteIscsiLun": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "WithTask_DeleteIscsiLun_": { - "properties": { - "task_id": { + "name_gte": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/DeleteIscsiLun" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "IscsiLunDeletionParams": { - "properties": { - "data": { - "properties": { - "remove_snapshot": { - "type": "boolean" - } + "name_in": { + "items": { + "type": "string" }, - "required": [ - "remove_snapshot" - ], - "type": "object" - }, - "where": { - "$ref": "#/components/schemas/IscsiLunWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "IscsiLunCloneParams": { - "properties": { - "iscsi_target_id": { - "type": "string" + "type": "array", + "nullable": true }, - "name": { - "type": "string" + "name_lt": { + "type": "string", + "nullable": true }, - "snapshot_id": { - "type": "string" - } - }, - "required": [ - "iscsi_target_id", - "name", - "snapshot_id" - ], - "type": "object" - }, - "IscsiLunRollbackParams": { - "properties": { - "lun_id": { - "type": "string" + "name_lte": { + "type": "string", + "nullable": true }, - "snapshot_id": { - "type": "string" - } - }, - "required": [ - "lun_id", - "snapshot_id" - ], - "type": "object" - }, - "CopyIscsiLunParams": { - "properties": { - "dest_iscsi_target_id": { - "type": "string" + "name_not": { + "type": "string", + "nullable": true }, - "name": { - "type": "string" + "name_not_contains": { + "type": "string", + "nullable": true }, - "src_lun_id": { - "type": "string" - } - }, - "required": [ - "name", - "src_lun_id" - ], - "type": "object" - }, - "NestedInitiatorChap": { - "properties": { - "chap_name": { - "type": "string" + "name_not_ends_with": { + "type": "string", + "nullable": true }, - "chap_secret": { - "type": "string" + "name_not_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true }, - "initiator_iqn": { - "type": "string" - } - }, - "required": [ - "chap_name", - "chap_secret", - "initiator_iqn" - ], - "type": "object", - "additionalProperties": false - }, - "IscsiTarget": { - "properties": { - "bps": { - "type": "integer", - "format": "int64", + "name_not_starts_with": { + "type": "string", "nullable": true }, - "bps_max": { - "type": "integer", - "format": "int64", + "name_starts_with": { + "type": "string", "nullable": true }, - "bps_max_length": { + "port": { "type": "integer", - "format": "int64", + "format": "int32", "nullable": true }, - "bps_rd": { + "port_gt": { "type": "integer", - "format": "int64", + "format": "int32", "nullable": true }, - "bps_rd_max": { + "port_gte": { "type": "integer", - "format": "int64", + "format": "int32", "nullable": true }, - "bps_rd_max_length": { - "type": "integer", - "format": "int64", + "port_in": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", "nullable": true }, - "bps_wr": { + "port_lt": { "type": "integer", - "format": "int64", + "format": "int32", "nullable": true }, - "bps_wr_max": { + "port_lte": { "type": "integer", - "format": "int64", + "format": "int32", "nullable": true }, - "bps_wr_max_length": { + "port_not": { "type": "integer", - "format": "int64", + "format": "int32", "nullable": true }, - "chap_enabled": { - "type": "boolean" + "port_not_in": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", + "nullable": true }, - "chap_name": { + "privacy_pass_phrase": { "type": "string", "nullable": true }, - "chap_secret": { + "privacy_pass_phrase_contains": { "type": "string", "nullable": true }, - "cluster": { - "$ref": "#/components/schemas/NestedCluster" - }, - "description": { - "type": "string" - }, - "entityAsyncStatus": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" - } - ], + "privacy_pass_phrase_ends_with": { + "type": "string", "nullable": true }, - "external_use": { - "type": "boolean" + "privacy_pass_phrase_gt": { + "type": "string", + "nullable": true }, - "id": { - "type": "string" + "privacy_pass_phrase_gte": { + "type": "string", + "nullable": true }, - "initiator_chaps": { + "privacy_pass_phrase_in": { "items": { - "$ref": "#/components/schemas/NestedInitiatorChap" + "type": "string" }, "type": "array", "nullable": true }, - "internal": { - "type": "boolean" - }, - "io_size": { - "type": "integer", - "format": "int64", + "privacy_pass_phrase_lt": { + "type": "string", "nullable": true }, - "iops": { - "type": "integer", - "format": "int64", + "privacy_pass_phrase_lte": { + "type": "string", "nullable": true }, - "iops_max": { - "type": "integer", - "format": "int64", + "privacy_pass_phrase_not": { + "type": "string", "nullable": true }, - "iops_max_length": { - "type": "integer", - "format": "int64", + "privacy_pass_phrase_not_contains": { + "type": "string", "nullable": true }, - "iops_rd": { - "type": "integer", - "format": "int64", + "privacy_pass_phrase_not_ends_with": { + "type": "string", "nullable": true }, - "iops_rd_max": { - "type": "integer", - "format": "int64", + "privacy_pass_phrase_not_in": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true }, - "iops_rd_max_length": { - "type": "integer", - "format": "int64", + "privacy_pass_phrase_not_starts_with": { + "type": "string", "nullable": true }, - "iops_wr": { - "type": "integer", - "format": "int64", + "privacy_pass_phrase_starts_with": { + "type": "string", "nullable": true }, - "iops_wr_max": { - "type": "integer", - "format": "int64", + "privacy_protocol": { + "allOf": [ + { + "$ref": "#/components/schemas/SnmpPrivacyProtocol" + } + ], "nullable": true }, - "iops_wr_max_length": { - "type": "integer", - "format": "int64", + "privacy_protocol_in": { + "items": { + "$ref": "#/components/schemas/SnmpPrivacyProtocol" + }, + "type": "array", "nullable": true }, - "ip_whitelist": { - "type": "string" - }, - "iqn_name": { - "type": "string" - }, - "iqn_whitelist": { - "type": "string" + "privacy_protocol_not": { + "allOf": [ + { + "$ref": "#/components/schemas/SnmpPrivacyProtocol" + } + ], + "nullable": true }, - "labels": { + "privacy_protocol_not_in": { "items": { - "$ref": "#/components/schemas/NestedLabel" + "$ref": "#/components/schemas/SnmpPrivacyProtocol" }, "type": "array", "nullable": true }, - "local_id": { - "type": "string" + "protocol": { + "allOf": [ + { + "$ref": "#/components/schemas/SnmpProtocol" + } + ], + "nullable": true }, - "luns": { + "protocol_in": { "items": { - "$ref": "#/components/schemas/NestedIscsiLun" + "$ref": "#/components/schemas/SnmpProtocol" }, "type": "array", "nullable": true }, - "name": { - "type": "string" - }, - "replica_num": { - "type": "integer", - "format": "int32" - }, - "stripe_num": { - "type": "integer", - "format": "int32" + "protocol_not": { + "allOf": [ + { + "$ref": "#/components/schemas/SnmpProtocol" + } + ], + "nullable": true }, - "stripe_size": { - "type": "integer", - "format": "int64" + "protocol_not_in": { + "items": { + "$ref": "#/components/schemas/SnmpProtocol" + }, + "type": "array", + "nullable": true }, - "thin_provision": { - "type": "boolean" - } - }, - "required": [ - "chap_enabled", - "cluster", - "description", - "external_use", - "id", - "internal", - "ip_whitelist", - "iqn_name", - "iqn_whitelist", - "local_id", - "name", - "replica_num", - "stripe_num", - "stripe_size", - "thin_provision" - ], - "type": "object", - "additionalProperties": false - }, - "WithTask_IscsiTarget_": { - "properties": { - "task_id": { + "username": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/IscsiTarget" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "IscsiTargetCommonParamsInitiatorChaps": { - "properties": { - "chap_secret": { - "type": "string" - }, - "chap_name": { - "type": "string" - }, - "initiator_iqn": { - "type": "string" - } - }, - "required": [ - "chap_secret", - "chap_name", - "initiator_iqn" - ], - "type": "object" - }, - "IscsiTargetCommonParams": { - "properties": { - "bps_wr_max_length": { - "type": "integer", - "format": "int64" - }, - "bps_wr_max_unit": { - "$ref": "#/components/schemas/BPSUnit" - }, - "bps_wr_max_size": { - "$ref": "#/components/schemas/BPSUnit", - "deprecated": true - }, - "bps_wr_max": { - "type": "integer", - "format": "int64" - }, - "bps_rd_max_length": { - "type": "integer", - "format": "int64" - }, - "bps_rd_max_unit": { - "$ref": "#/components/schemas/BPSUnit" - }, - "bps_rd_max": { - "type": "integer", - "format": "int64" - }, - "bps_max_length": { - "type": "integer", - "format": "int64" - }, - "bps_max_unit": { - "$ref": "#/components/schemas/BPSUnit" - }, - "bps_max": { - "type": "integer", - "format": "int64" - }, - "iops_wr_max_length": { - "type": "integer", - "format": "int64" - }, - "iops_wr_max": { - "type": "integer", - "format": "int64" - }, - "iops_rd_max_length": { - "type": "integer", - "format": "int64" - }, - "iops_rd_max": { - "type": "integer", - "format": "int64" - }, - "iops_max_length": { - "type": "integer", - "format": "int64" - }, - "iops_max": { - "type": "integer", - "format": "int64" + "username_contains": { + "type": "string", + "nullable": true }, - "bps_wr_unit": { - "$ref": "#/components/schemas/BPSUnit" + "username_ends_with": { + "type": "string", + "nullable": true }, - "bps_wr": { - "type": "integer", - "format": "int64" + "username_gt": { + "type": "string", + "nullable": true }, - "bps_rd_unit": { - "$ref": "#/components/schemas/BPSUnit" + "username_gte": { + "type": "string", + "nullable": true }, - "bps_rd": { - "type": "integer", - "format": "int64" + "username_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true }, - "bps_unit": { - "$ref": "#/components/schemas/BPSUnit" + "username_lt": { + "type": "string", + "nullable": true }, - "bps": { - "type": "integer", - "format": "int64" + "username_lte": { + "type": "string", + "nullable": true }, - "iops_wr": { - "type": "integer", - "format": "int64" + "username_not": { + "type": "string", + "nullable": true }, - "iops_rd": { - "type": "integer", - "format": "int64" + "username_not_contains": { + "type": "string", + "nullable": true }, - "iops": { - "type": "integer", - "format": "int64" + "username_not_ends_with": { + "type": "string", + "nullable": true }, - "initiator_chaps": { + "username_not_in": { "items": { - "$ref": "#/components/schemas/IscsiTargetCommonParamsInitiatorChaps" + "type": "string" }, - "type": "array" + "type": "array", + "nullable": true }, - "chap_secret": { - "type": "string" + "username_not_starts_with": { + "type": "string", + "nullable": true }, - "chap_name": { - "type": "string" + "username_starts_with": { + "type": "string", + "nullable": true }, - "chap_enabled": { - "type": "boolean" + "version": { + "allOf": [ + { + "$ref": "#/components/schemas/SnmpVersion" + } + ], + "nullable": true }, - "description": { - "type": "string" + "version_in": { + "items": { + "$ref": "#/components/schemas/SnmpVersion" + }, + "type": "array", + "nullable": true }, - "iqn_whitelist": { - "type": "string" + "version_not": { + "allOf": [ + { + "$ref": "#/components/schemas/SnmpVersion" + } + ], + "nullable": true }, - "ip_whitelist": { - "type": "string" + "version_not_in": { + "items": { + "$ref": "#/components/schemas/SnmpVersion" + }, + "type": "array", + "nullable": true } }, - "type": "object" + "type": "object", + "additionalProperties": false }, - "IscsiTargetCreationParams": { - "allOf": [ - { + "SnmpTransportUpdationParams": { + "properties": { + "data": { "properties": { - "stripe_size_unit": { - "$ref": "#/components/schemas/ByteUnit" + "disabled": { + "type": "boolean" }, - "stripe_size": { - "type": "integer", - "format": "int64" + "privacy_protocol": { + "$ref": "#/components/schemas/SnmpPrivacyProtocol" }, - "stripe_num": { - "type": "integer", - "format": "int32" + "privacy_pass_phrase": { + "type": "string" }, - "replica_num": { + "auth_protocol": { + "$ref": "#/components/schemas/SnmpAuthProtocol" + }, + "auth_pass_phrase": { + "type": "string" + }, + "username": { + "type": "string" + }, + "community": { + "type": "string" + }, + "port": { "type": "integer", "format": "int32" }, - "thin_provision": { - "type": "boolean" + "protocol": { + "$ref": "#/components/schemas/SnmpProtocol" }, - "cluster_id": { - "type": "string" + "version": { + "$ref": "#/components/schemas/SnmpVersion" }, "name": { "type": "string" } }, - "required": [ - "stripe_size", - "stripe_num", - "replica_num", - "thin_provision", - "cluster_id", - "name" - ], "type": "object" }, - { - "$ref": "#/components/schemas/IscsiTargetCommonParams" - } - ] - }, - "IscsiTargetUpdationParams": { - "properties": { - "data": { - "$ref": "#/components/schemas/IscsiTargetCommonParams" - }, "where": { - "$ref": "#/components/schemas/IscsiTargetWhereInput" + "$ref": "#/components/schemas/SnmpTransportWhereInput" } }, "required": [ @@ -75401,7 +76013,7 @@ ], "type": "object" }, - "DeleteIscsiTarget": { + "DeleteSnmpTransport": { "properties": { "id": { "type": "string" @@ -75412,14 +76024,14 @@ ], "type": "object" }, - "WithTask_DeleteIscsiTarget_": { + "WithTask_DeleteSnmpTransport_": { "properties": { "task_id": { "type": "string", "nullable": true }, "data": { - "$ref": "#/components/schemas/DeleteIscsiTarget" + "$ref": "#/components/schemas/DeleteSnmpTransport" } }, "required": [ @@ -75427,10 +76039,10 @@ ], "type": "object" }, - "IscsiTargetDeletionParams": { + "SnmpTransportDeletionParams": { "properties": { "where": { - "$ref": "#/components/schemas/IscsiTargetWhereInput" + "$ref": "#/components/schemas/SnmpTransportWhereInput" } }, "required": [ @@ -75438,42 +76050,40 @@ ], "type": "object" }, - "NestedContentLibraryImage": { - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" + "SnmpLanguageCode": { + "enum": [ + "EN_US", + "ZH_CN" ], - "type": "object", - "additionalProperties": false + "type": "string" }, - "ElfImage": { + "SnmpTrapReceiver": { "properties": { - "cluster": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedCluster" - } - ], + "auth_pass_phrase": { + "type": "string", "nullable": true }, - "content_library_image": { + "auth_protocol": { "allOf": [ { - "$ref": "#/components/schemas/NestedContentLibraryImage" + "$ref": "#/components/schemas/SnmpAuthProtocol" } ], "nullable": true }, - "description": { - "type": "string" + "cluster": { + "$ref": "#/components/schemas/NestedCluster" + }, + "community": { + "type": "string", + "nullable": true + }, + "disabled": { + "type": "boolean" + }, + "engine_id": { + "type": "string", + "nullable": true }, "entityAsyncStatus": { "allOf": [ @@ -75483,18 +76093,17 @@ ], "nullable": true }, + "host": { + "type": "string" + }, "id": { "type": "string" }, - "labels": { - "items": { - "$ref": "#/components/schemas/NestedLabel" - }, - "type": "array", - "nullable": true + "inform": { + "type": "boolean" }, - "local_created_at": { - "type": "string" + "language_code": { + "$ref": "#/components/schemas/SnmpLanguageCode" }, "local_id": { "type": "string" @@ -75502,55 +76111,57 @@ "name": { "type": "string" }, - "path": { - "type": "string" - }, - "size": { + "port": { "type": "integer", - "format": "int64" + "format": "int32" }, - "vm_disks": { - "items": { - "$ref": "#/components/schemas/NestedVmDisk" - }, - "type": "array", + "privacy_pass_phrase": { + "type": "string", "nullable": true }, - "vm_snapshots": { - "items": { - "$ref": "#/components/schemas/NestedVmSnapshot" - }, - "type": "array", + "privacy_protocol": { + "allOf": [ + { + "$ref": "#/components/schemas/SnmpPrivacyProtocol" + } + ], "nullable": true }, - "vm_templates": { - "items": { - "$ref": "#/components/schemas/NestedVmTemplate" - }, - "type": "array", + "protocol": { + "$ref": "#/components/schemas/SnmpProtocol" + }, + "username": { + "type": "string", "nullable": true + }, + "version": { + "$ref": "#/components/schemas/SnmpVersion" } }, "required": [ - "description", + "cluster", + "disabled", + "host", "id", - "local_created_at", + "inform", + "language_code", "local_id", "name", - "path", - "size" + "port", + "protocol", + "version" ], "type": "object", "additionalProperties": false }, - "WithTask_ElfImage_": { + "WithTask_SnmpTrapReceiver_": { "properties": { "task_id": { "type": "string", "nullable": true }, "data": { - "$ref": "#/components/schemas/ElfImage" + "$ref": "#/components/schemas/SnmpTrapReceiver" } }, "required": [ @@ -75558,1120 +76169,516 @@ ], "type": "object" }, - "ElfImageUpdationParams": { + "SnmpTrapReceiverCreationParams": { "properties": { - "data": { - "properties": { - "description": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "type": "object" + "disabled": { + "type": "boolean" }, - "where": { - "$ref": "#/components/schemas/ElfImageWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "DeleteElfImage": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "WithTask_DeleteElfImage_": { - "properties": { - "task_id": { - "type": "string", - "nullable": true + "inform": { + "type": "boolean" }, - "data": { - "$ref": "#/components/schemas/DeleteElfImage" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "ElfImageDeletionParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/ElfImageWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "NestedNamespaceGroup": { - "properties": { - "id": { + "engine_id": { "type": "string" }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "type": "object", - "additionalProperties": false - }, - "NestedNfsExport": { - "properties": { - "id": { - "type": "string" + "privacy_protocol": { + "$ref": "#/components/schemas/SnmpPrivacyProtocol" }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "type": "object", - "additionalProperties": false - }, - "NestedNfsInode": { - "properties": { - "id": { + "privacy_pass_phrase": { "type": "string" }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "type": "object", - "additionalProperties": false - }, - "NestedNvmfSubsystem": { - "properties": { - "id": { - "type": "string" + "auth_protocol": { + "$ref": "#/components/schemas/SnmpAuthProtocol" }, - "name": { + "auth_pass_phrase": { "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "type": "object", - "additionalProperties": false - }, - "NestedSecurityPolicy": { - "properties": { - "id": { + }, + "username": { "type": "string" }, - "name": { + "community": { "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "type": "object", - "additionalProperties": false - }, - "NestedVlan": { - "properties": { - "id": { + }, + "language_code": { + "$ref": "#/components/schemas/SnmpLanguageCode" + }, + "port": { + "type": "integer", + "format": "int32" + }, + "host": { "type": "string" }, + "protocol": { + "$ref": "#/components/schemas/SnmpProtocol" + }, + "version": { + "$ref": "#/components/schemas/SnmpVersion" + }, "name": { "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "type": "object", - "additionalProperties": false - }, - "NestedVmVolumeSnapshot": { - "properties": { - "id": { - "type": "string" }, - "name": { + "cluster_id": { "type": "string" } }, "required": [ - "id", - "name" + "language_code", + "port", + "host", + "protocol", + "version", + "name", + "cluster_id" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "Label": { + "SnmpTrapReceiverWhereInput": { "properties": { - "cluster_num": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "clusters": { + "AND": { "items": { - "$ref": "#/components/schemas/NestedCluster" + "$ref": "#/components/schemas/SnmpTrapReceiverWhereInput" }, "type": "array", "nullable": true }, - "consistency_group_num": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "consistency_group_snapshot_num": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "consistency_group_snapshots": { + "NOT": { "items": { - "$ref": "#/components/schemas/NestedConsistencyGroupSnapshot" + "$ref": "#/components/schemas/SnmpTrapReceiverWhereInput" }, "type": "array", "nullable": true }, - "consistency_groups": { + "OR": { "items": { - "$ref": "#/components/schemas/NestedConsistencyGroup" + "$ref": "#/components/schemas/SnmpTrapReceiverWhereInput" }, "type": "array", "nullable": true }, - "content_library_image_num": { - "type": "integer", - "format": "int32", + "auth_pass_phrase": { + "type": "string", "nullable": true }, - "content_library_images": { - "items": { - "$ref": "#/components/schemas/NestedContentLibraryImage" - }, - "type": "array", + "auth_pass_phrase_contains": { + "type": "string", "nullable": true }, - "content_library_vm_template_num": { - "type": "integer", - "format": "int32", + "auth_pass_phrase_ends_with": { + "type": "string", "nullable": true }, - "content_library_vm_templates": { - "items": { - "$ref": "#/components/schemas/NestedContentLibraryVmTemplate" - }, - "type": "array", + "auth_pass_phrase_gt": { + "type": "string", "nullable": true }, - "createdAt": { - "type": "string" - }, - "datacenter_num": { - "type": "integer", - "format": "int32", + "auth_pass_phrase_gte": { + "type": "string", "nullable": true }, - "datacenters": { + "auth_pass_phrase_in": { "items": { - "$ref": "#/components/schemas/NestedDatacenter" + "type": "string" }, "type": "array", "nullable": true }, - "disk_num": { - "type": "integer", - "format": "int32", + "auth_pass_phrase_lt": { + "type": "string", "nullable": true }, - "disks": { - "items": { - "$ref": "#/components/schemas/NestedDisk" - }, - "type": "array", + "auth_pass_phrase_lte": { + "type": "string", "nullable": true }, - "elf_image_num": { - "type": "integer", - "format": "int32", + "auth_pass_phrase_not": { + "type": "string", "nullable": true }, - "elf_images": { - "items": { - "$ref": "#/components/schemas/NestedElfImage" - }, - "type": "array", + "auth_pass_phrase_not_contains": { + "type": "string", "nullable": true }, - "gpu_device_num": { - "type": "integer", - "format": "int32", + "auth_pass_phrase_not_ends_with": { + "type": "string", "nullable": true }, - "gpu_devices": { + "auth_pass_phrase_not_in": { "items": { - "$ref": "#/components/schemas/NestedGpuDevice" + "type": "string" }, "type": "array", "nullable": true }, - "host_num": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "hosts": { - "items": { - "$ref": "#/components/schemas/NestedHost" - }, - "type": "array", + "auth_pass_phrase_not_starts_with": { + "type": "string", "nullable": true }, - "id": { - "type": "string" - }, - "iscsi_lun_num": { - "type": "integer", - "format": "int32", + "auth_pass_phrase_starts_with": { + "type": "string", "nullable": true }, - "iscsi_lun_snapshot_num": { - "type": "integer", - "format": "int32", + "auth_protocol": { + "allOf": [ + { + "$ref": "#/components/schemas/SnmpAuthProtocol" + } + ], "nullable": true }, - "iscsi_lun_snapshots": { + "auth_protocol_in": { "items": { - "$ref": "#/components/schemas/NestedIscsiLunSnapshot" + "$ref": "#/components/schemas/SnmpAuthProtocol" }, "type": "array", "nullable": true }, - "iscsi_luns": { + "auth_protocol_not": { + "allOf": [ + { + "$ref": "#/components/schemas/SnmpAuthProtocol" + } + ], + "nullable": true + }, + "auth_protocol_not_in": { "items": { - "$ref": "#/components/schemas/NestedIscsiLun" + "$ref": "#/components/schemas/SnmpAuthProtocol" }, "type": "array", "nullable": true }, - "iscsi_target_num": { - "type": "integer", - "format": "int32", + "cluster": { + "allOf": [ + { + "$ref": "#/components/schemas/ClusterWhereInput" + } + ], "nullable": true }, - "iscsi_targets": { - "items": { - "$ref": "#/components/schemas/NestedIscsiTarget" - }, - "type": "array", + "community": { + "type": "string", "nullable": true }, - "isolation_policies": { - "items": { - "$ref": "#/components/schemas/NestedIsolationPolicy" - }, - "type": "array", + "community_contains": { + "type": "string", "nullable": true }, - "isolation_policy_num": { - "type": "integer", - "format": "int32", + "community_ends_with": { + "type": "string", "nullable": true }, - "key": { - "type": "string" + "community_gt": { + "type": "string", + "nullable": true }, - "namespace_group_num": { - "type": "integer", - "format": "int32", + "community_gte": { + "type": "string", "nullable": true }, - "namespace_groups": { + "community_in": { "items": { - "$ref": "#/components/schemas/NestedNamespaceGroup" + "type": "string" }, "type": "array", "nullable": true }, - "nfs_export_num": { - "type": "integer", - "format": "int32", + "community_lt": { + "type": "string", "nullable": true }, - "nfs_exports": { - "items": { - "$ref": "#/components/schemas/NestedNfsExport" - }, - "type": "array", + "community_lte": { + "type": "string", "nullable": true }, - "nfs_inode_num": { - "type": "integer", - "format": "int32", + "community_not": { + "type": "string", "nullable": true }, - "nfs_inodes": { - "items": { - "$ref": "#/components/schemas/NestedNfsInode" - }, - "type": "array", + "community_not_contains": { + "type": "string", "nullable": true }, - "nic_num": { - "type": "integer", - "format": "int32", + "community_not_ends_with": { + "type": "string", "nullable": true }, - "nics": { + "community_not_in": { "items": { - "$ref": "#/components/schemas/NestedNic" + "type": "string" }, "type": "array", "nullable": true }, - "nvmf_namespace_num": { - "type": "integer", - "format": "int32", + "community_not_starts_with": { + "type": "string", "nullable": true }, - "nvmf_namespace_snapshot_num": { - "type": "integer", - "format": "int32", + "community_starts_with": { + "type": "string", "nullable": true }, - "nvmf_namespace_snapshots": { - "items": { - "$ref": "#/components/schemas/NestedNvmfNamespaceSnapshot" - }, - "type": "array", + "disabled": { + "type": "boolean", "nullable": true }, - "nvmf_namespaces": { - "items": { - "$ref": "#/components/schemas/NestedNvmfNamespace" - }, - "type": "array", + "disabled_not": { + "type": "boolean", "nullable": true }, - "nvmf_subsystem_num": { - "type": "integer", - "format": "int32", + "engine_id": { + "type": "string", "nullable": true }, - "nvmf_subsystems": { - "items": { - "$ref": "#/components/schemas/NestedNvmfSubsystem" - }, - "type": "array", + "engine_id_contains": { + "type": "string", "nullable": true }, - "security_policies": { + "engine_id_ends_with": { + "type": "string", + "nullable": true + }, + "engine_id_gt": { + "type": "string", + "nullable": true + }, + "engine_id_gte": { + "type": "string", + "nullable": true + }, + "engine_id_in": { "items": { - "$ref": "#/components/schemas/NestedSecurityPolicy" + "type": "string" }, "type": "array", "nullable": true }, - "security_policy_num": { - "type": "integer", - "format": "int32", + "engine_id_lt": { + "type": "string", "nullable": true }, - "system_vlan_num": { - "type": "integer", - "format": "int32", + "engine_id_lte": { + "type": "string", "nullable": true }, - "total_num": { - "type": "integer", - "format": "int32", + "engine_id_not": { + "type": "string", "nullable": true }, - "value": { + "engine_id_not_contains": { "type": "string", "nullable": true }, - "vds_num": { - "type": "integer", - "format": "int32", + "engine_id_not_ends_with": { + "type": "string", "nullable": true }, - "vdses": { + "engine_id_not_in": { "items": { - "$ref": "#/components/schemas/NestedVds" + "type": "string" }, "type": "array", "nullable": true }, - "vlans": { - "items": { - "$ref": "#/components/schemas/NestedVlan" - }, - "type": "array", + "engine_id_not_starts_with": { + "type": "string", "nullable": true }, - "vm_num": { - "type": "integer", - "format": "int32", + "engine_id_starts_with": { + "type": "string", "nullable": true }, - "vm_snapshot_num": { - "type": "integer", - "format": "int32", + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], "nullable": true }, - "vm_snapshots": { + "entityAsyncStatus_in": { "items": { - "$ref": "#/components/schemas/NestedVmSnapshot" + "$ref": "#/components/schemas/EntityAsyncStatus" }, "type": "array", "nullable": true }, - "vm_template_num": { - "type": "integer", - "format": "int32", + "entityAsyncStatus_not": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], "nullable": true }, - "vm_templates": { + "entityAsyncStatus_not_in": { "items": { - "$ref": "#/components/schemas/NestedVmTemplate" + "$ref": "#/components/schemas/EntityAsyncStatus" }, "type": "array", "nullable": true }, - "vm_vlan_num": { - "type": "integer", - "format": "int32", + "host": { + "type": "string", "nullable": true }, - "vm_volume_num": { - "type": "integer", - "format": "int32", + "host_contains": { + "type": "string", "nullable": true }, - "vm_volume_snapshot_num": { - "type": "integer", - "format": "int32", + "host_ends_with": { + "type": "string", "nullable": true }, - "vm_volume_snapshots": { - "items": { - "$ref": "#/components/schemas/NestedVmVolumeSnapshot" - }, - "type": "array", + "host_gt": { + "type": "string", "nullable": true }, - "vm_volumes": { - "items": { - "$ref": "#/components/schemas/NestedVmVolume" - }, - "type": "array", + "host_gte": { + "type": "string", "nullable": true }, - "vms": { + "host_in": { "items": { - "$ref": "#/components/schemas/NestedVm" + "type": "string" }, "type": "array", "nullable": true - } - }, - "required": [ - "createdAt", - "id", - "key" - ], - "type": "object", - "additionalProperties": false - }, - "WithTask_Label_": { - "properties": { - "task_id": { + }, + "host_lt": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/Label" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "LabelCreationParams": { - "properties": { - "value": { - "type": "string" - }, - "key": { - "type": "string" - } - }, - "required": [ - "key" - ], - "type": "object" - }, - "LabelUpdationParams": { - "properties": { - "data": { - "properties": { - "value": { - "type": "string" - }, - "key": { - "type": "string" - } - }, - "type": "object" - }, - "where": { - "$ref": "#/components/schemas/LabelWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "AddLabelsToResourcesParams": { - "properties": { - "data": { - "properties": { - "gpu_devices": { - "$ref": "#/components/schemas/GpuDeviceWhereInput" - }, - "content_library_vm_templates": { - "$ref": "#/components/schemas/ContentLibraryVmTemplateWhereInput" - }, - "content_library_images": { - "$ref": "#/components/schemas/ContentLibraryImageWhereInput" - }, - "isolation_policies": { - "$ref": "#/components/schemas/IsolationPolicyWhereInput" - }, - "security_policies": { - "$ref": "#/components/schemas/SecurityPolicyWhereInput" - }, - "vms": { - "$ref": "#/components/schemas/VmWhereInput" - }, - "vm_volume_snapshots": { - "$ref": "#/components/schemas/VmVolumeSnapshotWhereInput" - }, - "vm_volumes": { - "$ref": "#/components/schemas/VmVolumeWhereInput" - }, - "vm_templates": { - "$ref": "#/components/schemas/VmTemplateWhereInput" - }, - "vm_snapshots": { - "$ref": "#/components/schemas/VmSnapshotWhereInput" - }, - "vlans": { - "$ref": "#/components/schemas/VlanWhereInput" - }, - "vdses": { - "$ref": "#/components/schemas/VdsWhereInput" - }, - "nvmf_subsystems": { - "$ref": "#/components/schemas/NvmfSubsystemWhereInput" - }, - "nvmf_namespace_snapshots": { - "$ref": "#/components/schemas/NvmfNamespaceSnapshotWhereInput" - }, - "nvmf_namespaces": { - "$ref": "#/components/schemas/NvmfNamespaceWhereInput" - }, - "nics": { - "$ref": "#/components/schemas/NicWhereInput" - }, - "nfs_inodes": { - "$ref": "#/components/schemas/NfsInodeWhereInput" - }, - "nfs_exports": { - "$ref": "#/components/schemas/NfsExportWhereInput" - }, - "namespace_groups": { - "$ref": "#/components/schemas/NamespaceGroupWhereInput" - }, - "iscsi_targets": { - "$ref": "#/components/schemas/IscsiTargetWhereInput" - }, - "iscsi_lun_snapshots": { - "$ref": "#/components/schemas/IscsiLunSnapshotWhereInput" - }, - "iscsi_luns": { - "$ref": "#/components/schemas/IscsiLunWhereInput" - }, - "hosts": { - "$ref": "#/components/schemas/HostWhereInput" - }, - "elf_images": { - "$ref": "#/components/schemas/ElfImageWhereInput" - }, - "disks": { - "$ref": "#/components/schemas/DiskWhereInput" - }, - "datacenters": { - "$ref": "#/components/schemas/DatacenterWhereInput" - }, - "consistency_group_snapshots": { - "$ref": "#/components/schemas/ConsistencyGroupSnapshotWhereInput" - }, - "consistency_groups": { - "$ref": "#/components/schemas/ConsistencyGroupWhereInput" - }, - "clusters": { - "$ref": "#/components/schemas/ClusterWhereInput" - } - }, - "type": "object" + "host_lte": { + "type": "string", + "nullable": true }, - "where": { - "$ref": "#/components/schemas/LabelWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "RemoveLabelsFromResourcesParams": { - "$ref": "#/components/schemas/AddLabelsToResourcesParams" - }, - "DeleteLabel": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "WithTask_DeleteLabel_": { - "properties": { - "task_id": { + "host_not": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/DeleteLabel" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "LabelDeletionParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/LabelWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "License": { - "properties": { - "expire_date": { - "type": "string" + "host_not_contains": { + "type": "string", + "nullable": true }, - "id": { - "type": "string" + "host_not_ends_with": { + "type": "string", + "nullable": true }, - "license_serial": { - "type": "string" + "host_not_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true }, - "maintenance_end_date": { + "host_not_starts_with": { "type": "string", "nullable": true }, - "maintenance_start_date": { + "host_starts_with": { "type": "string", "nullable": true }, - "max_chunk_num": { - "type": "integer", - "format": "int32" - }, - "max_cluster_num": { - "type": "integer", - "format": "int32" + "id": { + "type": "string", + "nullable": true }, - "sign_date": { - "type": "string" + "id_contains": { + "type": "string", + "nullable": true }, - "software_edition": { - "$ref": "#/components/schemas/SoftwareEdition" + "id_ends_with": { + "type": "string", + "nullable": true }, - "type": { - "$ref": "#/components/schemas/LicenseType" - } - }, - "required": [ - "expire_date", - "id", - "license_serial", - "max_chunk_num", - "max_cluster_num", - "sign_date", - "software_edition", - "type" - ], - "type": "object", - "additionalProperties": false - }, - "WithTask_License_": { - "properties": { - "task_id": { + "id_gt": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/License" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "LicenseUpdationParams": { - "properties": { - "data": { - "properties": { - "license": { - "type": "string" - } - }, - "required": [ - "license" - ], - "type": "object" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "LogCollectionStatus": { - "enum": [ - "EXECUTING", - "FAILED", - "STOPPING", - "SUCCESSED" - ], - "type": "string" - }, - "LogCollection": { - "properties": { - "cluster": { - "$ref": "#/components/schemas/NestedCluster" + "id_gte": { + "type": "string", + "nullable": true }, - "groups": { + "id_in": { "items": { "type": "string" }, - "type": "array" - }, - "hosts": { - "items": { - "$ref": "#/components/schemas/NestedHost" - }, "type": "array", "nullable": true }, - "id": { - "type": "string" - }, - "local_id": { - "type": "string" - }, - "log_ended_at": { - "type": "string" - }, - "log_started_at": { - "type": "string" + "id_lt": { + "type": "string", + "nullable": true }, - "owner": { - "type": "string" + "id_lte": { + "type": "string", + "nullable": true }, - "path": { - "type": "string" + "id_not": { + "type": "string", + "nullable": true }, - "progress": { - "type": "number", - "format": "double" + "id_not_contains": { + "type": "string", + "nullable": true }, - "service_groups": { - "properties": {}, - "type": "object", + "id_not_ends_with": { + "type": "string", "nullable": true }, - "services": { + "id_not_in": { "items": { "type": "string" }, - "type": "array" - }, - "size": { - "type": "integer", - "format": "int64" + "type": "array", + "nullable": true }, - "started_at": { - "type": "string" + "id_not_starts_with": { + "type": "string", + "nullable": true }, - "status": { - "$ref": "#/components/schemas/LogCollectionStatus" + "id_starts_with": { + "type": "string", + "nullable": true }, - "witness": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedWitness" - } - ], - "nullable": true - } - }, - "required": [ - "cluster", - "groups", - "id", - "local_id", - "log_ended_at", - "log_started_at", - "owner", - "path", - "progress", - "services", - "size", - "started_at", - "status" - ], - "type": "object", - "additionalProperties": false - }, - "WithTask_LogCollection_": { - "properties": { - "task_id": { - "type": "string", - "nullable": true - }, - "data": { - "$ref": "#/components/schemas/LogCollection" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "LogCollectionServiceGroupParams": { - "properties": { - "services": { - "items": { - "type": "string" - }, - "type": "array" - }, - "group_name": { - "type": "string" - } - }, - "required": [ - "group_name" - ], - "type": "object" - }, - "LogCollectionCreationParams": { - "properties": { - "witness_id": { - "type": "string" - }, - "service_groups": { - "items": { - "$ref": "#/components/schemas/LogCollectionServiceGroupParams" - }, - "type": "array" - }, - "log_ended_at": { - "type": "string", - "format": "date-time" - }, - "log_started_at": { - "type": "string", - "format": "date-time" - }, - "cluster_id": { - "type": "string" - }, - "hosts": { - "$ref": "#/components/schemas/HostWhereInput" - } - }, - "required": [ - "log_ended_at", - "log_started_at", - "cluster_id", - "hosts" - ], - "type": "object" - }, - "LogCollectionWhereInput": { - "properties": { - "AND": { - "items": { - "$ref": "#/components/schemas/LogCollectionWhereInput" - }, - "type": "array", - "nullable": true - }, - "NOT": { - "items": { - "$ref": "#/components/schemas/LogCollectionWhereInput" - }, - "type": "array", - "nullable": true - }, - "OR": { - "items": { - "$ref": "#/components/schemas/LogCollectionWhereInput" - }, - "type": "array", + "inform": { + "type": "boolean", "nullable": true }, - "cluster": { - "allOf": [ - { - "$ref": "#/components/schemas/ClusterWhereInput" - } - ], + "inform_not": { + "type": "boolean", "nullable": true }, - "hosts_every": { + "language_code": { "allOf": [ { - "$ref": "#/components/schemas/HostWhereInput" + "$ref": "#/components/schemas/SnmpLanguageCode" } ], "nullable": true }, - "hosts_none": { - "allOf": [ - { - "$ref": "#/components/schemas/HostWhereInput" - } - ], + "language_code_in": { + "items": { + "$ref": "#/components/schemas/SnmpLanguageCode" + }, + "type": "array", "nullable": true }, - "hosts_some": { + "language_code_not": { "allOf": [ { - "$ref": "#/components/schemas/HostWhereInput" + "$ref": "#/components/schemas/SnmpLanguageCode" } ], "nullable": true }, - "id": { - "type": "string", - "nullable": true - }, - "id_contains": { - "type": "string", - "nullable": true - }, - "id_ends_with": { - "type": "string", - "nullable": true - }, - "id_gt": { - "type": "string", - "nullable": true - }, - "id_gte": { - "type": "string", - "nullable": true - }, - "id_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true - }, - "id_lt": { - "type": "string", - "nullable": true - }, - "id_lte": { - "type": "string", - "nullable": true - }, - "id_not": { - "type": "string", - "nullable": true - }, - "id_not_contains": { - "type": "string", - "nullable": true - }, - "id_not_ends_with": { - "type": "string", - "nullable": true - }, - "id_not_in": { + "language_code_not_in": { "items": { - "type": "string" + "$ref": "#/components/schemas/SnmpLanguageCode" }, "type": "array", "nullable": true }, - "id_not_starts_with": { - "type": "string", - "nullable": true - }, - "id_starts_with": { - "type": "string", - "nullable": true - }, "local_id": { "type": "string", "nullable": true @@ -76734,408 +76741,414 @@ "type": "string", "nullable": true }, - "log_ended_at": { - "type": "string", - "nullable": true - }, - "log_ended_at_gt": { + "name": { "type": "string", "nullable": true }, - "log_ended_at_gte": { + "name_contains": { "type": "string", "nullable": true }, - "log_ended_at_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true - }, - "log_ended_at_lt": { + "name_ends_with": { "type": "string", "nullable": true }, - "log_ended_at_lte": { + "name_gt": { "type": "string", "nullable": true }, - "log_ended_at_not": { + "name_gte": { "type": "string", "nullable": true }, - "log_ended_at_not_in": { + "name_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "log_started_at": { - "type": "string", - "nullable": true - }, - "log_started_at_gt": { + "name_lt": { "type": "string", "nullable": true }, - "log_started_at_gte": { + "name_lte": { "type": "string", "nullable": true }, - "log_started_at_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true - }, - "log_started_at_lt": { + "name_not": { "type": "string", "nullable": true }, - "log_started_at_lte": { + "name_not_contains": { "type": "string", "nullable": true }, - "log_started_at_not": { + "name_not_ends_with": { "type": "string", "nullable": true }, - "log_started_at_not_in": { + "name_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "owner": { + "name_not_starts_with": { "type": "string", "nullable": true }, - "owner_contains": { + "name_starts_with": { "type": "string", "nullable": true }, - "owner_ends_with": { - "type": "string", + "port": { + "type": "integer", + "format": "int32", "nullable": true }, - "owner_gt": { - "type": "string", + "port_gt": { + "type": "integer", + "format": "int32", "nullable": true }, - "owner_gte": { - "type": "string", + "port_gte": { + "type": "integer", + "format": "int32", "nullable": true }, - "owner_in": { + "port_in": { "items": { - "type": "string" + "type": "integer", + "format": "int32" }, "type": "array", "nullable": true }, - "owner_lt": { - "type": "string", - "nullable": true - }, - "owner_lte": { - "type": "string", - "nullable": true - }, - "owner_not": { - "type": "string", + "port_lt": { + "type": "integer", + "format": "int32", "nullable": true }, - "owner_not_contains": { - "type": "string", + "port_lte": { + "type": "integer", + "format": "int32", "nullable": true }, - "owner_not_ends_with": { - "type": "string", + "port_not": { + "type": "integer", + "format": "int32", "nullable": true }, - "owner_not_in": { + "port_not_in": { "items": { - "type": "string" + "type": "integer", + "format": "int32" }, "type": "array", "nullable": true }, - "owner_not_starts_with": { - "type": "string", - "nullable": true - }, - "owner_starts_with": { - "type": "string", - "nullable": true - }, - "path": { + "privacy_pass_phrase": { "type": "string", "nullable": true }, - "path_contains": { + "privacy_pass_phrase_contains": { "type": "string", "nullable": true }, - "path_ends_with": { + "privacy_pass_phrase_ends_with": { "type": "string", "nullable": true }, - "path_gt": { + "privacy_pass_phrase_gt": { "type": "string", "nullable": true }, - "path_gte": { + "privacy_pass_phrase_gte": { "type": "string", "nullable": true }, - "path_in": { + "privacy_pass_phrase_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "path_lt": { + "privacy_pass_phrase_lt": { "type": "string", "nullable": true }, - "path_lte": { + "privacy_pass_phrase_lte": { "type": "string", "nullable": true }, - "path_not": { + "privacy_pass_phrase_not": { "type": "string", "nullable": true }, - "path_not_contains": { + "privacy_pass_phrase_not_contains": { "type": "string", "nullable": true }, - "path_not_ends_with": { + "privacy_pass_phrase_not_ends_with": { "type": "string", "nullable": true }, - "path_not_in": { + "privacy_pass_phrase_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "path_not_starts_with": { + "privacy_pass_phrase_not_starts_with": { "type": "string", "nullable": true }, - "path_starts_with": { + "privacy_pass_phrase_starts_with": { "type": "string", "nullable": true }, - "progress": { - "type": "number", - "format": "double", - "nullable": true - }, - "progress_gt": { - "type": "number", - "format": "double", - "nullable": true - }, - "progress_gte": { - "type": "number", - "format": "double", + "privacy_protocol": { + "allOf": [ + { + "$ref": "#/components/schemas/SnmpPrivacyProtocol" + } + ], "nullable": true }, - "progress_in": { + "privacy_protocol_in": { "items": { - "type": "number", - "format": "double" + "$ref": "#/components/schemas/SnmpPrivacyProtocol" }, "type": "array", "nullable": true }, - "progress_lt": { - "type": "number", - "format": "double", - "nullable": true - }, - "progress_lte": { - "type": "number", - "format": "double", - "nullable": true - }, - "progress_not": { - "type": "number", - "format": "double", + "privacy_protocol_not": { + "allOf": [ + { + "$ref": "#/components/schemas/SnmpPrivacyProtocol" + } + ], "nullable": true }, - "progress_not_in": { + "privacy_protocol_not_in": { "items": { - "type": "number", - "format": "double" + "$ref": "#/components/schemas/SnmpPrivacyProtocol" }, "type": "array", "nullable": true }, - "size": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "size_gt": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "size_gte": { - "type": "integer", - "format": "int64", + "protocol": { + "allOf": [ + { + "$ref": "#/components/schemas/SnmpProtocol" + } + ], "nullable": true }, - "size_in": { + "protocol_in": { "items": { - "type": "integer", - "format": "int64" + "$ref": "#/components/schemas/SnmpProtocol" }, "type": "array", "nullable": true }, - "size_lt": { - "type": "integer", - "format": "int64", + "protocol_not": { + "allOf": [ + { + "$ref": "#/components/schemas/SnmpProtocol" + } + ], "nullable": true }, - "size_lte": { - "type": "integer", - "format": "int64", + "protocol_not_in": { + "items": { + "$ref": "#/components/schemas/SnmpProtocol" + }, + "type": "array", "nullable": true }, - "size_not": { - "type": "integer", - "format": "int64", + "username": { + "type": "string", "nullable": true }, - "size_not_in": { - "items": { - "type": "integer", - "format": "int64" - }, - "type": "array", + "username_contains": { + "type": "string", "nullable": true }, - "started_at": { + "username_ends_with": { "type": "string", "nullable": true }, - "started_at_gt": { + "username_gt": { "type": "string", "nullable": true }, - "started_at_gte": { + "username_gte": { "type": "string", "nullable": true }, - "started_at_in": { + "username_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "started_at_lt": { + "username_lt": { "type": "string", "nullable": true }, - "started_at_lte": { + "username_lte": { "type": "string", "nullable": true }, - "started_at_not": { + "username_not": { "type": "string", "nullable": true }, - "started_at_not_in": { + "username_not_contains": { + "type": "string", + "nullable": true + }, + "username_not_ends_with": { + "type": "string", + "nullable": true + }, + "username_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "status": { + "username_not_starts_with": { + "type": "string", + "nullable": true + }, + "username_starts_with": { + "type": "string", + "nullable": true + }, + "version": { "allOf": [ { - "$ref": "#/components/schemas/LogCollectionStatus" + "$ref": "#/components/schemas/SnmpVersion" } ], "nullable": true }, - "status_in": { + "version_in": { "items": { - "$ref": "#/components/schemas/LogCollectionStatus" + "$ref": "#/components/schemas/SnmpVersion" }, "type": "array", "nullable": true }, - "status_not": { + "version_not": { "allOf": [ { - "$ref": "#/components/schemas/LogCollectionStatus" + "$ref": "#/components/schemas/SnmpVersion" } ], "nullable": true }, - "status_not_in": { + "version_not_in": { "items": { - "$ref": "#/components/schemas/LogCollectionStatus" + "$ref": "#/components/schemas/SnmpVersion" }, "type": "array", "nullable": true - }, - "witness": { - "allOf": [ - { - "$ref": "#/components/schemas/WitnessWhereInput" - } - ], - "nullable": true } }, "type": "object", "additionalProperties": false }, - "ForceStopLogCollectionParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/LogCollectionWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "DeleteLogCollection": { + "SnmpTrapReceiverUpdationParams": { "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" + "data": { + "properties": { + "disabled": { + "type": "boolean" + }, + "inform": { + "type": "boolean" + }, + "engine_id": { + "type": "string" + }, + "privacy_protocol": { + "$ref": "#/components/schemas/SnmpPrivacyProtocol" + }, + "privacy_pass_phrase": { + "type": "string" + }, + "auth_protocol": { + "$ref": "#/components/schemas/SnmpAuthProtocol" + }, + "auth_pass_phrase": { + "type": "string" + }, + "username": { + "type": "string" + }, + "community": { + "type": "string" + }, + "language_code": { + "$ref": "#/components/schemas/SnmpLanguageCode" + }, + "port": { + "type": "integer", + "format": "int32" + }, + "host": { + "type": "string" + }, + "protocol": { + "$ref": "#/components/schemas/SnmpProtocol" + }, + "version": { + "$ref": "#/components/schemas/SnmpVersion" + }, + "name": { + "type": "string" + } + }, + "type": "object" + }, + "where": { + "$ref": "#/components/schemas/SnmpTrapReceiverWhereInput" + } + }, + "required": [ + "data", + "where" ], "type": "object" }, - "WithTask_DeleteLogCollection_": { + "DeleteSnmpTrapReceiver": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "WithTask_DeleteSnmpTrapReceiver_": { "properties": { "task_id": { "type": "string", "nullable": true }, "data": { - "$ref": "#/components/schemas/DeleteLogCollection" + "$ref": "#/components/schemas/DeleteSnmpTrapReceiver" } }, "required": [ @@ -77143,10 +77156,10 @@ ], "type": "object" }, - "LogCollectionDeletionParams": { + "SnmpTrapReceiverDeletionParams": { "properties": { "where": { - "$ref": "#/components/schemas/LogCollectionWhereInput" + "$ref": "#/components/schemas/SnmpTrapReceiverWhereInput" } }, "required": [ @@ -77154,3610 +77167,3527 @@ ], "type": "object" }, - "MetricLabel": { + "ColumnConfig": { "properties": { - "to_hostname": { - "type": "string", - "nullable": true + "name": { + "type": "string" }, - "serial_number": { + "path": { + "type": "string" + } + }, + "required": [ + "name", + "path" + ], + "type": "object" + }, + "HostOrderByInput": { + "enum": [ + "access_ip_ASC", + "access_ip_DESC", + "allocable_cpu_cores_for_vm_exclusive_ASC", + "allocable_cpu_cores_for_vm_exclusive_DESC", + "allocatable_memory_bytes_ASC", + "allocatable_memory_bytes_DESC", + "chunk_id_ASC", + "chunk_id_DESC", + "cpu_brand_ASC", + "cpu_brand_DESC", + "cpu_fan_speed_unit_ASC", + "cpu_fan_speed_unit_DESC", + "cpu_hz_per_core_ASC", + "cpu_hz_per_core_DESC", + "cpu_model_ASC", + "cpu_model_DESC", + "cpu_vendor_ASC", + "cpu_vendor_DESC", + "data_ip_ASC", + "data_ip_DESC", + "entityAsyncStatus_ASC", + "entityAsyncStatus_DESC", + "failure_data_space_ASC", + "failure_data_space_DESC", + "hdd_data_capacity_ASC", + "hdd_data_capacity_DESC", + "hdd_disk_count_ASC", + "hdd_disk_count_DESC", + "host_state_ASC", + "host_state_DESC", + "hypervisor_ip_ASC", + "hypervisor_ip_DESC", + "id_ASC", + "id_DESC", + "iommu_ASC", + "iommu_DESC", + "is_os_in_raid1_ASC", + "is_os_in_raid1_DESC", + "local_id_ASC", + "local_id_DESC", + "lsm_cap_disk_safe_umount_ASC", + "lsm_cap_disk_safe_umount_DESC", + "management_ip_ASC", + "management_ip_DESC", + "model_ASC", + "model_DESC", + "name_ASC", + "name_DESC", + "nested_virtualization_ASC", + "nested_virtualization_DESC", + "nic_count_ASC", + "nic_count_DESC", + "node_topo_local_id_ASC", + "node_topo_local_id_DESC", + "os_memory_bytes_ASC", + "os_memory_bytes_DESC", + "os_version_ASC", + "os_version_DESC", + "pmem_dimm_capacity_ASC", + "pmem_dimm_capacity_DESC", + "pmem_dimm_count_ASC", + "pmem_dimm_count_DESC", + "pmem_disk_count_ASC", + "pmem_disk_count_DESC", + "provisioned_cpu_cores_ASC", + "provisioned_cpu_cores_DESC", + "provisioned_memory_bytes_ASC", + "provisioned_memory_bytes_DESC", + "running_pause_vm_memory_bytes_ASC", + "running_pause_vm_memory_bytes_DESC", + "running_vm_num_ASC", + "running_vm_num_DESC", + "scvm_cpu_ASC", + "scvm_cpu_DESC", + "scvm_memory_ASC", + "scvm_memory_DESC", + "scvm_name_ASC", + "scvm_name_DESC", + "serial_ASC", + "serial_DESC", + "ssd_data_capacity_ASC", + "ssd_data_capacity_DESC", + "ssd_disk_count_ASC", + "ssd_disk_count_DESC", + "state_ASC", + "state_DESC", + "status_ASC", + "status_DESC", + "stopped_vm_num_ASC", + "stopped_vm_num_DESC", + "suspended_vm_num_ASC", + "suspended_vm_num_DESC", + "total_cache_capacity_ASC", + "total_cache_capacity_DESC", + "total_cpu_cores_ASC", + "total_cpu_cores_DESC", + "total_cpu_hz_ASC", + "total_cpu_hz_DESC", + "total_cpu_sockets_ASC", + "total_cpu_sockets_DESC", + "total_data_capacity_ASC", + "total_data_capacity_DESC", + "total_memory_bytes_ASC", + "total_memory_bytes_DESC", + "used_cpu_hz_ASC", + "used_cpu_hz_DESC", + "used_data_space_ASC", + "used_data_space_DESC", + "used_memory_bytes_ASC", + "used_memory_bytes_DESC", + "vm_num_ASC", + "vm_num_DESC", + "vmotion_ip_ASC", + "vmotion_ip_DESC", + "with_faster_ssd_as_cache_ASC", + "with_faster_ssd_as_cache_DESC" + ], + "type": "string" + }, + "GetHostsRequestBody": { + "properties": { + "after": { "type": "string", "nullable": true }, - "pool": { + "before": { "type": "string", "nullable": true }, - "name": { - "type": "string", + "first": { + "type": "integer", + "format": "int32", "nullable": true }, - "metric_name": { - "type": "string", + "last": { + "type": "integer", + "format": "int32", "nullable": true }, - "job": { - "type": "string", + "orderBy": { + "allOf": [ + { + "$ref": "#/components/schemas/HostOrderByInput" + } + ], "nullable": true }, - "instance": { - "type": "string", + "skip": { + "type": "integer", + "format": "int32", "nullable": true }, - "_zone": { - "type": "string", + "where": { + "allOf": [ + { + "$ref": "#/components/schemas/HostWhereInput" + } + ], "nullable": true - }, - "_witness": { + } + }, + "type": "object", + "additionalProperties": false + }, + "DatacenterOrderByInput": { + "enum": [ + "cluster_num_ASC", + "cluster_num_DESC", + "failure_data_space_ASC", + "failure_data_space_DESC", + "host_num_ASC", + "host_num_DESC", + "id_ASC", + "id_DESC", + "name_ASC", + "name_DESC", + "total_cpu_hz_ASC", + "total_cpu_hz_DESC", + "total_data_capacity_ASC", + "total_data_capacity_DESC", + "total_memory_bytes_ASC", + "total_memory_bytes_DESC", + "used_cpu_hz_ASC", + "used_cpu_hz_DESC", + "used_data_space_ASC", + "used_data_space_DESC", + "used_memory_bytes_ASC", + "used_memory_bytes_DESC", + "vm_num_ASC", + "vm_num_DESC" + ], + "type": "string" + }, + "GetDatacentersRequestBody": { + "properties": { + "after": { "type": "string", "nullable": true }, - "_volume": { + "before": { "type": "string", "nullable": true }, - "_vm": { - "type": "string", + "first": { + "type": "integer", + "format": "int32", "nullable": true }, - "_to_uuid": { - "type": "string", + "last": { + "type": "integer", + "format": "int32", "nullable": true }, - "_service": { - "type": "string", + "orderBy": { + "allOf": [ + { + "$ref": "#/components/schemas/DatacenterOrderByInput" + } + ], "nullable": true }, - "_scvm": { - "type": "string", + "skip": { + "type": "integer", + "format": "int32", "nullable": true }, - "_network": { - "type": "string", + "where": { + "allOf": [ + { + "$ref": "#/components/schemas/DatacenterWhereInput" + } + ], "nullable": true - }, - "_mac": { + } + }, + "type": "object", + "additionalProperties": false + }, + "ClusterOrderByInput": { + "enum": [ + "application_highest_version_ASC", + "application_highest_version_DESC", + "architecture_ASC", + "architecture_DESC", + "auto_converge_ASC", + "auto_converge_DESC", + "connect_state_ASC", + "connect_state_DESC", + "current_cpu_model_ASC", + "current_cpu_model_DESC", + "disconnected_date_ASC", + "disconnected_date_DESC", + "disconnected_reason_ASC", + "disconnected_reason_DESC", + "entityAsyncStatus_ASC", + "entityAsyncStatus_DESC", + "failure_data_space_ASC", + "failure_data_space_DESC", + "has_metrox_ASC", + "has_metrox_DESC", + "host_num_ASC", + "host_num_DESC", + "hypervisor_ASC", + "hypervisor_DESC", + "id_ASC", + "id_DESC", + "ip_ASC", + "ip_DESC", + "is_all_flash_ASC", + "is_all_flash_DESC", + "iscsi_vip_ASC", + "iscsi_vip_DESC", + "license_expire_date_ASC", + "license_expire_date_DESC", + "license_serial_ASC", + "license_serial_DESC", + "license_sign_date_ASC", + "license_sign_date_DESC", + "license_type_ASC", + "license_type_DESC", + "local_id_ASC", + "local_id_DESC", + "maintenance_end_date_ASC", + "maintenance_end_date_DESC", + "maintenance_start_date_ASC", + "maintenance_start_date_DESC", + "management_vip_ASC", + "management_vip_DESC", + "max_chunk_num_ASC", + "max_chunk_num_DESC", + "max_physical_data_capacity_ASC", + "max_physical_data_capacity_DESC", + "max_physical_data_capacity_per_node_ASC", + "max_physical_data_capacity_per_node_DESC", + "metro_availability_checklist_ASC", + "metro_availability_checklist_DESC", + "mgt_gateway_ASC", + "mgt_gateway_DESC", + "mgt_netmask_ASC", + "mgt_netmask_DESC", + "migration_data_size_ASC", + "migration_data_size_DESC", + "migration_speed_ASC", + "migration_speed_DESC", + "name_ASC", + "name_DESC", + "ntp_mode_ASC", + "ntp_mode_DESC", + "nvme_over_rdma_enabled_ASC", + "nvme_over_rdma_enabled_DESC", + "nvme_over_tcp_enabled_ASC", + "nvme_over_tcp_enabled_DESC", + "nvmf_enabled_ASC", + "nvmf_enabled_DESC", + "pmem_enabled_ASC", + "pmem_enabled_DESC", + "provisioned_cpu_cores_ASC", + "provisioned_cpu_cores_DESC", + "provisioned_cpu_cores_for_active_vm_ASC", + "provisioned_cpu_cores_for_active_vm_DESC", + "provisioned_for_active_vm_ratio_ASC", + "provisioned_for_active_vm_ratio_DESC", + "provisioned_memory_bytes_ASC", + "provisioned_memory_bytes_DESC", + "provisioned_ratio_ASC", + "provisioned_ratio_DESC", + "rdma_enabled_ASC", + "rdma_enabled_DESC", + "recover_data_size_ASC", + "recover_data_size_DESC", + "recover_speed_ASC", + "recover_speed_DESC", + "reserved_cpu_cores_for_system_service_ASC", + "reserved_cpu_cores_for_system_service_DESC", + "running_vm_num_ASC", + "running_vm_num_DESC", + "software_edition_ASC", + "software_edition_DESC", + "stopped_vm_num_ASC", + "stopped_vm_num_DESC", + "stretch_ASC", + "stretch_DESC", + "suspended_vm_num_ASC", + "suspended_vm_num_DESC", + "total_cache_capacity_ASC", + "total_cache_capacity_DESC", + "total_cpu_cores_ASC", + "total_cpu_cores_DESC", + "total_cpu_hz_ASC", + "total_cpu_hz_DESC", + "total_cpu_sockets_ASC", + "total_cpu_sockets_DESC", + "total_data_capacity_ASC", + "total_data_capacity_DESC", + "total_memory_bytes_ASC", + "total_memory_bytes_DESC", + "type_ASC", + "type_DESC", + "upgrade_tool_version_ASC", + "upgrade_tool_version_DESC", + "used_cpu_hz_ASC", + "used_cpu_hz_DESC", + "used_data_space_ASC", + "used_data_space_DESC", + "used_memory_bytes_ASC", + "used_memory_bytes_DESC", + "valid_data_space_ASC", + "valid_data_space_DESC", + "version_ASC", + "version_DESC", + "vhost_enabled_ASC", + "vhost_enabled_DESC", + "vm_num_ASC", + "vm_num_DESC" + ], + "type": "string" + }, + "GetClustersRequestBody": { + "properties": { + "after": { "type": "string", "nullable": true }, - "_host": { + "before": { "type": "string", "nullable": true }, - "_esxi_uuid": { - "type": "string", + "first": { + "type": "integer", + "format": "int32", "nullable": true }, - "_device": { - "type": "string", + "last": { + "type": "integer", + "format": "int32", "nullable": true }, - "_cluster": { - "type": "string", + "orderBy": { + "allOf": [ + { + "$ref": "#/components/schemas/ClusterOrderByInput" + } + ], "nullable": true }, - "_chunk": { - "type": "string", + "skip": { + "type": "integer", + "format": "int32", "nullable": true }, - "__typename": { - "type": "string", - "enum": [ - "MetricLabel" + "where": { + "allOf": [ + { + "$ref": "#/components/schemas/ClusterWhereInput" + } ], - "nullable": false + "nullable": true } }, - "type": "object" + "type": "object", + "additionalProperties": false }, - "DataPoint": { + "NicOrderByInput": { + "enum": [ + "driver_ASC", + "driver_DESC", + "driver_state_ASC", + "driver_state_DESC", + "entityAsyncStatus_ASC", + "entityAsyncStatus_DESC", + "gateway_ip_ASC", + "gateway_ip_DESC", + "ibdev_ASC", + "ibdev_DESC", + "id_ASC", + "id_DESC", + "iommu_status_ASC", + "iommu_status_DESC", + "ip_address_ASC", + "ip_address_DESC", + "is_sriov_ASC", + "is_sriov_DESC", + "local_id_ASC", + "local_id_DESC", + "mac_address_ASC", + "mac_address_DESC", + "max_vf_num_ASC", + "max_vf_num_DESC", + "model_ASC", + "model_DESC", + "mtu_ASC", + "mtu_DESC", + "name_ASC", + "name_DESC", + "nic_uuid_ASC", + "nic_uuid_DESC", + "physical_ASC", + "physical_DESC", + "rdma_enabled_ASC", + "rdma_enabled_DESC", + "running_ASC", + "running_DESC", + "speed_ASC", + "speed_DESC", + "subnet_mask_ASC", + "subnet_mask_DESC", + "total_vf_num_ASC", + "total_vf_num_DESC", + "type_ASC", + "type_DESC", + "up_ASC", + "up_DESC", + "used_vf_num_ASC", + "used_vf_num_DESC", + "user_usage_ASC", + "user_usage_DESC" + ], + "type": "string" + }, + "GetNicsRequestBody": { "properties": { - "v": { - "type": "number", - "format": "double", + "after": { + "type": "string", "nullable": true }, - "t": { - "type": "number", - "format": "double" - }, - "__typename": { + "before": { "type": "string", - "enum": [ - "DataPoint" + "nullable": true + }, + "first": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "last": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "orderBy": { + "allOf": [ + { + "$ref": "#/components/schemas/NicOrderByInput" + } ], - "nullable": false - } - }, - "required": [ - "t" - ], - "type": "object" - }, - "MetricStream": { - "properties": { - "points": { - "items": { - "$ref": "#/components/schemas/DataPoint" - }, - "type": "array", "nullable": true }, - "labels": { - "$ref": "#/components/schemas/MetricLabel" + "skip": { + "type": "integer", + "format": "int32", + "nullable": true }, - "__typename": { - "type": "string", - "enum": [ - "MetricStream" + "where": { + "allOf": [ + { + "$ref": "#/components/schemas/NicWhereInput" + } ], - "nullable": false + "nullable": true } }, - "required": [ - "labels" + "type": "object", + "additionalProperties": false + }, + "UsbDeviceOrderByInput": { + "enum": [ + "binded_ASC", + "binded_DESC", + "description_ASC", + "description_DESC", + "entityAsyncStatus_ASC", + "entityAsyncStatus_DESC", + "id_ASC", + "id_DESC", + "local_created_at_ASC", + "local_created_at_DESC", + "local_id_ASC", + "local_id_DESC", + "manufacturer_ASC", + "manufacturer_DESC", + "name_ASC", + "name_DESC", + "size_ASC", + "size_DESC", + "status_ASC", + "status_DESC", + "usb_type_ASC", + "usb_type_DESC" ], - "type": "object" + "type": "string" }, - "MetricSample": { + "GetUsbDevicesRequestBody": { "properties": { - "point": { + "after": { + "type": "string", + "nullable": true + }, + "before": { + "type": "string", + "nullable": true + }, + "first": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "last": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "orderBy": { "allOf": [ { - "$ref": "#/components/schemas/DataPoint" + "$ref": "#/components/schemas/UsbDeviceOrderByInput" } ], "nullable": true }, - "labels": { - "$ref": "#/components/schemas/MetricLabel" + "skip": { + "type": "integer", + "format": "int32", + "nullable": true }, - "__typename": { - "type": "string", - "enum": [ - "MetricSample" + "where": { + "allOf": [ + { + "$ref": "#/components/schemas/UsbDeviceWhereInput" + } ], - "nullable": false + "nullable": true } }, - "required": [ - "labels" - ], - "type": "object" + "type": "object", + "additionalProperties": false }, - "MetricUnit": { + "IscsiTargetOrderByInput": { "enum": [ - "COUNT", - "DATA_RATE_BIT", - "DATA_RATE_BYTE", - "DATA_SIZE", - "FREQUENCY", - "LOAD", - "PERCENT", - "RATIO", - "TEMPERATURE", - "TIME" + "bps_ASC", + "bps_DESC", + "bps_max_ASC", + "bps_max_DESC", + "bps_max_length_ASC", + "bps_max_length_DESC", + "bps_rd_ASC", + "bps_rd_DESC", + "bps_rd_max_ASC", + "bps_rd_max_DESC", + "bps_rd_max_length_ASC", + "bps_rd_max_length_DESC", + "bps_wr_ASC", + "bps_wr_DESC", + "bps_wr_max_ASC", + "bps_wr_max_DESC", + "bps_wr_max_length_ASC", + "bps_wr_max_length_DESC", + "chap_enabled_ASC", + "chap_enabled_DESC", + "chap_name_ASC", + "chap_name_DESC", + "chap_secret_ASC", + "chap_secret_DESC", + "description_ASC", + "description_DESC", + "entityAsyncStatus_ASC", + "entityAsyncStatus_DESC", + "external_use_ASC", + "external_use_DESC", + "id_ASC", + "id_DESC", + "initiator_chaps_ASC", + "initiator_chaps_DESC", + "internal_ASC", + "internal_DESC", + "io_size_ASC", + "io_size_DESC", + "iops_ASC", + "iops_DESC", + "iops_max_ASC", + "iops_max_DESC", + "iops_max_length_ASC", + "iops_max_length_DESC", + "iops_rd_ASC", + "iops_rd_DESC", + "iops_rd_max_ASC", + "iops_rd_max_DESC", + "iops_rd_max_length_ASC", + "iops_rd_max_length_DESC", + "iops_wr_ASC", + "iops_wr_DESC", + "iops_wr_max_ASC", + "iops_wr_max_DESC", + "iops_wr_max_length_ASC", + "iops_wr_max_length_DESC", + "ip_whitelist_ASC", + "ip_whitelist_DESC", + "iqn_name_ASC", + "iqn_name_DESC", + "iqn_whitelist_ASC", + "iqn_whitelist_DESC", + "local_id_ASC", + "local_id_DESC", + "name_ASC", + "name_DESC", + "replica_num_ASC", + "replica_num_DESC", + "stripe_num_ASC", + "stripe_num_DESC", + "stripe_size_ASC", + "stripe_size_DESC", + "thin_provision_ASC", + "thin_provision_DESC" ], "type": "string" }, - "Metric": { + "GetIscsiTargetsRequestBody": { "properties": { - "unit": { - "$ref": "#/components/schemas/MetricUnit" + "after": { + "type": "string", + "nullable": true }, - "step": { + "before": { + "type": "string", + "nullable": true + }, + "first": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, - "samples": { - "items": { - "$ref": "#/components/schemas/MetricSample" - }, - "type": "array", + "last": { + "type": "integer", + "format": "int32", "nullable": true }, - "sample_streams": { - "items": { - "$ref": "#/components/schemas/MetricStream" - }, - "type": "array", + "orderBy": { + "allOf": [ + { + "$ref": "#/components/schemas/IscsiTargetOrderByInput" + } + ], "nullable": true }, - "dropped": { - "type": "boolean" + "skip": { + "type": "integer", + "format": "int32", + "nullable": true }, - "__typename": { - "type": "string", - "enum": [ - "Metric" + "where": { + "allOf": [ + { + "$ref": "#/components/schemas/IscsiTargetWhereInput" + } ], - "nullable": false + "nullable": true } }, - "required": [ - "unit", - "step", - "dropped" + "type": "object", + "additionalProperties": false + }, + "NfsExportOrderByInput": { + "enum": [ + "description_ASC", + "description_DESC", + "entityAsyncStatus_ASC", + "entityAsyncStatus_DESC", + "export_inode_id_ASC", + "export_inode_id_DESC", + "id_ASC", + "id_DESC", + "internal_ASC", + "internal_DESC", + "ip_whitelist_ASC", + "ip_whitelist_DESC", + "local_id_ASC", + "local_id_DESC", + "name_ASC", + "name_DESC", + "replica_num_ASC", + "replica_num_DESC", + "thin_provision_ASC", + "thin_provision_DESC" ], - "type": "object" + "type": "string" }, - "WithTask_Metric_": { + "GetNfsExportsRequestBody": { "properties": { - "task_id": { + "after": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/Metric" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "GetVmMetricInput": { - "properties": { - "range": { - "type": "string" + "before": { + "type": "string", + "nullable": true }, - "metrics": { - "items": { - "type": "string" - }, - "type": "array" + "first": { + "type": "integer", + "format": "int32", + "nullable": true }, - "vms": { - "$ref": "#/components/schemas/VmWhereInput" - } - }, - "required": [ - "range", - "metrics", - "vms" - ], - "type": "object" - }, - "GetVmNetWorkMetricInput": { - "properties": { - "range": { - "type": "string" + "last": { + "type": "integer", + "format": "int32", + "nullable": true }, - "metrics": { - "items": { - "type": "string" - }, - "type": "array" + "orderBy": { + "allOf": [ + { + "$ref": "#/components/schemas/NfsExportOrderByInput" + } + ], + "nullable": true }, - "nics": { - "$ref": "#/components/schemas/VmNicWhereInput" + "skip": { + "type": "integer", + "format": "int32", + "nullable": true }, - "vms": { - "$ref": "#/components/schemas/VmWhereInput" + "where": { + "allOf": [ + { + "$ref": "#/components/schemas/NfsExportWhereInput" + } + ], + "nullable": true } }, - "required": [ - "range", - "metrics", - "vms" + "type": "object", + "additionalProperties": false + }, + "ElfDataStoreOrderByInput": { + "enum": [ + "description_ASC", + "description_DESC", + "external_use_ASC", + "external_use_DESC", + "id_ASC", + "id_DESC", + "internal_ASC", + "internal_DESC", + "ip_whitelist_ASC", + "ip_whitelist_DESC", + "local_id_ASC", + "local_id_DESC", + "name_ASC", + "name_DESC", + "replica_num_ASC", + "replica_num_DESC", + "thin_provision_ASC", + "thin_provision_DESC", + "type_ASC", + "type_DESC" ], - "type": "object" + "type": "string" }, - "GetDiskMetricInput": { + "ElfDataStoreWhereInput": { "properties": { - "range": { - "type": "string" - }, - "disks": { - "$ref": "#/components/schemas/DiskWhereInput" - }, - "metrics": { + "AND": { "items": { - "type": "string" + "$ref": "#/components/schemas/ElfDataStoreWhereInput" }, - "type": "array" - } - }, - "required": [ - "range", - "disks", - "metrics" - ], - "type": "object" - }, - "GetVmVolumeMetricInput": { - "properties": { - "range": { - "type": "string" + "type": "array", + "nullable": true }, - "metrics": { + "NOT": { "items": { - "type": "string" + "$ref": "#/components/schemas/ElfDataStoreWhereInput" }, - "type": "array" + "type": "array", + "nullable": true }, - "vmVolumes": { - "$ref": "#/components/schemas/VmVolumeWhereInput" - } - }, - "required": [ - "range", - "metrics", - "vmVolumes" - ], - "type": "object" - }, - "GetLunMetricInput": { - "properties": { - "range": { - "type": "string" + "OR": { + "items": { + "$ref": "#/components/schemas/ElfDataStoreWhereInput" + }, + "type": "array", + "nullable": true }, - "hosts": { - "$ref": "#/components/schemas/HostWhereInput" + "cluster": { + "allOf": [ + { + "$ref": "#/components/schemas/ClusterWhereInput" + } + ], + "nullable": true }, - "luns": { - "$ref": "#/components/schemas/IscsiLunWhereInput" + "description": { + "type": "string", + "nullable": true }, - "metrics": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "range", - "luns", - "metrics" - ], - "type": "object" - }, - "GetNvmfNamespaceMetricInput": { - "properties": { - "hosts": { - "$ref": "#/components/schemas/HostWhereInput" + "description_contains": { + "type": "string", + "nullable": true }, - "nvmfNamespaces": { - "$ref": "#/components/schemas/NvmfNamespaceWhereInput" + "description_ends_with": { + "type": "string", + "nullable": true }, - "metrics": { + "description_gt": { + "type": "string", + "nullable": true + }, + "description_gte": { + "type": "string", + "nullable": true + }, + "description_in": { "items": { "type": "string" }, - "type": "array" + "type": "array", + "nullable": true }, - "range": { - "type": "string" - } - }, - "required": [ - "nvmfNamespaces", - "metrics", - "range" - ], - "type": "object" - }, - "GetClusterMetricInput": { - "properties": { - "range": { - "type": "string" + "description_lt": { + "type": "string", + "nullable": true }, - "clusters": { - "$ref": "#/components/schemas/ClusterWhereInput" + "description_lte": { + "type": "string", + "nullable": true }, - "metrics": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "range", - "clusters", - "metrics" - ], - "type": "object" - }, - "GetHostMetricInput": { - "properties": { - "range": { - "type": "string" + "description_not": { + "type": "string", + "nullable": true }, - "hosts": { - "$ref": "#/components/schemas/HostWhereInput" + "description_not_contains": { + "type": "string", + "nullable": true }, - "metrics": { + "description_not_ends_with": { + "type": "string", + "nullable": true + }, + "description_not_in": { "items": { "type": "string" }, - "type": "array" - } - }, - "required": [ - "range", - "hosts", - "metrics" - ], - "type": "object" - }, - "GetHostNetworkMetricInput": { - "properties": { - "hosts": { - "$ref": "#/components/schemas/HostWhereInput" + "type": "array", + "nullable": true }, - "range": { - "type": "string" + "description_not_starts_with": { + "type": "string", + "nullable": true }, - "nics": { - "$ref": "#/components/schemas/NicWhereInput" + "description_starts_with": { + "type": "string", + "nullable": true }, - "metrics": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "hosts", - "range", - "metrics" - ], - "type": "object" - }, - "GetHostServiceMetricInput": { - "properties": { - "range": { - "type": "string" + "external_use": { + "type": "boolean", + "nullable": true }, - "hosts": { - "$ref": "#/components/schemas/HostWhereInput" + "external_use_not": { + "type": "boolean", + "nullable": true }, - "services": { - "items": { - "type": "string" - }, - "type": "array" + "id": { + "type": "string", + "nullable": true }, - "metrics": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "range", - "hosts", - "services", - "metrics" - ], - "type": "object" - }, - "GetScvmMetricInput": { - "properties": { - "range": { - "type": "string" + "id_contains": { + "type": "string", + "nullable": true }, - "hosts": { - "$ref": "#/components/schemas/HostWhereInput" + "id_ends_with": { + "type": "string", + "nullable": true }, - "metrics": { + "id_gt": { + "type": "string", + "nullable": true + }, + "id_gte": { + "type": "string", + "nullable": true + }, + "id_in": { "items": { "type": "string" }, - "type": "array" - } - }, - "required": [ - "range", - "hosts", - "metrics" - ], - "type": "object" - }, - "GetScvmNetworkInput": { - "properties": { - "range": { - "type": "string" + "type": "array", + "nullable": true }, - "hosts": { - "$ref": "#/components/schemas/HostWhereInput" + "id_lt": { + "type": "string", + "nullable": true }, - "nics": { - "$ref": "#/components/schemas/NicWhereInput" + "id_lte": { + "type": "string", + "nullable": true }, - "metrics": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "range", - "hosts", - "metrics" - ], - "type": "object" - }, - "GetScvmServiceMetricInput": { - "properties": { - "range": { - "type": "string" + "id_not": { + "type": "string", + "nullable": true }, - "hosts": { - "$ref": "#/components/schemas/HostWhereInput" + "id_not_contains": { + "type": "string", + "nullable": true }, - "services": { - "items": { - "type": "string" - }, - "type": "array" + "id_not_ends_with": { + "type": "string", + "nullable": true }, - "metrics": { + "id_not_in": { "items": { "type": "string" }, - "type": "array" - } - }, - "required": [ - "range", - "hosts", - "services", - "metrics" - ], - "type": "object" - }, - "GetSCVMDiskMetricInput": { - "properties": { - "range": { - "type": "string" + "type": "array", + "nullable": true }, - "disks": { - "$ref": "#/components/schemas/DiskWhereInput" + "id_not_starts_with": { + "type": "string", + "nullable": true }, - "metrics": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "range", - "disks", - "metrics" - ], - "type": "object" - }, - "GetZoneMetricInput": { - "properties": { - "range": { - "type": "string" + "id_starts_with": { + "type": "string", + "nullable": true }, - "type": { + "internal": { + "type": "boolean", + "nullable": true + }, + "internal_not": { + "type": "boolean", + "nullable": true + }, + "ip_whitelist": { "type": "string", - "enum": [ - "primary-to-secondary", - "secondary-to-primary" - ] + "nullable": true }, - "clusters": { - "$ref": "#/components/schemas/ClusterWhereInput" + "ip_whitelist_contains": { + "type": "string", + "nullable": true }, - "metrics": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "range", - "type", - "clusters", - "metrics" - ], - "type": "object" - }, - "GetWitnessMetricInput": { - "properties": { - "range": { - "type": "string" + "ip_whitelist_ends_with": { + "type": "string", + "nullable": true }, - "clusters": { - "$ref": "#/components/schemas/ClusterWhereInput" + "ip_whitelist_gt": { + "type": "string", + "nullable": true }, - "metrics": { + "ip_whitelist_gte": { + "type": "string", + "nullable": true + }, + "ip_whitelist_in": { "items": { "type": "string" }, - "type": "array" - } - }, - "required": [ - "range", - "clusters", - "metrics" - ], - "type": "object" - }, - "GetTopNMetricInput": { - "properties": { - "metrics": { + "type": "array", + "nullable": true + }, + "ip_whitelist_lt": { + "type": "string", + "nullable": true + }, + "ip_whitelist_lte": { + "type": "string", + "nullable": true + }, + "ip_whitelist_not": { + "type": "string", + "nullable": true + }, + "ip_whitelist_not_contains": { + "type": "string", + "nullable": true + }, + "ip_whitelist_not_ends_with": { + "type": "string", + "nullable": true + }, + "ip_whitelist_not_in": { "items": { "type": "string" }, - "type": "array" - }, - "clusters": { - "$ref": "#/components/schemas/ClusterWhereInput" + "type": "array", + "nullable": true }, - "type": { + "ip_whitelist_not_starts_with": { "type": "string", - "enum": [ - "top", - "bottom" - ] + "nullable": true }, - "n": { - "type": "integer", - "format": "int32" + "ip_whitelist_starts_with": { + "type": "string", + "nullable": true }, - "range": { - "type": "string" - } - }, - "required": [ - "metrics", - "clusters", - "type", - "n", - "range" - ], - "type": "object" - }, - "NamespaceGroup": { - "properties": { - "entityAsyncStatus": { + "iscsi_target": { "allOf": [ { - "$ref": "#/components/schemas/EntityAsyncStatus" + "$ref": "#/components/schemas/IscsiTargetWhereInput" } ], "nullable": true }, - "id": { - "type": "string" + "local_id": { + "type": "string", + "nullable": true }, - "labels": { - "items": { - "$ref": "#/components/schemas/NestedLabel" - }, - "type": "array", + "local_id_contains": { + "type": "string", "nullable": true }, - "local_create_time": { - "type": "string" + "local_id_ends_with": { + "type": "string", + "nullable": true }, - "local_id": { - "type": "string" + "local_id_gt": { + "type": "string", + "nullable": true }, - "name": { - "type": "string" + "local_id_gte": { + "type": "string", + "nullable": true }, - "namespaces": { + "local_id_in": { "items": { - "$ref": "#/components/schemas/NestedNvmfNamespace" + "type": "string" }, "type": "array", "nullable": true }, - "nvmf_subsystem": { - "$ref": "#/components/schemas/NestedNvmfSubsystem" - } - }, - "required": [ - "id", - "local_create_time", - "local_id", - "name", - "nvmf_subsystem" - ], - "type": "object", - "additionalProperties": false - }, - "WithTask_NamespaceGroup_": { - "properties": { - "task_id": { + "local_id_lt": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/NamespaceGroup" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "NamespaceGroupCreationParams": { - "properties": { - "nvmf_subsystem_id": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": [ - "nvmf_subsystem_id", - "name" - ], - "type": "object" - }, - "NamespaceGroupUpdationParams": { - "properties": { - "data": { - "properties": { - "name": { - "type": "string" - } - }, - "type": "object" - }, - "where": { - "$ref": "#/components/schemas/NamespaceGroupWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "DeleteNamespaceGroup": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "WithTask_DeleteNamespaceGroup_": { - "properties": { - "task_id": { + "local_id_lte": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/DeleteNamespaceGroup" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "NamespaceGroupDeletionParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/NamespaceGroupWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "NfsExport": { - "properties": { - "cluster": { - "$ref": "#/components/schemas/NestedCluster" - }, - "description": { - "type": "string" - }, - "entityAsyncStatus": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" - } - ], + "local_id_not": { + "type": "string", "nullable": true }, - "export_inode_id": { - "type": "string" + "local_id_not_contains": { + "type": "string", + "nullable": true }, - "id": { - "type": "string" + "local_id_not_ends_with": { + "type": "string", + "nullable": true }, - "inodes": { + "local_id_not_in": { "items": { - "$ref": "#/components/schemas/NestedNfsInode" + "type": "string" }, "type": "array", "nullable": true }, - "internal": { - "type": "boolean" - }, - "ip_whitelist": { - "type": "string" - }, - "labels": { - "items": { - "$ref": "#/components/schemas/NestedLabel" - }, - "type": "array", + "local_id_not_starts_with": { + "type": "string", "nullable": true }, - "local_id": { - "type": "string" + "local_id_starts_with": { + "type": "string", + "nullable": true }, "name": { - "type": "string" - }, - "replica_num": { - "type": "integer", - "format": "int32" - }, - "thin_provision": { - "type": "boolean" - } - }, - "required": [ - "cluster", - "description", - "export_inode_id", - "id", - "internal", - "ip_whitelist", - "local_id", - "name", - "replica_num", - "thin_provision" - ], - "type": "object", - "additionalProperties": false - }, - "WithTask_NfsExport_": { - "properties": { - "task_id": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/NfsExport" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "NfsExportCreationParams": { - "properties": { - "cluster_id": { - "type": "string" + "name_contains": { + "type": "string", + "nullable": true }, - "ip_whitelist": { - "type": "string" + "name_ends_with": { + "type": "string", + "nullable": true }, - "thin_provision": { - "type": "boolean" + "name_gt": { + "type": "string", + "nullable": true }, - "replica_num": { - "type": "integer", - "format": "int32" + "name_gte": { + "type": "string", + "nullable": true }, - "name": { - "type": "string" - } - }, - "required": [ - "cluster_id", - "thin_provision", - "replica_num", - "name" - ], - "type": "object" - }, - "NfsExportUpdationParams": { - "properties": { - "data": { - "properties": { - "ip_whitelist": { - "type": "string" - }, - "name": { - "type": "string" - } + "name_in": { + "items": { + "type": "string" }, - "type": "object" + "type": "array", + "nullable": true }, - "where": { - "$ref": "#/components/schemas/NfsExportWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "DeleteNfsExport": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "WithTask_DeleteNfsExport_": { - "properties": { - "task_id": { + "name_lt": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/DeleteNfsExport" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "NfsExportDeletionParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/NfsExportWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "Nic": { - "properties": { - "driver": { + "name_lte": { "type": "string", "nullable": true }, - "driver_state": { - "allOf": [ - { - "$ref": "#/components/schemas/NicDriverState" - } - ], + "name_not": { + "type": "string", "nullable": true }, - "entityAsyncStatus": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" - } - ], + "name_not_contains": { + "type": "string", "nullable": true }, - "gateway_ip": { + "name_not_ends_with": { "type": "string", "nullable": true }, - "host": { - "$ref": "#/components/schemas/NestedHost" + "name_not_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true }, - "ibdev": { + "name_not_starts_with": { "type": "string", "nullable": true }, - "id": { - "type": "string" + "name_starts_with": { + "type": "string", + "nullable": true }, - "iommu_status": { + "nfs_export": { "allOf": [ { - "$ref": "#/components/schemas/IommuStatus" + "$ref": "#/components/schemas/NfsExportWhereInput" } ], "nullable": true }, - "ip_address": { - "type": "string", - "nullable": true - }, - "is_sriov": { - "type": "boolean", - "nullable": true - }, - "labels": { - "items": { - "$ref": "#/components/schemas/NestedLabel" - }, - "type": "array", + "nvmf_subsystem": { + "allOf": [ + { + "$ref": "#/components/schemas/NvmfSubsystemWhereInput" + } + ], "nullable": true }, - "local_id": { - "type": "string" - }, - "mac_address": { - "type": "string" - }, - "max_vf_num": { + "replica_num": { "type": "integer", "format": "int32", "nullable": true }, - "model": { - "type": "string", + "replica_num_gt": { + "type": "integer", + "format": "int32", "nullable": true }, - "mtu": { + "replica_num_gte": { "type": "integer", - "format": "int32" - }, - "name": { - "type": "string" - }, - "nic_uuid": { - "type": "string", + "format": "int32", "nullable": true }, - "physical": { - "type": "boolean" - }, - "rdma_enabled": { - "type": "boolean", + "replica_num_in": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", "nullable": true }, - "running": { - "type": "boolean" - }, - "speed": { + "replica_num_lt": { "type": "integer", - "format": "int64", + "format": "int32", "nullable": true }, - "subnet_mask": { - "type": "string", + "replica_num_lte": { + "type": "integer", + "format": "int32", "nullable": true }, - "total_vf_num": { + "replica_num_not": { "type": "integer", "format": "int32", "nullable": true }, - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/NetworkType" - } - ], + "replica_num_not_in": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", "nullable": true }, - "up": { - "type": "boolean" + "thin_provision": { + "type": "boolean", + "nullable": true }, - "used_vf_num": { - "type": "integer", - "format": "int32", + "thin_provision_not": { + "type": "boolean", "nullable": true }, - "user_usage": { + "type": { "allOf": [ { - "$ref": "#/components/schemas/NicUserUsage" + "$ref": "#/components/schemas/ElfDataStoreType" } ], "nullable": true }, - "vds": { + "type_in": { + "items": { + "$ref": "#/components/schemas/ElfDataStoreType" + }, + "type": "array", + "nullable": true + }, + "type_not": { "allOf": [ { - "$ref": "#/components/schemas/NestedVds" + "$ref": "#/components/schemas/ElfDataStoreType" } ], "nullable": true }, - "vms": { + "type_not_in": { "items": { - "$ref": "#/components/schemas/NestedVm" + "$ref": "#/components/schemas/ElfDataStoreType" }, "type": "array", "nullable": true } }, - "required": [ - "host", - "id", - "local_id", - "mac_address", - "mtu", - "name", - "physical", - "running", - "up" - ], "type": "object", "additionalProperties": false }, - "WithTask_Nic_": { - "properties": { - "task_id": { - "type": "string", - "nullable": true - }, - "data": { - "$ref": "#/components/schemas/Nic" - } - }, - "required": [ - "data" + "ElfDataStoreType": { + "enum": [ + "ISCSI", + "NFS", + "NVMe" ], - "type": "object" + "type": "string" }, - "NicUpdationParams": { + "GetElfDataStoresRequestBody": { "properties": { - "data": { - "properties": { - "nic_user_usage": { - "$ref": "#/components/schemas/NicUserUsage" - }, - "total_vf_num": { - "type": "integer", - "format": "int32" - }, - "mtu": { - "type": "integer", - "format": "int32" - } - }, - "type": "object" + "after": { + "type": "string", + "nullable": true }, - "where": { - "$ref": "#/components/schemas/NicWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "NestedBrickTopo": { - "properties": { - "id": { - "type": "string" + "before": { + "type": "string", + "nullable": true }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "type": "object", - "additionalProperties": false - }, - "NestedPosition": { - "properties": { - "column": { + "first": { "type": "integer", "format": "int32", "nullable": true }, - "row": { + "last": { "type": "integer", "format": "int32", "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "NodeTopo": { - "properties": { - "brick_topo": { + }, + "orderBy": { "allOf": [ { - "$ref": "#/components/schemas/NestedBrickTopo" + "$ref": "#/components/schemas/ElfDataStoreOrderByInput" } ], "nullable": true }, - "cluster": { - "$ref": "#/components/schemas/NestedCluster" + "skip": { + "type": "integer", + "format": "int32", + "nullable": true }, - "cluster_topo": { + "where": { "allOf": [ { - "$ref": "#/components/schemas/NestedClusterTopo" + "$ref": "#/components/schemas/ElfDataStoreWhereInput" } ], "nullable": true - }, - "host": { - "$ref": "#/components/schemas/NestedHost" - }, - "id": { - "type": "string" - }, - "local_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "position": { - "$ref": "#/components/schemas/NestedPosition" } }, - "required": [ - "cluster", - "host", - "id", - "local_id", - "name", - "position" - ], "type": "object", "additionalProperties": false }, - "WithTask_NodeTopo_": { - "properties": { - "task_id": { - "type": "string", - "nullable": true - }, - "data": { - "$ref": "#/components/schemas/NodeTopo" - } - }, - "required": [ - "data" + "VdsOrderByInput": { + "enum": [ + "bond_mode_ASC", + "bond_mode_DESC", + "entityAsyncStatus_ASC", + "entityAsyncStatus_DESC", + "id_ASC", + "id_DESC", + "internal_ASC", + "internal_DESC", + "local_id_ASC", + "local_id_DESC", + "name_ASC", + "name_DESC", + "ovsbr_name_ASC", + "ovsbr_name_DESC", + "type_ASC", + "type_DESC", + "vlans_num_ASC", + "vlans_num_DESC", + "work_mode_ASC", + "work_mode_DESC" ], - "type": "object" + "type": "string" }, - "NodeTopoWhereUniqueInput": { + "GetVdsesRequestBody": { "properties": { - "id": { + "after": { "type": "string", "nullable": true }, - "local_id": { + "before": { "type": "string", "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "Position": { - "properties": { - "row": { + }, + "first": { "type": "integer", "format": "int32", "nullable": true }, - "column": { + "last": { "type": "integer", "format": "int32", "nullable": true }, - "__typename": { - "type": "string", - "enum": [ - "position" + "orderBy": { + "allOf": [ + { + "$ref": "#/components/schemas/VdsOrderByInput" + } ], - "nullable": false - } - }, - "type": "object" - }, - "NodeTopoUpdationParamsData": { - "properties": { - "cluster_topo_id": { - "type": "string" - }, - "position": { - "$ref": "#/components/schemas/Position" + "nullable": true }, - "brick_topo_id": { - "type": "string" - } - }, - "type": "object" - }, - "NodeTopUpdationParam": { - "properties": { - "data": { - "$ref": "#/components/schemas/NodeTopoUpdationParamsData" + "skip": { + "type": "integer", + "format": "int32", + "nullable": true }, "where": { - "$ref": "#/components/schemas/NodeTopoWhereUniqueInput" + "allOf": [ + { + "$ref": "#/components/schemas/VdsWhereInput" + } + ], + "nullable": true } }, - "required": [ - "data", - "where" - ], - "type": "object" + "type": "object", + "additionalProperties": false }, - "NodeTopoUpdationParams": { - "items": { - "$ref": "#/components/schemas/NodeTopUpdationParam" - }, - "type": "array" + "DiskOrderByInput": { + "enum": [ + "entityAsyncStatus_ASC", + "entityAsyncStatus_DESC", + "failure_information_ASC", + "failure_information_DESC", + "firmware_ASC", + "firmware_DESC", + "function_ASC", + "function_DESC", + "health_status_ASC", + "health_status_DESC", + "healthy_ASC", + "healthy_DESC", + "id_ASC", + "id_DESC", + "local_id_ASC", + "local_id_DESC", + "model_ASC", + "model_DESC", + "mounted_ASC", + "mounted_DESC", + "name_ASC", + "name_DESC", + "numa_node_ASC", + "numa_node_DESC", + "offline_ASC", + "offline_DESC", + "partitions_ASC", + "partitions_DESC", + "path_ASC", + "path_DESC", + "persistent_memory_type_ASC", + "persistent_memory_type_DESC", + "physical_slot_on_brick_ASC", + "physical_slot_on_brick_DESC", + "recommended_usage_ASC", + "recommended_usage_DESC", + "remaining_life_percent_ASC", + "remaining_life_percent_DESC", + "serial_ASC", + "serial_DESC", + "size_ASC", + "size_DESC", + "type_ASC", + "type_DESC", + "usage_ASC", + "usage_DESC", + "usage_status_ASC", + "usage_status_DESC" + ], + "type": "string" }, - "NvmfNamespaceSnapshot": { + "GetDisksRequestBody": { "properties": { - "consistency_group_snapshot": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedConsistencyGroupSnapshot" - } - ], + "after": { + "type": "string", "nullable": true }, - "entityAsyncStatus": { + "before": { + "type": "string", + "nullable": true + }, + "first": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "last": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "orderBy": { "allOf": [ { - "$ref": "#/components/schemas/EntityAsyncStatus" + "$ref": "#/components/schemas/DiskOrderByInput" } ], "nullable": true }, - "id": { - "type": "string" - }, - "labels": { - "items": { - "$ref": "#/components/schemas/NestedLabel" - }, - "type": "array", + "skip": { + "type": "integer", + "format": "int32", "nullable": true }, - "local_created_at": { - "type": "string" - }, - "local_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "nvmf_namespace": { + "where": { "allOf": [ { - "$ref": "#/components/schemas/NestedNvmfNamespace" + "$ref": "#/components/schemas/DiskWhereInput" } ], "nullable": true - }, - "nvmf_subsystem": { - "$ref": "#/components/schemas/NestedNvmfSubsystem" - }, - "unique_size": { - "type": "integer", - "format": "int64" } }, - "required": [ - "id", - "local_created_at", - "local_id", - "name", - "nvmf_subsystem", - "unique_size" - ], "type": "object", "additionalProperties": false }, - "WithTask_NvmfNamespaceSnapshot_": { - "properties": { - "task_id": { - "type": "string", - "nullable": true - }, - "data": { - "$ref": "#/components/schemas/NvmfNamespaceSnapshot" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "NvmfNamespaceSnapshotCreationParams": { - "properties": { - "nvmf_subsystem_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "nvmf_namespace_id": { - "type": "string" - } - }, - "required": [ - "nvmf_subsystem_id", - "name", - "nvmf_namespace_id" - ], - "type": "object" - }, - "DeleteNvmfNamespaceSnapshot": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" + "VlanOrderByInput": { + "enum": [ + "entityAsyncStatus_ASC", + "entityAsyncStatus_DESC", + "gateway_ip_ASC", + "gateway_ip_DESC", + "gateway_subnetmask_ASC", + "gateway_subnetmask_DESC", + "id_ASC", + "id_DESC", + "local_id_ASC", + "local_id_DESC", + "mode_type_ASC", + "mode_type_DESC", + "name_ASC", + "name_DESC", + "qos_max_bandwidth_ASC", + "qos_max_bandwidth_DESC", + "qos_min_bandwidth_ASC", + "qos_min_bandwidth_DESC", + "qos_priority_ASC", + "qos_priority_DESC", + "subnetmask_ASC", + "subnetmask_DESC", + "type_ASC", + "type_DESC", + "vlan_id_ASC", + "vlan_id_DESC" ], - "type": "object" + "type": "string" }, - "WithTask_DeleteNvmfNamespaceSnapshot_": { + "GetVlansRequestBody": { "properties": { - "task_id": { + "after": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/DeleteNvmfNamespaceSnapshot" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "NvmfNamespaceSnapshotDeletionParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/NvmfNamespaceSnapshotWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "NvmfNamespace": { - "properties": { - "assigned_size": { - "type": "integer", - "format": "int64" - }, - "bps": { - "type": "integer", - "format": "int64" + "before": { + "type": "string", + "nullable": true }, - "bps_max": { + "first": { "type": "integer", - "format": "int64" + "format": "int32", + "nullable": true }, - "bps_max_length": { + "last": { "type": "integer", - "format": "int64" + "format": "int32", + "nullable": true }, - "bps_rd": { - "type": "integer", - "format": "int64" + "orderBy": { + "allOf": [ + { + "$ref": "#/components/schemas/VlanOrderByInput" + } + ], + "nullable": true }, - "bps_rd_max": { + "skip": { "type": "integer", - "format": "int64" + "format": "int32", + "nullable": true }, - "bps_rd_max_length": { - "type": "integer", - "format": "int64" + "where": { + "allOf": [ + { + "$ref": "#/components/schemas/VlanWhereInput" + } + ], + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "VmVolumeOrderByInput": { + "enum": [ + "description_ASC", + "description_DESC", + "elf_storage_policy_ASC", + "elf_storage_policy_DESC", + "entityAsyncStatus_ASC", + "entityAsyncStatus_DESC", + "guest_size_usage_ASC", + "guest_size_usage_DESC", + "guest_used_size_ASC", + "guest_used_size_DESC", + "id_ASC", + "id_DESC", + "local_created_at_ASC", + "local_created_at_DESC", + "local_id_ASC", + "local_id_DESC", + "mounting_ASC", + "mounting_DESC", + "name_ASC", + "name_DESC", + "path_ASC", + "path_DESC", + "sharing_ASC", + "sharing_DESC", + "size_ASC", + "size_DESC", + "type_ASC", + "type_DESC", + "unique_logical_size_ASC", + "unique_logical_size_DESC", + "unique_size_ASC", + "unique_size_DESC" + ], + "type": "string" + }, + "GetVmVolumesRequestBody": { + "properties": { + "after": { + "type": "string", + "nullable": true }, - "bps_wr": { - "type": "integer", - "format": "int64" + "before": { + "type": "string", + "nullable": true }, - "bps_wr_max": { + "first": { "type": "integer", - "format": "int64" + "format": "int32", + "nullable": true }, - "bps_wr_max_length": { + "last": { "type": "integer", - "format": "int64" + "format": "int32", + "nullable": true }, - "consistency_group": { + "orderBy": { "allOf": [ { - "$ref": "#/components/schemas/NestedConsistencyGroup" + "$ref": "#/components/schemas/VmVolumeOrderByInput" } ], "nullable": true }, - "entityAsyncStatus": { + "skip": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "where": { "allOf": [ { - "$ref": "#/components/schemas/EntityAsyncStatus" + "$ref": "#/components/schemas/VmVolumeWhereInput" } ], "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "ElfImageOrderByInput": { + "enum": [ + "description_ASC", + "description_DESC", + "entityAsyncStatus_ASC", + "entityAsyncStatus_DESC", + "id_ASC", + "id_DESC", + "local_created_at_ASC", + "local_created_at_DESC", + "local_id_ASC", + "local_id_DESC", + "name_ASC", + "name_DESC", + "path_ASC", + "path_DESC", + "size_ASC", + "size_DESC" + ], + "type": "string" + }, + "GetElfImagesRequestBody": { + "properties": { + "after": { + "type": "string", + "nullable": true }, - "id": { - "type": "string" + "before": { + "type": "string", + "nullable": true }, - "io_size": { + "first": { "type": "integer", - "format": "int64" + "format": "int32", + "nullable": true }, - "iops": { + "last": { "type": "integer", - "format": "int64" + "format": "int32", + "nullable": true }, - "iops_max": { - "type": "integer", - "format": "int64" - }, - "iops_max_length": { - "type": "integer", - "format": "int64" - }, - "iops_rd": { - "type": "integer", - "format": "int64" - }, - "iops_rd_max": { - "type": "integer", - "format": "int64" - }, - "iops_rd_max_length": { - "type": "integer", - "format": "int64" - }, - "iops_wr": { - "type": "integer", - "format": "int64" - }, - "iops_wr_max": { - "type": "integer", - "format": "int64" + "orderBy": { + "allOf": [ + { + "$ref": "#/components/schemas/ElfImageOrderByInput" + } + ], + "nullable": true }, - "iops_wr_max_length": { + "skip": { "type": "integer", - "format": "int64" - }, - "is_shared": { - "type": "boolean" - }, - "labels": { - "items": { - "$ref": "#/components/schemas/NestedLabel" - }, - "type": "array", + "format": "int32", "nullable": true }, - "local_created_at": { - "type": "string" - }, - "local_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "namespace_group": { + "where": { "allOf": [ { - "$ref": "#/components/schemas/NestedNamespaceGroup" + "$ref": "#/components/schemas/ElfImageWhereInput" } ], "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "VmTemplateOrderByInput": { + "enum": [ + "clock_offset_ASC", + "clock_offset_DESC", + "cloud_init_supported_ASC", + "cloud_init_supported_DESC", + "cpu_ASC", + "cpu_DESC", + "cpu_model_ASC", + "cpu_model_DESC", + "description_ASC", + "description_DESC", + "entityAsyncStatus_ASC", + "entityAsyncStatus_DESC", + "firmware_ASC", + "firmware_DESC", + "ha_ASC", + "ha_DESC", + "id_ASC", + "id_DESC", + "io_policy_ASC", + "io_policy_DESC", + "local_created_at_ASC", + "local_created_at_DESC", + "local_id_ASC", + "local_id_DESC", + "max_bandwidth_ASC", + "max_bandwidth_DESC", + "max_bandwidth_policy_ASC", + "max_bandwidth_policy_DESC", + "max_iops_ASC", + "max_iops_DESC", + "max_iops_policy_ASC", + "max_iops_policy_DESC", + "memory_ASC", + "memory_DESC", + "name_ASC", + "name_DESC", + "size_ASC", + "size_DESC", + "vcpu_ASC", + "vcpu_DESC", + "video_type_ASC", + "video_type_DESC", + "vm_disks_ASC", + "vm_disks_DESC", + "vm_nics_ASC", + "vm_nics_DESC", + "win_opt_ASC", + "win_opt_DESC" + ], + "type": "string" + }, + "GetVmTemplatesRequestBody": { + "properties": { + "after": { + "type": "string", + "nullable": true }, - "namespace_id": { - "type": "integer", - "format": "int32" - }, - "nqn_whitelist": { - "type": "string" - }, - "nvmf_subsystem": { - "$ref": "#/components/schemas/NestedNvmfSubsystem" - }, - "replica_num": { - "type": "integer", - "format": "int32" - }, - "shared_size": { - "type": "integer", - "format": "int64" - }, - "snapshot_num": { - "type": "integer", - "format": "int32" + "before": { + "type": "string", + "nullable": true }, - "stripe_num": { + "first": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, - "stripe_size": { + "last": { "type": "integer", - "format": "int64" - }, - "thin_provision": { - "type": "boolean" + "format": "int32", + "nullable": true }, - "unique_logical_size": { - "type": "number", - "format": "double", + "orderBy": { + "allOf": [ + { + "$ref": "#/components/schemas/VmTemplateOrderByInput" + } + ], "nullable": true }, - "unique_size": { + "skip": { "type": "integer", - "format": "int64" + "format": "int32", + "nullable": true }, - "zbs_volume_id": { - "type": "string" + "where": { + "allOf": [ + { + "$ref": "#/components/schemas/VmTemplateWhereInput" + } + ], + "nullable": true } }, - "required": [ - "assigned_size", - "bps", - "bps_max", - "bps_max_length", - "bps_rd", - "bps_rd_max", - "bps_rd_max_length", - "bps_wr", - "bps_wr_max", - "bps_wr_max_length", - "id", - "io_size", - "iops", - "iops_max", - "iops_max_length", - "iops_rd", - "iops_rd_max", - "iops_rd_max_length", - "iops_wr", - "iops_wr_max", - "iops_wr_max_length", - "is_shared", - "local_created_at", - "local_id", - "name", - "namespace_id", - "nqn_whitelist", - "nvmf_subsystem", - "replica_num", - "shared_size", - "snapshot_num", - "stripe_num", - "stripe_size", - "thin_provision", - "unique_size", - "zbs_volume_id" - ], "type": "object", "additionalProperties": false }, - "WithTask_NvmfNamespace_": { - "properties": { - "task_id": { - "type": "string", - "nullable": true - }, - "data": { - "$ref": "#/components/schemas/NvmfNamespace" - } - }, - "required": [ - "data" + "VmPlacementGroupOrderByInput": { + "enum": [ + "description_ASC", + "description_DESC", + "enabled_ASC", + "enabled_DESC", + "entityAsyncStatus_ASC", + "entityAsyncStatus_DESC", + "id_ASC", + "id_DESC", + "local_created_at_ASC", + "local_created_at_DESC", + "local_id_ASC", + "local_id_DESC", + "local_updated_at_ASC", + "local_updated_at_DESC", + "name_ASC", + "name_DESC", + "vm_host_must_enabled_ASC", + "vm_host_must_enabled_DESC", + "vm_host_must_policy_ASC", + "vm_host_must_policy_DESC", + "vm_host_prefer_enabled_ASC", + "vm_host_prefer_enabled_DESC", + "vm_host_prefer_policy_ASC", + "vm_host_prefer_policy_DESC", + "vm_vm_policy_ASC", + "vm_vm_policy_DESC", + "vm_vm_policy_enabled_ASC", + "vm_vm_policy_enabled_DESC" ], - "type": "object" + "type": "string" }, - "NvmfNamespaceCommonParams": { + "GetVmPlacementGroupsRequestBody": { "properties": { - "bps_wr_max_length": { - "type": "integer", - "format": "int64" - }, - "bps_wr_max_unit": { - "$ref": "#/components/schemas/BPSUnit" - }, - "bps_wr_max": { - "type": "integer", - "format": "int64" - }, - "bps_rd_max_length": { - "type": "integer", - "format": "int64" - }, - "bps_rd_max_unit": { - "$ref": "#/components/schemas/BPSUnit" + "after": { + "type": "string", + "nullable": true }, - "bps_rd_max": { - "type": "integer", - "format": "int64" + "before": { + "type": "string", + "nullable": true }, - "bps_max_length": { + "first": { "type": "integer", - "format": "int64" - }, - "bps_max_unit": { - "$ref": "#/components/schemas/BPSUnit" + "format": "int32", + "nullable": true }, - "bps_max": { + "last": { "type": "integer", - "format": "int64" + "format": "int32", + "nullable": true }, - "iops_wr_max_length": { - "type": "integer", - "format": "int64" + "orderBy": { + "allOf": [ + { + "$ref": "#/components/schemas/VmPlacementGroupOrderByInput" + } + ], + "nullable": true }, - "iops_wr_max": { + "skip": { "type": "integer", - "format": "int64" + "format": "int32", + "nullable": true }, - "iops_rd_max_length": { - "type": "integer", - "format": "int64" + "where": { + "allOf": [ + { + "$ref": "#/components/schemas/VmPlacementGroupWhereInput" + } + ], + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "AlertOrderByInput": { + "enum": [ + "cause_ASC", + "cause_DESC", + "create_time_ASC", + "create_time_DESC", + "ended_ASC", + "ended_DESC", + "id_ASC", + "id_DESC", + "impact_ASC", + "impact_DESC", + "labels_ASC", + "labels_DESC", + "local_create_time_ASC", + "local_create_time_DESC", + "local_end_time_ASC", + "local_end_time_DESC", + "local_id_ASC", + "local_id_DESC", + "local_start_time_ASC", + "local_start_time_DESC", + "local_update_time_ASC", + "local_update_time_DESC", + "message_ASC", + "message_DESC", + "severity_ASC", + "severity_DESC", + "solution_ASC", + "solution_DESC", + "threshold_ASC", + "threshold_DESC", + "value_ASC", + "value_DESC" + ], + "type": "string" + }, + "GetAlertsRequestBody": { + "properties": { + "after": { + "type": "string", + "nullable": true }, - "iops_rd_max": { - "type": "integer", - "format": "int64" + "before": { + "type": "string", + "nullable": true }, - "iops_max_length": { + "first": { "type": "integer", - "format": "int64" + "format": "int32", + "nullable": true }, - "iops_max": { + "last": { "type": "integer", - "format": "int64" + "format": "int32", + "nullable": true }, - "bps_wr_unit": { - "$ref": "#/components/schemas/BPSUnit" + "orderBy": { + "allOf": [ + { + "$ref": "#/components/schemas/AlertOrderByInput" + } + ], + "nullable": true }, - "bps_wr": { + "skip": { "type": "integer", - "format": "int64" - }, - "bps_rd_unit": { - "$ref": "#/components/schemas/BPSUnit" + "format": "int32", + "nullable": true }, - "bps_rd": { - "type": "integer", - "format": "int64" + "where": { + "allOf": [ + { + "$ref": "#/components/schemas/AlertWhereInput" + } + ], + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "GlobalAlertRuleOrderByInput": { + "enum": [ + "boolean_ASC", + "boolean_DESC", + "cause_ASC", + "cause_DESC", + "default_thresholds_ASC", + "default_thresholds_DESC", + "disabled_ASC", + "disabled_DESC", + "id_ASC", + "id_DESC", + "impact_ASC", + "impact_DESC", + "message_ASC", + "message_DESC", + "name_ASC", + "name_DESC", + "object_ASC", + "object_DESC", + "operator_ASC", + "operator_DESC", + "solution_ASC", + "solution_DESC", + "thresholds_ASC", + "thresholds_DESC", + "unit_ASC", + "unit_DESC" + ], + "type": "string" + }, + "GetGlobalAlertRulesRequestBody": { + "properties": { + "after": { + "type": "string", + "nullable": true }, - "bps_unit": { - "$ref": "#/components/schemas/BPSUnit" + "before": { + "type": "string", + "nullable": true }, - "bps": { + "first": { "type": "integer", - "format": "int64" + "format": "int32", + "nullable": true }, - "iops_wr": { + "last": { "type": "integer", - "format": "int64" + "format": "int32", + "nullable": true }, - "iops_rd": { - "type": "integer", - "format": "int64" + "orderBy": { + "allOf": [ + { + "$ref": "#/components/schemas/GlobalAlertRuleOrderByInput" + } + ], + "nullable": true }, - "iops": { + "skip": { "type": "integer", - "format": "int64" + "format": "int32", + "nullable": true }, - "nqn_whitelist": { - "type": "string" + "where": { + "allOf": [ + { + "$ref": "#/components/schemas/GlobalAlertRuleWhereInput" + } + ], + "nullable": true } }, - "type": "object" + "type": "object", + "additionalProperties": false }, - "NvmfNamespaceCreationParams": { - "allOf": [ - { - "properties": { - "namespace_id": { - "type": "integer", - "format": "int32" - }, - "group_id": { - "type": "string" - }, - "is_shared": { - "type": "boolean" - }, - "assigned_size_unit": { - "$ref": "#/components/schemas/ByteUnit" - }, - "assigned_size": { - "type": "integer", - "format": "int64" - }, - "replica_num": { - "type": "integer", - "format": "int32" - }, - "nvmf_subsystem_id": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": [ - "assigned_size", - "replica_num", - "nvmf_subsystem_id", - "name" - ], - "type": "object" - }, - { - "$ref": "#/components/schemas/NvmfNamespaceCommonParams" - } - ] + "SnapshotPlanOrderByInput": { + "enum": [ + "auto_delete_num_ASC", + "auto_delete_num_DESC", + "auto_execute_num_ASC", + "auto_execute_num_DESC", + "description_ASC", + "description_DESC", + "end_time_ASC", + "end_time_DESC", + "entityAsyncStatus_ASC", + "entityAsyncStatus_DESC", + "exec_h_m_ASC", + "exec_h_m_DESC", + "execute_plan_type_ASC", + "execute_plan_type_DESC", + "healthy_ASC", + "healthy_DESC", + "id_ASC", + "id_DESC", + "last_execute_end_time_ASC", + "last_execute_end_time_DESC", + "last_execute_status_ASC", + "last_execute_status_DESC", + "last_execute_time_ASC", + "last_execute_time_DESC", + "local_id_ASC", + "local_id_DESC", + "logical_size_bytes_ASC", + "logical_size_bytes_DESC", + "manual_delete_num_ASC", + "manual_delete_num_DESC", + "manual_execute_num_ASC", + "manual_execute_num_DESC", + "mirror_ASC", + "mirror_DESC", + "name_ASC", + "name_DESC", + "next_execute_time_ASC", + "next_execute_time_DESC", + "object_num_ASC", + "object_num_DESC", + "physical_size_bytes_ASC", + "physical_size_bytes_DESC", + "remain_snapshot_num_ASC", + "remain_snapshot_num_DESC", + "snapshot_group_num_ASC", + "snapshot_group_num_DESC", + "start_time_ASC", + "start_time_DESC", + "status_ASC", + "status_DESC" + ], + "type": "string" }, - "NvmfNamespaceUpdationParamsData": { - "allOf": [ - { - "properties": { - "assigned_size_unit": { - "$ref": "#/components/schemas/ByteUnit" - }, - "assigned_size": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" + "GetSnapshotPlansRequestBody": { + "properties": { + "after": { + "type": "string", + "nullable": true + }, + "before": { + "type": "string", + "nullable": true + }, + "first": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "last": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "orderBy": { + "allOf": [ + { + "$ref": "#/components/schemas/SnapshotPlanOrderByInput" } - }, - "type": "object" + ], + "nullable": true }, - { - "$ref": "#/components/schemas/NvmfNamespaceCommonParams" - } - ] - }, - "NvmfNamespaceUpdationParams": { - "properties": { - "data": { - "$ref": "#/components/schemas/NvmfNamespaceUpdationParamsData" + "skip": { + "type": "integer", + "format": "int32", + "nullable": true }, "where": { - "$ref": "#/components/schemas/NvmfNamespaceWhereInput" + "allOf": [ + { + "$ref": "#/components/schemas/SnapshotPlanWhereInput" + } + ], + "nullable": true } }, - "required": [ - "data", - "where" - ], - "type": "object" + "type": "object", + "additionalProperties": false }, - "DeleteNvmfNamespace": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" + "EntityFilterOrderByInput": { + "enum": [ + "apply_to_all_clusters_ASC", + "apply_to_all_clusters_DESC", + "entity_type_ASC", + "entity_type_DESC", + "filter_status_ASC", + "filter_status_DESC", + "id_ASC", + "id_DESC", + "last_executed_at_ASC", + "last_executed_at_DESC", + "name_ASC", + "name_DESC", + "preset_ASC", + "preset_DESC", + "rules_ASC", + "rules_DESC" ], - "type": "object" + "type": "string" }, - "WithTask_DeleteNvmfNamespace_": { + "GetEntityFiltersRequestBody": { "properties": { - "task_id": { + "after": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/DeleteNvmfNamespace" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "NvmfNamespaceDeletionParams": { - "properties": { - "data": { - "properties": { - "remove_snapshot": { - "type": "boolean" + "before": { + "type": "string", + "nullable": true + }, + "first": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "last": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "orderBy": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityFilterOrderByInput" } - }, - "required": [ - "remove_snapshot" ], - "type": "object" + "nullable": true + }, + "skip": { + "type": "integer", + "format": "int32", + "nullable": true }, "where": { - "$ref": "#/components/schemas/NvmfNamespaceWhereInput" + "allOf": [ + { + "$ref": "#/components/schemas/EntityFilterWhereInput" + } + ], + "nullable": true } }, - "required": [ - "data", - "where" - ], - "type": "object" + "type": "object", + "additionalProperties": false }, - "NvmfNamespaceCloneParams": { - "properties": { - "namespace_group_id": { - "type": "string" - }, - "nvmf_subsystem_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "snapshot_id": { - "type": "string" - } - }, - "required": [ - "nvmf_subsystem_id", - "name", - "snapshot_id" + "UserOrderByInput": { + "enum": [ + "auth_config_id_ASC", + "auth_config_id_DESC", + "display_username_ASC", + "display_username_DESC", + "email_address_ASC", + "email_address_DESC", + "id_ASC", + "id_DESC", + "internal_ASC", + "internal_DESC", + "ldap_dn_ASC", + "ldap_dn_DESC", + "mobile_phone_ASC", + "mobile_phone_DESC", + "name_ASC", + "name_DESC", + "password_expired_ASC", + "password_expired_DESC", + "password_recover_qa_ASC", + "password_recover_qa_DESC", + "password_updated_at_ASC", + "password_updated_at_DESC", + "role_ASC", + "role_DESC", + "source_ASC", + "source_DESC", + "username_ASC", + "username_DESC" ], - "type": "object" + "type": "string" }, - "NvmfNamespaceRollbackParams": { + "GetUsersRequestBody": { "properties": { - "namespace_id": { - "type": "string" + "after": { + "type": "string", + "nullable": true }, - "snapshot_id": { - "type": "string" - } - }, - "required": [ - "namespace_id", - "snapshot_id" - ], - "type": "object" - }, - "NvmfSubsystem": { - "properties": { - "bps": { - "type": "integer", - "format": "int64", + "before": { + "type": "string", "nullable": true }, - "bps_max": { + "first": { "type": "integer", - "format": "int64", + "format": "int32", "nullable": true }, - "bps_max_length": { + "last": { "type": "integer", - "format": "int64", + "format": "int32", "nullable": true }, - "bps_rd": { - "type": "integer", - "format": "int64", + "orderBy": { + "allOf": [ + { + "$ref": "#/components/schemas/UserOrderByInput" + } + ], "nullable": true }, - "bps_rd_max": { + "skip": { "type": "integer", - "format": "int64", + "format": "int32", "nullable": true }, - "bps_rd_max_length": { - "type": "integer", - "format": "int64", + "where": { + "allOf": [ + { + "$ref": "#/components/schemas/UserWhereInput" + } + ], + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "ConsistencyGroupOrderByInput": { + "enum": [ + "description_ASC", + "description_DESC", + "entityAsyncStatus_ASC", + "entityAsyncStatus_DESC", + "id_ASC", + "id_DESC", + "local_created_at_ASC", + "local_created_at_DESC", + "local_id_ASC", + "local_id_DESC", + "name_ASC", + "name_DESC", + "unique_size_ASC", + "unique_size_DESC" + ], + "type": "string" + }, + "GetConsistencyGroupsRequestBody": { + "properties": { + "after": { + "type": "string", "nullable": true }, - "bps_wr": { - "type": "integer", - "format": "int64", + "before": { + "type": "string", "nullable": true }, - "bps_wr_max": { + "first": { "type": "integer", - "format": "int64", + "format": "int32", "nullable": true }, - "bps_wr_max_length": { + "last": { "type": "integer", - "format": "int64", + "format": "int32", "nullable": true }, - "cluster": { - "$ref": "#/components/schemas/NestedCluster" - }, - "description": { - "type": "string" - }, - "entityAsyncStatus": { + "orderBy": { "allOf": [ { - "$ref": "#/components/schemas/EntityAsyncStatus" + "$ref": "#/components/schemas/ConsistencyGroupOrderByInput" } ], "nullable": true }, - "external_use": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "internal": { - "type": "boolean" - }, - "io_size": { + "skip": { "type": "integer", - "format": "int64", + "format": "int32", "nullable": true }, - "iops": { - "type": "integer", - "format": "int64", + "where": { + "allOf": [ + { + "$ref": "#/components/schemas/ConsistencyGroupWhereInput" + } + ], + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "IscsiConnectionOrderByInput": { + "enum": [ + "client_port_ASC", + "client_port_DESC", + "id_ASC", + "id_DESC", + "initiator_ip_ASC", + "initiator_ip_DESC", + "tr_type_ASC", + "tr_type_DESC", + "type_ASC", + "type_DESC" + ], + "type": "string" + }, + "IscsiConnectionWhereInput": { + "properties": { + "AND": { + "items": { + "$ref": "#/components/schemas/IscsiConnectionWhereInput" + }, + "type": "array", "nullable": true }, - "iops_max": { - "type": "integer", - "format": "int64", + "NOT": { + "items": { + "$ref": "#/components/schemas/IscsiConnectionWhereInput" + }, + "type": "array", "nullable": true }, - "iops_max_length": { - "type": "integer", - "format": "int64", + "OR": { + "items": { + "$ref": "#/components/schemas/IscsiConnectionWhereInput" + }, + "type": "array", "nullable": true }, - "iops_rd": { + "client_port": { "type": "integer", - "format": "int64", + "format": "int32", "nullable": true }, - "iops_rd_max": { + "client_port_gt": { "type": "integer", - "format": "int64", + "format": "int32", "nullable": true }, - "iops_rd_max_length": { + "client_port_gte": { "type": "integer", - "format": "int64", + "format": "int32", "nullable": true }, - "iops_wr": { - "type": "integer", - "format": "int64", + "client_port_in": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", "nullable": true }, - "iops_wr_max": { + "client_port_lt": { "type": "integer", - "format": "int64", + "format": "int32", "nullable": true }, - "iops_wr_max_length": { + "client_port_lte": { "type": "integer", - "format": "int64", + "format": "int32", "nullable": true }, - "ip_whitelist": { - "type": "string" + "client_port_not": { + "type": "integer", + "format": "int32", + "nullable": true }, - "labels": { + "client_port_not_in": { "items": { - "$ref": "#/components/schemas/NestedLabel" + "type": "integer", + "format": "int32" }, "type": "array", "nullable": true }, - "local_id": { - "type": "string" - }, - "name": { - "type": "string" + "cluster": { + "allOf": [ + { + "$ref": "#/components/schemas/ClusterWhereInput" + } + ], + "nullable": true }, - "namespace_groups": { - "items": { - "$ref": "#/components/schemas/NestedNamespaceGroup" - }, - "type": "array", + "host": { + "allOf": [ + { + "$ref": "#/components/schemas/HostWhereInput" + } + ], "nullable": true }, - "namespaces": { - "items": { - "$ref": "#/components/schemas/NestedNvmfNamespace" - }, - "type": "array", + "id": { + "type": "string", "nullable": true }, - "nqn_name": { - "type": "string" + "id_contains": { + "type": "string", + "nullable": true }, - "nqn_whitelist": { - "type": "string" + "id_ends_with": { + "type": "string", + "nullable": true }, - "policy": { - "$ref": "#/components/schemas/NvmfSubsystemPolicyType" + "id_gt": { + "type": "string", + "nullable": true }, - "replica_num": { - "type": "integer", - "format": "int32" + "id_gte": { + "type": "string", + "nullable": true }, - "stripe_num": { - "type": "integer", - "format": "int32" + "id_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true }, - "stripe_size": { - "type": "integer", - "format": "int64" + "id_lt": { + "type": "string", + "nullable": true }, - "thin_provision": { - "type": "boolean" - } - }, - "required": [ - "cluster", - "description", - "external_use", - "id", - "internal", - "ip_whitelist", - "local_id", - "name", - "nqn_name", - "nqn_whitelist", - "policy", - "replica_num", - "stripe_num", - "stripe_size", - "thin_provision" - ], - "type": "object", - "additionalProperties": false - }, - "WithTask_NvmfSubsystem_": { - "properties": { - "task_id": { + "id_lte": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/NvmfSubsystem" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "NvmfSubsystemCommonParams": { - "properties": { - "bps_wr_max_length": { - "type": "integer", - "format": "int64" + "id_not": { + "type": "string", + "nullable": true }, - "bps_wr_max_unit": { - "$ref": "#/components/schemas/BPSUnit" + "id_not_contains": { + "type": "string", + "nullable": true }, - "bps_wr_max": { - "type": "integer", - "format": "int64" + "id_not_ends_with": { + "type": "string", + "nullable": true }, - "bps_rd_max_length": { - "type": "integer", - "format": "int64" + "id_not_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true }, - "bps_rd_max_unit": { - "$ref": "#/components/schemas/BPSUnit" + "id_not_starts_with": { + "type": "string", + "nullable": true }, - "bps_rd_max": { - "type": "integer", - "format": "int64" + "id_starts_with": { + "type": "string", + "nullable": true }, - "bps_max_length": { - "type": "integer", - "format": "int64" + "initiator_ip": { + "type": "string", + "nullable": true }, - "bps_max_unit": { - "$ref": "#/components/schemas/BPSUnit" + "initiator_ip_contains": { + "type": "string", + "nullable": true }, - "bps_max": { - "type": "integer", - "format": "int64" + "initiator_ip_ends_with": { + "type": "string", + "nullable": true }, - "iops_wr_max_length": { - "type": "integer", - "format": "int64" + "initiator_ip_gt": { + "type": "string", + "nullable": true }, - "iops_wr_max": { - "type": "integer", - "format": "int64" + "initiator_ip_gte": { + "type": "string", + "nullable": true }, - "iops_rd_max_length": { - "type": "integer", - "format": "int64" + "initiator_ip_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true }, - "iops_rd_max": { - "type": "integer", - "format": "int64" + "initiator_ip_lt": { + "type": "string", + "nullable": true }, - "iops_max_length": { - "type": "integer", - "format": "int64" + "initiator_ip_lte": { + "type": "string", + "nullable": true }, - "iops_max": { - "type": "integer", - "format": "int64" + "initiator_ip_not": { + "type": "string", + "nullable": true }, - "bps_wr_unit": { - "$ref": "#/components/schemas/BPSUnit" + "initiator_ip_not_contains": { + "type": "string", + "nullable": true }, - "bps_wr": { - "type": "integer", - "format": "int64" + "initiator_ip_not_ends_with": { + "type": "string", + "nullable": true }, - "bps_rd_unit": { - "$ref": "#/components/schemas/BPSUnit" + "initiator_ip_not_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true }, - "bps_rd": { - "type": "integer", - "format": "int64" + "initiator_ip_not_starts_with": { + "type": "string", + "nullable": true }, - "bps_unit": { - "$ref": "#/components/schemas/BPSUnit" + "initiator_ip_starts_with": { + "type": "string", + "nullable": true }, - "bps": { - "type": "integer", - "format": "int64" + "iscsi_target": { + "allOf": [ + { + "$ref": "#/components/schemas/IscsiTargetWhereInput" + } + ], + "nullable": true }, - "iops_wr": { - "type": "integer", - "format": "int64" + "nvmf_subsystem": { + "allOf": [ + { + "$ref": "#/components/schemas/NvmfSubsystemWhereInput" + } + ], + "nullable": true }, - "iops_rd": { - "type": "integer", - "format": "int64" + "tr_type": { + "allOf": [ + { + "$ref": "#/components/schemas/StoreTransportType" + } + ], + "nullable": true }, - "iops": { - "type": "integer", - "format": "int64" + "tr_type_in": { + "items": { + "$ref": "#/components/schemas/StoreTransportType" + }, + "type": "array", + "nullable": true }, - "description": { - "type": "string" + "tr_type_not": { + "allOf": [ + { + "$ref": "#/components/schemas/StoreTransportType" + } + ], + "nullable": true }, - "nqn_whitelist": { - "type": "string" + "tr_type_not_in": { + "items": { + "$ref": "#/components/schemas/StoreTransportType" + }, + "type": "array", + "nullable": true }, - "ip_whitelist": { - "type": "string" - } - }, - "type": "object" - }, - "NvmfSubsystemCreationParams": { - "allOf": [ - { - "properties": { - "replica_num": { - "type": "integer", - "format": "int32" - }, - "thin_provision": { - "type": "boolean" - }, - "stripe_size_unit": { - "$ref": "#/components/schemas/ByteUnit" - }, - "stripe_size": { - "type": "integer", - "format": "int64" - }, - "stripe_num": { - "type": "integer", - "format": "int32" - }, - "policy": { - "$ref": "#/components/schemas/NvmfSubsystemPolicyType" - }, - "cluster_id": { - "type": "string" - }, - "name": { - "type": "string" + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/StoreConnectionType" } - }, - "required": [ - "replica_num", - "thin_provision", - "stripe_size", - "stripe_num", - "policy", - "cluster_id", - "name" ], - "type": "object" + "nullable": true }, - { - "$ref": "#/components/schemas/NvmfSubsystemCommonParams" - } - ] - }, - "NvmfSubsystemUpdationParams": { - "properties": { - "data": { - "$ref": "#/components/schemas/NvmfSubsystemCommonParams" + "type_in": { + "items": { + "$ref": "#/components/schemas/StoreConnectionType" + }, + "type": "array", + "nullable": true }, - "where": { - "$ref": "#/components/schemas/NvmfSubsystemWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "DeleteNvmfSubsystem": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "WithTask_DeleteNvmfSubsystem_": { - "properties": { - "task_id": { - "type": "string", + "type_not": { + "allOf": [ + { + "$ref": "#/components/schemas/StoreConnectionType" + } + ], "nullable": true }, - "data": { - "$ref": "#/components/schemas/DeleteNvmfSubsystem" + "type_not_in": { + "items": { + "$ref": "#/components/schemas/StoreConnectionType" + }, + "type": "array", + "nullable": true } }, - "required": [ - "data" - ], - "type": "object" + "type": "object", + "additionalProperties": false }, - "NvmfSubsystemDeletionParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/NvmfSubsystemWhereInput" - } - }, - "required": [ - "where" + "StoreTransportType": { + "enum": [ + "RDMA", + "TCP" ], - "type": "object" + "type": "string" }, - "DisassociateSystemServiceFromObsServiceResultType": { + "StoreConnectionType": { "enum": [ - "FAIL", - "SUCCESS" + "ISCSI", + "NVMe" ], "type": "string" }, - "DisassociateSystemServiceFromObsServiceResult": { + "GetIscsiConnectionsRequestBody": { "properties": { - "errorMessage": { - "type": "string" - }, - "errorCode": { - "type": "string" + "after": { + "type": "string", + "nullable": true }, - "result": { - "$ref": "#/components/schemas/DisassociateSystemServiceFromObsServiceResultType" - } - }, - "required": [ - "result" - ], - "type": "object" - }, - "WithTask_DisassociateSystemServiceFromObsServiceResult_": { - "properties": { - "task_id": { + "before": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/DisassociateSystemServiceFromObsServiceResult" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "ObservabilityConnectedSystemServiceType": { - "enum": [ - "BACKUP_SERVICE", - "CLOUDTOWER", - "EVEROUTE_SERVICE", - "OBSERVABILITY_SERVICE", - "REPLICATION_SERVICE", - "SFS_SERVICE" - ], - "type": "string" - }, - "DisassociateSystemServiceFromObsServiceParams": { - "properties": { - "system_service_type": { - "$ref": "#/components/schemas/ObservabilityConnectedSystemServiceType" + "first": { + "type": "integer", + "format": "int32", + "nullable": true }, - "system_service_id": { - "type": "string" - } - }, - "required": [ - "system_service_id" - ], - "type": "object" - }, - "Organization": { - "properties": { - "datacenters": { - "items": { - "$ref": "#/components/schemas/NestedDatacenter" - }, - "type": "array", + "last": { + "type": "integer", + "format": "int32", "nullable": true }, - "id": { - "type": "string" + "orderBy": { + "allOf": [ + { + "$ref": "#/components/schemas/IscsiConnectionOrderByInput" + } + ], + "nullable": true }, - "name": { - "type": "string" + "skip": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "where": { + "allOf": [ + { + "$ref": "#/components/schemas/IscsiConnectionWhereInput" + } + ], + "nullable": true } }, - "required": [ - "id", - "name" - ], "type": "object", "additionalProperties": false }, - "WithTask_Organization_": { - "properties": { - "task_id": { - "type": "string", - "nullable": true - }, - "data": { - "$ref": "#/components/schemas/Organization" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "OrganizationCreationParams": { - "properties": { - "name": { - "type": "string" - } - }, - "required": [ - "name" + "IscsiLunSnapshotOrderByInput": { + "enum": [ + "entityAsyncStatus_ASC", + "entityAsyncStatus_DESC", + "id_ASC", + "id_DESC", + "local_created_at_ASC", + "local_created_at_DESC", + "local_id_ASC", + "local_id_DESC", + "name_ASC", + "name_DESC", + "unique_size_ASC", + "unique_size_DESC" ], - "type": "object" + "type": "string" }, - "OrganizationUpdationParams": { + "GetIscsiLunSnapshotsRequestBody": { "properties": { - "data": { - "properties": { - "name": { - "type": "string" - } - }, - "type": "object" + "after": { + "type": "string", + "nullable": true }, - "where": { - "$ref": "#/components/schemas/OrganizationWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "DeleteOrganization": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "WithTask_DeleteOrganization_": { - "properties": { - "task_id": { + "before": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/DeleteOrganization" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "OrganizationDeletionParams": { - "properties": { + "first": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "last": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "orderBy": { + "allOf": [ + { + "$ref": "#/components/schemas/IscsiLunSnapshotOrderByInput" + } + ], + "nullable": true + }, + "skip": { + "type": "integer", + "format": "int32", + "nullable": true + }, "where": { - "$ref": "#/components/schemas/OrganizationWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "NestedZoneTopo": { - "properties": { - "id": { - "type": "string" + "allOf": [ + { + "$ref": "#/components/schemas/IscsiLunSnapshotWhereInput" + } + ], + "nullable": true } }, - "required": [ - "id" - ], "type": "object", "additionalProperties": false }, - "RackTopo": { + "SystemAuditLogOrderByInput": { + "enum": [ + "action_ASC", + "action_DESC", + "finished_at_ASC", + "finished_at_DESC", + "id_ASC", + "id_DESC", + "local_created_at_ASC", + "local_created_at_DESC", + "local_id_ASC", + "local_id_DESC", + "message_ASC", + "message_DESC", + "resource_id_ASC", + "resource_id_DESC", + "status_ASC", + "status_DESC" + ], + "type": "string" + }, + "SystemAuditLogWhereInput": { "properties": { - "brick_topoes": { + "AND": { "items": { - "$ref": "#/components/schemas/NestedBrickTopo" + "$ref": "#/components/schemas/SystemAuditLogWhereInput" }, "type": "array", "nullable": true }, - "cluster": { - "$ref": "#/components/schemas/NestedCluster" + "NOT": { + "items": { + "$ref": "#/components/schemas/SystemAuditLogWhereInput" + }, + "type": "array", + "nullable": true }, - "height": { - "type": "integer", - "format": "int32" + "OR": { + "items": { + "$ref": "#/components/schemas/SystemAuditLogWhereInput" + }, + "type": "array", + "nullable": true }, - "id": { - "type": "string" + "action": { + "type": "string", + "nullable": true }, - "local_id": { - "type": "string" + "action_contains": { + "type": "string", + "nullable": true }, - "name": { - "type": "string" + "action_ends_with": { + "type": "string", + "nullable": true }, - "zone_topo": { - "$ref": "#/components/schemas/NestedZoneTopo" - } - }, - "required": [ - "cluster", - "height", - "id", - "local_id", - "name", - "zone_topo" - ], - "type": "object", - "additionalProperties": false - }, - "WithTask_RackTopo_": { - "properties": { - "task_id": { + "action_gt": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/RackTopo" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "RackTopoCreationParams": { - "properties": { - "brick_topoes": { - "$ref": "#/components/schemas/BrickTopoWhereInput" + "action_gte": { + "type": "string", + "nullable": true }, - "cluster_id": { - "type": "string" + "action_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true }, - "zone_topo_id": { - "type": "string" + "action_lt": { + "type": "string", + "nullable": true }, - "height": { - "type": "integer", - "format": "int32" + "action_lte": { + "type": "string", + "nullable": true }, - "name": { - "type": "string" - } - }, - "required": [ - "cluster_id", - "zone_topo_id", - "height", - "name" - ], - "type": "object" - }, - "RackTopoUpdationParams": { - "properties": { - "data": { - "properties": { - "brick_topoes": { - "$ref": "#/components/schemas/BrickTopoWhereInput" - }, - "cluster_id": { - "type": "string" - }, - "zone_topo_id": { - "type": "string" - }, - "height": { - "type": "integer", - "format": "int32" - }, - "name": { - "type": "string" - } - }, - "type": "object" + "action_not": { + "type": "string", + "nullable": true }, - "where": { - "$ref": "#/components/schemas/RackTopoWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "DeleteRackTopo": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "WithTask_DeleteRackTopo_": { - "properties": { - "task_id": { + "action_not_contains": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/DeleteRackTopo" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "RackTopoDeletionParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/RackTopoWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "AccessMode": { - "enum": [ - "ALLOW", - "DENY", - "NONE" - ], - "type": "string" - }, - "PasswordComplexity": { - "enum": [ - "HIGH", - "LOW", - "MIDDLE" - ], - "type": "string" - }, - "NestedAuthSettings": { - "properties": { - "access_list": { + "action_not_ends_with": { + "type": "string", + "nullable": true + }, + "action_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "access_mode": { + "action_not_starts_with": { + "type": "string", + "nullable": true + }, + "action_starts_with": { + "type": "string", + "nullable": true + }, + "cluster": { "allOf": [ { - "$ref": "#/components/schemas/AccessMode" + "$ref": "#/components/schemas/ClusterWhereInput" } ], "nullable": true }, - "enable_single_session_login": { - "type": "boolean", + "finished_at": { + "type": "string", "nullable": true }, - "login_miss_num_threshold": { - "type": "integer", - "format": "int32", + "finished_at_gt": { + "type": "string", "nullable": true }, - "login_miss_time_threshold": { - "type": "integer", - "format": "int32", + "finished_at_gte": { + "type": "string", "nullable": true }, - "password_complexity": { - "allOf": [ - { - "$ref": "#/components/schemas/PasswordComplexity" - } - ], + "finished_at_in": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true }, - "password_expire_days": { - "type": "integer", - "format": "int32", + "finished_at_lt": { + "type": "string", "nullable": true }, - "session_max_age": { - "type": "integer", - "format": "int32", + "finished_at_lte": { + "type": "string", "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "GlobalSettings": { - "properties": { - "auth": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedAuthSettings" - } - ], + }, + "finished_at_not": { + "type": "string", + "nullable": true + }, + "finished_at_not_in": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true }, "id": { - "type": "string" + "type": "string", + "nullable": true }, - "vm_recycle_bin": { - "$ref": "#/components/schemas/NestedVmRecycleBin" - } - }, - "required": [ - "id", - "vm_recycle_bin" - ], - "type": "object", - "additionalProperties": false - }, - "WithTask_GlobalSettings_": { - "properties": { - "task_id": { + "id_contains": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/GlobalSettings" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "GlobalRecycleBinUpdationParams": { - "properties": { - "retain": { - "type": "integer", - "format": "int32" + "id_ends_with": { + "type": "string", + "nullable": true }, - "enabled": { - "type": "boolean" - } - }, - "required": [ - "retain", - "enabled" - ], - "type": "object" - }, - "ClusterRecycleBinCreationParams": { - "properties": { - "data": { - "properties": { - "retain": { - "type": "integer", - "format": "int32" - }, - "enabled": { - "type": "boolean" - } - }, - "required": [ - "retain", - "enabled" - ], - "type": "object" + "id_gt": { + "type": "string", + "nullable": true }, - "where": { - "$ref": "#/components/schemas/ClusterWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "ClusterRecycleBinUpdationParams": { - "properties": { - "data": { - "properties": { - "retain": { - "type": "integer", - "format": "int32" - }, - "enabled": { - "type": "boolean" - } - }, - "required": [ - "retain", - "enabled" - ], - "type": "object" + "id_gte": { + "type": "string", + "nullable": true }, - "where": { - "$ref": "#/components/schemas/ClusterWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "DeleteClusterRecycleBin": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "WithTask_DeleteClusterRecycleBin_": { - "properties": { - "task_id": { - "type": "string", - "nullable": true - }, - "data": { - "$ref": "#/components/schemas/DeleteClusterRecycleBin" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "ClusterRecycleBinDeletionParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/ClusterWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "NestedExecutePlan": { - "properties": { - "enabled": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "period": { - "type": "string" - }, - "retain": { - "type": "integer", - "format": "int32" - }, - "start_at": { - "type": "string" - } - }, - "required": [ - "enabled", - "id", - "period", - "retain", - "start_at" - ], - "type": "object", - "additionalProperties": false - }, - "ReportResourceInputEnum": { - "enum": [ - "ALERT", - "ALL", - "CLUSTER", - "DATA_CENTER", - "DISK", - "ELF_IMAGE", - "ENTITY_FILTERS", - "GLOBAL_ALERT_RULE", - "HOST", - "TASK", - "VDS", - "VLAN", - "VM", - "VM_TEMPLATE" - ], - "type": "string" - }, - "NestedResourceMeta": { - "properties": { - "fields": { + "id_in": { "items": { "type": "string" }, - "type": "array" - }, - "filter": { - "properties": {}, - "type": "object" - }, - "name": { - "type": "string" - }, - "type": { - "$ref": "#/components/schemas/ReportResourceInputEnum" - } - }, - "required": [ - "fields", - "filter", - "name", - "type" - ], - "type": "object", - "additionalProperties": false - }, - "NestedReportTask": { - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "type": "object", - "additionalProperties": false - }, - "ReportTemplate": { - "properties": { - "createdAt": { - "type": "string" - }, - "description": { - "type": "string" - }, - "execute_plan": { - "items": { - "$ref": "#/components/schemas/NestedExecutePlan" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" + "type": "array", + "nullable": true }, - "preset": { + "id_lt": { "type": "string", "nullable": true }, - "resource_meta": { - "items": { - "$ref": "#/components/schemas/NestedResourceMeta" - }, - "type": "array" - }, - "task_num": { - "type": "integer", - "format": "int32" - }, - "tasks": { - "items": { - "$ref": "#/components/schemas/NestedReportTask" - }, - "type": "array", - "nullable": true - } - }, - "required": [ - "createdAt", - "description", - "execute_plan", - "id", - "name", - "resource_meta", - "task_num" - ], - "type": "object", - "additionalProperties": false - }, - "WithTask_ReportTemplate_": { - "properties": { - "task_id": { + "id_lte": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/ReportTemplate" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "ExecutePlan": { - "properties": { - "start_at": { - "type": "string" - }, - "retain": { - "type": "integer", - "format": "int32" - }, - "period": { - "type": "string" - }, - "id": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "__typename": { + "id_not": { "type": "string", - "enum": [ - "ExecutePlan" - ], - "nullable": false - } - }, - "required": [ - "start_at", - "retain", - "period", - "id", - "enabled" - ], - "type": "object" - }, - "ResourceMeta": { - "properties": { - "type": { - "$ref": "#/components/schemas/ReportResourceInputEnum" - }, - "name": { - "type": "string" - }, - "filter": {}, - "fields": { - "items": { - "type": "string" - }, - "type": "array" + "nullable": true }, - "__typename": { + "id_not_contains": { "type": "string", - "enum": [ - "ResourceMeta" - ], - "nullable": false - } - }, - "required": [ - "type", - "name", - "filter", - "fields" - ], - "type": "object" - }, - "ReportTemplateCreationParams": { - "properties": { - "resource_meta": { - "items": { - "$ref": "#/components/schemas/ResourceMeta" - }, - "type": "array" - }, - "execute_plan": { - "items": { - "$ref": "#/components/schemas/ExecutePlan" - }, - "type": "array" + "nullable": true }, - "description": { - "type": "string" + "id_not_ends_with": { + "type": "string", + "nullable": true }, - "name": { - "type": "string" - } - }, - "required": [ - "resource_meta", - "execute_plan", - "name" - ], - "type": "object" - }, - "ReportTemplateWhereInput": { - "properties": { - "AND": { + "id_not_in": { "items": { - "$ref": "#/components/schemas/ReportTemplateWhereInput" + "type": "string" }, "type": "array", "nullable": true }, - "NOT": { - "items": { - "$ref": "#/components/schemas/ReportTemplateWhereInput" - }, - "type": "array", + "id_not_starts_with": { + "type": "string", "nullable": true }, - "OR": { - "items": { - "$ref": "#/components/schemas/ReportTemplateWhereInput" - }, - "type": "array", + "id_starts_with": { + "type": "string", "nullable": true }, - "createdAt": { + "local_created_at": { "type": "string", "nullable": true }, - "createdAt_gt": { + "local_created_at_gt": { "type": "string", "nullable": true }, - "createdAt_gte": { + "local_created_at_gte": { "type": "string", "nullable": true }, - "createdAt_in": { + "local_created_at_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "createdAt_lt": { + "local_created_at_lt": { "type": "string", "nullable": true }, - "createdAt_lte": { + "local_created_at_lte": { "type": "string", "nullable": true }, - "createdAt_not": { + "local_created_at_not": { "type": "string", "nullable": true }, - "createdAt_not_in": { + "local_created_at_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "description": { + "local_id": { "type": "string", "nullable": true }, - "description_contains": { + "local_id_contains": { "type": "string", "nullable": true }, - "description_ends_with": { + "local_id_ends_with": { "type": "string", "nullable": true }, - "description_gt": { + "local_id_gt": { "type": "string", "nullable": true }, - "description_gte": { + "local_id_gte": { "type": "string", "nullable": true }, - "description_in": { + "local_id_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "description_lt": { + "local_id_lt": { "type": "string", "nullable": true }, - "description_lte": { + "local_id_lte": { "type": "string", "nullable": true }, - "description_not": { + "local_id_not": { "type": "string", "nullable": true }, - "description_not_contains": { + "local_id_not_contains": { "type": "string", "nullable": true }, - "description_not_ends_with": { + "local_id_not_ends_with": { "type": "string", "nullable": true }, - "description_not_in": { + "local_id_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "description_not_starts_with": { + "local_id_not_starts_with": { "type": "string", "nullable": true }, - "description_starts_with": { + "local_id_starts_with": { "type": "string", "nullable": true }, - "id": { + "message": { "type": "string", "nullable": true }, - "id_contains": { + "message_contains": { "type": "string", "nullable": true }, - "id_ends_with": { + "message_ends_with": { "type": "string", "nullable": true }, - "id_gt": { + "message_gt": { "type": "string", "nullable": true }, - "id_gte": { + "message_gte": { "type": "string", "nullable": true }, - "id_in": { + "message_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "id_lt": { + "message_lt": { "type": "string", "nullable": true }, - "id_lte": { + "message_lte": { "type": "string", "nullable": true }, - "id_not": { + "message_not": { "type": "string", "nullable": true }, - "id_not_contains": { + "message_not_contains": { "type": "string", "nullable": true }, - "id_not_ends_with": { + "message_not_ends_with": { "type": "string", "nullable": true }, - "id_not_in": { + "message_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "id_not_starts_with": { + "message_not_starts_with": { "type": "string", "nullable": true }, - "id_starts_with": { + "message_starts_with": { "type": "string", "nullable": true }, - "name": { + "resource_id": { "type": "string", "nullable": true }, - "name_contains": { + "resource_id_contains": { "type": "string", "nullable": true }, - "name_ends_with": { + "resource_id_ends_with": { "type": "string", "nullable": true }, - "name_gt": { + "resource_id_gt": { "type": "string", "nullable": true }, - "name_gte": { + "resource_id_gte": { "type": "string", "nullable": true }, - "name_in": { + "resource_id_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "name_lt": { + "resource_id_lt": { "type": "string", "nullable": true }, - "name_lte": { + "resource_id_lte": { "type": "string", "nullable": true }, - "name_not": { + "resource_id_not": { "type": "string", "nullable": true }, - "name_not_contains": { + "resource_id_not_contains": { "type": "string", "nullable": true }, - "name_not_ends_with": { + "resource_id_not_ends_with": { "type": "string", "nullable": true }, - "name_not_in": { + "resource_id_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "name_not_starts_with": { - "type": "string", - "nullable": true - }, - "name_starts_with": { - "type": "string", - "nullable": true - }, - "preset": { - "type": "string", - "nullable": true - }, - "preset_contains": { - "type": "string", - "nullable": true - }, - "preset_ends_with": { + "resource_id_not_starts_with": { "type": "string", "nullable": true }, - "preset_gt": { + "resource_id_starts_with": { "type": "string", "nullable": true }, - "preset_gte": { - "type": "string", + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/UserAuditLogStatus" + } + ], "nullable": true }, - "preset_in": { + "status_in": { "items": { - "type": "string" + "$ref": "#/components/schemas/UserAuditLogStatus" }, "type": "array", "nullable": true }, - "preset_lt": { - "type": "string", - "nullable": true - }, - "preset_lte": { - "type": "string", - "nullable": true - }, - "preset_not": { - "type": "string", - "nullable": true - }, - "preset_not_contains": { - "type": "string", - "nullable": true - }, - "preset_not_ends_with": { - "type": "string", + "status_not": { + "allOf": [ + { + "$ref": "#/components/schemas/UserAuditLogStatus" + } + ], "nullable": true }, - "preset_not_in": { + "status_not_in": { "items": { - "type": "string" + "$ref": "#/components/schemas/UserAuditLogStatus" }, "type": "array", "nullable": true - }, - "preset_not_starts_with": { + } + }, + "type": "object", + "additionalProperties": false + }, + "UserAuditLogStatus": { + "enum": [ + "FAILED", + "SUCCESSED" + ], + "type": "string" + }, + "GetSystemAuditLogsRequestBody": { + "properties": { + "after": { "type": "string", "nullable": true }, - "preset_starts_with": { + "before": { "type": "string", "nullable": true }, - "task_num": { + "first": { "type": "integer", "format": "int32", "nullable": true }, - "task_num_gt": { + "last": { "type": "integer", "format": "int32", "nullable": true }, - "task_num_gte": { + "orderBy": { + "allOf": [ + { + "$ref": "#/components/schemas/SystemAuditLogOrderByInput" + } + ], + "nullable": true + }, + "skip": { "type": "integer", "format": "int32", "nullable": true }, - "task_num_in": { - "items": { - "type": "integer", - "format": "int32" + "where": { + "allOf": [ + { + "$ref": "#/components/schemas/SystemAuditLogWhereInput" + } + ], + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "UserAuditLogOrderByInput": { + "enum": [ + "action_ASC", + "action_DESC", + "auth_type_ASC", + "auth_type_DESC", + "createdAt_ASC", + "createdAt_DESC", + "finished_at_ASC", + "finished_at_DESC", + "id_ASC", + "id_DESC", + "ip_address_ASC", + "ip_address_DESC", + "message_ASC", + "message_DESC", + "resource_id_ASC", + "resource_id_DESC", + "resource_type_ASC", + "resource_type_DESC", + "started_at_ASC", + "started_at_DESC", + "status_ASC", + "status_DESC", + "username_ASC", + "username_DESC" + ], + "type": "string" + }, + "UserAuditLogWhereInput": { + "properties": { + "AND": { + "items": { + "$ref": "#/components/schemas/UserAuditLogWhereInput" }, "type": "array", "nullable": true }, - "task_num_lt": { - "type": "integer", - "format": "int32", + "NOT": { + "items": { + "$ref": "#/components/schemas/UserAuditLogWhereInput" + }, + "type": "array", "nullable": true }, - "task_num_lte": { - "type": "integer", - "format": "int32", + "OR": { + "items": { + "$ref": "#/components/schemas/UserAuditLogWhereInput" + }, + "type": "array", "nullable": true }, - "task_num_not": { - "type": "integer", - "format": "int32", + "action": { + "type": "string", "nullable": true }, - "task_num_not_in": { + "action_contains": { + "type": "string", + "nullable": true + }, + "action_ends_with": { + "type": "string", + "nullable": true + }, + "action_gt": { + "type": "string", + "nullable": true + }, + "action_gte": { + "type": "string", + "nullable": true + }, + "action_in": { "items": { - "type": "integer", - "format": "int32" + "type": "string" }, "type": "array", "nullable": true }, - "tasks_every": { - "allOf": [ - { - "$ref": "#/components/schemas/ReportTaskWhereInput" - } - ], + "action_lt": { + "type": "string", "nullable": true }, - "tasks_none": { - "allOf": [ - { - "$ref": "#/components/schemas/ReportTaskWhereInput" - } - ], + "action_lte": { + "type": "string", "nullable": true }, - "tasks_some": { - "allOf": [ - { - "$ref": "#/components/schemas/ReportTaskWhereInput" - } - ], + "action_not": { + "type": "string", "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "ReportTaskWhereInput": { - "properties": { - "AND": { + }, + "action_not_contains": { + "type": "string", + "nullable": true + }, + "action_not_ends_with": { + "type": "string", + "nullable": true + }, + "action_not_in": { "items": { - "$ref": "#/components/schemas/ReportTaskWhereInput" + "type": "string" }, "type": "array", "nullable": true }, - "NOT": { + "action_not_starts_with": { + "type": "string", + "nullable": true + }, + "action_starts_with": { + "type": "string", + "nullable": true + }, + "auth_type": { + "type": "string", + "nullable": true + }, + "auth_type_contains": { + "type": "string", + "nullable": true + }, + "auth_type_ends_with": { + "type": "string", + "nullable": true + }, + "auth_type_gt": { + "type": "string", + "nullable": true + }, + "auth_type_gte": { + "type": "string", + "nullable": true + }, + "auth_type_in": { "items": { - "$ref": "#/components/schemas/ReportTaskWhereInput" + "type": "string" }, "type": "array", "nullable": true }, - "OR": { + "auth_type_lt": { + "type": "string", + "nullable": true + }, + "auth_type_lte": { + "type": "string", + "nullable": true + }, + "auth_type_not": { + "type": "string", + "nullable": true + }, + "auth_type_not_contains": { + "type": "string", + "nullable": true + }, + "auth_type_not_ends_with": { + "type": "string", + "nullable": true + }, + "auth_type_not_in": { "items": { - "$ref": "#/components/schemas/ReportTaskWhereInput" + "type": "string" }, "type": "array", "nullable": true }, + "auth_type_not_starts_with": { + "type": "string", + "nullable": true + }, + "auth_type_starts_with": { + "type": "string", + "nullable": true + }, + "cluster": { + "allOf": [ + { + "$ref": "#/components/schemas/ClusterWhereInput" + } + ], + "nullable": true + }, "createdAt": { "type": "string", "nullable": true @@ -80796,6 +80726,44 @@ "type": "array", "nullable": true }, + "finished_at": { + "type": "string", + "nullable": true + }, + "finished_at_gt": { + "type": "string", + "nullable": true + }, + "finished_at_gte": { + "type": "string", + "nullable": true + }, + "finished_at_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, + "finished_at_lt": { + "type": "string", + "nullable": true + }, + "finished_at_lte": { + "type": "string", + "nullable": true + }, + "finished_at_not": { + "type": "string", + "nullable": true + }, + "finished_at_not_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, "id": { "type": "string", "nullable": true @@ -80858,149 +80826,303 @@ "type": "string", "nullable": true }, - "internal": { - "type": "boolean", + "ip_address": { + "type": "string", "nullable": true }, - "internal_not": { - "type": "boolean", + "ip_address_contains": { + "type": "string", "nullable": true }, - "name": { + "ip_address_ends_with": { "type": "string", "nullable": true }, - "name_contains": { + "ip_address_gt": { "type": "string", "nullable": true }, - "name_ends_with": { + "ip_address_gte": { "type": "string", "nullable": true }, - "name_gt": { + "ip_address_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, + "ip_address_lt": { "type": "string", "nullable": true }, - "name_gte": { + "ip_address_lte": { "type": "string", "nullable": true }, - "name_in": { + "ip_address_not": { + "type": "string", + "nullable": true + }, + "ip_address_not_contains": { + "type": "string", + "nullable": true + }, + "ip_address_not_ends_with": { + "type": "string", + "nullable": true + }, + "ip_address_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "name_lt": { + "ip_address_not_starts_with": { "type": "string", "nullable": true }, - "name_lte": { + "ip_address_starts_with": { "type": "string", "nullable": true }, - "name_not": { + "message": { "type": "string", "nullable": true }, - "name_not_contains": { + "message_contains": { "type": "string", "nullable": true }, - "name_not_ends_with": { + "message_ends_with": { "type": "string", "nullable": true }, - "name_not_in": { + "message_gt": { + "type": "string", + "nullable": true + }, + "message_gte": { + "type": "string", + "nullable": true + }, + "message_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "name_not_starts_with": { + "message_lt": { "type": "string", "nullable": true }, - "name_starts_with": { + "message_lte": { "type": "string", "nullable": true }, - "plan_id": { + "message_not": { "type": "string", "nullable": true }, - "plan_id_contains": { + "message_not_contains": { "type": "string", "nullable": true }, - "plan_id_ends_with": { + "message_not_ends_with": { "type": "string", "nullable": true }, - "plan_id_gt": { + "message_not_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, + "message_not_starts_with": { "type": "string", "nullable": true }, - "plan_id_gte": { + "message_starts_with": { "type": "string", "nullable": true }, - "plan_id_in": { + "resource_id": { + "type": "string", + "nullable": true + }, + "resource_id_contains": { + "type": "string", + "nullable": true + }, + "resource_id_ends_with": { + "type": "string", + "nullable": true + }, + "resource_id_gt": { + "type": "string", + "nullable": true + }, + "resource_id_gte": { + "type": "string", + "nullable": true + }, + "resource_id_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "plan_id_lt": { + "resource_id_lt": { "type": "string", "nullable": true }, - "plan_id_lte": { + "resource_id_lte": { "type": "string", "nullable": true }, - "plan_id_not": { + "resource_id_not": { "type": "string", "nullable": true }, - "plan_id_not_contains": { + "resource_id_not_contains": { "type": "string", "nullable": true }, - "plan_id_not_ends_with": { + "resource_id_not_ends_with": { "type": "string", "nullable": true }, - "plan_id_not_in": { + "resource_id_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "plan_id_not_starts_with": { + "resource_id_not_starts_with": { "type": "string", "nullable": true }, - "plan_id_starts_with": { + "resource_id_starts_with": { + "type": "string", + "nullable": true + }, + "resource_type": { + "type": "string", + "nullable": true + }, + "resource_type_contains": { + "type": "string", + "nullable": true + }, + "resource_type_ends_with": { + "type": "string", + "nullable": true + }, + "resource_type_gt": { + "type": "string", + "nullable": true + }, + "resource_type_gte": { + "type": "string", + "nullable": true + }, + "resource_type_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, + "resource_type_lt": { + "type": "string", + "nullable": true + }, + "resource_type_lte": { + "type": "string", + "nullable": true + }, + "resource_type_not": { + "type": "string", + "nullable": true + }, + "resource_type_not_contains": { + "type": "string", + "nullable": true + }, + "resource_type_not_ends_with": { + "type": "string", + "nullable": true + }, + "resource_type_not_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, + "resource_type_not_starts_with": { + "type": "string", + "nullable": true + }, + "resource_type_starts_with": { + "type": "string", + "nullable": true + }, + "started_at": { + "type": "string", + "nullable": true + }, + "started_at_gt": { + "type": "string", + "nullable": true + }, + "started_at_gte": { + "type": "string", + "nullable": true + }, + "started_at_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, + "started_at_lt": { + "type": "string", + "nullable": true + }, + "started_at_lte": { + "type": "string", + "nullable": true + }, + "started_at_not": { "type": "string", "nullable": true }, + "started_at_not_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, "status": { "allOf": [ { - "$ref": "#/components/schemas/TaskStatus" + "$ref": "#/components/schemas/UserAuditLogStatus" } ], "nullable": true }, "status_in": { "items": { - "$ref": "#/components/schemas/TaskStatus" + "$ref": "#/components/schemas/UserAuditLogStatus" }, "type": "array", "nullable": true @@ -81008,1158 +81130,1475 @@ "status_not": { "allOf": [ { - "$ref": "#/components/schemas/TaskStatus" + "$ref": "#/components/schemas/UserAuditLogStatus" } ], "nullable": true }, "status_not_in": { "items": { - "$ref": "#/components/schemas/TaskStatus" + "$ref": "#/components/schemas/UserAuditLogStatus" }, "type": "array", "nullable": true }, - "template": { + "user": { "allOf": [ { - "$ref": "#/components/schemas/ReportTemplateWhereInput" + "$ref": "#/components/schemas/UserWhereInput" } ], "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "ReportTemplateUpdationParams": { - "properties": { - "data": { - "properties": { - "resource_meta": { - "items": { - "$ref": "#/components/schemas/ResourceMeta" - }, - "type": "array" - }, - "execute_plan": { - "items": { - "$ref": "#/components/schemas/ExecutePlan" - }, - "type": "array" - }, - "description": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "type": "object" }, - "where": { - "$ref": "#/components/schemas/ReportTemplateWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "NestedReportTemplate": { - "properties": { - "id": { - "type": "string" + "username": { + "type": "string", + "nullable": true }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "type": "object", - "additionalProperties": false - }, - "ReportTask": { - "properties": { - "createdAt": { - "type": "string" + "username_contains": { + "type": "string", + "nullable": true }, - "id": { - "type": "string" + "username_ends_with": { + "type": "string", + "nullable": true }, - "internal": { - "type": "boolean" + "username_gt": { + "type": "string", + "nullable": true }, - "name": { - "type": "string" + "username_gte": { + "type": "string", + "nullable": true }, - "plan_id": { + "username_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, + "username_lt": { "type": "string", "nullable": true }, - "status": { - "$ref": "#/components/schemas/TaskStatus" + "username_lte": { + "type": "string", + "nullable": true }, - "template": { - "$ref": "#/components/schemas/NestedReportTemplate" + "username_not": { + "type": "string", + "nullable": true + }, + "username_not_contains": { + "type": "string", + "nullable": true + }, + "username_not_ends_with": { + "type": "string", + "nullable": true + }, + "username_not_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, + "username_not_starts_with": { + "type": "string", + "nullable": true + }, + "username_starts_with": { + "type": "string", + "nullable": true } }, - "required": [ - "createdAt", - "id", - "internal", - "name", - "status", - "template" - ], "type": "object", "additionalProperties": false }, - "WithTask_ReportTask_": { + "GetUserAuditLogsRequestBody": { "properties": { - "task_id": { + "after": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/ReportTask" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "ReporteTemplateGenerationParams": { - "properties": { + "before": { + "type": "string", + "nullable": true + }, + "first": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "last": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "orderBy": { + "allOf": [ + { + "$ref": "#/components/schemas/UserAuditLogOrderByInput" + } + ], + "nullable": true + }, + "skip": { + "type": "integer", + "format": "int32", + "nullable": true + }, "where": { - "$ref": "#/components/schemas/ReportTemplateWhereInput" + "allOf": [ + { + "$ref": "#/components/schemas/UserAuditLogWhereInput" + } + ], + "nullable": true } }, - "required": [ - "where" - ], - "type": "object" + "type": "object", + "additionalProperties": false }, - "DeleteReportTemplate": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" + "TaskOrderByInput": { + "enum": [ + "args_ASC", + "args_DESC", + "description_ASC", + "description_DESC", + "error_code_ASC", + "error_code_DESC", + "error_message_ASC", + "error_message_DESC", + "finished_at_ASC", + "finished_at_DESC", + "id_ASC", + "id_DESC", + "internal_ASC", + "internal_DESC", + "key_ASC", + "key_DESC", + "local_created_at_ASC", + "local_created_at_DESC", + "progress_ASC", + "progress_DESC", + "resource_id_ASC", + "resource_id_DESC", + "resource_mutation_ASC", + "resource_mutation_DESC", + "resource_rollback_error_ASC", + "resource_rollback_error_DESC", + "resource_rollback_retry_count_ASC", + "resource_rollback_retry_count_DESC", + "resource_rollbacked_ASC", + "resource_rollbacked_DESC", + "resource_type_ASC", + "resource_type_DESC", + "snapshot_ASC", + "snapshot_DESC", + "started_at_ASC", + "started_at_DESC", + "status_ASC", + "status_DESC", + "steps_ASC", + "steps_DESC", + "type_ASC", + "type_DESC" ], - "type": "object" + "type": "string" }, - "WithTask_DeleteReportTemplate_": { + "GetTasksRequestBody": { "properties": { - "task_id": { + "after": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/DeleteReportTemplate" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "ReportTemplateDeletionParams": { - "properties": { + "before": { + "type": "string", + "nullable": true + }, + "first": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "last": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "orderBy": { + "allOf": [ + { + "$ref": "#/components/schemas/TaskOrderByInput" + } + ], + "nullable": true + }, + "skip": { + "type": "integer", + "format": "int32", + "nullable": true + }, "where": { - "$ref": "#/components/schemas/ReportTemplateWhereInput" + "allOf": [ + { + "$ref": "#/components/schemas/TaskWhereInput" + } + ], + "nullable": true } }, - "required": [ - "where" + "type": "object", + "additionalProperties": false + }, + "IscsiLunOrderByInput": { + "enum": [ + "allowed_initiators_ASC", + "allowed_initiators_DESC", + "assigned_size_ASC", + "assigned_size_DESC", + "bps_ASC", + "bps_DESC", + "bps_max_ASC", + "bps_max_DESC", + "bps_max_length_ASC", + "bps_max_length_DESC", + "bps_rd_ASC", + "bps_rd_DESC", + "bps_rd_max_ASC", + "bps_rd_max_DESC", + "bps_rd_max_length_ASC", + "bps_rd_max_length_DESC", + "bps_wr_ASC", + "bps_wr_DESC", + "bps_wr_max_ASC", + "bps_wr_max_DESC", + "bps_wr_max_length_ASC", + "bps_wr_max_length_DESC", + "entityAsyncStatus_ASC", + "entityAsyncStatus_DESC", + "id_ASC", + "id_DESC", + "io_size_ASC", + "io_size_DESC", + "iops_ASC", + "iops_DESC", + "iops_max_ASC", + "iops_max_DESC", + "iops_max_length_ASC", + "iops_max_length_DESC", + "iops_rd_ASC", + "iops_rd_DESC", + "iops_rd_max_ASC", + "iops_rd_max_DESC", + "iops_rd_max_length_ASC", + "iops_rd_max_length_DESC", + "iops_wr_ASC", + "iops_wr_DESC", + "iops_wr_max_ASC", + "iops_wr_max_DESC", + "iops_wr_max_length_ASC", + "iops_wr_max_length_DESC", + "local_created_at_ASC", + "local_created_at_DESC", + "local_id_ASC", + "local_id_DESC", + "lun_id_ASC", + "lun_id_DESC", + "name_ASC", + "name_DESC", + "replica_num_ASC", + "replica_num_DESC", + "shared_size_ASC", + "shared_size_DESC", + "snapshot_num_ASC", + "snapshot_num_DESC", + "stripe_num_ASC", + "stripe_num_DESC", + "stripe_size_ASC", + "stripe_size_DESC", + "thin_provision_ASC", + "thin_provision_DESC", + "unique_logical_size_ASC", + "unique_logical_size_DESC", + "unique_size_ASC", + "unique_size_DESC", + "zbs_volume_id_ASC", + "zbs_volume_id_DESC" ], - "type": "object" + "type": "string" }, - "UserRoleNext": { + "GetIscsiLunsRequestBody": { "properties": { - "actions": { - "items": { - "type": "string" - }, - "type": "array" + "after": { + "type": "string", + "nullable": true }, - "id": { - "type": "string" + "before": { + "type": "string", + "nullable": true }, - "name": { - "type": "string" + "first": { + "type": "integer", + "format": "int32", + "nullable": true }, - "platform": { - "$ref": "#/components/schemas/UserRolePlatform" + "last": { + "type": "integer", + "format": "int32", + "nullable": true }, - "preset": { + "orderBy": { "allOf": [ { - "$ref": "#/components/schemas/UserRolePreset" + "$ref": "#/components/schemas/IscsiLunOrderByInput" } ], "nullable": true }, - "users": { - "items": { - "$ref": "#/components/schemas/NestedUser" - }, - "type": "array", + "skip": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "where": { + "allOf": [ + { + "$ref": "#/components/schemas/IscsiLunWhereInput" + } + ], "nullable": true } }, - "required": [ - "actions", - "id", - "name", - "platform" - ], "type": "object", "additionalProperties": false }, - "WithTask_UserRoleNext_": { + "NamespaceGroupOrderByInput": { + "enum": [ + "entityAsyncStatus_ASC", + "entityAsyncStatus_DESC", + "id_ASC", + "id_DESC", + "local_create_time_ASC", + "local_create_time_DESC", + "local_id_ASC", + "local_id_DESC", + "name_ASC", + "name_DESC" + ], + "type": "string" + }, + "GetNamespaceGroupsRequestBody": { "properties": { - "task_id": { + "after": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/UserRoleNext" + "before": { + "type": "string", + "nullable": true + }, + "first": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "last": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "orderBy": { + "allOf": [ + { + "$ref": "#/components/schemas/NamespaceGroupOrderByInput" + } + ], + "nullable": true + }, + "skip": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "where": { + "allOf": [ + { + "$ref": "#/components/schemas/NamespaceGroupWhereInput" + } + ], + "nullable": true } }, - "required": [ - "data" - ], - "type": "object" + "type": "object", + "additionalProperties": false }, - "ROLE_ACTION": { + "NvmfNamespaceOrderByInput": { "enum": [ - "*", - "MANAGE_DATA_CENTER", - "MANAGE_CLUSTER_CONNECTION", - "MANAGE_STORAGE_CLUSTER_CONNECTION", - "MANAGE_HOST", - "MANAGE_NIC_MTU", - "MANAGE_DISK", - "MANAGE_HARDWARE_TOPO", - "MANAGE_USB_DEVICE", - "MANAGE_GPU_DEVICE", - "MANAGE_VDS", - "MANAGE_VLAN", - "MANAGE_SYSTEM_VLAN", - "MANAGE_ISCSI_DATA_STORE", - "MANAGE_NFS_DATA_STORE", - "MANAGE_NVMF_DATA_STORE", - "CREATE_VM", - "UPDATE_VM", - "DELETE_VM", - "UPDATE_VM_ADVANCED_SETTING", - "UPDATE_VM_GUEST", - "VM_OPERATION_OPEN_TERMINAL", - "VM_OPERATION_MIGRATE", - "VM_OPERATION_VM_FOLDER", - "VM_OPERATION_VM_POWER", - "VM_OPERATION_CLONE", - "VM_OPERATION_INSTALL_TOOLS", - "VM_IMPORT_EXPORT", - "CREATE_VM_TEMPLATE", - "MANAGE_VM_TEMPLATE", - "VM_TEMPLATE_IMPORT_EXPORT", - "MANAGE_VM_SNAPSHOT", - "MANAGE_VM_VOLUME", - "VM_VOLUME_IMPORT_EXPORT", - "MANAGE_ISO", - "DOWNLOAD_ISO", - "QUERY_SENSITIVE_RESOURCE_LIST", - "QUERY_SENSITIVE_RESOURCE", - "MANAGE_SENSITIVE_RESOURCE", - "MANAGE_VM_PLACEMENT_GROUP", - "MANAGE_SNAPSHOT_PLAN", - "MANAGE_ALERT", - "MANAGE_MONITOR_VIEW", - "MANAGE_ENTITY_FILTER", - "MANAGE_CLUSTER_BASIC_INFO", - "MANAGE_CLUSTER_LICENCE", - "MANAGE_CLUSTER_SNMP_TRANSPORT", - "MANAGE_SNMP_TRAP", - "MANAGE_CLUSTER_VIP", - "MANAGE_CLUSTER_MANAGEMENT_IP", - "MANAGE_DNS_SERVER", - "MANAGE_NTP_SERVER", - "MANAGE_IPMI", - "MANAGE_CLUSTER_VM_CPU_MODEL", - "MANAGE_CLUSTER_VM_TOOLS", - "MANAGE_CLUSTER_HOT_MIGRATION", - "MANAGE_CLUSTER_HA", - "MANAGE_SSL_CERTIFICATE", - "MANAGE_LOG_COLLECTION", - "MANAGE_SYSLOG", - "MANAGE_LOG_FIND", - "MANAGE_LABEL", - "MANAGE_USER_AND_ROLE", - "MANAGE_PASSWORD_SETTINGS", - "MANAGE_ACCESS_CONTROL", - "MANAGE_SESSION_EXPIRATION", - "MANAGE_VCENTER_ASSOCIATION", - "MANAGE_ESXI_ASSOCIATION", - "MANAGE_AUDIT_LOG", - "MANAGE_ALERT_EMAIL_SETTING", - "MANAGE_SMTP_SERVER", - "MANAGE_UPGRADE_CENTER", - "MANAGE_VM_RECYCLE_BIN_SETTING", - "MANAGE_REPORT", - "MANAGE_SHARING_VM_TOOLS", - "MANAGE_ADVANCED_MONITOR", - "MANAGE_THIRD_PARTY_DRIVER", - "MANAGE_ORGANIZATION_NAME", - "MANAGE_CLOUD_TOWER_LICENSE", - "MANAGE_CONSISTENCY_GROUP", - "MANAGE_NIC", - "MANAGE_CLUSTER_ISCSI", - "MANAGE_BACKUP_LICENSE", - "MANAGE_BACKUP_PACKAGE", - "MANAGE_BACKUP_SERVICE", - "MANAGE_BACKUP_STORE_REPOSITORY", - "MANAGE_BACKUP_PLAN", - "MANAGE_BACKUP_TASK", - "MANAGE_BACKUP_RESTORE_POINT", - "MANAGE_BACKUP_RESTORE_POINT_TASK", - "MANAGE_SECURITY_POLICY", - "MANAGE_SECURITY_GROUP", - "ISOLATE_VM", - "MANAGE_EVEROUTE_LICENSE", - "MANAGE_EVEROUTE_PACKAGE", - "DEPLOY_EVEROUTE_CLUSTER", - "UNDEPLOY_EVEROUTE_CLUSTER", - "UPDATE_EVEROUTE_CLUSTER", - "UPGRADE_EVEROUTE_CLUSTER", - "MANAGE_EVEROUTE_NETWORK_POLICY_RULE_SERVICE", - "MANAGE_EVEROUTE_CLUSTER_ASSOCIATION", - "MANAGE_EVEROUTE_CLUSTER_GLOBAL_POLICY", - "MANAGE_MICRO_SEGMENTATION", - "MANAGE_LOAD_BALANCER_RESOURCE", - "MANAGE_LOAD_BALANCER", - "MANAGE_LOAD_BALANCER_VNET_BOND", - "MANAGE_VIRTUAL_PRIVATE_CLOUD_SERVICE", - "MANAGE_VIRTUAL_PRIVATE_CLOUD_CLUSTER_BINDING", - "MANAGE_VIRTUAL_PRIVATE_CLOUD_EDGE_GATEWAY", - "MANAGE_VIRTUAL_PRIVATE_CLOUD_EXTERNAL_SUBNET", - "MANAGE_VIRTUAL_PRIVATE_CLOUD_BASIC_RESOURCE", - "MANAGE_VIRTUAL_PRIVATE_CLOUD_SECURITY_GROUP", - "MANAGE_VIRTUAL_PRIVATE_CLOUD_SECURITY_POLICY", - "MANAGE_VIRTUAL_PRIVATE_CLOUD_ISOLATION_POLICY", - "MANAGE_VIRTUAL_PRIVATE_CLOUD_FLOATING_IP", - "MANAGE_VIRTUAL_PRIVATE_CLOUD_ROUTER_GATEWAY", - "MANAGE_VIRTUAL_PRIVATE_CLOUD_NAT_GATEWAY", - "MANAGE_VIRTUAL_PRIVATE_CLOUD_LAYER2_GATEWAY", - "MANAGE_VIRTUAL_PRIVATE_CLOUD_PEERING", - "MANAGE_VIRTUAL_PRIVATE_CLOUD_LOAD_BALANCER_RESOURCE", - "MANAGE_LDAP_AD_CONFIG", - "MANAGE_MFA_CONFIG", - "MANAGE_DEFAULT_LOGIN_OPTION", - "MANAGE_CLUSTER_STORAGE_POLICY", - "MANAGE_SKS_SERVICE", - "MANAGE_SKS_LICENSE", - "CONFIGURE_SKS_SERVICE", - "CREATE_SKS_WORKLOAD_CLUSTER", - "DELETE_SKS_WORKLOAD_CLUSTER", - "UPDATE_SKS_WORKLOAD_CLUSTER", - "MANAGE_CONTAINER_REGISTRY", - "DOWNLOAD_SKS_WORKLOAD_CLUSTER_KUBECONFIG", - "DOWNLOAD_SKS_WORKLOAD_SPEC_FILE", - "MANAGE_SKS_WORKLOAD_CLUSTER_RECONCILE", - "MANAGE_OBSERVABILITY_PACKAGE", - "MANAGE_OBSERVABILITY_SERVICE", - "CONFIG_DYNAMIC_RESOURCE_SCHEDULE", - "GENERATE_DRS_PROPOSALS", - "APPLY_DRS_PROPOSAL", - "MANAGE_AGENT_MESH", - "MANAGE_REPLICATION_SERVICE", - "MANAGE_REPLICATION_RESTORE_POINT", - "MANAGE_REPLICATION_PLAN", - "MANAGE_REPLICATION_TASK", - "MANAGE_REPLICATION_FAULT_TASK", - "MANAGE_REPLICA_OBJECT", - "MANAGE_CLUSTER_PRIORITIZED", - "SMTX_INSPECTOR", - "MANAGE_SFS_LICENSE", - "MANAGE_SFS_IMAGE", - "MANAGE_SFS_FILE_STORAGE_CLUSTER", - "MANAGE_SFS_FILE_SYSTEM_CONFIG", - "MANAGE_SFS_FILE_SYSTEM_ACCESSIBILITY", - "MANAGE_SFS_SNAPSHOT", - "MANAGE_CLOUDTOWER_SNMP_TRANSPORT", - "MANAGE_CLOUD_TOWER_NTP", - "MANAGE_CLOUDTOWER_WEBHOOK_NOTIFIER", - "MANAGE_API_KEY" + "assigned_size_ASC", + "assigned_size_DESC", + "bps_ASC", + "bps_DESC", + "bps_max_ASC", + "bps_max_DESC", + "bps_max_length_ASC", + "bps_max_length_DESC", + "bps_rd_ASC", + "bps_rd_DESC", + "bps_rd_max_ASC", + "bps_rd_max_DESC", + "bps_rd_max_length_ASC", + "bps_rd_max_length_DESC", + "bps_wr_ASC", + "bps_wr_DESC", + "bps_wr_max_ASC", + "bps_wr_max_DESC", + "bps_wr_max_length_ASC", + "bps_wr_max_length_DESC", + "entityAsyncStatus_ASC", + "entityAsyncStatus_DESC", + "id_ASC", + "id_DESC", + "io_size_ASC", + "io_size_DESC", + "iops_ASC", + "iops_DESC", + "iops_max_ASC", + "iops_max_DESC", + "iops_max_length_ASC", + "iops_max_length_DESC", + "iops_rd_ASC", + "iops_rd_DESC", + "iops_rd_max_ASC", + "iops_rd_max_DESC", + "iops_rd_max_length_ASC", + "iops_rd_max_length_DESC", + "iops_wr_ASC", + "iops_wr_DESC", + "iops_wr_max_ASC", + "iops_wr_max_DESC", + "iops_wr_max_length_ASC", + "iops_wr_max_length_DESC", + "is_shared_ASC", + "is_shared_DESC", + "local_created_at_ASC", + "local_created_at_DESC", + "local_id_ASC", + "local_id_DESC", + "name_ASC", + "name_DESC", + "namespace_id_ASC", + "namespace_id_DESC", + "nqn_whitelist_ASC", + "nqn_whitelist_DESC", + "replica_num_ASC", + "replica_num_DESC", + "shared_size_ASC", + "shared_size_DESC", + "snapshot_num_ASC", + "snapshot_num_DESC", + "stripe_num_ASC", + "stripe_num_DESC", + "stripe_size_ASC", + "stripe_size_DESC", + "thin_provision_ASC", + "thin_provision_DESC", + "unique_logical_size_ASC", + "unique_logical_size_DESC", + "unique_size_ASC", + "unique_size_DESC", + "zbs_volume_id_ASC", + "zbs_volume_id_DESC" ], "type": "string" }, - "RoleCreationParams": { - "properties": { - "actions": { - "items": { - "$ref": "#/components/schemas/ROLE_ACTION" - }, - "type": "array" - }, - "name": { - "type": "string", - "minLength": 1 - } - }, - "required": [ - "actions", - "name" - ], - "type": "object" - }, - "RoleUpdationParams": { - "properties": { - "data": { - "properties": { - "actions": { - "items": { - "$ref": "#/components/schemas/ROLE_ACTION" - }, - "type": "array" - }, - "name": { - "type": "string", - "minLength": 1 - } - }, - "type": "object" - }, - "where": { - "$ref": "#/components/schemas/UserRoleNextWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "DeleteRole": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "WithTask_DeleteRole_": { + "GetNvmfNamespacesRequestBody": { "properties": { - "task_id": { + "after": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/DeleteRole" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "RoleDeletionParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/UserRoleNextWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "NestedLabelGroup": { - "properties": { - "labels": { - "items": { - "$ref": "#/components/schemas/NestedLabel" - }, - "type": "array" - } - }, - "required": [ - "labels" - ], - "type": "object", - "additionalProperties": false - }, - "SecurityGroup": { - "properties": { - "description": { + "before": { "type": "string", "nullable": true }, - "everoute_cluster": { - "$ref": "#/components/schemas/NestedEverouteCluster" - }, - "id": { - "type": "string" - }, - "isolation_policies": { - "items": { - "$ref": "#/components/schemas/NestedIsolationPolicy" - }, - "type": "array", + "first": { + "type": "integer", + "format": "int32", "nullable": true }, - "label_groups": { - "items": { - "$ref": "#/components/schemas/NestedLabelGroup" - }, - "type": "array", + "last": { + "type": "integer", + "format": "int32", "nullable": true }, - "name": { - "type": "string" + "orderBy": { + "allOf": [ + { + "$ref": "#/components/schemas/NvmfNamespaceOrderByInput" + } + ], + "nullable": true }, - "security_policies": { - "items": { - "$ref": "#/components/schemas/NestedSecurityPolicy" - }, - "type": "array", + "skip": { + "type": "integer", + "format": "int32", "nullable": true }, - "vms": { - "items": { - "$ref": "#/components/schemas/NestedVm" - }, - "type": "array", + "where": { + "allOf": [ + { + "$ref": "#/components/schemas/NvmfNamespaceWhereInput" + } + ], "nullable": true } }, - "required": [ - "everoute_cluster", - "id", - "name" - ], "type": "object", "additionalProperties": false }, - "WithTask_SecurityGroup_": { - "properties": { - "task_id": { - "type": "string", - "nullable": true - }, - "data": { - "$ref": "#/components/schemas/SecurityGroup" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "SecurityGroupCreateParams": { - "properties": { - "vms": { - "$ref": "#/components/schemas/VmWhereInput" - }, - "label_groups": { - "items": { - "$ref": "#/components/schemas/LabelWhereInput" - }, - "type": "array", - "minItems": 1 - }, - "description": { - "type": "string" - }, - "everoute_cluster_id": { - "type": "string" - }, - "name": { - "type": "string", - "minLength": 1 - } - }, - "required": [ - "everoute_cluster_id", - "name" - ], - "type": "object" - }, - "DeleteSecurityGroup": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" + "ContentLibraryImageOrderByInput": { + "enum": [ + "createdAt_ASC", + "createdAt_DESC", + "description_ASC", + "description_DESC", + "entityAsyncStatus_ASC", + "entityAsyncStatus_DESC", + "id_ASC", + "id_DESC", + "name_ASC", + "name_DESC", + "path_ASC", + "path_DESC", + "size_ASC", + "size_DESC" ], - "type": "object" + "type": "string" }, - "WithTask_DeleteSecurityGroup_": { + "GetContentLibraryImagesRequestBody": { "properties": { - "task_id": { + "after": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/DeleteSecurityGroup" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "SecurityGroupWhereInput": { - "properties": { - "AND": { - "items": { - "$ref": "#/components/schemas/SecurityGroupWhereInput" - }, - "type": "array", + "before": { + "type": "string", "nullable": true }, - "NOT": { - "items": { - "$ref": "#/components/schemas/SecurityGroupWhereInput" - }, - "type": "array", + "first": { + "type": "integer", + "format": "int32", "nullable": true }, - "OR": { - "items": { - "$ref": "#/components/schemas/SecurityGroupWhereInput" - }, - "type": "array", + "last": { + "type": "integer", + "format": "int32", "nullable": true }, - "description": { - "type": "string", + "orderBy": { + "allOf": [ + { + "$ref": "#/components/schemas/ContentLibraryImageOrderByInput" + } + ], "nullable": true }, - "description_contains": { - "type": "string", + "skip": { + "type": "integer", + "format": "int32", "nullable": true }, - "description_ends_with": { - "type": "string", + "where": { + "allOf": [ + { + "$ref": "#/components/schemas/ContentLibraryImageWhereInput" + } + ], "nullable": true - }, - "description_gt": { + } + }, + "type": "object", + "additionalProperties": false + }, + "NvmfNamespaceSnapshotOrderByInput": { + "enum": [ + "entityAsyncStatus_ASC", + "entityAsyncStatus_DESC", + "id_ASC", + "id_DESC", + "local_created_at_ASC", + "local_created_at_DESC", + "local_id_ASC", + "local_id_DESC", + "name_ASC", + "name_DESC", + "unique_size_ASC", + "unique_size_DESC" + ], + "type": "string" + }, + "GetNvmfNamespaceSnapshotsRequestBody": { + "properties": { + "after": { "type": "string", "nullable": true }, - "description_gte": { + "before": { "type": "string", "nullable": true }, - "description_in": { - "items": { - "type": "string" - }, - "type": "array", + "first": { + "type": "integer", + "format": "int32", "nullable": true }, - "description_lt": { - "type": "string", + "last": { + "type": "integer", + "format": "int32", "nullable": true }, - "description_lte": { - "type": "string", + "orderBy": { + "allOf": [ + { + "$ref": "#/components/schemas/NvmfNamespaceSnapshotOrderByInput" + } + ], "nullable": true }, - "description_not": { - "type": "string", + "skip": { + "type": "integer", + "format": "int32", "nullable": true }, - "description_not_contains": { - "type": "string", + "where": { + "allOf": [ + { + "$ref": "#/components/schemas/NvmfNamespaceSnapshotWhereInput" + } + ], "nullable": true - }, - "description_not_ends_with": { + } + }, + "type": "object", + "additionalProperties": false + }, + "ContentLibraryVmTemplateOrderByInput": { + "enum": [ + "architecture_ASC", + "architecture_DESC", + "cloud_init_supported_ASC", + "cloud_init_supported_DESC", + "createdAt_ASC", + "createdAt_DESC", + "description_ASC", + "description_DESC", + "entityAsyncStatus_ASC", + "entityAsyncStatus_DESC", + "id_ASC", + "id_DESC", + "memory_ASC", + "memory_DESC", + "name_ASC", + "name_DESC", + "os_ASC", + "os_DESC", + "size_ASC", + "size_DESC", + "vcpu_ASC", + "vcpu_DESC" + ], + "type": "string" + }, + "GetContentLibraryVmTemplatesRequestBody": { + "properties": { + "after": { "type": "string", "nullable": true }, - "description_not_in": { - "items": { - "type": "string" - }, - "type": "array", + "before": { + "type": "string", "nullable": true }, - "description_not_starts_with": { - "type": "string", + "first": { + "type": "integer", + "format": "int32", "nullable": true }, - "description_starts_with": { - "type": "string", + "last": { + "type": "integer", + "format": "int32", "nullable": true }, - "everoute_cluster": { + "orderBy": { "allOf": [ { - "$ref": "#/components/schemas/EverouteClusterWhereInput" + "$ref": "#/components/schemas/ContentLibraryVmTemplateOrderByInput" } ], "nullable": true }, - "id": { - "type": "string", + "skip": { + "type": "integer", + "format": "int32", "nullable": true }, - "id_contains": { + "where": { + "allOf": [ + { + "$ref": "#/components/schemas/ContentLibraryVmTemplateWhereInput" + } + ], + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "NvmfSubsystemOrderByInput": { + "enum": [ + "bps_ASC", + "bps_DESC", + "bps_max_ASC", + "bps_max_DESC", + "bps_max_length_ASC", + "bps_max_length_DESC", + "bps_rd_ASC", + "bps_rd_DESC", + "bps_rd_max_ASC", + "bps_rd_max_DESC", + "bps_rd_max_length_ASC", + "bps_rd_max_length_DESC", + "bps_wr_ASC", + "bps_wr_DESC", + "bps_wr_max_ASC", + "bps_wr_max_DESC", + "bps_wr_max_length_ASC", + "bps_wr_max_length_DESC", + "description_ASC", + "description_DESC", + "entityAsyncStatus_ASC", + "entityAsyncStatus_DESC", + "external_use_ASC", + "external_use_DESC", + "id_ASC", + "id_DESC", + "internal_ASC", + "internal_DESC", + "io_size_ASC", + "io_size_DESC", + "iops_ASC", + "iops_DESC", + "iops_max_ASC", + "iops_max_DESC", + "iops_max_length_ASC", + "iops_max_length_DESC", + "iops_rd_ASC", + "iops_rd_DESC", + "iops_rd_max_ASC", + "iops_rd_max_DESC", + "iops_rd_max_length_ASC", + "iops_rd_max_length_DESC", + "iops_wr_ASC", + "iops_wr_DESC", + "iops_wr_max_ASC", + "iops_wr_max_DESC", + "iops_wr_max_length_ASC", + "iops_wr_max_length_DESC", + "ip_whitelist_ASC", + "ip_whitelist_DESC", + "local_id_ASC", + "local_id_DESC", + "name_ASC", + "name_DESC", + "nqn_name_ASC", + "nqn_name_DESC", + "nqn_whitelist_ASC", + "nqn_whitelist_DESC", + "policy_ASC", + "policy_DESC", + "replica_num_ASC", + "replica_num_DESC", + "stripe_num_ASC", + "stripe_num_DESC", + "stripe_size_ASC", + "stripe_size_DESC", + "thin_provision_ASC", + "thin_provision_DESC" + ], + "type": "string" + }, + "GetNvmfSubsystemsRequestBody": { + "properties": { + "after": { "type": "string", "nullable": true }, - "id_ends_with": { + "before": { "type": "string", "nullable": true }, - "id_gt": { - "type": "string", + "first": { + "type": "integer", + "format": "int32", "nullable": true }, - "id_gte": { - "type": "string", + "last": { + "type": "integer", + "format": "int32", "nullable": true }, - "id_in": { + "orderBy": { + "allOf": [ + { + "$ref": "#/components/schemas/NvmfSubsystemOrderByInput" + } + ], + "nullable": true + }, + "skip": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "where": { + "allOf": [ + { + "$ref": "#/components/schemas/NvmfSubsystemWhereInput" + } + ], + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "TableReporterParams": { + "properties": { + "filter": { + "properties": { + "nvmfSubsystems": { + "$ref": "#/components/schemas/GetNvmfSubsystemsRequestBody" + }, + "contentLibraryVmTemplates": { + "$ref": "#/components/schemas/GetContentLibraryVmTemplatesRequestBody" + }, + "nvmfNamespaceSnapshots": { + "$ref": "#/components/schemas/GetNvmfNamespaceSnapshotsRequestBody" + }, + "contentLibraryImages": { + "$ref": "#/components/schemas/GetContentLibraryImagesRequestBody" + }, + "nvmfNamespaces": { + "$ref": "#/components/schemas/GetNvmfNamespacesRequestBody" + }, + "namespaceGroups": { + "$ref": "#/components/schemas/GetNamespaceGroupsRequestBody" + }, + "iscsiLuns": { + "$ref": "#/components/schemas/GetIscsiLunsRequestBody" + }, + "tasks": { + "$ref": "#/components/schemas/GetTasksRequestBody" + }, + "userAuditLogs": { + "$ref": "#/components/schemas/GetUserAuditLogsRequestBody" + }, + "systemAuditLogs": { + "$ref": "#/components/schemas/GetSystemAuditLogsRequestBody" + }, + "iscsiLunSnapshots": { + "$ref": "#/components/schemas/GetIscsiLunSnapshotsRequestBody" + }, + "iscsiConnections": { + "$ref": "#/components/schemas/GetIscsiConnectionsRequestBody" + }, + "consistencyGroups": { + "$ref": "#/components/schemas/GetConsistencyGroupsRequestBody" + }, + "users": { + "$ref": "#/components/schemas/GetUsersRequestBody" + }, + "vmEntityFilters": { + "$ref": "#/components/schemas/GetEntityFiltersRequestBody" + }, + "snapshotPlans": { + "$ref": "#/components/schemas/GetSnapshotPlansRequestBody" + }, + "globalAlertRules": { + "$ref": "#/components/schemas/GetGlobalAlertRulesRequestBody" + }, + "alerts": { + "$ref": "#/components/schemas/GetAlertsRequestBody" + }, + "vmPlacementGroups": { + "$ref": "#/components/schemas/GetVmPlacementGroupsRequestBody" + }, + "vmTemplates": { + "$ref": "#/components/schemas/GetVmTemplatesRequestBody" + }, + "elfImages": { + "$ref": "#/components/schemas/GetElfImagesRequestBody" + }, + "vmVolumes": { + "$ref": "#/components/schemas/GetVmVolumesRequestBody" + }, + "vlans": { + "$ref": "#/components/schemas/GetVlansRequestBody" + }, + "disks": { + "$ref": "#/components/schemas/GetDisksRequestBody" + }, + "vdses": { + "$ref": "#/components/schemas/GetVdsesRequestBody" + }, + "elfDataStores": { + "$ref": "#/components/schemas/GetElfDataStoresRequestBody", + "deprecated": true + }, + "vms": { + "$ref": "#/components/schemas/GetVmsRequestBody" + }, + "nfsExports": { + "$ref": "#/components/schemas/GetNfsExportsRequestBody" + }, + "iscsiTargets": { + "$ref": "#/components/schemas/GetIscsiTargetsRequestBody" + }, + "usbDevices": { + "$ref": "#/components/schemas/GetUsbDevicesRequestBody" + }, + "nics": { + "$ref": "#/components/schemas/GetNicsRequestBody" + }, + "clusters": { + "$ref": "#/components/schemas/GetClustersRequestBody" + }, + "datacenters": { + "$ref": "#/components/schemas/GetDatacentersRequestBody" + }, + "hosts": { + "$ref": "#/components/schemas/GetHostsRequestBody" + } + }, + "type": "object" + }, + "columns": { "items": { - "type": "string" + "$ref": "#/components/schemas/ColumnConfig" + }, + "type": "array" + }, + "name": { + "type": "string" + } + }, + "required": [ + "filter", + "columns", + "name" + ], + "type": "object" + }, + "UploadTaskWhereInput": { + "properties": { + "AND": { + "items": { + "$ref": "#/components/schemas/UploadTaskWhereInput" }, "type": "array", "nullable": true }, - "id_lt": { - "type": "string", + "NOT": { + "items": { + "$ref": "#/components/schemas/UploadTaskWhereInput" + }, + "type": "array", "nullable": true }, - "id_lte": { - "type": "string", + "OR": { + "items": { + "$ref": "#/components/schemas/UploadTaskWhereInput" + }, + "type": "array", "nullable": true }, - "id_not": { + "chunk_size": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "chunk_size_gt": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "chunk_size_gte": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "chunk_size_in": { + "items": { + "type": "integer", + "format": "int64" + }, + "type": "array", + "nullable": true + }, + "chunk_size_lt": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "chunk_size_lte": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "chunk_size_not": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "chunk_size_not_in": { + "items": { + "type": "integer", + "format": "int64" + }, + "type": "array", + "nullable": true + }, + "current_chunk": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "current_chunk_gt": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "current_chunk_gte": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "current_chunk_in": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", + "nullable": true + }, + "current_chunk_lt": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "current_chunk_lte": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "current_chunk_not": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "current_chunk_not_in": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", + "nullable": true + }, + "finished_at": { "type": "string", "nullable": true }, - "id_not_contains": { + "finished_at_gt": { "type": "string", "nullable": true }, - "id_not_ends_with": { + "finished_at_gte": { "type": "string", "nullable": true }, - "id_not_in": { + "finished_at_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "id_not_starts_with": { + "finished_at_lt": { "type": "string", "nullable": true }, - "id_starts_with": { + "finished_at_lte": { "type": "string", "nullable": true }, - "isolation_policies_every": { - "allOf": [ - { - "$ref": "#/components/schemas/IsolationPolicyWhereInput" - } - ], - "nullable": true - }, - "isolation_policies_none": { - "allOf": [ - { - "$ref": "#/components/schemas/IsolationPolicyWhereInput" - } - ], + "finished_at_not": { + "type": "string", "nullable": true }, - "isolation_policies_some": { - "allOf": [ - { - "$ref": "#/components/schemas/IsolationPolicyWhereInput" - } - ], + "finished_at_not_in": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true }, - "name": { + "id": { "type": "string", "nullable": true }, - "name_contains": { + "id_contains": { "type": "string", "nullable": true }, - "name_ends_with": { + "id_ends_with": { "type": "string", "nullable": true }, - "name_gt": { + "id_gt": { "type": "string", "nullable": true }, - "name_gte": { + "id_gte": { "type": "string", "nullable": true }, - "name_in": { + "id_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "name_lt": { + "id_lt": { "type": "string", "nullable": true }, - "name_lte": { + "id_lte": { "type": "string", "nullable": true }, - "name_not": { + "id_not": { "type": "string", "nullable": true }, - "name_not_contains": { + "id_not_contains": { "type": "string", "nullable": true }, - "name_not_ends_with": { + "id_not_ends_with": { "type": "string", "nullable": true }, - "name_not_in": { + "id_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "name_not_starts_with": { + "id_not_starts_with": { "type": "string", "nullable": true }, - "name_starts_with": { + "id_starts_with": { "type": "string", "nullable": true }, - "security_policies_every": { + "resource_type": { "allOf": [ { - "$ref": "#/components/schemas/SecurityPolicyWhereInput" + "$ref": "#/components/schemas/UploadResourceType" } ], "nullable": true }, - "security_policies_none": { + "resource_type_in": { + "items": { + "$ref": "#/components/schemas/UploadResourceType" + }, + "type": "array", + "nullable": true + }, + "resource_type_not": { "allOf": [ { - "$ref": "#/components/schemas/SecurityPolicyWhereInput" + "$ref": "#/components/schemas/UploadResourceType" } ], "nullable": true }, - "security_policies_some": { - "allOf": [ - { - "$ref": "#/components/schemas/SecurityPolicyWhereInput" - } - ], + "resource_type_not_in": { + "items": { + "$ref": "#/components/schemas/UploadResourceType" + }, + "type": "array", "nullable": true }, - "vms_every": { - "allOf": [ - { - "$ref": "#/components/schemas/VmWhereInput" - } - ], + "size": { + "type": "integer", + "format": "int64", "nullable": true }, - "vms_none": { - "allOf": [ - { - "$ref": "#/components/schemas/VmWhereInput" - } - ], + "size_gt": { + "type": "integer", + "format": "int64", "nullable": true }, - "vms_some": { - "allOf": [ - { - "$ref": "#/components/schemas/VmWhereInput" - } - ], + "size_gte": { + "type": "integer", + "format": "int64", "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "SecurityGroupDeleteParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/SecurityGroupWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "SecurityGroupUpdateParams": { - "properties": { - "label_groups": { + }, + "size_in": { "items": { - "$ref": "#/components/schemas/LabelWhereInput" + "type": "integer", + "format": "int64" }, - "type": "array" + "type": "array", + "nullable": true }, - "vms": { - "$ref": "#/components/schemas/VmWhereInput" + "size_lt": { + "type": "integer", + "format": "int64", + "nullable": true }, - "description": { - "type": "string" + "size_lte": { + "type": "integer", + "format": "int64", + "nullable": true }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "SecurityGroupUpdateBody": { - "properties": { - "data": { - "$ref": "#/components/schemas/SecurityGroupUpdateParams" + "size_not": { + "type": "integer", + "format": "int64", + "nullable": true }, - "where": { - "$ref": "#/components/schemas/SecurityGroupWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "NestedSecurityGroup": { - "properties": { - "id": { - "type": "string" + "size_not_in": { + "items": { + "type": "integer", + "format": "int64" + }, + "type": "array", + "nullable": true }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "type": "object", - "additionalProperties": false - }, - "NestedSecurityPolicyApply": { - "properties": { - "communicable": { - "type": "boolean" + "started_at": { + "type": "string", + "nullable": true }, - "security_group": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedSecurityGroup" - } - ], + "started_at_gt": { + "type": "string", "nullable": true }, - "security_group_id": { + "started_at_gte": { "type": "string", "nullable": true }, - "selector": { + "started_at_in": { "items": { - "$ref": "#/components/schemas/NestedLabel" + "type": "string" }, - "type": "array" + "type": "array", + "nullable": true }, - "selector_ids": { + "started_at_lt": { + "type": "string", + "nullable": true + }, + "started_at_lte": { + "type": "string", + "nullable": true + }, + "started_at_not": { + "type": "string", + "nullable": true + }, + "started_at_not_in": { "items": { "type": "string" }, - "type": "array" - } - }, - "required": [ - "communicable", - "selector", - "selector_ids" - ], - "type": "object", - "additionalProperties": false - }, - "NetworkPolicyRulePortProtocol": { - "enum": [ - "ALG", - "ICMP", - "IPIP", - "TCP", - "UDP" - ], - "type": "string" - }, - "NestedNetworkPolicyRulePort": { - "properties": { - "port": { - "type": "string", + "type": "array", "nullable": true }, - "protocol": { - "$ref": "#/components/schemas/NetworkPolicyRulePortProtocol" - } - }, - "required": [ - "protocol" - ], - "type": "object", - "additionalProperties": false - }, - "NetworkPolicyRuleType": { - "enum": [ - "ALL", - "IP_BLOCK", - "SECURITY_GROUP", - "SELECTOR" - ], - "type": "string" - }, - "NestedNetworkPolicyRule": { - "properties": { - "ip_block": { - "type": "string", + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/UploadTaskStatus" + } + ], "nullable": true }, - "ports": { + "status_in": { "items": { - "$ref": "#/components/schemas/NestedNetworkPolicyRulePort" + "$ref": "#/components/schemas/UploadTaskStatus" }, "type": "array", "nullable": true }, - "security_group": { + "status_not": { "allOf": [ { - "$ref": "#/components/schemas/NestedSecurityGroup" + "$ref": "#/components/schemas/UploadTaskStatus" } ], "nullable": true }, - "security_group_id": { + "status_not_in": { + "items": { + "$ref": "#/components/schemas/UploadTaskStatus" + }, + "type": "array", + "nullable": true + }, + "updatedAt": { "type": "string", "nullable": true }, - "selector": { + "updatedAt_gt": { + "type": "string", + "nullable": true + }, + "updatedAt_gte": { + "type": "string", + "nullable": true + }, + "updatedAt_in": { "items": { - "$ref": "#/components/schemas/NestedLabel" + "type": "string" }, "type": "array", "nullable": true }, - "selector_ids": { + "updatedAt_lt": { + "type": "string", + "nullable": true + }, + "updatedAt_lte": { + "type": "string", + "nullable": true + }, + "updatedAt_not": { + "type": "string", + "nullable": true + }, + "updatedAt_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true - }, - "type": { - "$ref": "#/components/schemas/NetworkPolicyRuleType" } }, - "required": [ - "type" - ], "type": "object", "additionalProperties": false }, - "SecurityPolicy": { + "CancelUploadTaskParams": { "properties": { - "apply_to": { - "items": { - "$ref": "#/components/schemas/NestedSecurityPolicyApply" - }, - "type": "array" + "where": { + "$ref": "#/components/schemas/UploadTaskWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "UsbDevice": { + "properties": { + "binded": { + "type": "boolean" }, "description": { "type": "string" }, - "egress": { - "items": { - "$ref": "#/components/schemas/NestedNetworkPolicyRule" - }, - "type": "array", + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], "nullable": true }, - "everoute_cluster": { - "$ref": "#/components/schemas/NestedEverouteCluster" + "host": { + "$ref": "#/components/schemas/NestedHost" }, "id": { "type": "string" }, - "ingress": { + "local_created_at": { + "type": "string" + }, + "local_id": { + "type": "string" + }, + "manufacturer": { + "type": "string" + }, + "name": { + "type": "string" + }, + "size": { + "type": "integer", + "format": "int64" + }, + "status": { + "$ref": "#/components/schemas/UsbDeviceStatus" + }, + "usb_type": { + "type": "string" + }, + "vms": { "items": { - "$ref": "#/components/schemas/NestedNetworkPolicyRule" + "$ref": "#/components/schemas/NestedVm" }, "type": "array", "nullable": true }, - "name": { - "type": "string" - }, - "policy_mode": { + "vm": { "allOf": [ { - "$ref": "#/components/schemas/PolicyMode" + "$ref": "#/components/schemas/NestedVm" } ], - "nullable": true + "nullable": true, + "deprecated": true } }, "required": [ - "apply_to", + "binded", "description", - "everoute_cluster", + "host", "id", - "name" + "local_created_at", + "local_id", + "manufacturer", + "name", + "size", + "status", + "usb_type" ], "type": "object", "additionalProperties": false }, - "WithTask_SecurityPolicy_": { + "WithTask_UsbDevice_": { "properties": { "task_id": { "type": "string", "nullable": true }, "data": { - "$ref": "#/components/schemas/SecurityPolicy" + "$ref": "#/components/schemas/UsbDevice" } }, "required": [ @@ -82167,423 +82606,437 @@ ], "type": "object" }, - "SecurityPolicyApplyToInputTarget": { + "UsbDeviceMountParams": { "properties": { - "security_groups": { - "$ref": "#/components/schemas/SecurityGroupWhereInput" - }, - "label_groups": { - "items": { - "$ref": "#/components/schemas/LabelWhereInput" + "data": { + "properties": { + "vms": { + "$ref": "#/components/schemas/VmWhereInput" + }, + "vm_id": { + "type": "string", + "deprecated": true + } }, - "type": "array" - } - }, - "type": "object" - }, - "SecurityPolicyApplyToInput": { - "properties": { - "communicable": { - "type": "boolean" + "type": "object" }, - "target": { - "$ref": "#/components/schemas/SecurityPolicyApplyToInputTarget" + "where": { + "$ref": "#/components/schemas/UsbDeviceWhereInput" } }, "required": [ - "target" + "data", + "where" ], "type": "object" }, - "IPSecurityPolicy": { + "UsbDeviceUnmountParams": { "properties": { - "except_ip_block": { - "items": { - "type": "string" + "data": { + "properties": { + "vms": { + "$ref": "#/components/schemas/VmWhereInput" + } }, - "type": "array" + "required": [ + "vms" + ], + "type": "object" }, - "ip_block": { - "type": "string" + "where": { + "$ref": "#/components/schemas/UsbDeviceWhereInput" } }, "required": [ - "ip_block" + "where" ], "type": "object" }, - "SecurityPolicyIngressEgressInputTarget": { - "properties": { - "security_groups": { - "$ref": "#/components/schemas/SecurityGroupWhereInput" - }, - "ips": { - "items": { - "$ref": "#/components/schemas/IPSecurityPolicy" - }, - "type": "array" - }, - "label_groups": { - "items": { - "$ref": "#/components/schemas/LabelWhereInput" - }, - "type": "array" - } - }, - "type": "object" - }, - "NetworkPolicyRulePortInput": { + "LoginResponse": { "properties": { - "protocol": { - "$ref": "#/components/schemas/NetworkPolicyRulePortProtocol" - }, - "port": { + "token": { "type": "string" } }, "required": [ - "protocol" + "token" ], "type": "object" }, - "SecurityPolicyIngressEgressInput": { + "WithTask_LoginResponse_": { "properties": { - "ports": { - "items": { - "$ref": "#/components/schemas/NetworkPolicyRulePortInput" - }, - "type": "array" + "task_id": { + "type": "string", + "nullable": true }, - "target": { - "$ref": "#/components/schemas/SecurityPolicyIngressEgressInputTarget" + "data": { + "$ref": "#/components/schemas/LoginResponse" } }, "required": [ - "target" + "data" ], "type": "object" }, - "SecurityPolicyCreateParams": { + "MfaType": { + "enum": [ + "Mail" + ], + "type": "string" + }, + "LoginInput": { "properties": { - "ingress": { - "items": { - "$ref": "#/components/schemas/SecurityPolicyIngressEgressInput" - }, - "type": "array" - }, - "egress": { - "items": { - "$ref": "#/components/schemas/SecurityPolicyIngressEgressInput" - }, - "type": "array" - }, - "apply_to": { - "items": { - "$ref": "#/components/schemas/SecurityPolicyApplyToInput" - }, - "type": "array", - "minItems": 1 + "username": { + "type": "string" }, - "policy_mode": { - "$ref": "#/components/schemas/PolicyMode" + "source": { + "allOf": [ + { + "$ref": "#/components/schemas/UserSource" + } + ], + "nullable": true }, - "everoute_cluster_id": { + "password": { "type": "string" }, - "description": { - "type": "string" + "mfa_type": { + "allOf": [ + { + "$ref": "#/components/schemas/MfaType" + } + ], + "nullable": true }, - "name": { + "auth_config_id": { "type": "string", - "minLength": 1 + "nullable": true } }, "required": [ - "everoute_cluster_id", - "name" + "username", + "password" ], "type": "object" }, - "DeleteSecurityPolicy": { + "NestedPasswordReoverQaItem": { "properties": { - "id": { + "question": { "type": "string" } }, "required": [ - "id" + "question" ], - "type": "object" + "type": "object", + "additionalProperties": false }, - "WithTask_DeleteSecurityPolicy_": { + "NestedPasswordRecoverQa": { "properties": { - "task_id": { - "type": "string", - "nullable": true + "enabled": { + "type": "boolean" }, - "data": { - "$ref": "#/components/schemas/DeleteSecurityPolicy" + "items": { + "items": { + "$ref": "#/components/schemas/NestedPasswordReoverQaItem" + }, + "type": "array", + "nullable": true } }, "required": [ - "data" + "enabled" ], - "type": "object" + "type": "object", + "additionalProperties": false }, - "SecurityPolicyDeleteParams": { + "NestedUserRoleNext": { "properties": { - "where": { - "$ref": "#/components/schemas/SecurityPolicyWhereInput" + "id": { + "type": "string" + }, + "name": { + "type": "string" } }, "required": [ - "where" + "id", + "name" ], - "type": "object" + "type": "object", + "additionalProperties": false }, - "SecurityPolicyUpdateParams": { + "User": { "properties": { - "ingress": { - "items": { - "$ref": "#/components/schemas/SecurityPolicyIngressEgressInput" - }, - "type": "array" + "auth_config_id": { + "type": "string", + "nullable": true }, - "egress": { - "items": { - "$ref": "#/components/schemas/SecurityPolicyIngressEgressInput" - }, - "type": "array" + "display_username": { + "type": "string" }, - "apply_to": { + "email_address": { + "type": "string", + "nullable": true + }, + "id": { + "type": "string" + }, + "internal": { + "type": "boolean" + }, + "ldap_dn": { + "type": "string", + "nullable": true + }, + "mobile_phone": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string" + }, + "password_expired": { + "type": "boolean", + "nullable": true + }, + "password_recover_qa": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedPasswordRecoverQa" + } + ], + "nullable": true + }, + "password_updated_at": { + "type": "string", + "nullable": true + }, + "role": { + "allOf": [ + { + "$ref": "#/components/schemas/UserRole" + } + ], + "nullable": true + }, + "roles": { "items": { - "$ref": "#/components/schemas/SecurityPolicyApplyToInput" + "$ref": "#/components/schemas/NestedUserRoleNext" }, - "type": "array" + "type": "array", + "nullable": true }, - "policy_mode": { - "$ref": "#/components/schemas/PolicyMode" + "source": { + "$ref": "#/components/schemas/UserSource" + }, + "username": { + "type": "string" } }, - "type": "object" + "required": [ + "display_username", + "id", + "internal", + "name", + "source", + "username" + ], + "type": "object", + "additionalProperties": false }, - "SecurityPolicyUpdateBody": { + "WithTask_User_": { "properties": { - "data": { - "$ref": "#/components/schemas/SecurityPolicyUpdateParams" + "task_id": { + "type": "string", + "nullable": true }, - "where": { - "$ref": "#/components/schemas/SecurityPolicyWhereInput" + "data": { + "$ref": "#/components/schemas/User" } }, "required": [ - "data", - "where" + "data" ], "type": "object" }, - "UpdatePassrodSecurityParams": { + "UserCreationParams": { "properties": { - "password_expire_days": { - "type": "integer", - "format": "int32" + "auth_config_id": { + "type": "string" }, - "password_complexity": { - "$ref": "#/components/schemas/PasswordComplexity" + "ldap_dn": { + "type": "string" }, - "login_miss_time_threshold": { - "type": "integer", - "format": "int32" + "source": { + "$ref": "#/components/schemas/UserSource" }, - "login_miss_num_threshold": { - "type": "integer", - "format": "int32" + "mobile_phone": { + "type": "string" + }, + "email_address": { + "type": "string" + }, + "internal": { + "type": "boolean" + }, + "role_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "password": { + "type": "string" + }, + "username": { + "type": "string" } }, + "required": [ + "role_id", + "name", + "username" + ], "type": "object" }, - "UpdateAccessRestrictionParams": { + "UserUpdationParams": { "properties": { - "access_list": { - "items": { - "type": "string" + "data": { + "properties": { + "internal": { + "type": "boolean" + }, + "mobile_phone": { + "type": "string", + "nullable": true + }, + "email_address": { + "type": "string", + "nullable": true + }, + "role_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "password": { + "type": "string" + }, + "username": { + "type": "string" + } }, - "type": "array" + "type": "object" }, - "access_mode": { - "$ref": "#/components/schemas/AccessMode" + "where": { + "$ref": "#/components/schemas/UserWhereInput" } }, "required": [ - "access_list", - "access_mode" + "data", + "where" ], "type": "object" }, - "UpdateSessionTimeoutParams": { + "DeleteUser": { "properties": { - "session_max_age": { - "type": "integer", - "format": "int32" + "id": { + "type": "string" } }, "required": [ - "session_max_age" + "id" ], "type": "object" }, - "NestedSnapshotPlanTask": { + "WithTask_DeleteUser_": { "properties": { - "id": { - "type": "string" + "task_id": { + "type": "string", + "nullable": true + }, + "data": { + "$ref": "#/components/schemas/DeleteUser" } }, "required": [ - "id" - ], - "type": "object", - "additionalProperties": false - }, - "ProtectSnapshotStatus": { - "enum": [ - "PROTECT_SNAPSHOT_STATUS_CREATED", - "PROTECT_SNAPSHOT_STATUS_CREATING", - "PROTECT_SNAPSHOT_STATUS_DELETED", - "PROTECT_SNAPSHOT_STATUS_FAILED" + "data" ], - "type": "string" + "type": "object" }, - "NestedSnapshotGroupVmDiskInfo": { + "UserDeletionParams": { "properties": { - "disk_id": { - "type": "string" - }, - "disk_snapshot_status": { - "$ref": "#/components/schemas/ProtectSnapshotStatus" + "where": { + "$ref": "#/components/schemas/UserWhereInput" } }, "required": [ - "disk_id", - "disk_snapshot_status" + "where" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "NestedSnapshotGroupVmInfo": { + "RootUserCreationParams": { "properties": { - "disks": { - "items": { - "$ref": "#/components/schemas/NestedSnapshotGroupVmDiskInfo" - }, - "type": "array" - }, - "vm_id": { - "type": "string" - }, - "vm_name": { + "password": { "type": "string" - }, - "vm_snapshot_status": { - "$ref": "#/components/schemas/ProtectSnapshotStatus" } }, "required": [ - "disks", - "vm_id", - "vm_name", - "vm_snapshot_status" + "password" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "SnapshotGroup": { + "VcenterAccount": { "properties": { "cluster": { - "$ref": "#/components/schemas/NestedCluster" - }, - "deleted": { - "type": "boolean" - }, - "entityAsyncStatus": { "allOf": [ { - "$ref": "#/components/schemas/EntityAsyncStatus" + "$ref": "#/components/schemas/NestedCluster" } ], "nullable": true }, - "estimated_recycling_time": { - "type": "string", - "nullable": true - }, "id": { "type": "string" }, - "internal": { - "type": "boolean", - "nullable": true + "ip": { + "type": "string" }, - "keep": { + "is_valid": { "type": "boolean" }, - "local_created_at": { - "type": "string" - }, "local_id": { "type": "string" }, - "logical_size_bytes": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - }, - "object_num": { + "port": { "type": "integer", "format": "int32" }, - "snapshotPlanTask": { - "$ref": "#/components/schemas/NestedSnapshotPlanTask" - }, - "vm_info": { - "items": { - "$ref": "#/components/schemas/NestedSnapshotGroupVmInfo" - }, - "type": "array" - }, - "vm_snapshots": { - "items": { - "$ref": "#/components/schemas/NestedVmSnapshot" - }, - "type": "array", - "nullable": true + "username": { + "type": "string" } }, "required": [ - "cluster", - "deleted", "id", - "keep", - "local_created_at", + "ip", + "is_valid", "local_id", - "logical_size_bytes", - "name", - "object_num", - "snapshotPlanTask", - "vm_info" + "port", + "username" ], "type": "object", "additionalProperties": false }, - "WithTask_SnapshotGroup_": { + "WithTask_VcenterAccount_": { "properties": { "task_id": { "type": "string", "nullable": true }, "data": { - "$ref": "#/components/schemas/SnapshotGroup" + "$ref": "#/components/schemas/VcenterAccount" } }, "required": [ @@ -82591,118 +83044,106 @@ ], "type": "object" }, - "SnapshotGroupRollbackParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/SnapshotGroupWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "SnapshotGroupCloneParam": { + "CreateVcenterAccountParamsData": { "properties": { - "from_source_vm_id": { + "port": { + "type": "integer", + "format": "int32" + }, + "password": { "type": "string" }, - "to_cloned_vm_name": { + "username": { "type": "string" - } - }, - "required": [ - "from_source_vm_id", - "to_cloned_vm_name" - ], - "type": "object" - }, - "SnapshotGroupCloneParams": { - "properties": { - "clone": { - "items": { - "$ref": "#/components/schemas/SnapshotGroupCloneParam" - }, - "type": "array" }, - "id": { + "ip": { + "type": "string" + }, + "cluster_id": { "type": "string" } }, "required": [ - "clone", - "id" + "port", + "password", + "username", + "ip", + "cluster_id" ], "type": "object" }, - "SnapshotGroupKeepParams": { + "CreateVcenterAccountParams": { "properties": { - "where": { - "$ref": "#/components/schemas/SnapshotGroupWhereInput" + "data": { + "$ref": "#/components/schemas/CreateVcenterAccountParamsData" } }, "required": [ - "where" + "data" ], "type": "object" }, - "DeleteSnapshotGroup": { + "VcenterAccountWhereUniqueInput": { "properties": { "id": { - "type": "string" + "type": "string", + "nullable": true + }, + "local_id": { + "type": "string", + "nullable": true } }, - "required": [ - "id" - ], - "type": "object" + "type": "object", + "additionalProperties": false }, - "WithTask_DeleteSnapshotGroup_": { + "UpdateVcenterAccountParamsData": { "properties": { - "task_id": { - "type": "string", - "nullable": true + "port": { + "type": "integer", + "format": "int32" }, - "data": { - "$ref": "#/components/schemas/DeleteSnapshotGroup" + "password": { + "type": "string" + }, + "username": { + "type": "string" + }, + "ip": { + "type": "string" } }, "required": [ - "data" + "port", + "password", + "username", + "ip" ], "type": "object" }, - "SnapshotGroupDeletionParams": { + "UpdateVcenterAccountParams": { "properties": { + "data": { + "$ref": "#/components/schemas/UpdateVcenterAccountParamsData" + }, "where": { - "$ref": "#/components/schemas/SnapshotGroupWhereInput" + "$ref": "#/components/schemas/VcenterAccountWhereUniqueInput" } }, "required": [ + "data", "where" ], "type": "object" }, - "SnapshotPlan": { + "Vds": { "properties": { - "auto_delete_num": { - "type": "integer", - "format": "int32" - }, - "auto_execute_num": { - "type": "integer", - "format": "int32" + "bond_mode": { + "type": "string" }, "cluster": { "$ref": "#/components/schemas/NestedCluster" }, - "description": { - "type": "string" - }, - "end_time": { - "type": "string", - "nullable": true - }, "entityAsyncStatus": { "allOf": [ { @@ -82711,134 +83152,84 @@ ], "nullable": true }, - "exec_h_m": { - "properties": {}, - "type": "object", + "everoute_cluster": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedEverouteCluster" + } + ], "nullable": true }, - "execute_intervals": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array" + "id": { + "type": "string" }, - "execute_plan_type": { - "$ref": "#/components/schemas/SnapshotPlanExecuteType" + "internal": { + "type": "boolean" }, - "execution_tasks": { + "labels": { "items": { - "$ref": "#/components/schemas/NestedSnapshotPlanTask" + "$ref": "#/components/schemas/NestedLabel" }, "type": "array", "nullable": true }, - "healthy": { - "type": "boolean" + "local_id": { + "type": "string" }, - "id": { + "name": { "type": "string" }, - "last_execute_end_time": { - "type": "string", - "nullable": true - }, - "last_execute_status": { - "$ref": "#/components/schemas/SnapshotPlanExecuteStatus" - }, - "last_execute_time": { - "type": "string", + "nics": { + "items": { + "$ref": "#/components/schemas/NestedNic" + }, + "type": "array", "nullable": true }, - "local_id": { + "ovsbr_name": { "type": "string" }, - "logical_size_bytes": { - "type": "integer", - "format": "int64" - }, - "manual_delete_num": { - "type": "integer", - "format": "int32" - }, - "manual_execute_num": { - "type": "integer", - "format": "int32" - }, - "mirror": { - "type": "boolean" - }, - "name": { - "type": "string" + "type": { + "$ref": "#/components/schemas/NetworkType" }, - "next_execute_time": { - "type": "string", + "vlans": { + "items": { + "$ref": "#/components/schemas/NestedVlan" + }, + "type": "array", "nullable": true }, - "object_num": { - "type": "integer", - "format": "int32" - }, - "physical_size_bytes": { - "type": "integer", - "format": "int64" - }, - "remain_snapshot_num": { - "type": "integer", - "format": "int32" - }, - "snapshot_group_num": { + "vlans_num": { "type": "integer", "format": "int32" }, - "start_time": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/SnapshotPlanStatus" - }, - "vms": { - "items": { - "$ref": "#/components/schemas/NestedVm" - }, - "type": "array", + "work_mode": { + "type": "string", "nullable": true } }, "required": [ - "auto_delete_num", - "auto_execute_num", + "bond_mode", "cluster", - "description", - "execute_intervals", - "execute_plan_type", - "healthy", "id", - "last_execute_status", + "internal", "local_id", - "logical_size_bytes", - "manual_delete_num", - "manual_execute_num", - "mirror", "name", - "object_num", - "physical_size_bytes", - "remain_snapshot_num", - "snapshot_group_num", - "start_time", - "status" + "ovsbr_name", + "type", + "vlans_num" ], "type": "object", "additionalProperties": false }, - "WithTask_SnapshotPlan_": { + "WithTask_Vds_": { "properties": { "task_id": { "type": "string", "nullable": true }, "data": { - "$ref": "#/components/schemas/SnapshotPlan" + "$ref": "#/components/schemas/Vds" } }, "required": [ @@ -82846,38 +83237,21 @@ ], "type": "object" }, - "SnapshotPlanCreationParams": { + "VdsCreationParams": { "properties": { - "vm_ids": { + "nic_ids": { "items": { "type": "string" }, "type": "array" }, - "execute_intervals": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array" - }, - "execute_plan_type": { - "$ref": "#/components/schemas/SnapshotPlanExecuteType" - }, - "exec_h_m": { - "type": "string" - }, - "end_time": { + "cluster_id": { "type": "string" }, - "start_time": { + "work_mode": { "type": "string" }, - "remain_snapshot_num": { - "type": "integer", - "format": "int32" - }, - "cluster_id": { + "bond_mode": { "type": "string" }, "name": { @@ -82885,46 +83259,140 @@ } }, "required": [ - "vm_ids", - "execute_intervals", - "execute_plan_type", - "start_time", - "remain_snapshot_num", + "nic_ids", "cluster_id", "name" ], "type": "object" }, - "SnapshotPlanUpdationParams": { + "VdsCreationWithMigrateVlanParams": { + "allOf": [ + { + "$ref": "#/components/schemas/VdsCreationParams" + }, + { + "properties": { + "vlan": { + "properties": { + "extra_ip": { + "items": { + "properties": { + "management_ip": { + "type": "string" + }, + "host_id": { + "type": "string" + } + }, + "required": [ + "management_ip", + "host_id" + ], + "type": "object" + }, + "type": "array" + }, + "subnetmask": { + "type": "string" + }, + "gateway_subnetmask": { + "type": "string" + }, + "gateway_ip": { + "type": "string" + }, + "vlan_id": { + "type": "integer", + "format": "int32" + } + }, + "required": [ + "extra_ip", + "subnetmask", + "vlan_id" + ], + "type": "object" + } + }, + "required": [ + "vlan" + ], + "type": "object" + } + ] + }, + "VdsCreationWithMAccessVlanParams": { + "allOf": [ + { + "$ref": "#/components/schemas/VdsCreationParams" + }, + { + "properties": { + "vlan": { + "properties": { + "extra_ip": { + "items": { + "properties": { + "management_ip": { + "type": "string" + }, + "host_id": { + "type": "string" + } + }, + "required": [ + "management_ip", + "host_id" + ], + "type": "object" + }, + "type": "array" + }, + "subnetmask": { + "type": "string" + }, + "gateway_subnetmask": { + "type": "string" + }, + "gateway_ip": { + "type": "string" + }, + "vlan_id": { + "type": "integer", + "format": "int32" + } + }, + "required": [ + "extra_ip", + "subnetmask", + "vlan_id" + ], + "type": "object" + } + }, + "required": [ + "vlan" + ], + "type": "object" + } + ] + }, + "VdsUpdationParams": { "properties": { "data": { "properties": { - "vm_ids": { + "nicIds": { "items": { "type": "string" }, "type": "array" }, - "execute_intervals": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array" - }, - "execute_plan_type": { - "$ref": "#/components/schemas/SnapshotPlanExecuteType" - }, - "exec_h_m": { + "work_mode": { "type": "string" }, - "end_time": { + "bond_mode": { "type": "string" }, - "remain_snapshot_num": { - "type": "integer", - "format": "int32" - }, "name": { "type": "string" } @@ -82932,15 +83400,16 @@ "type": "object" }, "where": { - "$ref": "#/components/schemas/SnapshotPlanWhereInput" + "$ref": "#/components/schemas/VdsWhereInput" } }, "required": [ + "data", "where" ], "type": "object" }, - "DeleteSnapshotPlan": { + "DeleteVds": { "properties": { "id": { "type": "string" @@ -82951,14 +83420,14 @@ ], "type": "object" }, - "WithTask_DeleteSnapshotPlan_": { + "WithTask_DeleteVds_": { "properties": { "task_id": { "type": "string", "nullable": true }, "data": { - "$ref": "#/components/schemas/DeleteSnapshotPlan" + "$ref": "#/components/schemas/DeleteVds" } }, "required": [ @@ -82966,44 +83435,10 @@ ], "type": "object" }, - "SnapshotPlanDeletionParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/SnapshotPlanWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "SnapshotPlanExecutionParams": { - "properties": { - "data": { - "properties": { - "task_name": { - "type": "string" - } - }, - "required": [ - "task_name" - ], - "type": "object" - }, - "where": { - "$ref": "#/components/schemas/SnapshotPlanWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "SnapshotPlanSuspendedParams": { + "VdsDeletionParams": { "properties": { "where": { - "$ref": "#/components/schemas/SnapshotPlanWhereInput" + "$ref": "#/components/schemas/VdsWhereInput" } }, "required": [ @@ -83011,69 +83446,23 @@ ], "type": "object" }, - "SnapshotPlanResumeParams": { + "NestedGraph": { "properties": { - "where": { - "$ref": "#/components/schemas/SnapshotPlanWhereInput" + "id": { + "type": "string" } }, "required": [ - "where" - ], - "type": "object" - }, - "SnmpAuthProtocol": { - "enum": [ - "MD5", - "SHA" - ], - "type": "string" - }, - "SnmpPrivacyProtocol": { - "enum": [ - "AES", - "DES" - ], - "type": "string" - }, - "SnmpProtocol": { - "enum": [ - "TCP", - "UDP" - ], - "type": "string" - }, - "SnmpVersion": { - "enum": [ - "V2C", - "V3" + "id" ], - "type": "string" + "type": "object", + "additionalProperties": false }, - "SnmpTransport": { + "View": { "properties": { - "auth_pass_phrase": { - "type": "string", - "nullable": true - }, - "auth_protocol": { - "allOf": [ - { - "$ref": "#/components/schemas/SnmpAuthProtocol" - } - ], - "nullable": true - }, "cluster": { "$ref": "#/components/schemas/NestedCluster" }, - "community": { - "type": "string", - "nullable": true - }, - "disabled": { - "type": "boolean" - }, "entityAsyncStatus": { "allOf": [ { @@ -83082,6 +83471,13 @@ ], "nullable": true }, + "graphs": { + "items": { + "$ref": "#/components/schemas/NestedGraph" + }, + "type": "array", + "nullable": true + }, "id": { "type": "string" }, @@ -83091,54 +83487,33 @@ "name": { "type": "string" }, - "port": { + "time_span": { "type": "integer", "format": "int32" }, - "privacy_pass_phrase": { - "type": "string", - "nullable": true - }, - "privacy_protocol": { - "allOf": [ - { - "$ref": "#/components/schemas/SnmpPrivacyProtocol" - } - ], - "nullable": true - }, - "protocol": { - "$ref": "#/components/schemas/SnmpProtocol" - }, - "username": { - "type": "string", - "nullable": true - }, - "version": { - "$ref": "#/components/schemas/SnmpVersion" + "time_unit": { + "$ref": "#/components/schemas/TimeUnit" } }, "required": [ "cluster", - "disabled", "id", "local_id", "name", - "port", - "protocol", - "version" + "time_span", + "time_unit" ], "type": "object", "additionalProperties": false }, - "WithTask_SnmpTransport_": { + "WithTask_View_": { "properties": { "task_id": { "type": "string", "nullable": true }, "data": { - "$ref": "#/components/schemas/SnmpTransport" + "$ref": "#/components/schemas/View" } }, "required": [ @@ -83146,780 +83521,1215 @@ ], "type": "object" }, - "SnmpTransportCreationParams": { + "ViewCreationParams": { "properties": { - "disabled": { - "type": "boolean" - }, - "privacy_protocol": { - "$ref": "#/components/schemas/SnmpPrivacyProtocol" - }, - "privacy_pass_phrase": { - "type": "string" - }, - "auth_protocol": { - "$ref": "#/components/schemas/SnmpAuthProtocol" - }, - "auth_pass_phrase": { - "type": "string" - }, - "username": { - "type": "string" - }, - "community": { - "type": "string" + "time_unit": { + "$ref": "#/components/schemas/TimeUnit" }, - "port": { + "time_span": { "type": "integer", "format": "int32" }, - "protocol": { - "$ref": "#/components/schemas/SnmpProtocol" - }, - "version": { - "$ref": "#/components/schemas/SnmpVersion" - }, - "name": { + "cluster_id": { "type": "string" }, - "cluster_id": { + "name": { "type": "string" } }, "required": [ - "port", - "protocol", - "version", - "name", - "cluster_id" + "time_unit", + "time_span", + "cluster_id", + "name" ], "type": "object" }, - "SnmpTransportWhereInput": { + "ViewUpdationParams": { "properties": { - "AND": { - "items": { - "$ref": "#/components/schemas/SnmpTransportWhereInput" - }, - "type": "array", - "nullable": true - }, - "NOT": { - "items": { - "$ref": "#/components/schemas/SnmpTransportWhereInput" + "data": { + "properties": { + "time_unit": { + "$ref": "#/components/schemas/TimeUnit" + }, + "time_span": { + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string" + } }, - "type": "array", - "nullable": true + "type": "object" }, - "OR": { - "items": { - "$ref": "#/components/schemas/SnmpTransportWhereInput" - }, - "type": "array", + "where": { + "$ref": "#/components/schemas/ViewWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "DeleteView": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "WithTask_DeleteView_": { + "properties": { + "task_id": { + "type": "string", "nullable": true }, - "auth_pass_phrase": { - "type": "string", - "nullable": true - }, - "auth_pass_phrase_contains": { - "type": "string", - "nullable": true - }, - "auth_pass_phrase_ends_with": { - "type": "string", - "nullable": true - }, - "auth_pass_phrase_gt": { - "type": "string", - "nullable": true - }, - "auth_pass_phrase_gte": { - "type": "string", - "nullable": true - }, - "auth_pass_phrase_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true - }, - "auth_pass_phrase_lt": { - "type": "string", - "nullable": true - }, - "auth_pass_phrase_lte": { - "type": "string", + "data": { + "$ref": "#/components/schemas/DeleteView" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "ViewDeletionParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/ViewWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "Vlan": { + "properties": { + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], "nullable": true }, - "auth_pass_phrase_not": { + "gateway_ip": { "type": "string", "nullable": true }, - "auth_pass_phrase_not_contains": { + "gateway_subnetmask": { "type": "string", "nullable": true }, - "auth_pass_phrase_not_ends_with": { - "type": "string", - "nullable": true + "id": { + "type": "string" }, - "auth_pass_phrase_not_in": { + "labels": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedLabel" }, "type": "array", "nullable": true }, - "auth_pass_phrase_not_starts_with": { - "type": "string", - "nullable": true - }, - "auth_pass_phrase_starts_with": { - "type": "string", - "nullable": true + "local_id": { + "type": "string" }, - "auth_protocol": { + "mode_type": { "allOf": [ { - "$ref": "#/components/schemas/SnmpAuthProtocol" + "$ref": "#/components/schemas/VlanModeType" } ], "nullable": true }, - "auth_protocol_in": { - "items": { - "$ref": "#/components/schemas/SnmpAuthProtocol" - }, - "type": "array", - "nullable": true - }, - "auth_protocol_not": { - "allOf": [ - { - "$ref": "#/components/schemas/SnmpAuthProtocol" - } - ], - "nullable": true + "name": { + "type": "string" }, - "auth_protocol_not_in": { + "network_ids": { "items": { - "$ref": "#/components/schemas/SnmpAuthProtocol" + "type": "string" }, - "type": "array", - "nullable": true + "type": "array" }, - "cluster": { - "allOf": [ - { - "$ref": "#/components/schemas/ClusterWhereInput" - } - ], + "qos_max_bandwidth": { + "type": "number", + "format": "double", "nullable": true }, - "community": { - "type": "string", + "qos_min_bandwidth": { + "type": "number", + "format": "double", "nullable": true }, - "community_contains": { - "type": "string", + "qos_priority": { + "type": "integer", + "format": "int32", "nullable": true }, - "community_ends_with": { + "subnetmask": { "type": "string", "nullable": true }, - "community_gt": { - "type": "string", - "nullable": true + "type": { + "$ref": "#/components/schemas/NetworkType" }, - "community_gte": { - "type": "string", - "nullable": true + "vds": { + "$ref": "#/components/schemas/NestedVds" }, - "community_in": { + "vlan_id": { + "type": "integer", + "format": "int32" + }, + "vm_nics": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedVmNic" }, "type": "array", "nullable": true - }, - "community_lt": { + } + }, + "required": [ + "id", + "local_id", + "name", + "network_ids", + "type", + "vds", + "vlan_id" + ], + "type": "object", + "additionalProperties": false + }, + "WithTask_Vlan_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "community_lte": { - "type": "string", - "nullable": true + "data": { + "$ref": "#/components/schemas/Vlan" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "VlanId": { + "type": "integer", + "format": "int32", + "minimum": 0, + "maximum": 4095 + }, + "Priority": { + "type": "number", + "format": "double", + "minimum": 0 + }, + "VmVlanCreationParams": { + "properties": { + "qos_burst_unit": { + "$ref": "#/components/schemas/ByteUnit" }, - "community_not": { - "type": "string", + "qos_burst": { + "type": "integer", + "format": "int64", "nullable": true }, - "community_not_contains": { - "type": "string", + "qos_max_bandwidth_unit": { + "$ref": "#/components/schemas/BPSUnit" + }, + "qos_max_bandwidth": { + "type": "integer", + "format": "int64", "nullable": true }, - "community_not_ends_with": { - "type": "string", + "qos_min_bandwidth_unit": { + "$ref": "#/components/schemas/BPSUnit" + }, + "qos_min_bandwidth": { + "type": "integer", + "format": "int64", "nullable": true }, - "community_not_in": { + "qos_priority": { + "$ref": "#/components/schemas/Priority" + }, + "mode_type": { + "$ref": "#/components/schemas/VlanModeType" + }, + "network_ids": { "items": { "type": "string" }, - "type": "array", - "nullable": true + "type": "array" }, - "community_not_starts_with": { - "type": "string", - "nullable": true + "vds_id": { + "type": "string" }, - "community_starts_with": { - "type": "string", - "nullable": true + "vlan_id": { + "$ref": "#/components/schemas/VlanId" }, - "disabled": { - "type": "boolean", - "nullable": true + "name": { + "type": "string" + } + }, + "required": [ + "vds_id", + "name" + ], + "type": "object" + }, + "VmVlanUpdationParams": { + "properties": { + "data": { + "properties": { + "qos_burst_unit": { + "$ref": "#/components/schemas/ByteUnit" + }, + "qos_burst": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "qos_max_bandwidth_unit": { + "$ref": "#/components/schemas/BPSUnit" + }, + "qos_max_bandwidth": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "qos_min_bandwidth_unit": { + "$ref": "#/components/schemas/BPSUnit" + }, + "qos_min_bandwidth": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "qos_priority": { + "$ref": "#/components/schemas/Priority" + }, + "mode_type": { + "$ref": "#/components/schemas/VlanModeType" + }, + "network_ids": { + "items": { + "type": "string" + }, + "type": "array" + }, + "vlan_id": { + "$ref": "#/components/schemas/VlanId" + }, + "name": { + "type": "string" + } + }, + "type": "object" }, - "disabled_not": { - "type": "boolean", - "nullable": true + "where": { + "$ref": "#/components/schemas/VlanWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "ExtraIp": { + "properties": { + "management_ip": { + "type": "string" }, - "entityAsyncStatus": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" + "host_id": { + "type": "string" + } + }, + "required": [ + "management_ip", + "host_id" + ], + "type": "object" + }, + "ManagementVlanUpdationParams": { + "properties": { + "data": { + "properties": { + "extra_ip": { + "items": { + "$ref": "#/components/schemas/ExtraIp" + }, + "type": "array" + }, + "subnetmask": { + "type": "string" + }, + "gateway_ip": { + "type": "string" + }, + "vlan_id": { + "$ref": "#/components/schemas/VlanId" } - ], - "nullable": true - }, - "entityAsyncStatus_in": { - "items": { - "$ref": "#/components/schemas/EntityAsyncStatus" }, - "type": "array", - "nullable": true + "type": "object" }, - "entityAsyncStatus_not": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" + "where": { + "$ref": "#/components/schemas/VlanWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "MigrationVlanUpdationParams": { + "properties": { + "data": { + "properties": { + "extra_ip": { + "items": { + "$ref": "#/components/schemas/ExtraIp" + }, + "type": "array" + }, + "subnetmask": { + "type": "string" + }, + "gateway_ip": { + "type": "string" + }, + "vlan_id": { + "$ref": "#/components/schemas/VlanId" } - ], - "nullable": true - }, - "entityAsyncStatus_not_in": { - "items": { - "$ref": "#/components/schemas/EntityAsyncStatus" }, - "type": "array", - "nullable": true + "type": "object" }, + "where": { + "$ref": "#/components/schemas/VlanWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "DeleteVlan": { + "properties": { "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "WithTask_DeleteVlan_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "id_contains": { - "type": "string", - "nullable": true - }, - "id_ends_with": { - "type": "string", - "nullable": true - }, - "id_gt": { - "type": "string", - "nullable": true - }, - "id_gte": { - "type": "string", - "nullable": true - }, - "id_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true - }, - "id_lt": { - "type": "string", - "nullable": true + "data": { + "$ref": "#/components/schemas/DeleteVlan" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "VlanDeletionParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/VlanWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "VmFolder": { + "properties": { + "cluster": { + "$ref": "#/components/schemas/NestedCluster" }, - "id_lte": { - "type": "string", - "nullable": true + "id": { + "type": "string" }, - "id_not": { + "local_id": { "type": "string", "nullable": true }, - "id_not_contains": { - "type": "string", - "nullable": true + "name": { + "type": "string" }, - "id_not_ends_with": { - "type": "string", + "vm_num": { + "type": "integer", + "format": "int32", "nullable": true }, - "id_not_in": { + "vms": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedVm" }, "type": "array", "nullable": true - }, - "id_not_starts_with": { - "type": "string", - "nullable": true - }, - "id_starts_with": { + } + }, + "required": [ + "cluster", + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "WithTask_VmFolder_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "local_id": { - "type": "string", - "nullable": true - }, - "local_id_contains": { - "type": "string", - "nullable": true - }, - "local_id_ends_with": { - "type": "string", - "nullable": true - }, - "local_id_gt": { - "type": "string", - "nullable": true - }, - "local_id_gte": { - "type": "string", - "nullable": true + "data": { + "$ref": "#/components/schemas/VmFolder" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "VmFolderCreationParams": { + "properties": { + "cluster_id": { + "type": "string" }, - "local_id_in": { - "items": { - "type": "string" + "name": { + "type": "string" + } + }, + "required": [ + "cluster_id", + "name" + ], + "type": "object" + }, + "VmFolderUpdationParams": { + "properties": { + "data": { + "properties": { + "name": { + "type": "string" + } }, - "type": "array", - "nullable": true + "required": [ + "name" + ], + "type": "object" }, - "local_id_lt": { + "where": { + "$ref": "#/components/schemas/VmFolderWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "DeleteVmFolder": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "WithTask_DeleteVmFolder_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "local_id_lte": { - "type": "string", - "nullable": true + "data": { + "$ref": "#/components/schemas/DeleteVmFolder" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "VmFolderDeletionParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/VmFolderWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "VmPlacementGroup": { + "properties": { + "cluster": { + "$ref": "#/components/schemas/NestedCluster" }, - "local_id_not": { - "type": "string", - "nullable": true + "description": { + "type": "string" }, - "local_id_not_contains": { - "type": "string", - "nullable": true + "enabled": { + "type": "boolean" }, - "local_id_not_ends_with": { - "type": "string", + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], "nullable": true }, - "local_id_not_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true + "id": { + "type": "string" }, - "local_id_not_starts_with": { - "type": "string", - "nullable": true + "local_created_at": { + "type": "string" }, - "local_id_starts_with": { - "type": "string", - "nullable": true + "local_id": { + "type": "string" + }, + "local_updated_at": { + "type": "string" }, "name": { - "type": "string", - "nullable": true + "type": "string" }, - "name_contains": { - "type": "string", - "nullable": true + "vm_host_must_enabled": { + "type": "boolean" }, - "name_ends_with": { - "type": "string", + "vm_host_must_host_uuids": { + "items": { + "$ref": "#/components/schemas/NestedHost" + }, + "type": "array", "nullable": true }, - "name_gt": { - "type": "string", - "nullable": true + "vm_host_must_policy": { + "type": "boolean" }, - "name_gte": { - "type": "string", - "nullable": true + "vm_host_prefer_enabled": { + "type": "boolean" }, - "name_in": { + "vm_host_prefer_host_uuids": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedHost" }, "type": "array", "nullable": true }, - "name_lt": { - "type": "string", - "nullable": true - }, - "name_lte": { - "type": "string", - "nullable": true - }, - "name_not": { - "type": "string", - "nullable": true + "vm_host_prefer_policy": { + "type": "boolean" }, - "name_not_contains": { - "type": "string", - "nullable": true + "vm_vm_policy": { + "$ref": "#/components/schemas/VmVmPolicy" }, - "name_not_ends_with": { - "type": "string", - "nullable": true + "vm_vm_policy_enabled": { + "type": "boolean" }, - "name_not_in": { + "vms": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedVm" }, "type": "array", "nullable": true - }, - "name_not_starts_with": { + } + }, + "required": [ + "cluster", + "description", + "enabled", + "id", + "local_created_at", + "local_id", + "local_updated_at", + "name", + "vm_host_must_enabled", + "vm_host_must_policy", + "vm_host_prefer_enabled", + "vm_host_prefer_policy", + "vm_vm_policy", + "vm_vm_policy_enabled" + ], + "type": "object", + "additionalProperties": false + }, + "WithTask_VmPlacementGroup_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "name_starts_with": { - "type": "string", - "nullable": true + "data": { + "$ref": "#/components/schemas/VmPlacementGroup" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "VmPlacementGroupCreationParams": { + "properties": { + "vm_vm_policy": { + "$ref": "#/components/schemas/VmVmPolicy" }, - "port": { - "type": "integer", - "format": "int32", - "nullable": true + "vm_host_prefer_enabled": { + "type": "boolean" }, - "port_gt": { - "type": "integer", - "format": "int32", - "nullable": true + "vm_host_must_policy": { + "type": "boolean" }, - "port_gte": { - "type": "integer", - "format": "int32", - "nullable": true + "vm_host_must_enabled": { + "type": "boolean" }, - "port_in": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array", - "nullable": true + "vm_host_prefer_policy": { + "type": "boolean" }, - "port_lt": { - "type": "integer", - "format": "int32", - "nullable": true + "vm_vm_policy_enabled": { + "type": "boolean" }, - "port_lte": { - "type": "integer", - "format": "int32", - "nullable": true + "vms": { + "$ref": "#/components/schemas/VmWhereInput" }, - "port_not": { - "type": "integer", - "format": "int32", - "nullable": true + "prefer_hosts": { + "$ref": "#/components/schemas/HostWhereInput" }, - "port_not_in": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array", - "nullable": true + "must_hosts": { + "$ref": "#/components/schemas/HostWhereInput" }, - "privacy_pass_phrase": { - "type": "string", - "nullable": true + "name": { + "type": "string" }, - "privacy_pass_phrase_contains": { - "type": "string", - "nullable": true + "description": { + "type": "string" }, - "privacy_pass_phrase_ends_with": { - "type": "string", - "nullable": true + "enabled": { + "type": "boolean" }, - "privacy_pass_phrase_gt": { - "type": "string", - "nullable": true + "cluster_id": { + "type": "string" + } + }, + "required": [ + "name", + "enabled", + "cluster_id" + ], + "type": "object" + }, + "VmPlacementGroupUpdationParams": { + "properties": { + "data": { + "properties": { + "vm_vm_policy": { + "$ref": "#/components/schemas/VmVmPolicy" + }, + "vms": { + "$ref": "#/components/schemas/VmWhereInput" + }, + "prefer_hosts": { + "$ref": "#/components/schemas/HostWhereInput" + }, + "must_hosts": { + "$ref": "#/components/schemas/HostWhereInput" + }, + "vm_host_prefer_enabled": { + "type": "boolean" + }, + "vm_host_must_policy": { + "type": "boolean" + }, + "vm_host_must_enabled": { + "type": "boolean" + }, + "vm_host_prefer_policy": { + "type": "boolean" + }, + "vm_vm_policy_enabled": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "enabled": { + "type": "boolean" + } + }, + "type": "object" }, - "privacy_pass_phrase_gte": { + "where": { + "$ref": "#/components/schemas/VmPlacementGroupWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "DeleteVmPlacementGroup": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "WithTask_DeleteVmPlacementGroup_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "privacy_pass_phrase_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true + "data": { + "$ref": "#/components/schemas/DeleteVmPlacementGroup" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "VmPlacementGroupDeletionParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/VmPlacementGroupWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "NestedSnapshotGroup": { + "properties": { + "id": { + "type": "string" }, - "privacy_pass_phrase_lt": { - "type": "string", - "nullable": true + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "NestedFrozenDisks": { + "properties": { + "boot": { + "type": "integer", + "format": "int32" }, - "privacy_pass_phrase_lte": { - "type": "string", - "nullable": true + "bus": { + "$ref": "#/components/schemas/Bus" }, - "privacy_pass_phrase_not": { - "type": "string", + "disabled": { + "type": "boolean", "nullable": true }, - "privacy_pass_phrase_not_contains": { + "disk_name": { "type": "string", "nullable": true }, - "privacy_pass_phrase_not_ends_with": { + "elf_image_local_id": { + "type": "string" + }, + "image_name": { "type": "string", "nullable": true }, - "privacy_pass_phrase_not_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true + "index": { + "type": "integer", + "format": "int32" }, - "privacy_pass_phrase_not_starts_with": { - "type": "string", + "key": { + "type": "integer", + "format": "int32", "nullable": true }, - "privacy_pass_phrase_starts_with": { - "type": "string", + "max_bandwidth": { + "type": "integer", + "format": "int64", "nullable": true }, - "privacy_protocol": { + "max_bandwidth_policy": { "allOf": [ { - "$ref": "#/components/schemas/SnmpPrivacyProtocol" + "$ref": "#/components/schemas/VmDiskIoRestrictType" } ], "nullable": true }, - "privacy_protocol_in": { - "items": { - "$ref": "#/components/schemas/SnmpPrivacyProtocol" - }, - "type": "array", + "max_iops": { + "type": "integer", + "format": "int32", "nullable": true }, - "privacy_protocol_not": { + "max_iops_policy": { "allOf": [ { - "$ref": "#/components/schemas/SnmpPrivacyProtocol" + "$ref": "#/components/schemas/VmDiskIoRestrictType" } ], "nullable": true }, - "privacy_protocol_not_in": { - "items": { - "$ref": "#/components/schemas/SnmpPrivacyProtocol" - }, - "type": "array", - "nullable": true + "path": { + "type": "string" }, - "protocol": { - "allOf": [ - { - "$ref": "#/components/schemas/SnmpProtocol" - } - ], - "nullable": true + "size": { + "type": "integer", + "format": "int64" }, - "protocol_in": { - "items": { - "$ref": "#/components/schemas/SnmpProtocol" - }, - "type": "array", + "snapshot_local_id": { + "type": "string", "nullable": true }, - "protocol_not": { - "allOf": [ - { - "$ref": "#/components/schemas/SnmpProtocol" - } - ], - "nullable": true + "storage_policy_uuid": { + "type": "string" }, - "protocol_not_in": { - "items": { - "$ref": "#/components/schemas/SnmpProtocol" - }, - "type": "array", - "nullable": true + "svt_image_local_id": { + "type": "string" }, - "username": { - "type": "string", - "nullable": true + "type": { + "$ref": "#/components/schemas/VmDiskType" }, - "username_contains": { - "type": "string", - "nullable": true + "vm_volume_local_id": { + "type": "string" }, - "username_ends_with": { + "vm_volume_snapshot_uuid": { "type": "string", "nullable": true }, - "username_gt": { + "vm_volume_template_uuid": { "type": "string", "nullable": true + } + }, + "required": [ + "boot", + "bus", + "elf_image_local_id", + "index", + "path", + "size", + "storage_policy_uuid", + "svt_image_local_id", + "type", + "vm_volume_local_id" + ], + "type": "object", + "additionalProperties": false + }, + "NestedFrozenVlan": { + "properties": { + "name": { + "type": "string" }, - "username_gte": { - "type": "string", - "nullable": true + "vds_ovs": { + "type": "string" }, - "username_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true + "vlan_id": { + "type": "integer", + "format": "int32" }, - "username_lt": { - "type": "string", + "vlan_local_id": { + "type": "string" + } + }, + "required": [ + "name", + "vds_ovs", + "vlan_id", + "vlan_local_id" + ], + "type": "object", + "additionalProperties": false + }, + "NestedFrozenNic": { + "properties": { + "enabled": { + "type": "boolean", "nullable": true }, - "username_lte": { - "type": "string", + "gateway": { + "type": "string" + }, + "index": { + "type": "integer", + "format": "int32" + }, + "ip_address": { + "type": "string" + }, + "mac_address": { + "type": "string" + }, + "mirror": { + "type": "boolean", "nullable": true }, - "username_not": { - "type": "string", + "model": { + "allOf": [ + { + "$ref": "#/components/schemas/VmNicModel" + } + ], "nullable": true }, - "username_not_contains": { - "type": "string", + "subnet_mask": { + "type": "string" + }, + "vlan": { + "$ref": "#/components/schemas/NestedFrozenVlan" + } + }, + "required": [ + "gateway", + "index", + "ip_address", + "mac_address", + "subnet_mask", + "vlan" + ], + "type": "object", + "additionalProperties": false + }, + "VmSnapshot": { + "properties": { + "clock_offset": { + "$ref": "#/components/schemas/VmClockOffset" + }, + "cluster": { + "$ref": "#/components/schemas/NestedCluster" + }, + "consistent_type": { + "$ref": "#/components/schemas/ConsistentType" + }, + "cpu": { + "$ref": "#/components/schemas/NestedCpu" + }, + "cpu_model": { + "type": "string" + }, + "description": { + "type": "string" + }, + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], "nullable": true }, - "username_not_ends_with": { - "type": "string", + "firmware": { + "$ref": "#/components/schemas/VmFirmware" + }, + "ha": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "io_policy": { + "allOf": [ + { + "$ref": "#/components/schemas/VmDiskIoPolicy" + } + ], "nullable": true }, - "username_not_in": { + "labels": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedLabel" }, "type": "array", "nullable": true }, - "username_not_starts_with": { + "local_created_at": { "type": "string", "nullable": true }, - "username_starts_with": { - "type": "string", + "local_id": { + "type": "string" + }, + "max_bandwidth": { + "type": "integer", + "format": "int64", "nullable": true }, - "version": { + "max_bandwidth_policy": { "allOf": [ { - "$ref": "#/components/schemas/SnmpVersion" + "$ref": "#/components/schemas/VmDiskIoRestrictType" } ], "nullable": true }, - "version_in": { - "items": { - "$ref": "#/components/schemas/SnmpVersion" - }, - "type": "array", + "max_iops": { + "type": "integer", + "format": "int32", "nullable": true }, - "version_not": { + "max_iops_policy": { "allOf": [ { - "$ref": "#/components/schemas/SnmpVersion" + "$ref": "#/components/schemas/VmDiskIoRestrictType" } ], "nullable": true }, - "version_not_in": { + "memory": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "size": { + "type": "integer", + "format": "int64" + }, + "snapshot_group": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedSnapshotGroup" + } + ], + "nullable": true + }, + "vcpu": { + "type": "integer", + "format": "int32" + }, + "vm": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedVm" + } + ], + "nullable": true + }, + "vm_disks": { "items": { - "$ref": "#/components/schemas/SnmpVersion" + "$ref": "#/components/schemas/NestedFrozenDisks" + }, + "type": "array", + "nullable": true + }, + "vm_nics": { + "items": { + "$ref": "#/components/schemas/NestedFrozenNic" }, "type": "array", "nullable": true + }, + "win_opt": { + "type": "boolean" } }, + "required": [ + "clock_offset", + "cluster", + "consistent_type", + "cpu", + "cpu_model", + "description", + "firmware", + "ha", + "id", + "local_id", + "memory", + "name", + "size", + "vcpu", + "win_opt" + ], "type": "object", "additionalProperties": false }, - "SnmpTransportUpdationParams": { + "WithTask_VmSnapshot_": { "properties": { + "task_id": { + "type": "string", + "nullable": true + }, "data": { - "properties": { - "disabled": { - "type": "boolean" - }, - "privacy_protocol": { - "$ref": "#/components/schemas/SnmpPrivacyProtocol" - }, - "privacy_pass_phrase": { - "type": "string" - }, - "auth_protocol": { - "$ref": "#/components/schemas/SnmpAuthProtocol" - }, - "auth_pass_phrase": { - "type": "string" - }, - "username": { - "type": "string" - }, - "community": { - "type": "string" - }, - "port": { - "type": "integer", - "format": "int32" - }, - "protocol": { - "$ref": "#/components/schemas/SnmpProtocol" - }, - "version": { - "$ref": "#/components/schemas/SnmpVersion" - }, - "name": { - "type": "string" - } - }, - "type": "object" + "$ref": "#/components/schemas/VmSnapshot" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "VmSnapshotCreationParamsData": { + "properties": { + "consistent_type": { + "$ref": "#/components/schemas/ConsistentType" }, - "where": { - "$ref": "#/components/schemas/SnmpTransportWhereInput" + "name": { + "type": "string" + }, + "vm_id": { + "type": "string" } }, "required": [ - "data", - "where" + "name", + "vm_id" ], "type": "object" }, - "DeleteSnmpTransport": { + "VmSnapshotCreationParams": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/VmSnapshotCreationParamsData" + }, + "type": "array" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "DeleteVmSnapshot": { "properties": { "id": { "type": "string" @@ -83930,14 +84740,14 @@ ], "type": "object" }, - "WithTask_DeleteSnmpTransport_": { + "WithTask_DeleteVmSnapshot_": { "properties": { "task_id": { "type": "string", "nullable": true }, "data": { - "$ref": "#/components/schemas/DeleteSnmpTransport" + "$ref": "#/components/schemas/DeleteVmSnapshot" } }, "required": [ @@ -83945,10 +84755,10 @@ ], "type": "object" }, - "SnmpTransportDeletionParams": { + "VmSnapshotDeletionParams": { "properties": { "where": { - "$ref": "#/components/schemas/SnmpTransportWhereInput" + "$ref": "#/components/schemas/VmSnapshotWhereInput" } }, "required": [ @@ -83956,41 +84766,107 @@ ], "type": "object" }, - "SnmpLanguageCode": { - "enum": [ - "EN_US", - "ZH_CN" + "NestedTemplateVpcNic": { + "properties": { + "vpc_local_id": { + "type": "string" + }, + "vpc_subnet_local_id": { + "type": "string" + } + }, + "required": [ + "vpc_local_id", + "vpc_subnet_local_id" ], - "type": "string" + "type": "object", + "additionalProperties": false }, - "SnmpTrapReceiver": { + "NestedTemplateNic": { "properties": { - "auth_pass_phrase": { + "enabled": { + "type": "boolean", + "nullable": true + }, + "index": { + "type": "integer", + "format": "int32" + }, + "ip_address": { "type": "string", "nullable": true }, - "auth_protocol": { + "mac_address": { + "type": "string", + "nullable": true + }, + "mirror": { + "type": "boolean", + "nullable": true + }, + "model": { "allOf": [ { - "$ref": "#/components/schemas/SnmpAuthProtocol" + "$ref": "#/components/schemas/VmNicModel" } ], "nullable": true }, - "cluster": { - "$ref": "#/components/schemas/NestedCluster" + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/VmNicType" + } + ], + "nullable": true }, - "community": { - "type": "string", + "vlan": { + "$ref": "#/components/schemas/NestedFrozenVlan" + }, + "vpc_nic": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedTemplateVpcNic" + } + ], "nullable": true + } + }, + "required": [ + "index", + "vlan" + ], + "type": "object", + "additionalProperties": false + }, + "VmTemplate": { + "properties": { + "clock_offset": { + "$ref": "#/components/schemas/VmClockOffset" }, - "disabled": { + "cloud_init_supported": { "type": "boolean" }, - "engine_id": { - "type": "string", + "cluster": { + "$ref": "#/components/schemas/NestedCluster" + }, + "content_library_vm_template": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedContentLibraryVmTemplate" + } + ], "nullable": true }, + "cpu": { + "$ref": "#/components/schemas/NestedCpu" + }, + "cpu_model": { + "type": "string" + }, + "description": { + "type": "string" + }, "entityAsyncStatus": { "allOf": [ { @@ -83999,75 +84875,128 @@ ], "nullable": true }, - "host": { - "type": "string" + "firmware": { + "$ref": "#/components/schemas/VmFirmware" + }, + "ha": { + "type": "boolean" }, "id": { "type": "string" }, - "inform": { - "type": "boolean" + "io_policy": { + "allOf": [ + { + "$ref": "#/components/schemas/VmDiskIoPolicy" + } + ], + "nullable": true }, - "language_code": { - "$ref": "#/components/schemas/SnmpLanguageCode" + "labels": { + "items": { + "$ref": "#/components/schemas/NestedLabel" + }, + "type": "array", + "nullable": true }, - "local_id": { - "type": "string" + "local_created_at": { + "type": "string", + "nullable": true }, - "name": { + "local_id": { "type": "string" }, - "port": { + "max_bandwidth": { "type": "integer", - "format": "int32" - }, - "privacy_pass_phrase": { - "type": "string", + "format": "int64", "nullable": true }, - "privacy_protocol": { + "max_bandwidth_policy": { "allOf": [ { - "$ref": "#/components/schemas/SnmpPrivacyProtocol" + "$ref": "#/components/schemas/VmDiskIoRestrictType" } ], "nullable": true }, - "protocol": { - "$ref": "#/components/schemas/SnmpProtocol" - }, - "username": { - "type": "string", + "max_iops": { + "type": "integer", + "format": "int32", "nullable": true }, - "version": { - "$ref": "#/components/schemas/SnmpVersion" + "max_iops_policy": { + "allOf": [ + { + "$ref": "#/components/schemas/VmDiskIoRestrictType" + } + ], + "nullable": true + }, + "memory": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "size": { + "type": "integer", + "format": "int64" + }, + "vcpu": { + "type": "integer", + "format": "int32" + }, + "video_type": { + "type": "string", + "nullable": true + }, + "vm_disks": { + "items": { + "$ref": "#/components/schemas/NestedFrozenDisks" + }, + "type": "array", + "nullable": true + }, + "vm_nics": { + "items": { + "$ref": "#/components/schemas/NestedTemplateNic" + }, + "type": "array", + "nullable": true + }, + "win_opt": { + "type": "boolean" } }, "required": [ + "clock_offset", + "cloud_init_supported", "cluster", - "disabled", - "host", + "cpu", + "cpu_model", + "description", + "firmware", + "ha", "id", - "inform", - "language_code", "local_id", + "memory", "name", - "port", - "protocol", - "version" + "size", + "vcpu", + "win_opt" ], "type": "object", "additionalProperties": false }, - "WithTask_SnmpTrapReceiver_": { + "WithTask_VmTemplate_": { "properties": { "task_id": { "type": "string", "nullable": true }, "data": { - "$ref": "#/components/schemas/SnmpTrapReceiver" + "$ref": "#/components/schemas/VmTemplate" } }, "required": [ @@ -84075,2139 +85004,2147 @@ ], "type": "object" }, - "SnmpTrapReceiverCreationParams": { + "VmTemplateCreationParams": { "properties": { - "disabled": { - "type": "boolean" - }, - "inform": { - "type": "boolean" - }, - "engine_id": { - "type": "string" - }, - "privacy_protocol": { - "$ref": "#/components/schemas/SnmpPrivacyProtocol" - }, - "privacy_pass_phrase": { - "type": "string" - }, - "auth_protocol": { - "$ref": "#/components/schemas/SnmpAuthProtocol" - }, - "auth_pass_phrase": { + "cluster_id": { "type": "string" }, - "username": { - "type": "string" + "cloud_init_supported": { + "type": "boolean" }, - "community": { + "vm_id": { "type": "string" }, - "language_code": { - "$ref": "#/components/schemas/SnmpLanguageCode" - }, - "port": { - "type": "integer", - "format": "int32" - }, - "host": { + "description": { "type": "string" }, - "protocol": { - "$ref": "#/components/schemas/SnmpProtocol" - }, - "version": { - "$ref": "#/components/schemas/SnmpVersion" - }, "name": { "type": "string" - }, - "cluster_id": { - "type": "string" } }, "required": [ - "language_code", - "port", - "host", - "protocol", - "version", - "name", - "cluster_id" + "cloud_init_supported", + "vm_id", + "name" ], "type": "object" }, - "SnmpTrapReceiverWhereInput": { + "VmTemplateUpdationParams": { "properties": { - "AND": { - "items": { - "$ref": "#/components/schemas/SnmpTrapReceiverWhereInput" + "data": { + "properties": { + "cloud_init_supported": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + } }, - "type": "array", - "nullable": true + "type": "object" }, - "NOT": { - "items": { - "$ref": "#/components/schemas/SnmpTrapReceiverWhereInput" - }, - "type": "array", + "where": { + "$ref": "#/components/schemas/VmTemplateWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "DeleteVmTemplate": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "WithTask_DeleteVmTemplate_": { + "properties": { + "task_id": { + "type": "string", "nullable": true }, - "OR": { - "items": { - "$ref": "#/components/schemas/SnmpTrapReceiverWhereInput" - }, - "type": "array", - "nullable": true + "data": { + "$ref": "#/components/schemas/DeleteVmTemplate" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "VmTemplateDeletionParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/VmTemplateWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "VmVolumeSnapshot": { + "properties": { + "cluster": { + "$ref": "#/components/schemas/NestedCluster" }, - "auth_pass_phrase": { + "createAt": { "type": "string", "nullable": true }, - "auth_pass_phrase_contains": { - "type": "string", - "nullable": true + "description": { + "type": "string" }, - "auth_pass_phrase_ends_with": { - "type": "string", - "nullable": true + "elf_storage_policy": { + "$ref": "#/components/schemas/VmVolumeElfStoragePolicyType" }, - "auth_pass_phrase_gt": { - "type": "string", + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], "nullable": true }, - "auth_pass_phrase_gte": { - "type": "string", - "nullable": true + "id": { + "type": "string" }, - "auth_pass_phrase_in": { + "labels": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedLabel" }, "type": "array", "nullable": true }, - "auth_pass_phrase_lt": { - "type": "string", - "nullable": true - }, - "auth_pass_phrase_lte": { - "type": "string", - "nullable": true - }, - "auth_pass_phrase_not": { - "type": "string", - "nullable": true - }, - "auth_pass_phrase_not_contains": { - "type": "string", - "nullable": true + "local_created_at": { + "type": "string" }, - "auth_pass_phrase_not_ends_with": { - "type": "string", - "nullable": true + "local_id": { + "type": "string" }, - "auth_pass_phrase_not_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true + "name": { + "type": "string" }, - "auth_pass_phrase_not_starts_with": { - "type": "string", + "shared_size": { + "type": "number", + "format": "double", "nullable": true }, - "auth_pass_phrase_starts_with": { - "type": "string", + "size": { + "type": "number", + "format": "double", "nullable": true }, - "auth_protocol": { - "allOf": [ - { - "$ref": "#/components/schemas/SnmpAuthProtocol" - } - ], - "nullable": true + "type": { + "$ref": "#/components/schemas/VmVolumeSnapshotType" }, - "auth_protocol_in": { - "items": { - "$ref": "#/components/schemas/SnmpAuthProtocol" - }, - "type": "array", + "unique_size": { + "type": "number", + "format": "double", "nullable": true }, - "auth_protocol_not": { + "vm_volume": { "allOf": [ { - "$ref": "#/components/schemas/SnmpAuthProtocol" + "$ref": "#/components/schemas/NestedVmVolume" } ], "nullable": true }, - "auth_protocol_not_in": { - "items": { - "$ref": "#/components/schemas/SnmpAuthProtocol" - }, - "type": "array", + "volume_sharing": { + "type": "boolean", "nullable": true }, - "cluster": { - "allOf": [ - { - "$ref": "#/components/schemas/ClusterWhereInput" - } - ], + "volume_size": { + "type": "number", + "format": "double", "nullable": true }, - "community": { + "zbs_snapshot_uuid": { "type": "string", "nullable": true - }, - "community_contains": { + } + }, + "required": [ + "cluster", + "description", + "elf_storage_policy", + "id", + "local_created_at", + "local_id", + "name", + "type" + ], + "type": "object", + "additionalProperties": false + }, + "WithTask_VmVolumeSnapshot_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "community_ends_with": { - "type": "string", - "nullable": true + "data": { + "$ref": "#/components/schemas/VmVolumeSnapshot" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "VmVolumeSnapshotCreationParams": { + "properties": { + "volume_id": { + "type": "string" }, - "community_gt": { - "type": "string", - "nullable": true + "description": { + "type": "string" }, - "community_gte": { + "name": { + "type": "string" + } + }, + "required": [ + "volume_id", + "description", + "name" + ], + "type": "object" + }, + "DeleteVmVolumeSnapshot": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "WithTask_DeleteVmVolumeSnapshot_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "community_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true + "data": { + "$ref": "#/components/schemas/DeleteVmVolumeSnapshot" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "VmVolumeSnapshotDeletionParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/VmVolumeSnapshotWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "VmVolume": { + "properties": { + "cluster": { + "$ref": "#/components/schemas/NestedCluster" }, - "community_lt": { + "description": { "type": "string", "nullable": true }, - "community_lte": { - "type": "string", - "nullable": true + "elf_storage_policy": { + "$ref": "#/components/schemas/VmVolumeElfStoragePolicyType" }, - "community_not": { - "type": "string", + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], "nullable": true }, - "community_not_contains": { - "type": "string", + "guest_size_usage": { + "type": "number", + "format": "double", "nullable": true }, - "community_not_ends_with": { - "type": "string", + "guest_used_size": { + "type": "integer", + "format": "int64", "nullable": true }, - "community_not_in": { + "id": { + "type": "string" + }, + "labels": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedLabel" }, "type": "array", "nullable": true }, - "community_not_starts_with": { - "type": "string", - "nullable": true + "local_created_at": { + "type": "string" }, - "community_starts_with": { - "type": "string", - "nullable": true + "local_id": { + "type": "string" }, - "disabled": { - "type": "boolean", + "lun": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedIscsiLun" + } + ], "nullable": true }, - "disabled_not": { - "type": "boolean", - "nullable": true + "mounting": { + "type": "boolean" }, - "engine_id": { - "type": "string", - "nullable": true + "name": { + "type": "string" }, - "engine_id_contains": { - "type": "string", - "nullable": true + "path": { + "type": "string" }, - "engine_id_ends_with": { - "type": "string", + "sharing": { + "type": "boolean" + }, + "size": { + "type": "integer", + "format": "int64" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/VmVolumeType" + } + ], "nullable": true }, - "engine_id_gt": { - "type": "string", + "unique_logical_size": { + "type": "number", + "format": "double", "nullable": true }, - "engine_id_gte": { - "type": "string", + "unique_size": { + "type": "integer", + "format": "int64", "nullable": true }, - "engine_id_in": { + "vm_disks": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedVmDisk" }, "type": "array", "nullable": true - }, - "engine_id_lt": { - "type": "string", - "nullable": true - }, - "engine_id_lte": { - "type": "string", - "nullable": true - }, - "engine_id_not": { - "type": "string", - "nullable": true - }, - "engine_id_not_contains": { + } + }, + "required": [ + "cluster", + "elf_storage_policy", + "id", + "local_created_at", + "local_id", + "mounting", + "name", + "path", + "sharing", + "size" + ], + "type": "object", + "additionalProperties": false + }, + "WithTask_VmVolume_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "engine_id_not_ends_with": { + "data": { + "$ref": "#/components/schemas/VmVolume" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "VmVolumeCreationParams": { + "properties": { + "elf_storage_policy": { + "$ref": "#/components/schemas/VmVolumeElfStoragePolicyType" + }, + "size_unit": { + "$ref": "#/components/schemas/ByteUnit" + }, + "size": { + "type": "integer", + "format": "int64" + }, + "sharing": { + "type": "boolean" + }, + "cluster_id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "elf_storage_policy", + "size", + "sharing", + "cluster_id", + "name" + ], + "type": "object" + }, + "DeleteVmVolume": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "WithTask_DeleteVmVolume_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "engine_id_not_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true + "data": { + "$ref": "#/components/schemas/DeleteVmVolume" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "VmVolumeDeletionParamsEffect": { + "properties": { + "include_snapshots": { + "type": "boolean" + } + }, + "type": "object" + }, + "VmVolumeDeletionParams": { + "properties": { + "effect": { + "$ref": "#/components/schemas/VmVolumeDeletionParamsEffect" }, - "engine_id_not_starts_with": { + "where": { + "$ref": "#/components/schemas/VmVolumeWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "VmVolumeRebuildParams": { + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "volume_snapshot_id": { + "type": "string" + } + }, + "required": [ + "name", + "description", + "volume_snapshot_id" + ], + "type": "object" + }, + "VmVolumeRollbackParams": { + "properties": { + "volume_snapshot_id": { + "type": "string" + } + }, + "required": [ + "volume_snapshot_id" + ], + "type": "object" + }, + "VmVolumeWhereUniqueInput": { + "properties": { + "id": { "type": "string", "nullable": true }, - "engine_id_starts_with": { + "local_id": { "type": "string", "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "CloneVmVolumeParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/VmVolumeWhereUniqueInput" }, - "entityAsyncStatus": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" + "data": { + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" } + }, + "required": [ + "name" ], - "nullable": true + "type": "object" + } + }, + "required": [ + "where", + "data" + ], + "type": "object" + }, + "UpdateVmVolumeParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/VmVolumeWhereInput" }, - "entityAsyncStatus_in": { - "items": { - "$ref": "#/components/schemas/EntityAsyncStatus" + "data": { + "properties": { + "size_unit": { + "$ref": "#/components/schemas/ByteUnit" + }, + "size": { + "type": "integer", + "format": "int64" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + } }, - "type": "array", - "nullable": true - }, - "entityAsyncStatus_not": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" + "type": "object" + } + }, + "required": [ + "where", + "data" + ], + "type": "object" + }, + "VmVolumeExportFileType": { + "type": "string", + "enum": [ + "QCOW2", + "RAW" + ] + }, + "ExportVmVolumeParams": { + "properties": { + "data": { + "properties": { + "type": { + "$ref": "#/components/schemas/VmVolumeExportFileType" } - ], - "nullable": true - }, - "entityAsyncStatus_not_in": { - "items": { - "$ref": "#/components/schemas/EntityAsyncStatus" }, - "type": "array", - "nullable": true - }, - "host": { - "type": "string", - "nullable": true + "required": [ + "type" + ], + "type": "object" }, - "host_contains": { - "type": "string", - "nullable": true + "where": { + "$ref": "#/components/schemas/VmVolumeWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "ImportVmVolumeParams": { + "properties": { + "upload_task_id": { + "type": "string" }, - "host_ends_with": { - "type": "string", - "nullable": true + "name": { + "type": "string" }, - "host_gt": { - "type": "string", - "nullable": true + "storage_policy": { + "$ref": "#/components/schemas/VmVolumeElfStoragePolicyType" }, - "host_gte": { - "type": "string", - "nullable": true + "cluster_id": { + "type": "string" + } + }, + "required": [ + "upload_task_id", + "name", + "storage_policy", + "cluster_id" + ], + "type": "object" + }, + "VsphereEsxiAccount": { + "properties": { + "host": { + "$ref": "#/components/schemas/NestedHost" }, - "host_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true + "id": { + "type": "string" }, - "host_lt": { - "type": "string", - "nullable": true + "ip": { + "type": "string" }, - "host_lte": { - "type": "string", - "nullable": true + "is_valid": { + "type": "boolean" }, - "host_not": { - "type": "string", - "nullable": true + "local_id": { + "type": "string" }, - "host_not_contains": { - "type": "string", - "nullable": true + "port": { + "type": "integer", + "format": "int32" }, - "host_not_ends_with": { + "username": { + "type": "string" + } + }, + "required": [ + "host", + "id", + "ip", + "is_valid", + "local_id", + "port", + "username" + ], + "type": "object", + "additionalProperties": false + }, + "WithTask_VsphereEsxiAccount-Array_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "host_not_in": { + "data": { "items": { - "type": "string" + "$ref": "#/components/schemas/VsphereEsxiAccount" }, - "type": "array", - "nullable": true - }, - "host_not_starts_with": { - "type": "string", - "nullable": true - }, - "host_starts_with": { - "type": "string", - "nullable": true - }, - "id": { - "type": "string", - "nullable": true - }, - "id_contains": { - "type": "string", - "nullable": true + "type": "array" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "UpdateVsphereEsxiAccountParamsData": { + "properties": { + "port": { + "type": "integer", + "format": "int32" }, - "id_ends_with": { - "type": "string", - "nullable": true + "password": { + "type": "string" }, - "id_gt": { - "type": "string", - "nullable": true + "username": { + "type": "string" }, - "id_gte": { - "type": "string", - "nullable": true + "ip": { + "type": "string" }, - "id_in": { + "esxi_account_id": { + "type": "string" + } + }, + "required": [ + "username", + "ip", + "esxi_account_id" + ], + "type": "object" + }, + "UpdateVsphereEsxiAccountParams": { + "properties": { + "data": { "items": { - "type": "string" + "$ref": "#/components/schemas/UpdateVsphereEsxiAccountParamsData" }, - "type": "array", - "nullable": true + "type": "array" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "UserAuditLog": { + "properties": { + "action": { + "type": "string" }, - "id_lt": { + "auth_type": { "type": "string", "nullable": true }, - "id_lte": { - "type": "string", + "cluster": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedCluster" + } + ], "nullable": true }, - "id_not": { - "type": "string", - "nullable": true + "createdAt": { + "type": "string" }, - "id_not_contains": { + "finished_at": { "type": "string", "nullable": true }, - "id_not_ends_with": { - "type": "string", - "nullable": true + "id": { + "type": "string" }, - "id_not_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true + "ip_address": { + "type": "string" }, - "id_not_starts_with": { - "type": "string", - "nullable": true + "message": { + "type": "string" }, - "id_starts_with": { + "resource_id": { "type": "string", "nullable": true }, - "inform": { - "type": "boolean", + "resource_type": { + "type": "string", "nullable": true }, - "inform_not": { - "type": "boolean", + "started_at": { + "type": "string", "nullable": true }, - "language_code": { + "status": { "allOf": [ { - "$ref": "#/components/schemas/SnmpLanguageCode" + "$ref": "#/components/schemas/UserAuditLogStatus" } ], "nullable": true }, - "language_code_in": { - "items": { - "$ref": "#/components/schemas/SnmpLanguageCode" - }, - "type": "array", - "nullable": true - }, - "language_code_not": { + "user": { "allOf": [ { - "$ref": "#/components/schemas/SnmpLanguageCode" + "$ref": "#/components/schemas/NestedUser" } ], "nullable": true }, - "language_code_not_in": { - "items": { - "$ref": "#/components/schemas/SnmpLanguageCode" - }, - "type": "array", - "nullable": true - }, - "local_id": { + "username": { "type": "string", "nullable": true - }, - "local_id_contains": { + } + }, + "required": [ + "action", + "createdAt", + "id", + "ip_address", + "message" + ], + "type": "object", + "additionalProperties": false + }, + "WithTask_UserAuditLog_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "local_id_ends_with": { - "type": "string", - "nullable": true - }, - "local_id_gt": { - "type": "string", - "nullable": true + "data": { + "$ref": "#/components/schemas/UserAuditLog" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "UserAuditLogMessage": { + "properties": { + "en-US": { + "type": "string" }, - "local_id_gte": { - "type": "string", - "nullable": true + "zh-CN": { + "type": "string" + } + }, + "required": [ + "en-US", + "zh-CN" + ], + "type": "object" + }, + "UserAuditLogCreationParams": { + "properties": { + "started_at": { + "type": "string" }, - "local_id_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true + "finished_at": { + "type": "string" }, - "local_id_lt": { - "type": "string", - "nullable": true + "cluster_id": { + "type": "string" }, - "local_id_lte": { - "type": "string", - "nullable": true + "resource_id": { + "type": "string" }, - "local_id_not": { - "type": "string", - "nullable": true + "ip_address": { + "type": "string" }, - "local_id_not_contains": { - "type": "string", - "nullable": true + "status": { + "$ref": "#/components/schemas/UserAuditLogStatus" }, - "local_id_not_ends_with": { - "type": "string", - "nullable": true + "user_id": { + "type": "string" }, - "local_id_not_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true + "message": { + "$ref": "#/components/schemas/UserAuditLogMessage" }, - "local_id_not_starts_with": { + "resource_type": { "type": "string", - "nullable": true + "minLength": 1 }, - "local_id_starts_with": { + "action": { "type": "string", - "nullable": true + "minLength": 1 + } + }, + "required": [ + "status", + "user_id", + "message", + "resource_type", + "action" + ], + "type": "object" + }, + "NestedBackupService": { + "properties": { + "id": { + "type": "string" }, "name": { - "type": "string", - "nullable": true - }, - "name_contains": { - "type": "string", - "nullable": true - }, - "name_ends_with": { - "type": "string", - "nullable": true - }, - "name_gt": { - "type": "string", - "nullable": true + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "NestedBackupStoreRepository": { + "properties": { + "id": { + "type": "string" }, - "name_gte": { - "type": "string", + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "BackupPlanPeriod": { + "enum": [ + "DAILY", + "HOURLY", + "MINUTELY", + "MONTHLY", + "WEEKLY", + "YEARLY" + ], + "type": "string" + }, + "WeekdayTypeEnum": { + "enum": [ + "FRI", + "MON", + "SAT", + "SUN", + "THU", + "TUE", + "WED" + ], + "type": "string" + }, + "NestedBackupPlanTimePoint": { + "properties": { + "date": { + "type": "integer", + "format": "int32", "nullable": true }, - "name_in": { + "date_position": { "items": { - "type": "string" + "type": "integer", + "format": "int32" }, "type": "array", "nullable": true }, - "name_lt": { - "type": "string", - "nullable": true + "hour": { + "type": "integer", + "format": "int32" }, - "name_lte": { - "type": "string", - "nullable": true + "minute": { + "type": "integer", + "format": "int32" }, - "name_not": { - "type": "string", + "weekday": { + "allOf": [ + { + "$ref": "#/components/schemas/WeekdayTypeEnum" + } + ], "nullable": true + } + }, + "required": [ + "hour", + "minute" + ], + "type": "object", + "additionalProperties": false + }, + "BackupPlanKeepPolicy": { + "enum": [ + "COUNT", + "FOREVER", + "TIME" + ], + "type": "string" + }, + "BackupPlanExecutionStatus": { + "enum": [ + "FAILED", + "NEVER_EXECUTE", + "PARTIAL_SUCCESS", + "PAUSED", + "RUNNING", + "SUCCESS", + "WAITING_EXECUTE" + ], + "type": "string" + }, + "BackupPlanStatus": { + "enum": [ + "PAUSED", + "STOPPED", + "WORKING" + ], + "type": "string" + }, + "BackupPlan": { + "properties": { + "backup_service": { + "$ref": "#/components/schemas/NestedBackupService" }, - "name_not_contains": { - "type": "string", - "nullable": true + "backup_store_repository": { + "$ref": "#/components/schemas/NestedBackupStoreRepository" }, - "name_not_ends_with": { - "type": "string", + "compression": { + "type": "boolean", "nullable": true }, - "name_not_in": { - "items": { - "type": "string" - }, - "type": "array", + "compression_ratio": { + "type": "number", + "format": "double", "nullable": true }, - "name_not_starts_with": { - "type": "string", - "nullable": true + "createdAt": { + "type": "string" }, - "name_starts_with": { + "description": { "type": "string", "nullable": true }, - "port": { - "type": "integer", - "format": "int32", + "enable_window": { + "type": "boolean" + }, + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], "nullable": true }, - "port_gt": { + "full_interval": { "type": "integer", - "format": "int32", - "nullable": true + "format": "int32" }, - "port_gte": { + "full_period": { + "$ref": "#/components/schemas/BackupPlanPeriod" + }, + "full_time_point": { + "$ref": "#/components/schemas/NestedBackupPlanTimePoint" + }, + "id": { + "type": "string" + }, + "incremental_interval": { "type": "integer", "format": "int32", "nullable": true }, - "port_in": { + "incremental_period": { + "$ref": "#/components/schemas/BackupPlanPeriod" + }, + "incremental_time_points": { "items": { - "type": "integer", - "format": "int32" + "$ref": "#/components/schemas/NestedBackupPlanTimePoint" + }, + "type": "array" + }, + "incremental_weekdays": { + "items": { + "$ref": "#/components/schemas/WeekdayTypeEnum" }, "type": "array", "nullable": true }, - "port_lt": { - "type": "integer", - "format": "int32", + "keep_policy": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupPlanKeepPolicy" + } + ], "nullable": true }, - "port_lte": { + "keep_policy_value": { "type": "integer", "format": "int32", "nullable": true }, - "port_not": { + "last_execute_status": { + "$ref": "#/components/schemas/BackupPlanExecutionStatus" + }, + "last_execute_success_job_count": { "type": "integer", "format": "int32", "nullable": true }, - "port_not_in": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array", + "last_execute_total_job_count": { + "type": "integer", + "format": "int32", "nullable": true }, - "privacy_pass_phrase": { + "last_executed_at": { "type": "string", "nullable": true }, - "privacy_pass_phrase_contains": { - "type": "string", - "nullable": true + "last_manual_execute_status": { + "$ref": "#/components/schemas/BackupPlanExecutionStatus" }, - "privacy_pass_phrase_ends_with": { - "type": "string", + "last_manual_execute_success_job_count": { + "type": "integer", + "format": "int32", "nullable": true }, - "privacy_pass_phrase_gt": { - "type": "string", + "last_manual_execute_total_job_count": { + "type": "integer", + "format": "int32", "nullable": true }, - "privacy_pass_phrase_gte": { + "last_manual_executed_at": { "type": "string", "nullable": true }, - "privacy_pass_phrase_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true + "name": { + "type": "string" }, - "privacy_pass_phrase_lt": { + "next_execute_time": { "type": "string", "nullable": true }, - "privacy_pass_phrase_lte": { - "type": "string", + "physical_size": { + "type": "integer", + "format": "int64", "nullable": true }, - "privacy_pass_phrase_not": { - "type": "string", + "snapshot_consistent_type": { + "allOf": [ + { + "$ref": "#/components/schemas/ConsistentType" + } + ], "nullable": true }, - "privacy_pass_phrase_not_contains": { - "type": "string", - "nullable": true + "status": { + "$ref": "#/components/schemas/BackupPlanStatus" }, - "privacy_pass_phrase_not_ends_with": { - "type": "string", + "valid_size_of_backup_object": { + "type": "integer", + "format": "int64", "nullable": true }, - "privacy_pass_phrase_not_in": { - "items": { - "type": "string" - }, - "type": "array", + "window_end": { + "type": "string", "nullable": true }, - "privacy_pass_phrase_not_starts_with": { + "window_start": { "type": "string", "nullable": true - }, - "privacy_pass_phrase_starts_with": { + } + }, + "required": [ + "backup_service", + "backup_store_repository", + "createdAt", + "enable_window", + "full_interval", + "full_period", + "full_time_point", + "id", + "incremental_period", + "incremental_time_points", + "last_execute_status", + "last_manual_execute_status", + "name", + "status" + ], + "type": "object", + "additionalProperties": false + }, + "WithTask_BackupPlan_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "privacy_protocol": { + "data": { + "$ref": "#/components/schemas/BackupPlan" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "BackupPlanTimePoint": { + "properties": { + "weekday": { "allOf": [ { - "$ref": "#/components/schemas/SnmpPrivacyProtocol" + "$ref": "#/components/schemas/WeekdayTypeEnum" } ], "nullable": true }, - "privacy_protocol_in": { - "items": { - "$ref": "#/components/schemas/SnmpPrivacyProtocol" - }, - "type": "array", - "nullable": true + "minute": { + "type": "integer", + "format": "int32" }, - "privacy_protocol_not": { - "allOf": [ - { - "$ref": "#/components/schemas/SnmpPrivacyProtocol" - } - ], - "nullable": true + "hour": { + "type": "integer", + "format": "int32" }, - "privacy_protocol_not_in": { + "date_position": { "items": { - "$ref": "#/components/schemas/SnmpPrivacyProtocol" + "type": "integer", + "format": "int32" }, "type": "array", "nullable": true }, - "protocol": { - "allOf": [ - { - "$ref": "#/components/schemas/SnmpProtocol" - } - ], + "date": { + "type": "integer", + "format": "int32", "nullable": true + } + }, + "required": [ + "minute", + "hour" + ], + "type": "object" + }, + "BackupPlanDelayOption": { + "enum": [ + "KEEP_GO_ON", + "STOP_BACKUP" + ], + "type": "string" + }, + "BackupPlanCreationParams": { + "properties": { + "keep_policy_value": { + "type": "integer", + "format": "int32" }, - "protocol_in": { - "items": { - "$ref": "#/components/schemas/SnmpProtocol" - }, - "type": "array", - "nullable": true + "keep_policy": { + "$ref": "#/components/schemas/BackupPlanKeepPolicy" }, - "protocol_not": { - "allOf": [ - { - "$ref": "#/components/schemas/SnmpProtocol" - } - ], - "nullable": true + "backup_delay_option": { + "$ref": "#/components/schemas/BackupPlanDelayOption" }, - "protocol_not_in": { - "items": { - "$ref": "#/components/schemas/SnmpProtocol" - }, - "type": "array", - "nullable": true + "window_end": { + "type": "string" }, - "username": { - "type": "string", - "nullable": true + "window_start": { + "type": "string" }, - "username_contains": { - "type": "string", - "nullable": true + "enable_window": { + "type": "boolean" }, - "username_ends_with": { - "type": "string", + "full_time_point": { + "$ref": "#/components/schemas/BackupPlanTimePoint" + }, + "full_period": { + "$ref": "#/components/schemas/BackupPlanPeriod" + }, + "full_interval": { + "type": "integer", + "format": "int32" + }, + "incremental_weekdays": { + "items": { + "$ref": "#/components/schemas/WeekdayTypeEnum" + }, + "type": "array" + }, + "incremental_time_points": { + "items": { + "$ref": "#/components/schemas/BackupPlanTimePoint" + }, + "type": "array" + }, + "incremental_interval": { + "type": "integer", + "format": "int32" + }, + "incremental_period": { + "$ref": "#/components/schemas/BackupPlanPeriod" + }, + "snapshot_consistent_type": { + "$ref": "#/components/schemas/ConsistentType" + }, + "compression": { + "type": "boolean" + }, + "vms": { + "$ref": "#/components/schemas/VmWhereInput" + }, + "description": { + "type": "string" + }, + "backup_store_repository_id": { + "type": "string" + }, + "backup_service_id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "keep_policy_value", + "keep_policy", + "enable_window", + "full_time_point", + "full_period", + "full_interval", + "incremental_interval", + "incremental_period", + "snapshot_consistent_type", + "compression", + "vms", + "backup_store_repository_id", + "backup_service_id", + "name" + ], + "type": "object" + }, + "BackupPlanWhereInput": { + "properties": { + "AND": { + "items": { + "$ref": "#/components/schemas/BackupPlanWhereInput" + }, + "type": "array", "nullable": true }, - "username_gt": { - "type": "string", + "NOT": { + "items": { + "$ref": "#/components/schemas/BackupPlanWhereInput" + }, + "type": "array", "nullable": true }, - "username_gte": { - "type": "string", + "OR": { + "items": { + "$ref": "#/components/schemas/BackupPlanWhereInput" + }, + "type": "array", "nullable": true }, - "username_in": { + "backup_service": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupServiceWhereInput" + } + ], + "nullable": true + }, + "backup_store_repository": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupStoreRepositoryWhereInput" + } + ], + "nullable": true + }, + "compression": { + "type": "boolean", + "nullable": true + }, + "compression_not": { + "type": "boolean", + "nullable": true + }, + "compression_ratio": { + "type": "number", + "format": "double", + "nullable": true + }, + "compression_ratio_gt": { + "type": "number", + "format": "double", + "nullable": true + }, + "compression_ratio_gte": { + "type": "number", + "format": "double", + "nullable": true + }, + "compression_ratio_in": { "items": { - "type": "string" + "type": "number", + "format": "double" }, "type": "array", "nullable": true }, - "username_lt": { - "type": "string", + "compression_ratio_lt": { + "type": "number", + "format": "double", "nullable": true }, - "username_lte": { - "type": "string", + "compression_ratio_lte": { + "type": "number", + "format": "double", "nullable": true }, - "username_not": { + "compression_ratio_not": { + "type": "number", + "format": "double", + "nullable": true + }, + "compression_ratio_not_in": { + "items": { + "type": "number", + "format": "double" + }, + "type": "array", + "nullable": true + }, + "createdAt": { "type": "string", "nullable": true }, - "username_not_contains": { + "createdAt_gt": { "type": "string", "nullable": true }, - "username_not_ends_with": { + "createdAt_gte": { "type": "string", "nullable": true }, - "username_not_in": { + "createdAt_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "username_not_starts_with": { + "createdAt_lt": { "type": "string", "nullable": true }, - "username_starts_with": { + "createdAt_lte": { "type": "string", "nullable": true }, - "version": { - "allOf": [ - { - "$ref": "#/components/schemas/SnmpVersion" - } - ], + "createdAt_not": { + "type": "string", "nullable": true }, - "version_in": { + "createdAt_not_in": { "items": { - "$ref": "#/components/schemas/SnmpVersion" + "type": "string" }, "type": "array", "nullable": true }, - "version_not": { - "allOf": [ - { - "$ref": "#/components/schemas/SnmpVersion" - } - ], + "description": { + "type": "string", "nullable": true }, - "version_not_in": { + "description_contains": { + "type": "string", + "nullable": true + }, + "description_ends_with": { + "type": "string", + "nullable": true + }, + "description_gt": { + "type": "string", + "nullable": true + }, + "description_gte": { + "type": "string", + "nullable": true + }, + "description_in": { "items": { - "$ref": "#/components/schemas/SnmpVersion" + "type": "string" }, "type": "array", "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "SnmpTrapReceiverUpdationParams": { - "properties": { - "data": { - "properties": { - "disabled": { - "type": "boolean" - }, - "inform": { - "type": "boolean" - }, - "engine_id": { - "type": "string" - }, - "privacy_protocol": { - "$ref": "#/components/schemas/SnmpPrivacyProtocol" - }, - "privacy_pass_phrase": { - "type": "string" - }, - "auth_protocol": { - "$ref": "#/components/schemas/SnmpAuthProtocol" - }, - "auth_pass_phrase": { - "type": "string" - }, - "username": { - "type": "string" - }, - "community": { - "type": "string" - }, - "language_code": { - "$ref": "#/components/schemas/SnmpLanguageCode" - }, - "port": { - "type": "integer", - "format": "int32" - }, - "host": { - "type": "string" - }, - "protocol": { - "$ref": "#/components/schemas/SnmpProtocol" - }, - "version": { - "$ref": "#/components/schemas/SnmpVersion" - }, - "name": { - "type": "string" - } - }, - "type": "object" }, - "where": { - "$ref": "#/components/schemas/SnmpTrapReceiverWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "DeleteSnmpTrapReceiver": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "WithTask_DeleteSnmpTrapReceiver_": { - "properties": { - "task_id": { + "description_lt": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/DeleteSnmpTrapReceiver" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "SnmpTrapReceiverDeletionParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/SnmpTrapReceiverWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "ColumnConfig": { - "properties": { - "name": { - "type": "string" + "description_lte": { + "type": "string", + "nullable": true }, - "path": { - "type": "string" - } - }, - "required": [ - "name", - "path" - ], - "type": "object" - }, - "HostOrderByInput": { - "enum": [ - "access_ip_ASC", - "access_ip_DESC", - "allocable_cpu_cores_for_vm_exclusive_ASC", - "allocable_cpu_cores_for_vm_exclusive_DESC", - "allocatable_memory_bytes_ASC", - "allocatable_memory_bytes_DESC", - "chunk_id_ASC", - "chunk_id_DESC", - "cpu_brand_ASC", - "cpu_brand_DESC", - "cpu_fan_speed_unit_ASC", - "cpu_fan_speed_unit_DESC", - "cpu_hz_per_core_ASC", - "cpu_hz_per_core_DESC", - "cpu_model_ASC", - "cpu_model_DESC", - "cpu_vendor_ASC", - "cpu_vendor_DESC", - "data_ip_ASC", - "data_ip_DESC", - "entityAsyncStatus_ASC", - "entityAsyncStatus_DESC", - "failure_data_space_ASC", - "failure_data_space_DESC", - "hdd_data_capacity_ASC", - "hdd_data_capacity_DESC", - "hdd_disk_count_ASC", - "hdd_disk_count_DESC", - "host_state_ASC", - "host_state_DESC", - "hypervisor_ip_ASC", - "hypervisor_ip_DESC", - "id_ASC", - "id_DESC", - "iommu_ASC", - "iommu_DESC", - "is_os_in_raid1_ASC", - "is_os_in_raid1_DESC", - "local_id_ASC", - "local_id_DESC", - "lsm_cap_disk_safe_umount_ASC", - "lsm_cap_disk_safe_umount_DESC", - "management_ip_ASC", - "management_ip_DESC", - "model_ASC", - "model_DESC", - "name_ASC", - "name_DESC", - "nested_virtualization_ASC", - "nested_virtualization_DESC", - "nic_count_ASC", - "nic_count_DESC", - "node_topo_local_id_ASC", - "node_topo_local_id_DESC", - "os_memory_bytes_ASC", - "os_memory_bytes_DESC", - "os_version_ASC", - "os_version_DESC", - "pmem_dimm_capacity_ASC", - "pmem_dimm_capacity_DESC", - "pmem_dimm_count_ASC", - "pmem_dimm_count_DESC", - "pmem_disk_count_ASC", - "pmem_disk_count_DESC", - "provisioned_cpu_cores_ASC", - "provisioned_cpu_cores_DESC", - "provisioned_memory_bytes_ASC", - "provisioned_memory_bytes_DESC", - "running_pause_vm_memory_bytes_ASC", - "running_pause_vm_memory_bytes_DESC", - "running_vm_num_ASC", - "running_vm_num_DESC", - "scvm_cpu_ASC", - "scvm_cpu_DESC", - "scvm_memory_ASC", - "scvm_memory_DESC", - "scvm_name_ASC", - "scvm_name_DESC", - "serial_ASC", - "serial_DESC", - "ssd_data_capacity_ASC", - "ssd_data_capacity_DESC", - "ssd_disk_count_ASC", - "ssd_disk_count_DESC", - "state_ASC", - "state_DESC", - "status_ASC", - "status_DESC", - "stopped_vm_num_ASC", - "stopped_vm_num_DESC", - "suspended_vm_num_ASC", - "suspended_vm_num_DESC", - "total_cache_capacity_ASC", - "total_cache_capacity_DESC", - "total_cpu_cores_ASC", - "total_cpu_cores_DESC", - "total_cpu_hz_ASC", - "total_cpu_hz_DESC", - "total_cpu_sockets_ASC", - "total_cpu_sockets_DESC", - "total_data_capacity_ASC", - "total_data_capacity_DESC", - "total_memory_bytes_ASC", - "total_memory_bytes_DESC", - "used_cpu_hz_ASC", - "used_cpu_hz_DESC", - "used_data_space_ASC", - "used_data_space_DESC", - "used_memory_bytes_ASC", - "used_memory_bytes_DESC", - "vm_num_ASC", - "vm_num_DESC", - "vmotion_ip_ASC", - "vmotion_ip_DESC", - "with_faster_ssd_as_cache_ASC", - "with_faster_ssd_as_cache_DESC" - ], - "type": "string" - }, - "GetHostsRequestBody": { - "properties": { - "after": { + "description_not": { "type": "string", "nullable": true }, - "before": { + "description_not_contains": { "type": "string", "nullable": true }, - "first": { - "type": "integer", - "format": "int32", + "description_not_ends_with": { + "type": "string", "nullable": true }, - "last": { - "type": "integer", - "format": "int32", + "description_not_in": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true }, - "orderBy": { + "description_not_starts_with": { + "type": "string", + "nullable": true + }, + "description_starts_with": { + "type": "string", + "nullable": true + }, + "enable_window": { + "type": "boolean", + "nullable": true + }, + "enable_window_not": { + "type": "boolean", + "nullable": true + }, + "entityAsyncStatus": { "allOf": [ { - "$ref": "#/components/schemas/HostOrderByInput" + "$ref": "#/components/schemas/EntityAsyncStatus" } ], "nullable": true }, - "skip": { - "type": "integer", - "format": "int32", + "entityAsyncStatus_in": { + "items": { + "$ref": "#/components/schemas/EntityAsyncStatus" + }, + "type": "array", "nullable": true }, - "where": { + "entityAsyncStatus_not": { "allOf": [ { - "$ref": "#/components/schemas/HostWhereInput" + "$ref": "#/components/schemas/EntityAsyncStatus" } ], "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "DatacenterOrderByInput": { - "enum": [ - "cluster_num_ASC", - "cluster_num_DESC", - "failure_data_space_ASC", - "failure_data_space_DESC", - "host_num_ASC", - "host_num_DESC", - "id_ASC", - "id_DESC", - "name_ASC", - "name_DESC", - "total_cpu_hz_ASC", - "total_cpu_hz_DESC", - "total_data_capacity_ASC", - "total_data_capacity_DESC", - "total_memory_bytes_ASC", - "total_memory_bytes_DESC", - "used_cpu_hz_ASC", - "used_cpu_hz_DESC", - "used_data_space_ASC", - "used_data_space_DESC", - "used_memory_bytes_ASC", - "used_memory_bytes_DESC", - "vm_num_ASC", - "vm_num_DESC" - ], - "type": "string" - }, - "GetDatacentersRequestBody": { - "properties": { - "after": { - "type": "string", - "nullable": true }, - "before": { - "type": "string", + "entityAsyncStatus_not_in": { + "items": { + "$ref": "#/components/schemas/EntityAsyncStatus" + }, + "type": "array", "nullable": true }, - "first": { + "full_interval": { "type": "integer", "format": "int32", "nullable": true }, - "last": { + "full_interval_gt": { "type": "integer", "format": "int32", "nullable": true }, - "orderBy": { - "allOf": [ - { - "$ref": "#/components/schemas/DatacenterOrderByInput" - } - ], - "nullable": true - }, - "skip": { + "full_interval_gte": { "type": "integer", "format": "int32", "nullable": true }, - "where": { - "allOf": [ - { - "$ref": "#/components/schemas/DatacenterWhereInput" - } - ], - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "ClusterOrderByInput": { - "enum": [ - "application_highest_version_ASC", - "application_highest_version_DESC", - "architecture_ASC", - "architecture_DESC", - "auto_converge_ASC", - "auto_converge_DESC", - "connect_state_ASC", - "connect_state_DESC", - "current_cpu_model_ASC", - "current_cpu_model_DESC", - "disconnected_date_ASC", - "disconnected_date_DESC", - "disconnected_reason_ASC", - "disconnected_reason_DESC", - "entityAsyncStatus_ASC", - "entityAsyncStatus_DESC", - "failure_data_space_ASC", - "failure_data_space_DESC", - "has_metrox_ASC", - "has_metrox_DESC", - "host_num_ASC", - "host_num_DESC", - "hypervisor_ASC", - "hypervisor_DESC", - "id_ASC", - "id_DESC", - "ip_ASC", - "ip_DESC", - "is_all_flash_ASC", - "is_all_flash_DESC", - "iscsi_vip_ASC", - "iscsi_vip_DESC", - "license_expire_date_ASC", - "license_expire_date_DESC", - "license_serial_ASC", - "license_serial_DESC", - "license_sign_date_ASC", - "license_sign_date_DESC", - "license_type_ASC", - "license_type_DESC", - "local_id_ASC", - "local_id_DESC", - "maintenance_end_date_ASC", - "maintenance_end_date_DESC", - "maintenance_start_date_ASC", - "maintenance_start_date_DESC", - "management_vip_ASC", - "management_vip_DESC", - "max_chunk_num_ASC", - "max_chunk_num_DESC", - "max_physical_data_capacity_ASC", - "max_physical_data_capacity_DESC", - "max_physical_data_capacity_per_node_ASC", - "max_physical_data_capacity_per_node_DESC", - "metro_availability_checklist_ASC", - "metro_availability_checklist_DESC", - "mgt_gateway_ASC", - "mgt_gateway_DESC", - "mgt_netmask_ASC", - "mgt_netmask_DESC", - "migration_data_size_ASC", - "migration_data_size_DESC", - "migration_speed_ASC", - "migration_speed_DESC", - "name_ASC", - "name_DESC", - "ntp_mode_ASC", - "ntp_mode_DESC", - "nvme_over_rdma_enabled_ASC", - "nvme_over_rdma_enabled_DESC", - "nvme_over_tcp_enabled_ASC", - "nvme_over_tcp_enabled_DESC", - "nvmf_enabled_ASC", - "nvmf_enabled_DESC", - "pmem_enabled_ASC", - "pmem_enabled_DESC", - "provisioned_cpu_cores_ASC", - "provisioned_cpu_cores_DESC", - "provisioned_cpu_cores_for_active_vm_ASC", - "provisioned_cpu_cores_for_active_vm_DESC", - "provisioned_for_active_vm_ratio_ASC", - "provisioned_for_active_vm_ratio_DESC", - "provisioned_memory_bytes_ASC", - "provisioned_memory_bytes_DESC", - "provisioned_ratio_ASC", - "provisioned_ratio_DESC", - "rdma_enabled_ASC", - "rdma_enabled_DESC", - "recover_data_size_ASC", - "recover_data_size_DESC", - "recover_speed_ASC", - "recover_speed_DESC", - "reserved_cpu_cores_for_system_service_ASC", - "reserved_cpu_cores_for_system_service_DESC", - "running_vm_num_ASC", - "running_vm_num_DESC", - "software_edition_ASC", - "software_edition_DESC", - "stopped_vm_num_ASC", - "stopped_vm_num_DESC", - "stretch_ASC", - "stretch_DESC", - "suspended_vm_num_ASC", - "suspended_vm_num_DESC", - "total_cache_capacity_ASC", - "total_cache_capacity_DESC", - "total_cpu_cores_ASC", - "total_cpu_cores_DESC", - "total_cpu_hz_ASC", - "total_cpu_hz_DESC", - "total_cpu_sockets_ASC", - "total_cpu_sockets_DESC", - "total_data_capacity_ASC", - "total_data_capacity_DESC", - "total_memory_bytes_ASC", - "total_memory_bytes_DESC", - "type_ASC", - "type_DESC", - "upgrade_tool_version_ASC", - "upgrade_tool_version_DESC", - "used_cpu_hz_ASC", - "used_cpu_hz_DESC", - "used_data_space_ASC", - "used_data_space_DESC", - "used_memory_bytes_ASC", - "used_memory_bytes_DESC", - "valid_data_space_ASC", - "valid_data_space_DESC", - "version_ASC", - "version_DESC", - "vhost_enabled_ASC", - "vhost_enabled_DESC", - "vm_num_ASC", - "vm_num_DESC" - ], - "type": "string" - }, - "GetClustersRequestBody": { - "properties": { - "after": { - "type": "string", + "full_interval_in": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", "nullable": true }, - "before": { - "type": "string", + "full_interval_lt": { + "type": "integer", + "format": "int32", "nullable": true }, - "first": { + "full_interval_lte": { "type": "integer", "format": "int32", "nullable": true }, - "last": { + "full_interval_not": { "type": "integer", "format": "int32", "nullable": true }, - "orderBy": { + "full_interval_not_in": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", + "nullable": true + }, + "full_period": { "allOf": [ { - "$ref": "#/components/schemas/ClusterOrderByInput" + "$ref": "#/components/schemas/BackupPlanPeriod" } ], "nullable": true }, - "skip": { - "type": "integer", - "format": "int32", + "full_period_in": { + "items": { + "$ref": "#/components/schemas/BackupPlanPeriod" + }, + "type": "array", "nullable": true }, - "where": { + "full_period_not": { "allOf": [ { - "$ref": "#/components/schemas/ClusterWhereInput" + "$ref": "#/components/schemas/BackupPlanPeriod" } ], "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "NicOrderByInput": { - "enum": [ - "driver_ASC", - "driver_DESC", - "driver_state_ASC", - "driver_state_DESC", - "entityAsyncStatus_ASC", - "entityAsyncStatus_DESC", - "gateway_ip_ASC", - "gateway_ip_DESC", - "ibdev_ASC", - "ibdev_DESC", - "id_ASC", - "id_DESC", - "iommu_status_ASC", - "iommu_status_DESC", - "ip_address_ASC", - "ip_address_DESC", - "is_sriov_ASC", - "is_sriov_DESC", - "local_id_ASC", - "local_id_DESC", - "mac_address_ASC", - "mac_address_DESC", - "max_vf_num_ASC", - "max_vf_num_DESC", - "model_ASC", - "model_DESC", - "mtu_ASC", - "mtu_DESC", - "name_ASC", - "name_DESC", - "nic_uuid_ASC", - "nic_uuid_DESC", - "physical_ASC", - "physical_DESC", - "rdma_enabled_ASC", - "rdma_enabled_DESC", - "running_ASC", - "running_DESC", - "speed_ASC", - "speed_DESC", - "subnet_mask_ASC", - "subnet_mask_DESC", - "total_vf_num_ASC", - "total_vf_num_DESC", - "type_ASC", - "type_DESC", - "up_ASC", - "up_DESC", - "used_vf_num_ASC", - "used_vf_num_DESC", - "user_usage_ASC", - "user_usage_DESC" - ], - "type": "string" - }, - "GetNicsRequestBody": { - "properties": { - "after": { + }, + "full_period_not_in": { + "items": { + "$ref": "#/components/schemas/BackupPlanPeriod" + }, + "type": "array", + "nullable": true + }, + "id": { "type": "string", "nullable": true }, - "before": { + "id_contains": { "type": "string", "nullable": true }, - "first": { + "id_ends_with": { + "type": "string", + "nullable": true + }, + "id_gt": { + "type": "string", + "nullable": true + }, + "id_gte": { + "type": "string", + "nullable": true + }, + "id_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, + "id_lt": { + "type": "string", + "nullable": true + }, + "id_lte": { + "type": "string", + "nullable": true + }, + "id_not": { + "type": "string", + "nullable": true + }, + "id_not_contains": { + "type": "string", + "nullable": true + }, + "id_not_ends_with": { + "type": "string", + "nullable": true + }, + "id_not_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, + "id_not_starts_with": { + "type": "string", + "nullable": true + }, + "id_starts_with": { + "type": "string", + "nullable": true + }, + "incremental_interval": { "type": "integer", "format": "int32", "nullable": true }, - "last": { + "incremental_interval_gt": { "type": "integer", "format": "int32", "nullable": true }, - "orderBy": { - "allOf": [ - { - "$ref": "#/components/schemas/NicOrderByInput" - } - ], + "incremental_interval_gte": { + "type": "integer", + "format": "int32", "nullable": true }, - "skip": { + "incremental_interval_in": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", + "nullable": true + }, + "incremental_interval_lt": { "type": "integer", "format": "int32", "nullable": true }, - "where": { + "incremental_interval_lte": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "incremental_interval_not": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "incremental_interval_not_in": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", + "nullable": true + }, + "incremental_period": { "allOf": [ { - "$ref": "#/components/schemas/NicWhereInput" + "$ref": "#/components/schemas/BackupPlanPeriod" } ], "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "UsbDeviceOrderByInput": { - "enum": [ - "binded_ASC", - "binded_DESC", - "description_ASC", - "description_DESC", - "entityAsyncStatus_ASC", - "entityAsyncStatus_DESC", - "id_ASC", - "id_DESC", - "local_created_at_ASC", - "local_created_at_DESC", - "local_id_ASC", - "local_id_DESC", - "manufacturer_ASC", - "manufacturer_DESC", - "name_ASC", - "name_DESC", - "size_ASC", - "size_DESC", - "status_ASC", - "status_DESC", - "usb_type_ASC", - "usb_type_DESC" - ], - "type": "string" - }, - "GetUsbDevicesRequestBody": { - "properties": { - "after": { - "type": "string", - "nullable": true }, - "before": { - "type": "string", + "incremental_period_in": { + "items": { + "$ref": "#/components/schemas/BackupPlanPeriod" + }, + "type": "array", "nullable": true }, - "first": { - "type": "integer", - "format": "int32", + "incremental_period_not": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupPlanPeriod" + } + ], "nullable": true }, - "last": { - "type": "integer", - "format": "int32", + "incremental_period_not_in": { + "items": { + "$ref": "#/components/schemas/BackupPlanPeriod" + }, + "type": "array", "nullable": true }, - "orderBy": { + "keep_policy": { "allOf": [ { - "$ref": "#/components/schemas/UsbDeviceOrderByInput" + "$ref": "#/components/schemas/BackupPlanKeepPolicy" } ], "nullable": true }, - "skip": { - "type": "integer", - "format": "int32", + "keep_policy_in": { + "items": { + "$ref": "#/components/schemas/BackupPlanKeepPolicy" + }, + "type": "array", "nullable": true }, - "where": { + "keep_policy_not": { "allOf": [ { - "$ref": "#/components/schemas/UsbDeviceWhereInput" + "$ref": "#/components/schemas/BackupPlanKeepPolicy" } ], "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "IscsiTargetOrderByInput": { - "enum": [ - "bps_ASC", - "bps_DESC", - "bps_max_ASC", - "bps_max_DESC", - "bps_max_length_ASC", - "bps_max_length_DESC", - "bps_rd_ASC", - "bps_rd_DESC", - "bps_rd_max_ASC", - "bps_rd_max_DESC", - "bps_rd_max_length_ASC", - "bps_rd_max_length_DESC", - "bps_wr_ASC", - "bps_wr_DESC", - "bps_wr_max_ASC", - "bps_wr_max_DESC", - "bps_wr_max_length_ASC", - "bps_wr_max_length_DESC", - "chap_enabled_ASC", - "chap_enabled_DESC", - "chap_name_ASC", - "chap_name_DESC", - "chap_secret_ASC", - "chap_secret_DESC", - "description_ASC", - "description_DESC", - "entityAsyncStatus_ASC", - "entityAsyncStatus_DESC", - "external_use_ASC", - "external_use_DESC", - "id_ASC", - "id_DESC", - "initiator_chaps_ASC", - "initiator_chaps_DESC", - "internal_ASC", - "internal_DESC", - "io_size_ASC", - "io_size_DESC", - "iops_ASC", - "iops_DESC", - "iops_max_ASC", - "iops_max_DESC", - "iops_max_length_ASC", - "iops_max_length_DESC", - "iops_rd_ASC", - "iops_rd_DESC", - "iops_rd_max_ASC", - "iops_rd_max_DESC", - "iops_rd_max_length_ASC", - "iops_rd_max_length_DESC", - "iops_wr_ASC", - "iops_wr_DESC", - "iops_wr_max_ASC", - "iops_wr_max_DESC", - "iops_wr_max_length_ASC", - "iops_wr_max_length_DESC", - "ip_whitelist_ASC", - "ip_whitelist_DESC", - "iqn_name_ASC", - "iqn_name_DESC", - "iqn_whitelist_ASC", - "iqn_whitelist_DESC", - "local_id_ASC", - "local_id_DESC", - "name_ASC", - "name_DESC", - "replica_num_ASC", - "replica_num_DESC", - "stripe_num_ASC", - "stripe_num_DESC", - "stripe_size_ASC", - "stripe_size_DESC", - "thin_provision_ASC", - "thin_provision_DESC" - ], - "type": "string" - }, - "GetIscsiTargetsRequestBody": { - "properties": { - "after": { - "type": "string", - "nullable": true }, - "before": { - "type": "string", + "keep_policy_not_in": { + "items": { + "$ref": "#/components/schemas/BackupPlanKeepPolicy" + }, + "type": "array", "nullable": true }, - "first": { + "keep_policy_value": { "type": "integer", "format": "int32", "nullable": true }, - "last": { + "keep_policy_value_gt": { "type": "integer", "format": "int32", "nullable": true }, - "orderBy": { - "allOf": [ - { - "$ref": "#/components/schemas/IscsiTargetOrderByInput" - } - ], - "nullable": true - }, - "skip": { + "keep_policy_value_gte": { "type": "integer", "format": "int32", "nullable": true }, - "where": { - "allOf": [ - { - "$ref": "#/components/schemas/IscsiTargetWhereInput" - } - ], - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "NfsExportOrderByInput": { - "enum": [ - "description_ASC", - "description_DESC", - "entityAsyncStatus_ASC", - "entityAsyncStatus_DESC", - "export_inode_id_ASC", - "export_inode_id_DESC", - "id_ASC", - "id_DESC", - "internal_ASC", - "internal_DESC", - "ip_whitelist_ASC", - "ip_whitelist_DESC", - "local_id_ASC", - "local_id_DESC", - "name_ASC", - "name_DESC", - "replica_num_ASC", - "replica_num_DESC", - "thin_provision_ASC", - "thin_provision_DESC" - ], - "type": "string" - }, - "GetNfsExportsRequestBody": { - "properties": { - "after": { - "type": "string", - "nullable": true - }, - "before": { - "type": "string", + "keep_policy_value_in": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", "nullable": true }, - "first": { + "keep_policy_value_lt": { "type": "integer", "format": "int32", "nullable": true }, - "last": { + "keep_policy_value_lte": { "type": "integer", "format": "int32", "nullable": true }, - "orderBy": { - "allOf": [ - { - "$ref": "#/components/schemas/NfsExportOrderByInput" - } - ], - "nullable": true - }, - "skip": { + "keep_policy_value_not": { "type": "integer", "format": "int32", "nullable": true }, - "where": { - "allOf": [ - { - "$ref": "#/components/schemas/NfsExportWhereInput" - } - ], - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "ElfDataStoreOrderByInput": { - "enum": [ - "description_ASC", - "description_DESC", - "external_use_ASC", - "external_use_DESC", - "id_ASC", - "id_DESC", - "internal_ASC", - "internal_DESC", - "ip_whitelist_ASC", - "ip_whitelist_DESC", - "local_id_ASC", - "local_id_DESC", - "name_ASC", - "name_DESC", - "replica_num_ASC", - "replica_num_DESC", - "thin_provision_ASC", - "thin_provision_DESC", - "type_ASC", - "type_DESC" - ], - "type": "string" - }, - "ElfDataStoreWhereInput": { - "properties": { - "AND": { + "keep_policy_value_not_in": { "items": { - "$ref": "#/components/schemas/ElfDataStoreWhereInput" + "type": "integer", + "format": "int32" }, "type": "array", "nullable": true }, - "NOT": { - "items": { - "$ref": "#/components/schemas/ElfDataStoreWhereInput" - }, - "type": "array", + "last_execute_status": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupPlanExecutionStatus" + } + ], "nullable": true }, - "OR": { + "last_execute_status_in": { "items": { - "$ref": "#/components/schemas/ElfDataStoreWhereInput" + "$ref": "#/components/schemas/BackupPlanExecutionStatus" }, "type": "array", "nullable": true }, - "cluster": { + "last_execute_status_not": { "allOf": [ { - "$ref": "#/components/schemas/ClusterWhereInput" + "$ref": "#/components/schemas/BackupPlanExecutionStatus" } ], "nullable": true }, - "description": { - "type": "string", - "nullable": true - }, - "description_contains": { - "type": "string", + "last_execute_status_not_in": { + "items": { + "$ref": "#/components/schemas/BackupPlanExecutionStatus" + }, + "type": "array", "nullable": true }, - "description_ends_with": { - "type": "string", + "last_execute_success_job_count": { + "type": "integer", + "format": "int32", "nullable": true }, - "description_gt": { - "type": "string", + "last_execute_success_job_count_gt": { + "type": "integer", + "format": "int32", "nullable": true }, - "description_gte": { - "type": "string", + "last_execute_success_job_count_gte": { + "type": "integer", + "format": "int32", "nullable": true }, - "description_in": { + "last_execute_success_job_count_in": { "items": { - "type": "string" + "type": "integer", + "format": "int32" }, "type": "array", "nullable": true }, - "description_lt": { - "type": "string", + "last_execute_success_job_count_lt": { + "type": "integer", + "format": "int32", "nullable": true }, - "description_lte": { - "type": "string", + "last_execute_success_job_count_lte": { + "type": "integer", + "format": "int32", "nullable": true }, - "description_not": { - "type": "string", + "last_execute_success_job_count_not": { + "type": "integer", + "format": "int32", "nullable": true }, - "description_not_contains": { - "type": "string", + "last_execute_success_job_count_not_in": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", "nullable": true }, - "description_not_ends_with": { - "type": "string", + "last_execute_total_job_count": { + "type": "integer", + "format": "int32", "nullable": true }, - "description_not_in": { - "items": { - "type": "string" - }, - "type": "array", + "last_execute_total_job_count_gt": { + "type": "integer", + "format": "int32", "nullable": true }, - "description_not_starts_with": { - "type": "string", + "last_execute_total_job_count_gte": { + "type": "integer", + "format": "int32", "nullable": true }, - "description_starts_with": { - "type": "string", + "last_execute_total_job_count_in": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", "nullable": true }, - "external_use": { - "type": "boolean", + "last_execute_total_job_count_lt": { + "type": "integer", + "format": "int32", "nullable": true }, - "external_use_not": { - "type": "boolean", + "last_execute_total_job_count_lte": { + "type": "integer", + "format": "int32", "nullable": true }, - "id": { - "type": "string", + "last_execute_total_job_count_not": { + "type": "integer", + "format": "int32", "nullable": true }, - "id_contains": { - "type": "string", + "last_execute_total_job_count_not_in": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", "nullable": true }, - "id_ends_with": { + "last_executed_at": { "type": "string", "nullable": true }, - "id_gt": { + "last_executed_at_gt": { "type": "string", "nullable": true }, - "id_gte": { + "last_executed_at_gte": { "type": "string", "nullable": true }, - "id_in": { + "last_executed_at_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "id_lt": { + "last_executed_at_lt": { "type": "string", "nullable": true }, - "id_lte": { + "last_executed_at_lte": { "type": "string", "nullable": true }, - "id_not": { + "last_executed_at_not": { "type": "string", "nullable": true }, - "id_not_contains": { - "type": "string", + "last_executed_at_not_in": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true }, - "id_not_ends_with": { - "type": "string", + "last_manual_execute_status": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupPlanExecutionStatus" + } + ], "nullable": true }, - "id_not_in": { + "last_manual_execute_status_in": { "items": { - "type": "string" + "$ref": "#/components/schemas/BackupPlanExecutionStatus" }, "type": "array", "nullable": true }, - "id_not_starts_with": { - "type": "string", + "last_manual_execute_status_not": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupPlanExecutionStatus" + } + ], "nullable": true }, - "id_starts_with": { - "type": "string", + "last_manual_execute_status_not_in": { + "items": { + "$ref": "#/components/schemas/BackupPlanExecutionStatus" + }, + "type": "array", "nullable": true }, - "internal": { - "type": "boolean", + "last_manual_execute_success_job_count": { + "type": "integer", + "format": "int32", "nullable": true }, - "internal_not": { - "type": "boolean", + "last_manual_execute_success_job_count_gt": { + "type": "integer", + "format": "int32", "nullable": true }, - "ip_whitelist": { - "type": "string", + "last_manual_execute_success_job_count_gte": { + "type": "integer", + "format": "int32", "nullable": true }, - "ip_whitelist_contains": { - "type": "string", + "last_manual_execute_success_job_count_in": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", "nullable": true }, - "ip_whitelist_ends_with": { - "type": "string", + "last_manual_execute_success_job_count_lt": { + "type": "integer", + "format": "int32", "nullable": true }, - "ip_whitelist_gt": { - "type": "string", + "last_manual_execute_success_job_count_lte": { + "type": "integer", + "format": "int32", "nullable": true }, - "ip_whitelist_gte": { - "type": "string", + "last_manual_execute_success_job_count_not": { + "type": "integer", + "format": "int32", "nullable": true }, - "ip_whitelist_in": { + "last_manual_execute_success_job_count_not_in": { "items": { - "type": "string" + "type": "integer", + "format": "int32" }, "type": "array", "nullable": true }, - "ip_whitelist_lt": { - "type": "string", - "nullable": true - }, - "ip_whitelist_lte": { - "type": "string", - "nullable": true - }, - "ip_whitelist_not": { - "type": "string", + "last_manual_execute_total_job_count": { + "type": "integer", + "format": "int32", "nullable": true }, - "ip_whitelist_not_contains": { - "type": "string", + "last_manual_execute_total_job_count_gt": { + "type": "integer", + "format": "int32", "nullable": true }, - "ip_whitelist_not_ends_with": { - "type": "string", + "last_manual_execute_total_job_count_gte": { + "type": "integer", + "format": "int32", "nullable": true }, - "ip_whitelist_not_in": { + "last_manual_execute_total_job_count_in": { "items": { - "type": "string" + "type": "integer", + "format": "int32" }, "type": "array", "nullable": true }, - "ip_whitelist_not_starts_with": { - "type": "string", - "nullable": true - }, - "ip_whitelist_starts_with": { - "type": "string", + "last_manual_execute_total_job_count_lt": { + "type": "integer", + "format": "int32", "nullable": true }, - "iscsi_target": { - "allOf": [ - { - "$ref": "#/components/schemas/IscsiTargetWhereInput" - } - ], + "last_manual_execute_total_job_count_lte": { + "type": "integer", + "format": "int32", "nullable": true }, - "local_id": { - "type": "string", + "last_manual_execute_total_job_count_not": { + "type": "integer", + "format": "int32", "nullable": true }, - "local_id_contains": { - "type": "string", + "last_manual_execute_total_job_count_not_in": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", "nullable": true }, - "local_id_ends_with": { + "last_manual_executed_at": { "type": "string", "nullable": true }, - "local_id_gt": { + "last_manual_executed_at_gt": { "type": "string", "nullable": true }, - "local_id_gte": { + "last_manual_executed_at_gte": { "type": "string", "nullable": true }, - "local_id_in": { + "last_manual_executed_at_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "local_id_lt": { - "type": "string", - "nullable": true - }, - "local_id_lte": { - "type": "string", - "nullable": true - }, - "local_id_not": { + "last_manual_executed_at_lt": { "type": "string", "nullable": true }, - "local_id_not_contains": { + "last_manual_executed_at_lte": { "type": "string", "nullable": true }, - "local_id_not_ends_with": { + "last_manual_executed_at_not": { "type": "string", "nullable": true }, - "local_id_not_in": { + "last_manual_executed_at_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "local_id_not_starts_with": { - "type": "string", - "nullable": true - }, - "local_id_starts_with": { - "type": "string", - "nullable": true - }, "name": { "type": "string", "nullable": true @@ -86270,1297 +87207,889 @@ "type": "string", "nullable": true }, - "nfs_export": { - "allOf": [ - { - "$ref": "#/components/schemas/NfsExportWhereInput" - } - ], + "next_execute_time": { + "type": "string", "nullable": true }, - "nvmf_subsystem": { - "allOf": [ - { - "$ref": "#/components/schemas/NvmfSubsystemWhereInput" - } - ], + "next_execute_time_gt": { + "type": "string", "nullable": true }, - "replica_num": { + "next_execute_time_gte": { + "type": "string", + "nullable": true + }, + "next_execute_time_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, + "next_execute_time_lt": { + "type": "string", + "nullable": true + }, + "next_execute_time_lte": { + "type": "string", + "nullable": true + }, + "next_execute_time_not": { + "type": "string", + "nullable": true + }, + "next_execute_time_not_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, + "physical_size": { "type": "integer", - "format": "int32", + "format": "int64", "nullable": true }, - "replica_num_gt": { + "physical_size_gt": { "type": "integer", - "format": "int32", + "format": "int64", "nullable": true }, - "replica_num_gte": { + "physical_size_gte": { "type": "integer", - "format": "int32", + "format": "int64", "nullable": true }, - "replica_num_in": { + "physical_size_in": { "items": { "type": "integer", - "format": "int32" + "format": "int64" }, "type": "array", "nullable": true }, - "replica_num_lt": { + "physical_size_lt": { "type": "integer", - "format": "int32", + "format": "int64", "nullable": true }, - "replica_num_lte": { + "physical_size_lte": { "type": "integer", - "format": "int32", + "format": "int64", "nullable": true }, - "replica_num_not": { + "physical_size_not": { "type": "integer", - "format": "int32", + "format": "int64", "nullable": true }, - "replica_num_not_in": { + "physical_size_not_in": { "items": { "type": "integer", - "format": "int32" + "format": "int64" }, "type": "array", "nullable": true }, - "thin_provision": { - "type": "boolean", + "snapshot_consistent_type": { + "allOf": [ + { + "$ref": "#/components/schemas/ConsistentType" + } + ], "nullable": true }, - "thin_provision_not": { - "type": "boolean", + "snapshot_consistent_type_in": { + "items": { + "$ref": "#/components/schemas/ConsistentType" + }, + "type": "array", "nullable": true }, - "type": { + "snapshot_consistent_type_not": { "allOf": [ { - "$ref": "#/components/schemas/ElfDataStoreType" + "$ref": "#/components/schemas/ConsistentType" } ], "nullable": true }, - "type_in": { + "snapshot_consistent_type_not_in": { "items": { - "$ref": "#/components/schemas/ElfDataStoreType" + "$ref": "#/components/schemas/ConsistentType" }, "type": "array", "nullable": true }, - "type_not": { + "status": { "allOf": [ { - "$ref": "#/components/schemas/ElfDataStoreType" + "$ref": "#/components/schemas/BackupPlanStatus" } ], "nullable": true }, - "type_not_in": { + "status_in": { "items": { - "$ref": "#/components/schemas/ElfDataStoreType" + "$ref": "#/components/schemas/BackupPlanStatus" }, "type": "array", "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "ElfDataStoreType": { - "enum": [ - "ISCSI", - "NFS", - "NVMe" - ], - "type": "string" - }, - "GetElfDataStoresRequestBody": { - "properties": { - "after": { - "type": "string", + }, + "status_not": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupPlanStatus" + } + ], "nullable": true }, - "before": { - "type": "string", + "status_not_in": { + "items": { + "$ref": "#/components/schemas/BackupPlanStatus" + }, + "type": "array", "nullable": true }, - "first": { + "valid_size_of_backup_object": { "type": "integer", - "format": "int32", + "format": "int64", "nullable": true }, - "last": { + "valid_size_of_backup_object_gt": { "type": "integer", - "format": "int32", + "format": "int64", "nullable": true }, - "orderBy": { - "allOf": [ - { - "$ref": "#/components/schemas/ElfDataStoreOrderByInput" - } - ], + "valid_size_of_backup_object_gte": { + "type": "integer", + "format": "int64", "nullable": true }, - "skip": { + "valid_size_of_backup_object_in": { + "items": { + "type": "integer", + "format": "int64" + }, + "type": "array", + "nullable": true + }, + "valid_size_of_backup_object_lt": { "type": "integer", - "format": "int32", + "format": "int64", "nullable": true }, - "where": { - "allOf": [ - { - "$ref": "#/components/schemas/ElfDataStoreWhereInput" - } - ], + "valid_size_of_backup_object_lte": { + "type": "integer", + "format": "int64", "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "VdsOrderByInput": { - "enum": [ - "bond_mode_ASC", - "bond_mode_DESC", - "entityAsyncStatus_ASC", - "entityAsyncStatus_DESC", - "id_ASC", - "id_DESC", - "internal_ASC", - "internal_DESC", - "local_id_ASC", - "local_id_DESC", - "name_ASC", - "name_DESC", - "ovsbr_name_ASC", - "ovsbr_name_DESC", - "type_ASC", - "type_DESC", - "vlans_num_ASC", - "vlans_num_DESC", - "work_mode_ASC", - "work_mode_DESC" - ], - "type": "string" - }, - "GetVdsesRequestBody": { - "properties": { - "after": { + }, + "valid_size_of_backup_object_not": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "valid_size_of_backup_object_not_in": { + "items": { + "type": "integer", + "format": "int64" + }, + "type": "array", + "nullable": true + }, + "window_end": { "type": "string", "nullable": true }, - "before": { + "window_end_contains": { "type": "string", "nullable": true }, - "first": { - "type": "integer", - "format": "int32", + "window_end_ends_with": { + "type": "string", "nullable": true }, - "last": { - "type": "integer", - "format": "int32", + "window_end_gt": { + "type": "string", "nullable": true }, - "orderBy": { - "allOf": [ - { - "$ref": "#/components/schemas/VdsOrderByInput" - } - ], + "window_end_gte": { + "type": "string", "nullable": true }, - "skip": { - "type": "integer", - "format": "int32", + "window_end_in": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true }, - "where": { - "allOf": [ - { - "$ref": "#/components/schemas/VdsWhereInput" - } - ], + "window_end_lt": { + "type": "string", "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "DiskOrderByInput": { - "enum": [ - "entityAsyncStatus_ASC", - "entityAsyncStatus_DESC", - "failure_information_ASC", - "failure_information_DESC", - "firmware_ASC", - "firmware_DESC", - "function_ASC", - "function_DESC", - "health_status_ASC", - "health_status_DESC", - "healthy_ASC", - "healthy_DESC", - "id_ASC", - "id_DESC", - "local_id_ASC", - "local_id_DESC", - "model_ASC", - "model_DESC", - "mounted_ASC", - "mounted_DESC", - "name_ASC", - "name_DESC", - "numa_node_ASC", - "numa_node_DESC", - "offline_ASC", - "offline_DESC", - "partitions_ASC", - "partitions_DESC", - "path_ASC", - "path_DESC", - "persistent_memory_type_ASC", - "persistent_memory_type_DESC", - "physical_slot_on_brick_ASC", - "physical_slot_on_brick_DESC", - "recommended_usage_ASC", - "recommended_usage_DESC", - "remaining_life_percent_ASC", - "remaining_life_percent_DESC", - "serial_ASC", - "serial_DESC", - "size_ASC", - "size_DESC", - "type_ASC", - "type_DESC", - "usage_ASC", - "usage_DESC", - "usage_status_ASC", - "usage_status_DESC" - ], - "type": "string" - }, - "GetDisksRequestBody": { - "properties": { - "after": { + }, + "window_end_lte": { "type": "string", "nullable": true }, - "before": { + "window_end_not": { "type": "string", "nullable": true }, - "first": { - "type": "integer", - "format": "int32", + "window_end_not_contains": { + "type": "string", "nullable": true }, - "last": { - "type": "integer", - "format": "int32", + "window_end_not_ends_with": { + "type": "string", "nullable": true }, - "orderBy": { - "allOf": [ - { - "$ref": "#/components/schemas/DiskOrderByInput" - } - ], + "window_end_not_in": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true }, - "skip": { - "type": "integer", - "format": "int32", + "window_end_not_starts_with": { + "type": "string", "nullable": true }, - "where": { - "allOf": [ - { - "$ref": "#/components/schemas/DiskWhereInput" - } - ], + "window_end_starts_with": { + "type": "string", "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "VlanOrderByInput": { - "enum": [ - "entityAsyncStatus_ASC", - "entityAsyncStatus_DESC", - "gateway_ip_ASC", - "gateway_ip_DESC", - "gateway_subnetmask_ASC", - "gateway_subnetmask_DESC", - "id_ASC", - "id_DESC", - "local_id_ASC", - "local_id_DESC", - "mode_type_ASC", - "mode_type_DESC", - "name_ASC", - "name_DESC", - "qos_max_bandwidth_ASC", - "qos_max_bandwidth_DESC", - "qos_min_bandwidth_ASC", - "qos_min_bandwidth_DESC", - "qos_priority_ASC", - "qos_priority_DESC", - "subnetmask_ASC", - "subnetmask_DESC", - "type_ASC", - "type_DESC", - "vlan_id_ASC", - "vlan_id_DESC" - ], - "type": "string" - }, - "GetVlansRequestBody": { - "properties": { - "after": { + }, + "window_start": { "type": "string", "nullable": true }, - "before": { + "window_start_contains": { "type": "string", "nullable": true }, - "first": { - "type": "integer", - "format": "int32", + "window_start_ends_with": { + "type": "string", "nullable": true }, - "last": { - "type": "integer", - "format": "int32", + "window_start_gt": { + "type": "string", "nullable": true }, - "orderBy": { - "allOf": [ - { - "$ref": "#/components/schemas/VlanOrderByInput" - } - ], + "window_start_gte": { + "type": "string", "nullable": true }, - "skip": { - "type": "integer", - "format": "int32", + "window_start_in": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true }, - "where": { - "allOf": [ - { - "$ref": "#/components/schemas/VlanWhereInput" - } - ], + "window_start_lt": { + "type": "string", "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "VmVolumeOrderByInput": { - "enum": [ - "description_ASC", - "description_DESC", - "elf_storage_policy_ASC", - "elf_storage_policy_DESC", - "entityAsyncStatus_ASC", - "entityAsyncStatus_DESC", - "guest_size_usage_ASC", - "guest_size_usage_DESC", - "guest_used_size_ASC", - "guest_used_size_DESC", - "id_ASC", - "id_DESC", - "local_created_at_ASC", - "local_created_at_DESC", - "local_id_ASC", - "local_id_DESC", - "mounting_ASC", - "mounting_DESC", - "name_ASC", - "name_DESC", - "path_ASC", - "path_DESC", - "sharing_ASC", - "sharing_DESC", - "size_ASC", - "size_DESC", - "type_ASC", - "type_DESC", - "unique_logical_size_ASC", - "unique_logical_size_DESC", - "unique_size_ASC", - "unique_size_DESC" - ], - "type": "string" - }, - "GetVmVolumesRequestBody": { - "properties": { - "after": { + }, + "window_start_lte": { "type": "string", "nullable": true }, - "before": { + "window_start_not": { "type": "string", "nullable": true }, - "first": { - "type": "integer", - "format": "int32", + "window_start_not_contains": { + "type": "string", "nullable": true }, - "last": { - "type": "integer", - "format": "int32", + "window_start_not_ends_with": { + "type": "string", "nullable": true }, - "orderBy": { - "allOf": [ - { - "$ref": "#/components/schemas/VmVolumeOrderByInput" - } - ], + "window_start_not_in": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true }, - "skip": { - "type": "integer", - "format": "int32", + "window_start_not_starts_with": { + "type": "string", "nullable": true }, - "where": { - "allOf": [ - { - "$ref": "#/components/schemas/VmVolumeWhereInput" - } - ], + "window_start_starts_with": { + "type": "string", "nullable": true } }, "type": "object", "additionalProperties": false }, - "ElfImageOrderByInput": { - "enum": [ - "description_ASC", - "description_DESC", - "entityAsyncStatus_ASC", - "entityAsyncStatus_DESC", - "id_ASC", - "id_DESC", - "local_created_at_ASC", - "local_created_at_DESC", - "local_id_ASC", - "local_id_DESC", - "name_ASC", - "name_DESC", - "path_ASC", - "path_DESC", - "size_ASC", - "size_DESC" - ], - "type": "string" - }, - "GetElfImagesRequestBody": { + "BackupServiceWhereInput": { "properties": { - "after": { - "type": "string", + "AND": { + "items": { + "$ref": "#/components/schemas/BackupServiceWhereInput" + }, + "type": "array", "nullable": true }, - "before": { - "type": "string", + "NOT": { + "items": { + "$ref": "#/components/schemas/BackupServiceWhereInput" + }, + "type": "array", "nullable": true }, - "first": { - "type": "integer", - "format": "int32", + "OR": { + "items": { + "$ref": "#/components/schemas/BackupServiceWhereInput" + }, + "type": "array", "nullable": true }, - "last": { - "type": "integer", - "format": "int32", + "application": { + "allOf": [ + { + "$ref": "#/components/schemas/CloudTowerApplicationWhereInput" + } + ], "nullable": true }, - "orderBy": { + "backup_clusters_every": { "allOf": [ { - "$ref": "#/components/schemas/ElfImageOrderByInput" + "$ref": "#/components/schemas/ClusterWhereInput" } ], "nullable": true }, - "skip": { - "type": "integer", - "format": "int32", + "backup_clusters_none": { + "allOf": [ + { + "$ref": "#/components/schemas/ClusterWhereInput" + } + ], "nullable": true }, - "where": { + "backup_clusters_some": { "allOf": [ { - "$ref": "#/components/schemas/ElfImageWhereInput" + "$ref": "#/components/schemas/ClusterWhereInput" } ], "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "VmTemplateOrderByInput": { - "enum": [ - "clock_offset_ASC", - "clock_offset_DESC", - "cloud_init_supported_ASC", - "cloud_init_supported_DESC", - "cpu_ASC", - "cpu_DESC", - "cpu_model_ASC", - "cpu_model_DESC", - "description_ASC", - "description_DESC", - "entityAsyncStatus_ASC", - "entityAsyncStatus_DESC", - "firmware_ASC", - "firmware_DESC", - "ha_ASC", - "ha_DESC", - "id_ASC", - "id_DESC", - "io_policy_ASC", - "io_policy_DESC", - "local_created_at_ASC", - "local_created_at_DESC", - "local_id_ASC", - "local_id_DESC", - "max_bandwidth_ASC", - "max_bandwidth_DESC", - "max_bandwidth_policy_ASC", - "max_bandwidth_policy_DESC", - "max_iops_ASC", - "max_iops_DESC", - "max_iops_policy_ASC", - "max_iops_policy_DESC", - "memory_ASC", - "memory_DESC", - "name_ASC", - "name_DESC", - "size_ASC", - "size_DESC", - "vcpu_ASC", - "vcpu_DESC", - "video_type_ASC", - "video_type_DESC", - "vm_disks_ASC", - "vm_disks_DESC", - "vm_nics_ASC", - "vm_nics_DESC", - "win_opt_ASC", - "win_opt_DESC" - ], - "type": "string" - }, - "GetVmTemplatesRequestBody": { - "properties": { - "after": { + }, + "backup_network_gateway": { "type": "string", "nullable": true }, - "before": { + "backup_network_gateway_contains": { "type": "string", "nullable": true }, - "first": { - "type": "integer", - "format": "int32", + "backup_network_gateway_ends_with": { + "type": "string", "nullable": true }, - "last": { - "type": "integer", - "format": "int32", + "backup_network_gateway_gt": { + "type": "string", "nullable": true }, - "orderBy": { - "allOf": [ - { - "$ref": "#/components/schemas/VmTemplateOrderByInput" - } - ], + "backup_network_gateway_gte": { + "type": "string", "nullable": true }, - "skip": { - "type": "integer", - "format": "int32", + "backup_network_gateway_in": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true }, - "where": { - "allOf": [ - { - "$ref": "#/components/schemas/VmTemplateWhereInput" - } - ], + "backup_network_gateway_lt": { + "type": "string", "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "VmPlacementGroupOrderByInput": { - "enum": [ - "description_ASC", - "description_DESC", - "enabled_ASC", - "enabled_DESC", - "entityAsyncStatus_ASC", - "entityAsyncStatus_DESC", - "id_ASC", - "id_DESC", - "local_created_at_ASC", - "local_created_at_DESC", - "local_id_ASC", - "local_id_DESC", - "local_updated_at_ASC", - "local_updated_at_DESC", - "name_ASC", - "name_DESC", - "vm_host_must_enabled_ASC", - "vm_host_must_enabled_DESC", - "vm_host_must_policy_ASC", - "vm_host_must_policy_DESC", - "vm_host_prefer_enabled_ASC", - "vm_host_prefer_enabled_DESC", - "vm_host_prefer_policy_ASC", - "vm_host_prefer_policy_DESC", - "vm_vm_policy_ASC", - "vm_vm_policy_DESC", - "vm_vm_policy_enabled_ASC", - "vm_vm_policy_enabled_DESC" - ], - "type": "string" - }, - "GetVmPlacementGroupsRequestBody": { - "properties": { - "after": { + }, + "backup_network_gateway_lte": { "type": "string", "nullable": true }, - "before": { + "backup_network_gateway_not": { "type": "string", "nullable": true }, - "first": { - "type": "integer", - "format": "int32", + "backup_network_gateway_not_contains": { + "type": "string", "nullable": true }, - "last": { - "type": "integer", - "format": "int32", + "backup_network_gateway_not_ends_with": { + "type": "string", "nullable": true }, - "orderBy": { - "allOf": [ - { - "$ref": "#/components/schemas/VmPlacementGroupOrderByInput" - } - ], + "backup_network_gateway_not_in": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true }, - "skip": { - "type": "integer", - "format": "int32", + "backup_network_gateway_not_starts_with": { + "type": "string", "nullable": true }, - "where": { - "allOf": [ - { - "$ref": "#/components/schemas/VmPlacementGroupWhereInput" - } - ], + "backup_network_gateway_starts_with": { + "type": "string", "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "AlertOrderByInput": { - "enum": [ - "cause_ASC", - "cause_DESC", - "create_time_ASC", - "create_time_DESC", - "ended_ASC", - "ended_DESC", - "id_ASC", - "id_DESC", - "impact_ASC", - "impact_DESC", - "labels_ASC", - "labels_DESC", - "local_create_time_ASC", - "local_create_time_DESC", - "local_end_time_ASC", - "local_end_time_DESC", - "local_id_ASC", - "local_id_DESC", - "local_start_time_ASC", - "local_start_time_DESC", - "local_update_time_ASC", - "local_update_time_DESC", - "message_ASC", - "message_DESC", - "severity_ASC", - "severity_DESC", - "solution_ASC", - "solution_DESC", - "threshold_ASC", - "threshold_DESC", - "value_ASC", - "value_DESC" - ], - "type": "string" - }, - "GetAlertsRequestBody": { - "properties": { - "after": { + }, + "backup_network_ip": { "type": "string", "nullable": true }, - "before": { + "backup_network_ip_contains": { "type": "string", "nullable": true }, - "first": { - "type": "integer", - "format": "int32", + "backup_network_ip_ends_with": { + "type": "string", "nullable": true }, - "last": { - "type": "integer", - "format": "int32", + "backup_network_ip_gt": { + "type": "string", "nullable": true }, - "orderBy": { - "allOf": [ - { - "$ref": "#/components/schemas/AlertOrderByInput" - } - ], + "backup_network_ip_gte": { + "type": "string", "nullable": true }, - "skip": { - "type": "integer", - "format": "int32", + "backup_network_ip_in": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true }, - "where": { - "allOf": [ - { - "$ref": "#/components/schemas/AlertWhereInput" - } - ], + "backup_network_ip_lt": { + "type": "string", "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "GlobalAlertRuleOrderByInput": { - "enum": [ - "boolean_ASC", - "boolean_DESC", - "cause_ASC", - "cause_DESC", - "default_thresholds_ASC", - "default_thresholds_DESC", - "disabled_ASC", - "disabled_DESC", - "id_ASC", - "id_DESC", - "impact_ASC", - "impact_DESC", - "message_ASC", - "message_DESC", - "name_ASC", - "name_DESC", - "object_ASC", - "object_DESC", - "operator_ASC", - "operator_DESC", - "solution_ASC", - "solution_DESC", - "thresholds_ASC", - "thresholds_DESC", - "unit_ASC", - "unit_DESC" - ], - "type": "string" - }, - "GetGlobalAlertRulesRequestBody": { - "properties": { - "after": { + }, + "backup_network_ip_lte": { "type": "string", "nullable": true }, - "before": { + "backup_network_ip_not": { "type": "string", "nullable": true }, - "first": { - "type": "integer", - "format": "int32", + "backup_network_ip_not_contains": { + "type": "string", "nullable": true }, - "last": { - "type": "integer", - "format": "int32", + "backup_network_ip_not_ends_with": { + "type": "string", "nullable": true }, - "orderBy": { - "allOf": [ - { - "$ref": "#/components/schemas/GlobalAlertRuleOrderByInput" - } - ], + "backup_network_ip_not_in": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true }, - "skip": { - "type": "integer", - "format": "int32", + "backup_network_ip_not_starts_with": { + "type": "string", "nullable": true }, - "where": { - "allOf": [ - { - "$ref": "#/components/schemas/GlobalAlertRuleWhereInput" - } - ], + "backup_network_ip_starts_with": { + "type": "string", "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "SnapshotPlanOrderByInput": { - "enum": [ - "auto_delete_num_ASC", - "auto_delete_num_DESC", - "auto_execute_num_ASC", - "auto_execute_num_DESC", - "description_ASC", - "description_DESC", - "end_time_ASC", - "end_time_DESC", - "entityAsyncStatus_ASC", - "entityAsyncStatus_DESC", - "exec_h_m_ASC", - "exec_h_m_DESC", - "execute_plan_type_ASC", - "execute_plan_type_DESC", - "healthy_ASC", - "healthy_DESC", - "id_ASC", - "id_DESC", - "last_execute_end_time_ASC", - "last_execute_end_time_DESC", - "last_execute_status_ASC", - "last_execute_status_DESC", - "last_execute_time_ASC", - "last_execute_time_DESC", - "local_id_ASC", - "local_id_DESC", - "logical_size_bytes_ASC", - "logical_size_bytes_DESC", - "manual_delete_num_ASC", - "manual_delete_num_DESC", - "manual_execute_num_ASC", - "manual_execute_num_DESC", - "mirror_ASC", - "mirror_DESC", - "name_ASC", - "name_DESC", - "next_execute_time_ASC", - "next_execute_time_DESC", - "object_num_ASC", - "object_num_DESC", - "physical_size_bytes_ASC", - "physical_size_bytes_DESC", - "remain_snapshot_num_ASC", - "remain_snapshot_num_DESC", - "snapshot_group_num_ASC", - "snapshot_group_num_DESC", - "start_time_ASC", - "start_time_DESC", - "status_ASC", - "status_DESC" - ], - "type": "string" - }, - "GetSnapshotPlansRequestBody": { - "properties": { - "after": { + }, + "backup_network_subnet_mask": { "type": "string", "nullable": true }, - "before": { + "backup_network_subnet_mask_contains": { "type": "string", "nullable": true }, - "first": { - "type": "integer", - "format": "int32", + "backup_network_subnet_mask_ends_with": { + "type": "string", "nullable": true }, - "last": { - "type": "integer", - "format": "int32", + "backup_network_subnet_mask_gt": { + "type": "string", "nullable": true }, - "orderBy": { - "allOf": [ - { - "$ref": "#/components/schemas/SnapshotPlanOrderByInput" - } - ], + "backup_network_subnet_mask_gte": { + "type": "string", "nullable": true }, - "skip": { - "type": "integer", - "format": "int32", + "backup_network_subnet_mask_in": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true }, - "where": { - "allOf": [ - { - "$ref": "#/components/schemas/SnapshotPlanWhereInput" - } - ], + "backup_network_subnet_mask_lt": { + "type": "string", "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "EntityFilterOrderByInput": { - "enum": [ - "apply_to_all_clusters_ASC", - "apply_to_all_clusters_DESC", - "entity_type_ASC", - "entity_type_DESC", - "filter_status_ASC", - "filter_status_DESC", - "id_ASC", - "id_DESC", - "last_executed_at_ASC", - "last_executed_at_DESC", - "name_ASC", - "name_DESC", - "preset_ASC", - "preset_DESC", - "rules_ASC", - "rules_DESC" - ], - "type": "string" - }, - "GetEntityFiltersRequestBody": { - "properties": { - "after": { + }, + "backup_network_subnet_mask_lte": { "type": "string", "nullable": true }, - "before": { + "backup_network_subnet_mask_not": { "type": "string", "nullable": true }, - "first": { - "type": "integer", - "format": "int32", + "backup_network_subnet_mask_not_contains": { + "type": "string", "nullable": true }, - "last": { - "type": "integer", - "format": "int32", + "backup_network_subnet_mask_not_ends_with": { + "type": "string", "nullable": true }, - "orderBy": { + "backup_network_subnet_mask_not_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, + "backup_network_subnet_mask_not_starts_with": { + "type": "string", + "nullable": true + }, + "backup_network_subnet_mask_starts_with": { + "type": "string", + "nullable": true + }, + "backup_network_type": { "allOf": [ { - "$ref": "#/components/schemas/EntityFilterOrderByInput" + "$ref": "#/components/schemas/BackupServiceNetworkType" } ], "nullable": true }, - "skip": { - "type": "integer", - "format": "int32", + "backup_network_type_in": { + "items": { + "$ref": "#/components/schemas/BackupServiceNetworkType" + }, + "type": "array", "nullable": true }, - "where": { + "backup_network_type_not": { "allOf": [ { - "$ref": "#/components/schemas/EntityFilterWhereInput" + "$ref": "#/components/schemas/BackupServiceNetworkType" } ], "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "UserOrderByInput": { - "enum": [ - "auth_config_id_ASC", - "auth_config_id_DESC", - "display_username_ASC", - "display_username_DESC", - "email_address_ASC", - "email_address_DESC", - "id_ASC", - "id_DESC", - "internal_ASC", - "internal_DESC", - "ldap_dn_ASC", - "ldap_dn_DESC", - "mobile_phone_ASC", - "mobile_phone_DESC", - "name_ASC", - "name_DESC", - "password_expired_ASC", - "password_expired_DESC", - "password_recover_qa_ASC", - "password_recover_qa_DESC", - "password_updated_at_ASC", - "password_updated_at_DESC", - "role_ASC", - "role_DESC", - "source_ASC", - "source_DESC", - "username_ASC", - "username_DESC" - ], - "type": "string" - }, - "GetUsersRequestBody": { - "properties": { - "after": { + }, + "backup_network_type_not_in": { + "items": { + "$ref": "#/components/schemas/BackupServiceNetworkType" + }, + "type": "array", + "nullable": true + }, + "backup_network_vlan": { "type": "string", "nullable": true }, - "before": { + "backup_network_vlan_contains": { "type": "string", "nullable": true }, - "first": { - "type": "integer", - "format": "int32", + "backup_network_vlan_ends_with": { + "type": "string", "nullable": true }, - "last": { - "type": "integer", - "format": "int32", + "backup_network_vlan_gt": { + "type": "string", "nullable": true }, - "orderBy": { + "backup_network_vlan_gte": { + "type": "string", + "nullable": true + }, + "backup_network_vlan_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, + "backup_network_vlan_lt": { + "type": "string", + "nullable": true + }, + "backup_network_vlan_lte": { + "type": "string", + "nullable": true + }, + "backup_network_vlan_not": { + "type": "string", + "nullable": true + }, + "backup_network_vlan_not_contains": { + "type": "string", + "nullable": true + }, + "backup_network_vlan_not_ends_with": { + "type": "string", + "nullable": true + }, + "backup_network_vlan_not_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, + "backup_network_vlan_not_starts_with": { + "type": "string", + "nullable": true + }, + "backup_network_vlan_starts_with": { + "type": "string", + "nullable": true + }, + "backup_plans_every": { "allOf": [ { - "$ref": "#/components/schemas/UserOrderByInput" + "$ref": "#/components/schemas/BackupPlanWhereInput" } ], "nullable": true }, - "skip": { - "type": "integer", - "format": "int32", + "backup_plans_none": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupPlanWhereInput" + } + ], "nullable": true }, - "where": { + "backup_plans_some": { "allOf": [ { - "$ref": "#/components/schemas/UserWhereInput" + "$ref": "#/components/schemas/BackupPlanWhereInput" } ], "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "ConsistencyGroupOrderByInput": { - "enum": [ - "description_ASC", - "description_DESC", - "entityAsyncStatus_ASC", - "entityAsyncStatus_DESC", - "id_ASC", - "id_DESC", - "local_created_at_ASC", - "local_created_at_DESC", - "local_id_ASC", - "local_id_DESC", - "name_ASC", - "name_DESC", - "unique_size_ASC", - "unique_size_DESC" - ], - "type": "string" - }, - "GetConsistencyGroupsRequestBody": { - "properties": { - "after": { - "type": "string", + }, + "backup_rd_iops_max": { + "type": "integer", + "format": "int64", "nullable": true }, - "before": { - "type": "string", + "backup_rd_iops_max_gt": { + "type": "integer", + "format": "int64", "nullable": true }, - "first": { + "backup_rd_iops_max_gte": { "type": "integer", - "format": "int32", + "format": "int64", "nullable": true }, - "last": { + "backup_rd_iops_max_in": { + "items": { + "type": "integer", + "format": "int64" + }, + "type": "array", + "nullable": true + }, + "backup_rd_iops_max_lt": { "type": "integer", - "format": "int32", + "format": "int64", "nullable": true }, - "orderBy": { + "backup_rd_iops_max_lte": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "backup_rd_iops_max_not": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "backup_rd_iops_max_not_in": { + "items": { + "type": "integer", + "format": "int64" + }, + "type": "array", + "nullable": true + }, + "backup_store_repositories_every": { "allOf": [ { - "$ref": "#/components/schemas/ConsistencyGroupOrderByInput" + "$ref": "#/components/schemas/BackupStoreRepositoryWhereInput" } ], "nullable": true }, - "skip": { - "type": "integer", - "format": "int32", + "backup_store_repositories_none": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupStoreRepositoryWhereInput" + } + ], "nullable": true }, - "where": { + "backup_store_repositories_some": { "allOf": [ { - "$ref": "#/components/schemas/ConsistencyGroupWhereInput" + "$ref": "#/components/schemas/BackupStoreRepositoryWhereInput" } ], "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "IscsiConnectionOrderByInput": { - "enum": [ - "client_port_ASC", - "client_port_DESC", - "id_ASC", - "id_DESC", - "initiator_ip_ASC", - "initiator_ip_DESC", - "tr_type_ASC", - "tr_type_DESC", - "type_ASC", - "type_DESC" - ], - "type": "string" - }, - "IscsiConnectionWhereInput": { - "properties": { - "AND": { - "items": { - "$ref": "#/components/schemas/IscsiConnectionWhereInput" - }, - "type": "array", + }, + "backup_wr_iops_max": { + "type": "integer", + "format": "int64", "nullable": true }, - "NOT": { - "items": { - "$ref": "#/components/schemas/IscsiConnectionWhereInput" - }, - "type": "array", + "backup_wr_iops_max_gt": { + "type": "integer", + "format": "int64", "nullable": true }, - "OR": { + "backup_wr_iops_max_gte": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "backup_wr_iops_max_in": { "items": { - "$ref": "#/components/schemas/IscsiConnectionWhereInput" + "type": "integer", + "format": "int64" }, "type": "array", "nullable": true }, - "client_port": { + "backup_wr_iops_max_lt": { "type": "integer", - "format": "int32", + "format": "int64", "nullable": true }, - "client_port_gt": { + "backup_wr_iops_max_lte": { "type": "integer", - "format": "int32", + "format": "int64", "nullable": true }, - "client_port_gte": { + "backup_wr_iops_max_not": { "type": "integer", - "format": "int32", + "format": "int64", "nullable": true }, - "client_port_in": { + "backup_wr_iops_max_not_in": { "items": { "type": "integer", - "format": "int32" + "format": "int64" }, "type": "array", "nullable": true }, - "client_port_lt": { - "type": "integer", - "format": "int32", + "description": { + "type": "string", "nullable": true }, - "client_port_lte": { - "type": "integer", - "format": "int32", + "description_contains": { + "type": "string", "nullable": true }, - "client_port_not": { - "type": "integer", - "format": "int32", + "description_ends_with": { + "type": "string", "nullable": true }, - "client_port_not_in": { + "description_gt": { + "type": "string", + "nullable": true + }, + "description_gte": { + "type": "string", + "nullable": true + }, + "description_in": { "items": { - "type": "integer", - "format": "int32" + "type": "string" }, "type": "array", "nullable": true }, - "cluster": { + "description_lt": { + "type": "string", + "nullable": true + }, + "description_lte": { + "type": "string", + "nullable": true + }, + "description_not": { + "type": "string", + "nullable": true + }, + "description_not_contains": { + "type": "string", + "nullable": true + }, + "description_not_ends_with": { + "type": "string", + "nullable": true + }, + "description_not_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, + "description_not_starts_with": { + "type": "string", + "nullable": true + }, + "description_starts_with": { + "type": "string", + "nullable": true + }, + "entityAsyncStatus": { "allOf": [ { - "$ref": "#/components/schemas/ClusterWhereInput" + "$ref": "#/components/schemas/EntityAsyncStatus" } ], "nullable": true }, - "host": { + "entityAsyncStatus_in": { + "items": { + "$ref": "#/components/schemas/EntityAsyncStatus" + }, + "type": "array", + "nullable": true + }, + "entityAsyncStatus_not": { "allOf": [ { - "$ref": "#/components/schemas/HostWhereInput" + "$ref": "#/components/schemas/EntityAsyncStatus" } ], "nullable": true }, + "entityAsyncStatus_not_in": { + "items": { + "$ref": "#/components/schemas/EntityAsyncStatus" + }, + "type": "array", + "nullable": true + }, "id": { "type": "string", "nullable": true @@ -87623,2645 +88152,1932 @@ "type": "string", "nullable": true }, - "initiator_ip": { + "kube_config": { "type": "string", "nullable": true }, - "initiator_ip_contains": { + "kube_config_contains": { "type": "string", "nullable": true }, - "initiator_ip_ends_with": { + "kube_config_ends_with": { "type": "string", "nullable": true }, - "initiator_ip_gt": { + "kube_config_gt": { "type": "string", "nullable": true }, - "initiator_ip_gte": { + "kube_config_gte": { "type": "string", "nullable": true }, - "initiator_ip_in": { + "kube_config_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "initiator_ip_lt": { + "kube_config_lt": { "type": "string", "nullable": true }, - "initiator_ip_lte": { + "kube_config_lte": { "type": "string", "nullable": true }, - "initiator_ip_not": { + "kube_config_not": { "type": "string", "nullable": true }, - "initiator_ip_not_contains": { + "kube_config_not_contains": { "type": "string", "nullable": true }, - "initiator_ip_not_ends_with": { + "kube_config_not_ends_with": { "type": "string", "nullable": true }, - "initiator_ip_not_in": { + "kube_config_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "initiator_ip_not_starts_with": { + "kube_config_not_starts_with": { "type": "string", "nullable": true }, - "initiator_ip_starts_with": { + "kube_config_starts_with": { "type": "string", "nullable": true }, - "iscsi_target": { - "allOf": [ - { - "$ref": "#/components/schemas/IscsiTargetWhereInput" - } - ], + "management_network_gateway": { + "type": "string", "nullable": true }, - "nvmf_subsystem": { - "allOf": [ - { - "$ref": "#/components/schemas/NvmfSubsystemWhereInput" - } - ], + "management_network_gateway_contains": { + "type": "string", "nullable": true }, - "tr_type": { - "allOf": [ - { - "$ref": "#/components/schemas/StoreTransportType" - } - ], + "management_network_gateway_ends_with": { + "type": "string", "nullable": true }, - "tr_type_in": { - "items": { - "$ref": "#/components/schemas/StoreTransportType" - }, - "type": "array", + "management_network_gateway_gt": { + "type": "string", "nullable": true }, - "tr_type_not": { - "allOf": [ - { - "$ref": "#/components/schemas/StoreTransportType" - } - ], + "management_network_gateway_gte": { + "type": "string", "nullable": true }, - "tr_type_not_in": { + "management_network_gateway_in": { "items": { - "$ref": "#/components/schemas/StoreTransportType" + "type": "string" }, "type": "array", "nullable": true }, - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/StoreConnectionType" - } - ], - "nullable": true - }, - "type_in": { - "items": { - "$ref": "#/components/schemas/StoreConnectionType" - }, - "type": "array", - "nullable": true - }, - "type_not": { - "allOf": [ - { - "$ref": "#/components/schemas/StoreConnectionType" - } - ], - "nullable": true - }, - "type_not_in": { - "items": { - "$ref": "#/components/schemas/StoreConnectionType" - }, - "type": "array", - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "StoreTransportType": { - "enum": [ - "RDMA", - "TCP" - ], - "type": "string" - }, - "StoreConnectionType": { - "enum": [ - "ISCSI", - "NVMe" - ], - "type": "string" - }, - "GetIscsiConnectionsRequestBody": { - "properties": { - "after": { + "management_network_gateway_lt": { "type": "string", "nullable": true }, - "before": { + "management_network_gateway_lte": { "type": "string", "nullable": true }, - "first": { - "type": "integer", - "format": "int32", + "management_network_gateway_not": { + "type": "string", "nullable": true }, - "last": { - "type": "integer", - "format": "int32", + "management_network_gateway_not_contains": { + "type": "string", "nullable": true }, - "orderBy": { - "allOf": [ - { - "$ref": "#/components/schemas/IscsiConnectionOrderByInput" - } - ], + "management_network_gateway_not_ends_with": { + "type": "string", "nullable": true }, - "skip": { - "type": "integer", - "format": "int32", + "management_network_gateway_not_in": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true }, - "where": { - "allOf": [ - { - "$ref": "#/components/schemas/IscsiConnectionWhereInput" - } - ], - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "IscsiLunSnapshotOrderByInput": { - "enum": [ - "entityAsyncStatus_ASC", - "entityAsyncStatus_DESC", - "id_ASC", - "id_DESC", - "local_created_at_ASC", - "local_created_at_DESC", - "local_id_ASC", - "local_id_DESC", - "name_ASC", - "name_DESC", - "unique_size_ASC", - "unique_size_DESC" - ], - "type": "string" - }, - "GetIscsiLunSnapshotsRequestBody": { - "properties": { - "after": { + "management_network_gateway_not_starts_with": { "type": "string", "nullable": true }, - "before": { + "management_network_gateway_starts_with": { "type": "string", "nullable": true }, - "first": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "last": { - "type": "integer", - "format": "int32", + "management_network_ip": { + "type": "string", "nullable": true }, - "orderBy": { - "allOf": [ - { - "$ref": "#/components/schemas/IscsiLunSnapshotOrderByInput" - } - ], + "management_network_ip_contains": { + "type": "string", "nullable": true }, - "skip": { - "type": "integer", - "format": "int32", + "management_network_ip_ends_with": { + "type": "string", "nullable": true }, - "where": { - "allOf": [ - { - "$ref": "#/components/schemas/IscsiLunSnapshotWhereInput" - } - ], - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "SystemAuditLogOrderByInput": { - "enum": [ - "action_ASC", - "action_DESC", - "finished_at_ASC", - "finished_at_DESC", - "id_ASC", - "id_DESC", - "local_created_at_ASC", - "local_created_at_DESC", - "local_id_ASC", - "local_id_DESC", - "message_ASC", - "message_DESC", - "resource_id_ASC", - "resource_id_DESC", - "status_ASC", - "status_DESC" - ], - "type": "string" - }, - "SystemAuditLogWhereInput": { - "properties": { - "AND": { - "items": { - "$ref": "#/components/schemas/SystemAuditLogWhereInput" - }, - "type": "array", + "management_network_ip_gt": { + "type": "string", "nullable": true }, - "NOT": { - "items": { - "$ref": "#/components/schemas/SystemAuditLogWhereInput" - }, - "type": "array", + "management_network_ip_gte": { + "type": "string", "nullable": true }, - "OR": { + "management_network_ip_in": { "items": { - "$ref": "#/components/schemas/SystemAuditLogWhereInput" + "type": "string" }, "type": "array", "nullable": true }, - "action": { + "management_network_ip_lt": { "type": "string", "nullable": true }, - "action_contains": { + "management_network_ip_lte": { "type": "string", "nullable": true }, - "action_ends_with": { + "management_network_ip_not": { "type": "string", "nullable": true }, - "action_gt": { + "management_network_ip_not_contains": { "type": "string", "nullable": true }, - "action_gte": { + "management_network_ip_not_ends_with": { "type": "string", "nullable": true }, - "action_in": { + "management_network_ip_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "action_lt": { + "management_network_ip_not_starts_with": { "type": "string", "nullable": true }, - "action_lte": { + "management_network_ip_starts_with": { "type": "string", "nullable": true }, - "action_not": { + "management_network_subnet_mask": { "type": "string", "nullable": true }, - "action_not_contains": { + "management_network_subnet_mask_contains": { "type": "string", "nullable": true }, - "action_not_ends_with": { + "management_network_subnet_mask_ends_with": { "type": "string", "nullable": true }, - "action_not_in": { + "management_network_subnet_mask_gt": { + "type": "string", + "nullable": true + }, + "management_network_subnet_mask_gte": { + "type": "string", + "nullable": true + }, + "management_network_subnet_mask_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "action_not_starts_with": { + "management_network_subnet_mask_lt": { "type": "string", "nullable": true }, - "action_starts_with": { + "management_network_subnet_mask_lte": { "type": "string", "nullable": true }, - "cluster": { - "allOf": [ - { - "$ref": "#/components/schemas/ClusterWhereInput" - } - ], - "nullable": true - }, - "finished_at": { + "management_network_subnet_mask_not": { "type": "string", "nullable": true }, - "finished_at_gt": { + "management_network_subnet_mask_not_contains": { "type": "string", "nullable": true }, - "finished_at_gte": { + "management_network_subnet_mask_not_ends_with": { "type": "string", "nullable": true }, - "finished_at_in": { + "management_network_subnet_mask_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "finished_at_lt": { - "type": "string", - "nullable": true - }, - "finished_at_lte": { + "management_network_subnet_mask_not_starts_with": { "type": "string", "nullable": true }, - "finished_at_not": { + "management_network_subnet_mask_starts_with": { "type": "string", "nullable": true }, - "finished_at_not_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true - }, - "id": { + "management_network_vlan": { "type": "string", "nullable": true }, - "id_contains": { + "management_network_vlan_contains": { "type": "string", "nullable": true }, - "id_ends_with": { + "management_network_vlan_ends_with": { "type": "string", "nullable": true }, - "id_gt": { + "management_network_vlan_gt": { "type": "string", "nullable": true }, - "id_gte": { + "management_network_vlan_gte": { "type": "string", "nullable": true }, - "id_in": { + "management_network_vlan_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "id_lt": { + "management_network_vlan_lt": { "type": "string", "nullable": true }, - "id_lte": { + "management_network_vlan_lte": { "type": "string", "nullable": true }, - "id_not": { + "management_network_vlan_not": { "type": "string", "nullable": true }, - "id_not_contains": { + "management_network_vlan_not_contains": { "type": "string", "nullable": true }, - "id_not_ends_with": { + "management_network_vlan_not_ends_with": { "type": "string", "nullable": true }, - "id_not_in": { + "management_network_vlan_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "id_not_starts_with": { + "management_network_vlan_not_starts_with": { "type": "string", "nullable": true }, - "id_starts_with": { + "management_network_vlan_starts_with": { "type": "string", "nullable": true }, - "local_created_at": { - "type": "string", + "max_job_retry_times": { + "type": "integer", + "format": "int32", "nullable": true }, - "local_created_at_gt": { - "type": "string", + "max_job_retry_times_gt": { + "type": "integer", + "format": "int32", "nullable": true }, - "local_created_at_gte": { - "type": "string", + "max_job_retry_times_gte": { + "type": "integer", + "format": "int32", "nullable": true }, - "local_created_at_in": { + "max_job_retry_times_in": { "items": { - "type": "string" + "type": "integer", + "format": "int32" }, "type": "array", "nullable": true }, - "local_created_at_lt": { - "type": "string", + "max_job_retry_times_lt": { + "type": "integer", + "format": "int32", "nullable": true }, - "local_created_at_lte": { - "type": "string", + "max_job_retry_times_lte": { + "type": "integer", + "format": "int32", "nullable": true }, - "local_created_at_not": { - "type": "string", + "max_job_retry_times_not": { + "type": "integer", + "format": "int32", "nullable": true }, - "local_created_at_not_in": { + "max_job_retry_times_not_in": { "items": { - "type": "string" + "type": "integer", + "format": "int32" }, "type": "array", "nullable": true }, - "local_id": { - "type": "string", - "nullable": true - }, - "local_id_contains": { - "type": "string", - "nullable": true - }, - "local_id_ends_with": { - "type": "string", + "max_parallel_backup_jobs": { + "type": "integer", + "format": "int32", "nullable": true }, - "local_id_gt": { - "type": "string", + "max_parallel_backup_jobs_gt": { + "type": "integer", + "format": "int32", "nullable": true }, - "local_id_gte": { - "type": "string", + "max_parallel_backup_jobs_gte": { + "type": "integer", + "format": "int32", "nullable": true }, - "local_id_in": { + "max_parallel_backup_jobs_in": { "items": { - "type": "string" + "type": "integer", + "format": "int32" }, "type": "array", "nullable": true }, - "local_id_lt": { - "type": "string", - "nullable": true - }, - "local_id_lte": { - "type": "string", - "nullable": true - }, - "local_id_not": { - "type": "string", + "max_parallel_backup_jobs_lt": { + "type": "integer", + "format": "int32", "nullable": true }, - "local_id_not_contains": { - "type": "string", + "max_parallel_backup_jobs_lte": { + "type": "integer", + "format": "int32", "nullable": true }, - "local_id_not_ends_with": { - "type": "string", + "max_parallel_backup_jobs_not": { + "type": "integer", + "format": "int32", "nullable": true }, - "local_id_not_in": { + "max_parallel_backup_jobs_not_in": { "items": { - "type": "string" + "type": "integer", + "format": "int32" }, "type": "array", "nullable": true }, - "local_id_not_starts_with": { - "type": "string", + "max_parallel_restore_jobs": { + "type": "integer", + "format": "int32", "nullable": true }, - "local_id_starts_with": { - "type": "string", + "max_parallel_restore_jobs_gt": { + "type": "integer", + "format": "int32", "nullable": true }, - "message": { - "type": "string", + "max_parallel_restore_jobs_gte": { + "type": "integer", + "format": "int32", "nullable": true }, - "message_contains": { - "type": "string", + "max_parallel_restore_jobs_in": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", "nullable": true }, - "message_ends_with": { - "type": "string", + "max_parallel_restore_jobs_lt": { + "type": "integer", + "format": "int32", "nullable": true }, - "message_gt": { - "type": "string", + "max_parallel_restore_jobs_lte": { + "type": "integer", + "format": "int32", "nullable": true }, - "message_gte": { - "type": "string", + "max_parallel_restore_jobs_not": { + "type": "integer", + "format": "int32", "nullable": true }, - "message_in": { + "max_parallel_restore_jobs_not_in": { "items": { - "type": "string" + "type": "integer", + "format": "int32" }, "type": "array", "nullable": true }, - "message_lt": { + "name": { "type": "string", "nullable": true }, - "message_lte": { + "name_contains": { "type": "string", "nullable": true }, - "message_not": { + "name_ends_with": { "type": "string", "nullable": true }, - "message_not_contains": { + "name_gt": { "type": "string", "nullable": true }, - "message_not_ends_with": { + "name_gte": { "type": "string", "nullable": true }, - "message_not_in": { + "name_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "message_not_starts_with": { - "type": "string", - "nullable": true - }, - "message_starts_with": { - "type": "string", - "nullable": true - }, - "resource_id": { + "name_lt": { "type": "string", "nullable": true }, - "resource_id_contains": { + "name_lte": { "type": "string", "nullable": true }, - "resource_id_ends_with": { + "name_not": { "type": "string", "nullable": true }, - "resource_id_gt": { + "name_not_contains": { "type": "string", "nullable": true }, - "resource_id_gte": { + "name_not_ends_with": { "type": "string", "nullable": true }, - "resource_id_in": { + "name_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "resource_id_lt": { - "type": "string", - "nullable": true - }, - "resource_id_lte": { + "name_not_starts_with": { "type": "string", "nullable": true }, - "resource_id_not": { + "name_starts_with": { "type": "string", "nullable": true }, - "resource_id_not_contains": { - "type": "string", + "resource_version_gt": { + "type": "integer", + "format": "int32", "nullable": true }, - "resource_id_not_ends_with": { - "type": "string", + "resource_version_gte": { + "type": "integer", + "format": "int32", "nullable": true }, - "resource_id_not_in": { + "resource_version_in": { "items": { - "type": "string" + "type": "integer", + "format": "int32" }, "type": "array", "nullable": true }, - "resource_id_not_starts_with": { - "type": "string", + "resource_version_lt": { + "type": "integer", + "format": "int32", "nullable": true }, - "resource_id_starts_with": { - "type": "string", + "resource_version_lte": { + "type": "integer", + "format": "int32", "nullable": true }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/UserAuditLogStatus" - } - ], + "resource_version_not": { + "type": "integer", + "format": "int32", "nullable": true }, - "status_in": { + "resource_version_not_in": { "items": { - "$ref": "#/components/schemas/UserAuditLogStatus" + "type": "integer", + "format": "int32" }, "type": "array", "nullable": true }, - "status_not": { - "allOf": [ - { - "$ref": "#/components/schemas/UserAuditLogStatus" - } - ], - "nullable": true - }, - "status_not_in": { + "restore_rd_iops_max": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "restore_rd_iops_max_gt": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "restore_rd_iops_max_gte": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "restore_rd_iops_max_in": { "items": { - "$ref": "#/components/schemas/UserAuditLogStatus" + "type": "integer", + "format": "int64" }, "type": "array", "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "GetSystemAuditLogsRequestBody": { - "properties": { - "after": { - "type": "string", + }, + "restore_rd_iops_max_lt": { + "type": "integer", + "format": "int64", "nullable": true }, - "before": { - "type": "string", + "restore_rd_iops_max_lte": { + "type": "integer", + "format": "int64", "nullable": true }, - "first": { + "restore_rd_iops_max_not": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "restore_rd_iops_max_not_in": { + "items": { + "type": "integer", + "format": "int64" + }, + "type": "array", + "nullable": true + }, + "restore_wr_iops_max": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "restore_wr_iops_max_gt": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "restore_wr_iops_max_gte": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "restore_wr_iops_max_in": { + "items": { + "type": "integer", + "format": "int64" + }, + "type": "array", + "nullable": true + }, + "restore_wr_iops_max_lt": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "restore_wr_iops_max_lte": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "restore_wr_iops_max_not": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "restore_wr_iops_max_not_in": { + "items": { + "type": "integer", + "format": "int64" + }, + "type": "array", + "nullable": true + }, + "retry_interval": { "type": "integer", "format": "int32", "nullable": true }, - "last": { + "retry_interval_gt": { "type": "integer", "format": "int32", "nullable": true }, - "orderBy": { - "allOf": [ - { - "$ref": "#/components/schemas/SystemAuditLogOrderByInput" - } - ], + "retry_interval_gte": { + "type": "integer", + "format": "int32", "nullable": true }, - "skip": { + "retry_interval_in": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", + "nullable": true + }, + "retry_interval_lt": { "type": "integer", "format": "int32", "nullable": true }, - "where": { + "retry_interval_lte": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "retry_interval_not": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "retry_interval_not_in": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", + "nullable": true + }, + "running_vm": { "allOf": [ { - "$ref": "#/components/schemas/SystemAuditLogWhereInput" + "$ref": "#/components/schemas/VmWhereInput" } ], "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "UserAuditLogOrderByInput": { - "enum": [ - "action_ASC", - "action_DESC", - "auth_type_ASC", - "auth_type_DESC", - "createdAt_ASC", - "createdAt_DESC", - "finished_at_ASC", - "finished_at_DESC", - "id_ASC", - "id_DESC", - "ip_address_ASC", - "ip_address_DESC", - "message_ASC", - "message_DESC", - "resource_id_ASC", - "resource_id_DESC", - "resource_type_ASC", - "resource_type_DESC", - "started_at_ASC", - "started_at_DESC", - "status_ASC", - "status_DESC", - "username_ASC", - "username_DESC" - ], - "type": "string" - }, - "UserAuditLogWhereInput": { - "properties": { - "AND": { - "items": { - "$ref": "#/components/schemas/UserAuditLogWhereInput" - }, - "type": "array", + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupServiceStatus" + } + ], "nullable": true }, - "NOT": { + "status_in": { "items": { - "$ref": "#/components/schemas/UserAuditLogWhereInput" + "$ref": "#/components/schemas/BackupServiceStatus" }, "type": "array", "nullable": true }, - "OR": { + "status_not": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupServiceStatus" + } + ], + "nullable": true + }, + "status_not_in": { "items": { - "$ref": "#/components/schemas/UserAuditLogWhereInput" + "$ref": "#/components/schemas/BackupServiceStatus" }, "type": "array", "nullable": true }, - "action": { + "storage_network_gateway": { "type": "string", "nullable": true }, - "action_contains": { + "storage_network_gateway_contains": { "type": "string", "nullable": true }, - "action_ends_with": { + "storage_network_gateway_ends_with": { "type": "string", "nullable": true }, - "action_gt": { + "storage_network_gateway_gt": { "type": "string", "nullable": true }, - "action_gte": { + "storage_network_gateway_gte": { "type": "string", "nullable": true }, - "action_in": { + "storage_network_gateway_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "action_lt": { + "storage_network_gateway_lt": { "type": "string", "nullable": true }, - "action_lte": { + "storage_network_gateway_lte": { "type": "string", "nullable": true }, - "action_not": { + "storage_network_gateway_not": { "type": "string", "nullable": true }, - "action_not_contains": { + "storage_network_gateway_not_contains": { "type": "string", "nullable": true }, - "action_not_ends_with": { + "storage_network_gateway_not_ends_with": { "type": "string", "nullable": true }, - "action_not_in": { + "storage_network_gateway_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "action_not_starts_with": { + "storage_network_gateway_not_starts_with": { "type": "string", "nullable": true }, - "action_starts_with": { + "storage_network_gateway_starts_with": { "type": "string", "nullable": true }, - "auth_type": { + "storage_network_ip": { "type": "string", "nullable": true }, - "auth_type_contains": { + "storage_network_ip_contains": { "type": "string", "nullable": true }, - "auth_type_ends_with": { + "storage_network_ip_ends_with": { "type": "string", "nullable": true }, - "auth_type_gt": { + "storage_network_ip_gt": { "type": "string", "nullable": true }, - "auth_type_gte": { + "storage_network_ip_gte": { "type": "string", "nullable": true }, - "auth_type_in": { + "storage_network_ip_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "auth_type_lt": { + "storage_network_ip_lt": { "type": "string", "nullable": true }, - "auth_type_lte": { + "storage_network_ip_lte": { "type": "string", "nullable": true }, - "auth_type_not": { + "storage_network_ip_not": { "type": "string", "nullable": true }, - "auth_type_not_contains": { + "storage_network_ip_not_contains": { "type": "string", "nullable": true }, - "auth_type_not_ends_with": { + "storage_network_ip_not_ends_with": { "type": "string", "nullable": true }, - "auth_type_not_in": { + "storage_network_ip_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "auth_type_not_starts_with": { + "storage_network_ip_not_starts_with": { "type": "string", "nullable": true }, - "auth_type_starts_with": { + "storage_network_ip_starts_with": { "type": "string", "nullable": true }, - "cluster": { - "allOf": [ - { - "$ref": "#/components/schemas/ClusterWhereInput" - } - ], + "storage_network_subnet_mask": { + "type": "string", "nullable": true }, - "createdAt": { + "storage_network_subnet_mask_contains": { "type": "string", "nullable": true }, - "createdAt_gt": { + "storage_network_subnet_mask_ends_with": { "type": "string", "nullable": true }, - "createdAt_gte": { + "storage_network_subnet_mask_gt": { "type": "string", "nullable": true }, - "createdAt_in": { + "storage_network_subnet_mask_gte": { + "type": "string", + "nullable": true + }, + "storage_network_subnet_mask_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "createdAt_lt": { + "storage_network_subnet_mask_lt": { "type": "string", "nullable": true }, - "createdAt_lte": { + "storage_network_subnet_mask_lte": { "type": "string", "nullable": true }, - "createdAt_not": { + "storage_network_subnet_mask_not": { "type": "string", "nullable": true }, - "createdAt_not_in": { + "storage_network_subnet_mask_not_contains": { + "type": "string", + "nullable": true + }, + "storage_network_subnet_mask_not_ends_with": { + "type": "string", + "nullable": true + }, + "storage_network_subnet_mask_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "finished_at": { + "storage_network_subnet_mask_not_starts_with": { "type": "string", "nullable": true }, - "finished_at_gt": { + "storage_network_subnet_mask_starts_with": { "type": "string", "nullable": true }, - "finished_at_gte": { - "type": "string", + "storage_network_type": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupServiceNetworkType" + } + ], "nullable": true }, - "finished_at_in": { + "storage_network_type_in": { "items": { - "type": "string" + "$ref": "#/components/schemas/BackupServiceNetworkType" }, "type": "array", "nullable": true }, - "finished_at_lt": { - "type": "string", - "nullable": true - }, - "finished_at_lte": { - "type": "string", - "nullable": true - }, - "finished_at_not": { - "type": "string", + "storage_network_type_not": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupServiceNetworkType" + } + ], "nullable": true }, - "finished_at_not_in": { + "storage_network_type_not_in": { "items": { - "type": "string" + "$ref": "#/components/schemas/BackupServiceNetworkType" }, "type": "array", "nullable": true }, - "id": { + "storage_network_vlan": { "type": "string", "nullable": true }, - "id_contains": { + "storage_network_vlan_contains": { "type": "string", "nullable": true }, - "id_ends_with": { + "storage_network_vlan_ends_with": { "type": "string", "nullable": true }, - "id_gt": { + "storage_network_vlan_gt": { "type": "string", "nullable": true }, - "id_gte": { + "storage_network_vlan_gte": { "type": "string", "nullable": true }, - "id_in": { + "storage_network_vlan_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "id_lt": { + "storage_network_vlan_lt": { "type": "string", "nullable": true }, - "id_lte": { + "storage_network_vlan_lte": { "type": "string", "nullable": true }, - "id_not": { + "storage_network_vlan_not": { "type": "string", "nullable": true }, - "id_not_contains": { + "storage_network_vlan_not_contains": { "type": "string", "nullable": true }, - "id_not_ends_with": { + "storage_network_vlan_not_ends_with": { "type": "string", "nullable": true }, - "id_not_in": { + "storage_network_vlan_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "id_not_starts_with": { + "storage_network_vlan_not_starts_with": { "type": "string", "nullable": true }, - "id_starts_with": { + "storage_network_vlan_starts_with": { "type": "string", "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "BackupServiceNetworkType": { + "enum": [ + "MANAGEMENT", + "NEW_NIC", + "STORAGE" + ], + "type": "string" + }, + "BackupStoreRepositoryWhereInput": { + "properties": { + "AND": { + "items": { + "$ref": "#/components/schemas/BackupStoreRepositoryWhereInput" + }, + "type": "array", + "nullable": true }, - "ip_address": { - "type": "string", + "NOT": { + "items": { + "$ref": "#/components/schemas/BackupStoreRepositoryWhereInput" + }, + "type": "array", "nullable": true }, - "ip_address_contains": { - "type": "string", + "OR": { + "items": { + "$ref": "#/components/schemas/BackupStoreRepositoryWhereInput" + }, + "type": "array", "nullable": true }, - "ip_address_ends_with": { - "type": "string", + "backup_plans_every": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupPlanWhereInput" + } + ], "nullable": true }, - "ip_address_gt": { - "type": "string", + "backup_plans_none": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupPlanWhereInput" + } + ], "nullable": true }, - "ip_address_gte": { - "type": "string", + "backup_plans_some": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupPlanWhereInput" + } + ], "nullable": true }, - "ip_address_in": { - "items": { - "type": "string" - }, - "type": "array", + "backup_restore_points_every": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupRestorePointWhereInput" + } + ], "nullable": true }, - "ip_address_lt": { - "type": "string", + "backup_restore_points_none": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupRestorePointWhereInput" + } + ], "nullable": true }, - "ip_address_lte": { - "type": "string", + "backup_restore_points_some": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupRestorePointWhereInput" + } + ], "nullable": true }, - "ip_address_not": { + "backup_service": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupServiceWhereInput" + } + ], + "nullable": true + }, + "createdAt": { "type": "string", "nullable": true }, - "ip_address_not_contains": { + "createdAt_gt": { "type": "string", "nullable": true }, - "ip_address_not_ends_with": { + "createdAt_gte": { "type": "string", "nullable": true }, - "ip_address_not_in": { + "createdAt_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "ip_address_not_starts_with": { + "createdAt_lt": { "type": "string", "nullable": true }, - "ip_address_starts_with": { + "createdAt_lte": { "type": "string", "nullable": true }, - "message": { + "createdAt_not": { "type": "string", "nullable": true }, - "message_contains": { + "createdAt_not_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, + "description": { "type": "string", "nullable": true }, - "message_ends_with": { + "description_contains": { "type": "string", "nullable": true }, - "message_gt": { + "description_ends_with": { "type": "string", "nullable": true }, - "message_gte": { + "description_gt": { "type": "string", "nullable": true }, - "message_in": { + "description_gte": { + "type": "string", + "nullable": true + }, + "description_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "message_lt": { + "description_lt": { "type": "string", "nullable": true }, - "message_lte": { + "description_lte": { "type": "string", "nullable": true }, - "message_not": { + "description_not": { "type": "string", "nullable": true }, - "message_not_contains": { + "description_not_contains": { "type": "string", "nullable": true }, - "message_not_ends_with": { + "description_not_ends_with": { "type": "string", "nullable": true }, - "message_not_in": { + "description_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "message_not_starts_with": { - "type": "string", - "nullable": true - }, - "message_starts_with": { + "description_not_starts_with": { "type": "string", "nullable": true }, - "resource_id": { + "description_starts_with": { "type": "string", "nullable": true }, - "resource_id_contains": { + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], + "nullable": true + }, + "entityAsyncStatus_in": { + "items": { + "$ref": "#/components/schemas/EntityAsyncStatus" + }, + "type": "array", + "nullable": true + }, + "entityAsyncStatus_not": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], + "nullable": true + }, + "entityAsyncStatus_not_in": { + "items": { + "$ref": "#/components/schemas/EntityAsyncStatus" + }, + "type": "array", + "nullable": true + }, + "error_code": { "type": "string", "nullable": true }, - "resource_id_ends_with": { + "error_code_contains": { "type": "string", "nullable": true }, - "resource_id_gt": { + "error_code_ends_with": { "type": "string", "nullable": true }, - "resource_id_gte": { + "error_code_gt": { "type": "string", "nullable": true }, - "resource_id_in": { + "error_code_gte": { + "type": "string", + "nullable": true + }, + "error_code_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "resource_id_lt": { + "error_code_lt": { "type": "string", "nullable": true }, - "resource_id_lte": { + "error_code_lte": { "type": "string", "nullable": true }, - "resource_id_not": { + "error_code_not": { "type": "string", "nullable": true }, - "resource_id_not_contains": { + "error_code_not_contains": { "type": "string", "nullable": true }, - "resource_id_not_ends_with": { + "error_code_not_ends_with": { "type": "string", "nullable": true }, - "resource_id_not_in": { + "error_code_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "resource_id_not_starts_with": { + "error_code_not_starts_with": { "type": "string", "nullable": true }, - "resource_id_starts_with": { + "error_code_starts_with": { "type": "string", "nullable": true }, - "resource_type": { + "id": { "type": "string", "nullable": true }, - "resource_type_contains": { + "id_contains": { "type": "string", "nullable": true }, - "resource_type_ends_with": { + "id_ends_with": { "type": "string", "nullable": true }, - "resource_type_gt": { + "id_gt": { "type": "string", "nullable": true }, - "resource_type_gte": { + "id_gte": { "type": "string", "nullable": true }, - "resource_type_in": { + "id_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "resource_type_lt": { + "id_lt": { "type": "string", "nullable": true }, - "resource_type_lte": { + "id_lte": { "type": "string", "nullable": true }, - "resource_type_not": { + "id_not": { "type": "string", "nullable": true }, - "resource_type_not_contains": { + "id_not_contains": { "type": "string", "nullable": true }, - "resource_type_not_ends_with": { + "id_not_ends_with": { "type": "string", "nullable": true }, - "resource_type_not_in": { + "id_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "resource_type_not_starts_with": { + "id_not_starts_with": { "type": "string", "nullable": true }, - "resource_type_starts_with": { + "id_starts_with": { "type": "string", "nullable": true }, - "started_at": { + "iscsi_chap_name": { "type": "string", "nullable": true }, - "started_at_gt": { + "iscsi_chap_name_contains": { "type": "string", "nullable": true }, - "started_at_gte": { + "iscsi_chap_name_ends_with": { "type": "string", "nullable": true }, - "started_at_in": { + "iscsi_chap_name_gt": { + "type": "string", + "nullable": true + }, + "iscsi_chap_name_gte": { + "type": "string", + "nullable": true + }, + "iscsi_chap_name_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "started_at_lt": { + "iscsi_chap_name_lt": { "type": "string", "nullable": true }, - "started_at_lte": { + "iscsi_chap_name_lte": { "type": "string", "nullable": true }, - "started_at_not": { + "iscsi_chap_name_not": { "type": "string", "nullable": true }, - "started_at_not_in": { + "iscsi_chap_name_not_contains": { + "type": "string", + "nullable": true + }, + "iscsi_chap_name_not_ends_with": { + "type": "string", + "nullable": true + }, + "iscsi_chap_name_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/UserAuditLogStatus" - } - ], + "iscsi_chap_name_not_starts_with": { + "type": "string", "nullable": true }, - "status_in": { + "iscsi_chap_name_starts_with": { + "type": "string", + "nullable": true + }, + "iscsi_chap_secret": { + "type": "string", + "nullable": true + }, + "iscsi_chap_secret_contains": { + "type": "string", + "nullable": true + }, + "iscsi_chap_secret_ends_with": { + "type": "string", + "nullable": true + }, + "iscsi_chap_secret_gt": { + "type": "string", + "nullable": true + }, + "iscsi_chap_secret_gte": { + "type": "string", + "nullable": true + }, + "iscsi_chap_secret_in": { "items": { - "$ref": "#/components/schemas/UserAuditLogStatus" + "type": "string" }, "type": "array", "nullable": true }, - "status_not": { - "allOf": [ - { - "$ref": "#/components/schemas/UserAuditLogStatus" - } - ], + "iscsi_chap_secret_lt": { + "type": "string", "nullable": true }, - "status_not_in": { + "iscsi_chap_secret_lte": { + "type": "string", + "nullable": true + }, + "iscsi_chap_secret_not": { + "type": "string", + "nullable": true + }, + "iscsi_chap_secret_not_contains": { + "type": "string", + "nullable": true + }, + "iscsi_chap_secret_not_ends_with": { + "type": "string", + "nullable": true + }, + "iscsi_chap_secret_not_in": { "items": { - "$ref": "#/components/schemas/UserAuditLogStatus" + "type": "string" }, "type": "array", "nullable": true }, - "user": { - "allOf": [ - { - "$ref": "#/components/schemas/UserWhereInput" - } - ], + "iscsi_chap_secret_not_starts_with": { + "type": "string", "nullable": true }, - "username": { + "iscsi_chap_secret_starts_with": { "type": "string", "nullable": true }, - "username_contains": { + "iscsi_ip": { "type": "string", "nullable": true }, - "username_ends_with": { + "iscsi_ip_contains": { "type": "string", "nullable": true }, - "username_gt": { + "iscsi_ip_ends_with": { "type": "string", "nullable": true }, - "username_gte": { + "iscsi_ip_gt": { "type": "string", "nullable": true }, - "username_in": { + "iscsi_ip_gte": { + "type": "string", + "nullable": true + }, + "iscsi_ip_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "username_lt": { + "iscsi_ip_lt": { "type": "string", "nullable": true }, - "username_lte": { + "iscsi_ip_lte": { "type": "string", "nullable": true }, - "username_not": { + "iscsi_ip_not": { "type": "string", "nullable": true }, - "username_not_contains": { + "iscsi_ip_not_contains": { "type": "string", "nullable": true }, - "username_not_ends_with": { + "iscsi_ip_not_ends_with": { "type": "string", "nullable": true }, - "username_not_in": { + "iscsi_ip_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "username_not_starts_with": { + "iscsi_ip_not_starts_with": { "type": "string", "nullable": true }, - "username_starts_with": { + "iscsi_ip_starts_with": { "type": "string", "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "GetUserAuditLogsRequestBody": { - "properties": { - "after": { + }, + "iscsi_lun_id": { "type": "string", "nullable": true }, - "before": { + "iscsi_lun_id_contains": { "type": "string", "nullable": true }, - "first": { - "type": "integer", - "format": "int32", + "iscsi_lun_id_ends_with": { + "type": "string", "nullable": true }, - "last": { - "type": "integer", - "format": "int32", + "iscsi_lun_id_gt": { + "type": "string", "nullable": true }, - "orderBy": { - "allOf": [ - { - "$ref": "#/components/schemas/UserAuditLogOrderByInput" - } - ], + "iscsi_lun_id_gte": { + "type": "string", "nullable": true }, - "skip": { - "type": "integer", - "format": "int32", + "iscsi_lun_id_in": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true }, - "where": { - "allOf": [ - { - "$ref": "#/components/schemas/UserAuditLogWhereInput" - } - ], - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "TaskOrderByInput": { - "enum": [ - "args_ASC", - "args_DESC", - "description_ASC", - "description_DESC", - "error_code_ASC", - "error_code_DESC", - "error_message_ASC", - "error_message_DESC", - "finished_at_ASC", - "finished_at_DESC", - "id_ASC", - "id_DESC", - "internal_ASC", - "internal_DESC", - "key_ASC", - "key_DESC", - "local_created_at_ASC", - "local_created_at_DESC", - "progress_ASC", - "progress_DESC", - "resource_id_ASC", - "resource_id_DESC", - "resource_mutation_ASC", - "resource_mutation_DESC", - "resource_rollback_error_ASC", - "resource_rollback_error_DESC", - "resource_rollback_retry_count_ASC", - "resource_rollback_retry_count_DESC", - "resource_rollbacked_ASC", - "resource_rollbacked_DESC", - "resource_type_ASC", - "resource_type_DESC", - "snapshot_ASC", - "snapshot_DESC", - "started_at_ASC", - "started_at_DESC", - "status_ASC", - "status_DESC", - "steps_ASC", - "steps_DESC", - "type_ASC", - "type_DESC" - ], - "type": "string" - }, - "GetTasksRequestBody": { - "properties": { - "after": { + "iscsi_lun_id_lt": { "type": "string", "nullable": true }, - "before": { + "iscsi_lun_id_lte": { "type": "string", "nullable": true }, - "first": { - "type": "integer", - "format": "int32", + "iscsi_lun_id_not": { + "type": "string", "nullable": true }, - "last": { - "type": "integer", - "format": "int32", + "iscsi_lun_id_not_contains": { + "type": "string", "nullable": true }, - "orderBy": { - "allOf": [ - { - "$ref": "#/components/schemas/TaskOrderByInput" - } - ], + "iscsi_lun_id_not_ends_with": { + "type": "string", "nullable": true }, - "skip": { - "type": "integer", - "format": "int32", + "iscsi_lun_id_not_in": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true }, - "where": { - "allOf": [ - { - "$ref": "#/components/schemas/TaskWhereInput" - } - ], - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "IscsiLunOrderByInput": { - "enum": [ - "allowed_initiators_ASC", - "allowed_initiators_DESC", - "assigned_size_ASC", - "assigned_size_DESC", - "bps_ASC", - "bps_DESC", - "bps_max_ASC", - "bps_max_DESC", - "bps_max_length_ASC", - "bps_max_length_DESC", - "bps_rd_ASC", - "bps_rd_DESC", - "bps_rd_max_ASC", - "bps_rd_max_DESC", - "bps_rd_max_length_ASC", - "bps_rd_max_length_DESC", - "bps_wr_ASC", - "bps_wr_DESC", - "bps_wr_max_ASC", - "bps_wr_max_DESC", - "bps_wr_max_length_ASC", - "bps_wr_max_length_DESC", - "entityAsyncStatus_ASC", - "entityAsyncStatus_DESC", - "id_ASC", - "id_DESC", - "io_size_ASC", - "io_size_DESC", - "iops_ASC", - "iops_DESC", - "iops_max_ASC", - "iops_max_DESC", - "iops_max_length_ASC", - "iops_max_length_DESC", - "iops_rd_ASC", - "iops_rd_DESC", - "iops_rd_max_ASC", - "iops_rd_max_DESC", - "iops_rd_max_length_ASC", - "iops_rd_max_length_DESC", - "iops_wr_ASC", - "iops_wr_DESC", - "iops_wr_max_ASC", - "iops_wr_max_DESC", - "iops_wr_max_length_ASC", - "iops_wr_max_length_DESC", - "local_created_at_ASC", - "local_created_at_DESC", - "local_id_ASC", - "local_id_DESC", - "lun_id_ASC", - "lun_id_DESC", - "name_ASC", - "name_DESC", - "replica_num_ASC", - "replica_num_DESC", - "shared_size_ASC", - "shared_size_DESC", - "snapshot_num_ASC", - "snapshot_num_DESC", - "stripe_num_ASC", - "stripe_num_DESC", - "stripe_size_ASC", - "stripe_size_DESC", - "thin_provision_ASC", - "thin_provision_DESC", - "unique_logical_size_ASC", - "unique_logical_size_DESC", - "unique_size_ASC", - "unique_size_DESC", - "zbs_volume_id_ASC", - "zbs_volume_id_DESC" - ], - "type": "string" - }, - "GetIscsiLunsRequestBody": { - "properties": { - "after": { + "iscsi_lun_id_not_starts_with": { "type": "string", "nullable": true }, - "before": { + "iscsi_lun_id_starts_with": { "type": "string", "nullable": true }, - "first": { + "iscsi_port": { "type": "integer", "format": "int32", "nullable": true }, - "last": { + "iscsi_port_gt": { "type": "integer", "format": "int32", "nullable": true }, - "orderBy": { - "allOf": [ - { - "$ref": "#/components/schemas/IscsiLunOrderByInput" - } - ], - "nullable": true - }, - "skip": { + "iscsi_port_gte": { "type": "integer", "format": "int32", "nullable": true }, - "where": { - "allOf": [ - { - "$ref": "#/components/schemas/IscsiLunWhereInput" - } - ], - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "NamespaceGroupOrderByInput": { - "enum": [ - "entityAsyncStatus_ASC", - "entityAsyncStatus_DESC", - "id_ASC", - "id_DESC", - "local_create_time_ASC", - "local_create_time_DESC", - "local_id_ASC", - "local_id_DESC", - "name_ASC", - "name_DESC" - ], - "type": "string" - }, - "GetNamespaceGroupsRequestBody": { - "properties": { - "after": { - "type": "string", + "iscsi_port_in": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", "nullable": true }, - "before": { - "type": "string", + "iscsi_port_lt": { + "type": "integer", + "format": "int32", "nullable": true }, - "first": { + "iscsi_port_lte": { "type": "integer", "format": "int32", "nullable": true }, - "last": { + "iscsi_port_not": { "type": "integer", "format": "int32", "nullable": true }, - "orderBy": { - "allOf": [ - { - "$ref": "#/components/schemas/NamespaceGroupOrderByInput" - } - ], + "iscsi_port_not_in": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", "nullable": true }, - "skip": { - "type": "integer", - "format": "int32", + "iscsi_target_iqn": { + "type": "string", "nullable": true }, - "where": { - "allOf": [ - { - "$ref": "#/components/schemas/NamespaceGroupWhereInput" - } - ], + "iscsi_target_iqn_contains": { + "type": "string", "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "NvmfNamespaceOrderByInput": { - "enum": [ - "assigned_size_ASC", - "assigned_size_DESC", - "bps_ASC", - "bps_DESC", - "bps_max_ASC", - "bps_max_DESC", - "bps_max_length_ASC", - "bps_max_length_DESC", - "bps_rd_ASC", - "bps_rd_DESC", - "bps_rd_max_ASC", - "bps_rd_max_DESC", - "bps_rd_max_length_ASC", - "bps_rd_max_length_DESC", - "bps_wr_ASC", - "bps_wr_DESC", - "bps_wr_max_ASC", - "bps_wr_max_DESC", - "bps_wr_max_length_ASC", - "bps_wr_max_length_DESC", - "entityAsyncStatus_ASC", - "entityAsyncStatus_DESC", - "id_ASC", - "id_DESC", - "io_size_ASC", - "io_size_DESC", - "iops_ASC", - "iops_DESC", - "iops_max_ASC", - "iops_max_DESC", - "iops_max_length_ASC", - "iops_max_length_DESC", - "iops_rd_ASC", - "iops_rd_DESC", - "iops_rd_max_ASC", - "iops_rd_max_DESC", - "iops_rd_max_length_ASC", - "iops_rd_max_length_DESC", - "iops_wr_ASC", - "iops_wr_DESC", - "iops_wr_max_ASC", - "iops_wr_max_DESC", - "iops_wr_max_length_ASC", - "iops_wr_max_length_DESC", - "is_shared_ASC", - "is_shared_DESC", - "local_created_at_ASC", - "local_created_at_DESC", - "local_id_ASC", - "local_id_DESC", - "name_ASC", - "name_DESC", - "namespace_id_ASC", - "namespace_id_DESC", - "nqn_whitelist_ASC", - "nqn_whitelist_DESC", - "replica_num_ASC", - "replica_num_DESC", - "shared_size_ASC", - "shared_size_DESC", - "snapshot_num_ASC", - "snapshot_num_DESC", - "stripe_num_ASC", - "stripe_num_DESC", - "stripe_size_ASC", - "stripe_size_DESC", - "thin_provision_ASC", - "thin_provision_DESC", - "unique_logical_size_ASC", - "unique_logical_size_DESC", - "unique_size_ASC", - "unique_size_DESC", - "zbs_volume_id_ASC", - "zbs_volume_id_DESC" - ], - "type": "string" - }, - "GetNvmfNamespacesRequestBody": { - "properties": { - "after": { + }, + "iscsi_target_iqn_ends_with": { "type": "string", "nullable": true }, - "before": { + "iscsi_target_iqn_gt": { "type": "string", "nullable": true }, - "first": { - "type": "integer", - "format": "int32", + "iscsi_target_iqn_gte": { + "type": "string", "nullable": true }, - "last": { - "type": "integer", - "format": "int32", + "iscsi_target_iqn_in": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true }, - "orderBy": { - "allOf": [ - { - "$ref": "#/components/schemas/NvmfNamespaceOrderByInput" - } - ], + "iscsi_target_iqn_lt": { + "type": "string", "nullable": true }, - "skip": { - "type": "integer", - "format": "int32", + "iscsi_target_iqn_lte": { + "type": "string", "nullable": true }, - "where": { - "allOf": [ - { - "$ref": "#/components/schemas/NvmfNamespaceWhereInput" - } - ], + "iscsi_target_iqn_not": { + "type": "string", "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "ContentLibraryImageOrderByInput": { - "enum": [ - "createdAt_ASC", - "createdAt_DESC", - "description_ASC", - "description_DESC", - "entityAsyncStatus_ASC", - "entityAsyncStatus_DESC", - "id_ASC", - "id_DESC", - "name_ASC", - "name_DESC", - "path_ASC", - "path_DESC", - "size_ASC", - "size_DESC" - ], - "type": "string" - }, - "GetContentLibraryImagesRequestBody": { - "properties": { - "after": { + }, + "iscsi_target_iqn_not_contains": { "type": "string", "nullable": true }, - "before": { + "iscsi_target_iqn_not_ends_with": { "type": "string", "nullable": true }, - "first": { - "type": "integer", - "format": "int32", + "iscsi_target_iqn_not_in": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true }, - "last": { - "type": "integer", - "format": "int32", + "iscsi_target_iqn_not_starts_with": { + "type": "string", "nullable": true }, - "orderBy": { - "allOf": [ - { - "$ref": "#/components/schemas/ContentLibraryImageOrderByInput" - } - ], + "iscsi_target_iqn_starts_with": { + "type": "string", "nullable": true }, - "skip": { - "type": "integer", - "format": "int32", + "name": { + "type": "string", "nullable": true }, - "where": { - "allOf": [ - { - "$ref": "#/components/schemas/ContentLibraryImageWhereInput" - } - ], + "name_contains": { + "type": "string", "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "NvmfNamespaceSnapshotOrderByInput": { - "enum": [ - "entityAsyncStatus_ASC", - "entityAsyncStatus_DESC", - "id_ASC", - "id_DESC", - "local_created_at_ASC", - "local_created_at_DESC", - "local_id_ASC", - "local_id_DESC", - "name_ASC", - "name_DESC", - "unique_size_ASC", - "unique_size_DESC" - ], - "type": "string" - }, - "GetNvmfNamespaceSnapshotsRequestBody": { - "properties": { - "after": { + }, + "name_ends_with": { "type": "string", "nullable": true }, - "before": { + "name_gt": { "type": "string", "nullable": true }, - "first": { - "type": "integer", - "format": "int32", + "name_gte": { + "type": "string", "nullable": true }, - "last": { - "type": "integer", - "format": "int32", + "name_in": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true }, - "orderBy": { - "allOf": [ - { - "$ref": "#/components/schemas/NvmfNamespaceSnapshotOrderByInput" - } - ], + "name_lt": { + "type": "string", "nullable": true }, - "skip": { - "type": "integer", - "format": "int32", + "name_lte": { + "type": "string", "nullable": true }, - "where": { - "allOf": [ - { - "$ref": "#/components/schemas/NvmfNamespaceSnapshotWhereInput" - } - ], + "name_not": { + "type": "string", "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "ContentLibraryVmTemplateOrderByInput": { - "enum": [ - "architecture_ASC", - "architecture_DESC", - "cloud_init_supported_ASC", - "cloud_init_supported_DESC", - "createdAt_ASC", - "createdAt_DESC", - "description_ASC", - "description_DESC", - "entityAsyncStatus_ASC", - "entityAsyncStatus_DESC", - "id_ASC", - "id_DESC", - "memory_ASC", - "memory_DESC", - "name_ASC", - "name_DESC", - "os_ASC", - "os_DESC", - "size_ASC", - "size_DESC", - "vcpu_ASC", - "vcpu_DESC" - ], - "type": "string" - }, - "GetContentLibraryVmTemplatesRequestBody": { - "properties": { - "after": { + }, + "name_not_contains": { "type": "string", "nullable": true }, - "before": { + "name_not_ends_with": { "type": "string", "nullable": true }, - "first": { - "type": "integer", - "format": "int32", + "name_not_in": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true }, - "last": { - "type": "integer", - "format": "int32", + "name_not_starts_with": { + "type": "string", "nullable": true }, - "orderBy": { - "allOf": [ - { - "$ref": "#/components/schemas/ContentLibraryVmTemplateOrderByInput" - } - ], + "name_starts_with": { + "type": "string", "nullable": true }, - "skip": { - "type": "integer", - "format": "int32", + "nfs_path": { + "type": "string", "nullable": true }, - "where": { - "allOf": [ - { - "$ref": "#/components/schemas/ContentLibraryVmTemplateWhereInput" - } - ], + "nfs_path_contains": { + "type": "string", "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "NvmfSubsystemOrderByInput": { - "enum": [ - "bps_ASC", - "bps_DESC", - "bps_max_ASC", - "bps_max_DESC", - "bps_max_length_ASC", - "bps_max_length_DESC", - "bps_rd_ASC", - "bps_rd_DESC", - "bps_rd_max_ASC", - "bps_rd_max_DESC", - "bps_rd_max_length_ASC", - "bps_rd_max_length_DESC", - "bps_wr_ASC", - "bps_wr_DESC", - "bps_wr_max_ASC", - "bps_wr_max_DESC", - "bps_wr_max_length_ASC", - "bps_wr_max_length_DESC", - "description_ASC", - "description_DESC", - "entityAsyncStatus_ASC", - "entityAsyncStatus_DESC", - "external_use_ASC", - "external_use_DESC", - "id_ASC", - "id_DESC", - "internal_ASC", - "internal_DESC", - "io_size_ASC", - "io_size_DESC", - "iops_ASC", - "iops_DESC", - "iops_max_ASC", - "iops_max_DESC", - "iops_max_length_ASC", - "iops_max_length_DESC", - "iops_rd_ASC", - "iops_rd_DESC", - "iops_rd_max_ASC", - "iops_rd_max_DESC", - "iops_rd_max_length_ASC", - "iops_rd_max_length_DESC", - "iops_wr_ASC", - "iops_wr_DESC", - "iops_wr_max_ASC", - "iops_wr_max_DESC", - "iops_wr_max_length_ASC", - "iops_wr_max_length_DESC", - "ip_whitelist_ASC", - "ip_whitelist_DESC", - "local_id_ASC", - "local_id_DESC", - "name_ASC", - "name_DESC", - "nqn_name_ASC", - "nqn_name_DESC", - "nqn_whitelist_ASC", - "nqn_whitelist_DESC", - "policy_ASC", - "policy_DESC", - "replica_num_ASC", - "replica_num_DESC", - "stripe_num_ASC", - "stripe_num_DESC", - "stripe_size_ASC", - "stripe_size_DESC", - "thin_provision_ASC", - "thin_provision_DESC" - ], - "type": "string" - }, - "GetNvmfSubsystemsRequestBody": { - "properties": { - "after": { + }, + "nfs_path_ends_with": { "type": "string", "nullable": true }, - "before": { + "nfs_path_gt": { "type": "string", "nullable": true }, - "first": { - "type": "integer", - "format": "int32", + "nfs_path_gte": { + "type": "string", "nullable": true }, - "last": { - "type": "integer", - "format": "int32", + "nfs_path_in": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true }, - "orderBy": { - "allOf": [ - { - "$ref": "#/components/schemas/NvmfSubsystemOrderByInput" - } - ], + "nfs_path_lt": { + "type": "string", "nullable": true }, - "skip": { - "type": "integer", - "format": "int32", + "nfs_path_lte": { + "type": "string", "nullable": true }, - "where": { - "allOf": [ - { - "$ref": "#/components/schemas/NvmfSubsystemWhereInput" - } - ], + "nfs_path_not": { + "type": "string", "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "TableReporterParams": { - "properties": { - "filter": { - "properties": { - "nvmfSubsystems": { - "$ref": "#/components/schemas/GetNvmfSubsystemsRequestBody" - }, - "contentLibraryVmTemplates": { - "$ref": "#/components/schemas/GetContentLibraryVmTemplatesRequestBody" - }, - "nvmfNamespaceSnapshots": { - "$ref": "#/components/schemas/GetNvmfNamespaceSnapshotsRequestBody" - }, - "contentLibraryImages": { - "$ref": "#/components/schemas/GetContentLibraryImagesRequestBody" - }, - "nvmfNamespaces": { - "$ref": "#/components/schemas/GetNvmfNamespacesRequestBody" - }, - "namespaceGroups": { - "$ref": "#/components/schemas/GetNamespaceGroupsRequestBody" - }, - "iscsiLuns": { - "$ref": "#/components/schemas/GetIscsiLunsRequestBody" - }, - "tasks": { - "$ref": "#/components/schemas/GetTasksRequestBody" - }, - "userAuditLogs": { - "$ref": "#/components/schemas/GetUserAuditLogsRequestBody" - }, - "systemAuditLogs": { - "$ref": "#/components/schemas/GetSystemAuditLogsRequestBody" - }, - "iscsiLunSnapshots": { - "$ref": "#/components/schemas/GetIscsiLunSnapshotsRequestBody" - }, - "iscsiConnections": { - "$ref": "#/components/schemas/GetIscsiConnectionsRequestBody" - }, - "consistencyGroups": { - "$ref": "#/components/schemas/GetConsistencyGroupsRequestBody" - }, - "users": { - "$ref": "#/components/schemas/GetUsersRequestBody" - }, - "vmEntityFilters": { - "$ref": "#/components/schemas/GetEntityFiltersRequestBody" - }, - "snapshotPlans": { - "$ref": "#/components/schemas/GetSnapshotPlansRequestBody" - }, - "globalAlertRules": { - "$ref": "#/components/schemas/GetGlobalAlertRulesRequestBody" - }, - "alerts": { - "$ref": "#/components/schemas/GetAlertsRequestBody" - }, - "vmPlacementGroups": { - "$ref": "#/components/schemas/GetVmPlacementGroupsRequestBody" - }, - "vmTemplates": { - "$ref": "#/components/schemas/GetVmTemplatesRequestBody" - }, - "elfImages": { - "$ref": "#/components/schemas/GetElfImagesRequestBody" - }, - "vmVolumes": { - "$ref": "#/components/schemas/GetVmVolumesRequestBody" - }, - "vlans": { - "$ref": "#/components/schemas/GetVlansRequestBody" - }, - "disks": { - "$ref": "#/components/schemas/GetDisksRequestBody" - }, - "vdses": { - "$ref": "#/components/schemas/GetVdsesRequestBody" - }, - "elfDataStores": { - "$ref": "#/components/schemas/GetElfDataStoresRequestBody", - "deprecated": true - }, - "vms": { - "$ref": "#/components/schemas/GetVmsRequestBody" - }, - "nfsExports": { - "$ref": "#/components/schemas/GetNfsExportsRequestBody" - }, - "iscsiTargets": { - "$ref": "#/components/schemas/GetIscsiTargetsRequestBody" - }, - "usbDevices": { - "$ref": "#/components/schemas/GetUsbDevicesRequestBody" - }, - "nics": { - "$ref": "#/components/schemas/GetNicsRequestBody" - }, - "clusters": { - "$ref": "#/components/schemas/GetClustersRequestBody" - }, - "datacenters": { - "$ref": "#/components/schemas/GetDatacentersRequestBody" - }, - "hosts": { - "$ref": "#/components/schemas/GetHostsRequestBody" - } - }, - "type": "object" - }, - "columns": { - "items": { - "$ref": "#/components/schemas/ColumnConfig" - }, - "type": "array" }, - "name": { - "type": "string" - } - }, - "required": [ - "filter", - "columns", - "name" - ], - "type": "object" - }, - "WithTask_Task_": { - "properties": { - "task_id": { + "nfs_path_not_contains": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/Task" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "TaskDescription": { - "properties": { - "en-US": { - "type": "string" - }, - "zh-CN": { - "type": "string" - } - }, - "required": [ - "en-US", - "zh-CN" - ], - "type": "object" - }, - "TaskStepCreationParams": { - "properties": { - "description": { - "type": "string" - }, - "finished": { - "type": "boolean" - }, - "key": { + "nfs_path_not_ends_with": { "type": "string", - "minLength": 1 - } - }, - "required": [ - "finished", - "key" - ], - "type": "object" - }, - "TaskCreationParams": { - "properties": { - "steps": { + "nullable": true + }, + "nfs_path_not_in": { "items": { - "$ref": "#/components/schemas/TaskStepCreationParams" + "type": "string" }, - "type": "array" - }, - "args": { - "additionalProperties": false, - "type": "object" - }, - "key": { - "type": "string" - }, - "internal": { - "type": "boolean" + "type": "array", + "nullable": true }, - "type": { - "$ref": "#/components/schemas/TaskType" + "nfs_path_not_starts_with": { + "type": "string", + "nullable": true }, - "resource_id": { - "type": "string" + "nfs_path_starts_with": { + "type": "string", + "nullable": true }, - "cluster_id": { - "type": "string" + "nfs_server": { + "type": "string", + "nullable": true }, - "user_id": { - "type": "string" + "nfs_server_contains": { + "type": "string", + "nullable": true }, - "description": { - "$ref": "#/components/schemas/TaskDescription" + "nfs_server_ends_with": { + "type": "string", + "nullable": true }, - "resource_mutation": { + "nfs_server_gt": { "type": "string", - "minLength": 1 + "nullable": true }, - "resource_type": { + "nfs_server_gte": { "type": "string", - "minLength": 1 - } - }, - "required": [ - "user_id", - "description", - "resource_mutation", - "resource_type" - ], - "type": "object" - }, - "TaskUpdateParams": { - "properties": { - "data": { - "properties": { - "resource_rollback_retry_count": { - "type": "integer", - "format": "int32" - }, - "resource_rollback_error": { - "type": "string" - }, - "resource_rollbacked": { - "type": "boolean" - }, - "steps": { - "items": { - "$ref": "#/components/schemas/TaskStepCreationParams" - }, - "type": "array" - }, - "error_message": { - "type": "string" - }, - "error_code": { - "type": "string" - }, - "progress": { - "type": "number", - "format": "float" - }, - "status": { - "$ref": "#/components/schemas/TaskStatus" - }, - "snapshot": { - "type": "string" - }, - "args": { - "additionalProperties": false, - "type": "object" - }, - "key": { - "type": "string" - }, - "type": { - "$ref": "#/components/schemas/TaskType" - }, - "resource_id": { - "type": "string" - }, - "cluster_id": { - "type": "string" - }, - "user_id": { - "type": "string" - }, - "resource_mutation": { - "type": "string" - }, - "resource_type": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "type": "object" + "nullable": true }, - "where": { - "$ref": "#/components/schemas/TaskWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "UploadTaskWhereInput": { - "properties": { - "AND": { + "nfs_server_in": { "items": { - "$ref": "#/components/schemas/UploadTaskWhereInput" + "type": "string" }, "type": "array", "nullable": true }, - "NOT": { - "items": { - "$ref": "#/components/schemas/UploadTaskWhereInput" - }, - "type": "array", + "nfs_server_lt": { + "type": "string", "nullable": true }, - "OR": { - "items": { - "$ref": "#/components/schemas/UploadTaskWhereInput" - }, - "type": "array", + "nfs_server_lte": { + "type": "string", "nullable": true }, - "chunk_size": { - "type": "integer", - "format": "int64", + "nfs_server_not": { + "type": "string", "nullable": true }, - "chunk_size_gt": { - "type": "integer", - "format": "int64", + "nfs_server_not_contains": { + "type": "string", "nullable": true }, - "chunk_size_gte": { - "type": "integer", - "format": "int64", + "nfs_server_not_ends_with": { + "type": "string", "nullable": true }, - "chunk_size_in": { + "nfs_server_not_in": { "items": { - "type": "integer", - "format": "int64" + "type": "string" }, "type": "array", "nullable": true }, - "chunk_size_lt": { - "type": "integer", - "format": "int64", + "nfs_server_not_starts_with": { + "type": "string", "nullable": true }, - "chunk_size_lte": { + "nfs_server_starts_with": { + "type": "string", + "nullable": true + }, + "resource_version_gt": { "type": "integer", - "format": "int64", + "format": "int32", "nullable": true }, - "chunk_size_not": { + "resource_version_gte": { "type": "integer", - "format": "int64", + "format": "int32", "nullable": true }, - "chunk_size_not_in": { + "resource_version_in": { "items": { "type": "integer", - "format": "int64" + "format": "int32" }, "type": "array", "nullable": true }, - "current_chunk": { + "resource_version_lt": { "type": "integer", "format": "int32", "nullable": true }, - "current_chunk_gt": { + "resource_version_lte": { "type": "integer", "format": "int32", "nullable": true }, - "current_chunk_gte": { + "resource_version_not": { "type": "integer", "format": "int32", "nullable": true }, - "current_chunk_in": { + "resource_version_not_in": { "items": { "type": "integer", "format": "int32" @@ -90269,175 +90085,190 @@ "type": "array", "nullable": true }, - "current_chunk_lt": { + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupStoreStatus" + } + ], + "nullable": true + }, + "status_in": { + "items": { + "$ref": "#/components/schemas/BackupStoreStatus" + }, + "type": "array", + "nullable": true + }, + "status_not": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupStoreStatus" + } + ], + "nullable": true + }, + "status_not_in": { + "items": { + "$ref": "#/components/schemas/BackupStoreStatus" + }, + "type": "array", + "nullable": true + }, + "total_capacity": { "type": "integer", - "format": "int32", + "format": "int64", "nullable": true }, - "current_chunk_lte": { + "total_capacity_gt": { "type": "integer", - "format": "int32", + "format": "int64", "nullable": true }, - "current_chunk_not": { + "total_capacity_gte": { "type": "integer", - "format": "int32", + "format": "int64", "nullable": true }, - "current_chunk_not_in": { + "total_capacity_in": { "items": { "type": "integer", - "format": "int32" + "format": "int64" }, "type": "array", "nullable": true }, - "finished_at": { - "type": "string", + "total_capacity_lt": { + "type": "integer", + "format": "int64", "nullable": true }, - "finished_at_gt": { - "type": "string", + "total_capacity_lte": { + "type": "integer", + "format": "int64", "nullable": true }, - "finished_at_gte": { - "type": "string", + "total_capacity_not": { + "type": "integer", + "format": "int64", "nullable": true }, - "finished_at_in": { + "total_capacity_not_in": { "items": { - "type": "string" + "type": "integer", + "format": "int64" }, "type": "array", "nullable": true }, - "finished_at_lt": { - "type": "string", + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupStoreType" + } + ], "nullable": true }, - "finished_at_lte": { - "type": "string", + "type_in": { + "items": { + "$ref": "#/components/schemas/BackupStoreType" + }, + "type": "array", "nullable": true }, - "finished_at_not": { - "type": "string", + "type_not": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupStoreType" + } + ], "nullable": true }, - "finished_at_not_in": { + "type_not_in": { "items": { - "type": "string" + "$ref": "#/components/schemas/BackupStoreType" }, "type": "array", "nullable": true }, - "id": { + "update_timestamp": { "type": "string", "nullable": true }, - "id_contains": { + "update_timestamp_contains": { "type": "string", "nullable": true }, - "id_ends_with": { + "update_timestamp_ends_with": { "type": "string", "nullable": true }, - "id_gt": { + "update_timestamp_gt": { "type": "string", "nullable": true }, - "id_gte": { + "update_timestamp_gte": { "type": "string", "nullable": true }, - "id_in": { + "update_timestamp_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "id_lt": { + "update_timestamp_lt": { "type": "string", "nullable": true }, - "id_lte": { + "update_timestamp_lte": { "type": "string", "nullable": true }, - "id_not": { + "update_timestamp_not": { "type": "string", "nullable": true }, - "id_not_contains": { + "update_timestamp_not_contains": { "type": "string", "nullable": true }, - "id_not_ends_with": { + "update_timestamp_not_ends_with": { "type": "string", "nullable": true }, - "id_not_in": { + "update_timestamp_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "id_not_starts_with": { + "update_timestamp_not_starts_with": { "type": "string", "nullable": true }, - "id_starts_with": { + "update_timestamp_starts_with": { "type": "string", "nullable": true }, - "resource_type": { - "allOf": [ - { - "$ref": "#/components/schemas/UploadResourceType" - } - ], - "nullable": true - }, - "resource_type_in": { - "items": { - "$ref": "#/components/schemas/UploadResourceType" - }, - "type": "array", - "nullable": true - }, - "resource_type_not": { - "allOf": [ - { - "$ref": "#/components/schemas/UploadResourceType" - } - ], - "nullable": true - }, - "resource_type_not_in": { - "items": { - "$ref": "#/components/schemas/UploadResourceType" - }, - "type": "array", - "nullable": true - }, - "size": { + "used_data_space": { "type": "integer", "format": "int64", "nullable": true }, - "size_gt": { + "used_data_space_gt": { "type": "integer", "format": "int64", "nullable": true }, - "size_gte": { + "used_data_space_gte": { "type": "integer", "format": "int64", "nullable": true }, - "size_in": { + "used_data_space_in": { "items": { "type": "integer", "format": "int64" @@ -90445,22 +90276,22 @@ "type": "array", "nullable": true }, - "size_lt": { + "used_data_space_lt": { "type": "integer", "format": "int64", "nullable": true }, - "size_lte": { + "used_data_space_lte": { "type": "integer", "format": "int64", "nullable": true }, - "size_not": { + "used_data_space_not": { "type": "integer", "format": "int64", "nullable": true }, - "size_not_in": { + "used_data_space_not_in": { "items": { "type": "integer", "format": "int64" @@ -90468,1831 +90299,1113 @@ "type": "array", "nullable": true }, - "started_at": { - "type": "string", + "used_data_space_usage": { + "type": "number", + "format": "double", "nullable": true }, - "started_at_gt": { - "type": "string", + "used_data_space_usage_gt": { + "type": "number", + "format": "double", "nullable": true }, - "started_at_gte": { - "type": "string", + "used_data_space_usage_gte": { + "type": "number", + "format": "double", "nullable": true }, - "started_at_in": { + "used_data_space_usage_in": { "items": { - "type": "string" + "type": "number", + "format": "double" }, "type": "array", "nullable": true }, - "started_at_lt": { - "type": "string", + "used_data_space_usage_lt": { + "type": "number", + "format": "double", "nullable": true }, - "started_at_lte": { - "type": "string", + "used_data_space_usage_lte": { + "type": "number", + "format": "double", "nullable": true }, - "started_at_not": { - "type": "string", + "used_data_space_usage_not": { + "type": "number", + "format": "double", "nullable": true }, - "started_at_not_in": { + "used_data_space_usage_not_in": { "items": { - "type": "string" + "type": "number", + "format": "double" }, "type": "array", "nullable": true }, - "status": { + "valid_data_space": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "valid_data_space_gt": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "valid_data_space_gte": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "valid_data_space_in": { + "items": { + "type": "integer", + "format": "int64" + }, + "type": "array", + "nullable": true + }, + "valid_data_space_lt": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "valid_data_space_lte": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "valid_data_space_not": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "valid_data_space_not_in": { + "items": { + "type": "integer", + "format": "int64" + }, + "type": "array", + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "BackupRestorePointWhereInput": { + "properties": { + "AND": { + "items": { + "$ref": "#/components/schemas/BackupRestorePointWhereInput" + }, + "type": "array", + "nullable": true + }, + "NOT": { + "items": { + "$ref": "#/components/schemas/BackupRestorePointWhereInput" + }, + "type": "array", + "nullable": true + }, + "OR": { + "items": { + "$ref": "#/components/schemas/BackupRestorePointWhereInput" + }, + "type": "array", + "nullable": true + }, + "backup_plan": { "allOf": [ { - "$ref": "#/components/schemas/UploadTaskStatus" + "$ref": "#/components/schemas/BackupPlanWhereInput" } ], "nullable": true }, - "status_in": { - "items": { - "$ref": "#/components/schemas/UploadTaskStatus" - }, - "type": "array", + "backup_restore_executions_every": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupRestoreExecutionWhereInput" + } + ], "nullable": true }, - "status_not": { + "backup_restore_executions_none": { "allOf": [ { - "$ref": "#/components/schemas/UploadTaskStatus" + "$ref": "#/components/schemas/BackupRestoreExecutionWhereInput" } ], "nullable": true }, - "status_not_in": { - "items": { - "$ref": "#/components/schemas/UploadTaskStatus" - }, - "type": "array", + "backup_restore_executions_some": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupRestoreExecutionWhereInput" + } + ], "nullable": true }, - "updatedAt": { + "backup_target_execution": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupTargetExecutionWhereInput" + } + ], + "nullable": true + }, + "cluster_local_id": { "type": "string", "nullable": true }, - "updatedAt_gt": { + "cluster_local_id_contains": { "type": "string", "nullable": true }, - "updatedAt_gte": { + "cluster_local_id_ends_with": { "type": "string", "nullable": true }, - "updatedAt_in": { + "cluster_local_id_gt": { + "type": "string", + "nullable": true + }, + "cluster_local_id_gte": { + "type": "string", + "nullable": true + }, + "cluster_local_id_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "updatedAt_lt": { + "cluster_local_id_lt": { "type": "string", "nullable": true }, - "updatedAt_lte": { + "cluster_local_id_lte": { "type": "string", "nullable": true }, - "updatedAt_not": { + "cluster_local_id_not": { "type": "string", "nullable": true }, - "updatedAt_not_in": { + "cluster_local_id_not_contains": { + "type": "string", + "nullable": true + }, + "cluster_local_id_not_ends_with": { + "type": "string", + "nullable": true + }, + "cluster_local_id_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "CancelUploadTaskParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/UploadTaskWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "UsbDevice": { - "properties": { - "binded": { - "type": "boolean" }, - "description": { - "type": "string" + "cluster_local_id_not_starts_with": { + "type": "string", + "nullable": true }, - "entityAsyncStatus": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" - } - ], + "cluster_local_id_starts_with": { + "type": "string", "nullable": true }, - "host": { - "$ref": "#/components/schemas/NestedHost" + "compressed": { + "type": "boolean", + "nullable": true }, - "id": { - "type": "string" + "compressed_not": { + "type": "boolean", + "nullable": true }, - "local_created_at": { - "type": "string" + "compression_ratio": { + "type": "number", + "format": "double", + "nullable": true }, - "local_id": { - "type": "string" + "compression_ratio_gt": { + "type": "number", + "format": "double", + "nullable": true }, - "manufacturer": { - "type": "string" + "compression_ratio_gte": { + "type": "number", + "format": "double", + "nullable": true }, - "name": { - "type": "string" + "compression_ratio_in": { + "items": { + "type": "number", + "format": "double" + }, + "type": "array", + "nullable": true }, - "size": { - "type": "integer", - "format": "int64" + "compression_ratio_lt": { + "type": "number", + "format": "double", + "nullable": true }, - "status": { - "$ref": "#/components/schemas/UsbDeviceStatus" + "compression_ratio_lte": { + "type": "number", + "format": "double", + "nullable": true }, - "usb_type": { - "type": "string" + "compression_ratio_not": { + "type": "number", + "format": "double", + "nullable": true }, - "vms": { + "compression_ratio_not_in": { "items": { - "$ref": "#/components/schemas/NestedVm" + "type": "number", + "format": "double" }, "type": "array", "nullable": true }, - "vm": { + "creation": { "allOf": [ { - "$ref": "#/components/schemas/NestedVm" + "$ref": "#/components/schemas/BackupRestorePointCreation" } ], - "nullable": true, - "deprecated": true - } - }, - "required": [ - "binded", - "description", - "host", - "id", - "local_created_at", - "local_id", - "manufacturer", - "name", - "size", - "status", - "usb_type" - ], - "type": "object", - "additionalProperties": false - }, - "WithTask_UsbDevice_": { - "properties": { - "task_id": { - "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/UsbDevice" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "UsbDeviceMountParams": { - "properties": { - "data": { - "properties": { - "vms": { - "$ref": "#/components/schemas/VmWhereInput" - }, - "vm_id": { - "type": "string", - "deprecated": true - } + "creation_in": { + "items": { + "$ref": "#/components/schemas/BackupRestorePointCreation" }, - "type": "object" + "type": "array", + "nullable": true }, - "where": { - "$ref": "#/components/schemas/UsbDeviceWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "UsbDeviceUnmountParams": { - "properties": { - "data": { - "properties": { - "vms": { - "$ref": "#/components/schemas/VmWhereInput" + "creation_not": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupRestorePointCreation" } - }, - "required": [ - "vms" ], - "type": "object" - }, - "where": { - "$ref": "#/components/schemas/UsbDeviceWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "LoginResponse": { - "properties": { - "token": { - "type": "string" - } - }, - "required": [ - "token" - ], - "type": "object" - }, - "WithTask_LoginResponse_": { - "properties": { - "task_id": { - "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/LoginResponse" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "MfaType": { - "enum": [ - "Mail" - ], - "type": "string" - }, - "LoginInput": { - "properties": { - "username": { - "type": "string" + "creation_not_in": { + "items": { + "$ref": "#/components/schemas/BackupRestorePointCreation" + }, + "type": "array", + "nullable": true }, - "source": { + "entityAsyncStatus": { "allOf": [ { - "$ref": "#/components/schemas/UserSource" + "$ref": "#/components/schemas/EntityAsyncStatus" } ], "nullable": true }, - "password": { - "type": "string" + "entityAsyncStatus_in": { + "items": { + "$ref": "#/components/schemas/EntityAsyncStatus" + }, + "type": "array", + "nullable": true }, - "mfa_type": { + "entityAsyncStatus_not": { "allOf": [ { - "$ref": "#/components/schemas/MfaType" + "$ref": "#/components/schemas/EntityAsyncStatus" } ], "nullable": true }, - "auth_config_id": { - "type": "string", - "nullable": true - } - }, - "required": [ - "username", - "password" - ], - "type": "object" - }, - "NestedPasswordReoverQaItem": { - "properties": { - "question": { - "type": "string" - } - }, - "required": [ - "question" - ], - "type": "object", - "additionalProperties": false - }, - "NestedPasswordRecoverQa": { - "properties": { - "enabled": { - "type": "boolean" - }, - "items": { + "entityAsyncStatus_not_in": { "items": { - "$ref": "#/components/schemas/NestedPasswordReoverQaItem" + "$ref": "#/components/schemas/EntityAsyncStatus" }, "type": "array", "nullable": true - } - }, - "required": [ - "enabled" - ], - "type": "object", - "additionalProperties": false - }, - "NestedUserRoleNext": { - "properties": { - "id": { - "type": "string" }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "type": "object", - "additionalProperties": false - }, - "User": { - "properties": { - "auth_config_id": { + "id": { "type": "string", "nullable": true }, - "display_username": { - "type": "string" - }, - "email_address": { + "id_contains": { "type": "string", "nullable": true }, - "id": { - "type": "string" - }, - "internal": { - "type": "boolean" - }, - "ldap_dn": { + "id_ends_with": { "type": "string", "nullable": true }, - "mobile_phone": { + "id_gt": { "type": "string", "nullable": true }, - "name": { - "type": "string" + "id_gte": { + "type": "string", + "nullable": true }, - "password_expired": { - "type": "boolean", + "id_in": { + "items": { + "type": "string" + }, + "type": "array", "nullable": true }, - "password_recover_qa": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedPasswordRecoverQa" - } - ], + "id_lt": { + "type": "string", "nullable": true }, - "password_updated_at": { + "id_lte": { "type": "string", "nullable": true }, - "role": { - "allOf": [ - { - "$ref": "#/components/schemas/UserRole" - } - ], + "id_not": { + "type": "string", "nullable": true }, - "roles": { + "id_not_contains": { + "type": "string", + "nullable": true + }, + "id_not_ends_with": { + "type": "string", + "nullable": true + }, + "id_not_in": { "items": { - "$ref": "#/components/schemas/NestedUserRoleNext" + "type": "string" }, "type": "array", "nullable": true }, - "source": { - "$ref": "#/components/schemas/UserSource" - }, - "username": { - "type": "string" - } - }, - "required": [ - "display_username", - "id", - "internal", - "name", - "source", - "username" - ], - "type": "object", - "additionalProperties": false - }, - "WithTask_User_": { - "properties": { - "task_id": { + "id_not_starts_with": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/User" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "UserCreationParams": { - "properties": { - "auth_config_id": { - "type": "string" - }, - "ldap_dn": { - "type": "string" - }, - "source": { - "$ref": "#/components/schemas/UserSource" - }, - "mobile_phone": { - "type": "string" - }, - "email_address": { - "type": "string" - }, - "internal": { - "type": "boolean" + "id_starts_with": { + "type": "string", + "nullable": true }, - "role_id": { - "type": "string" + "local_created_at": { + "type": "string", + "nullable": true }, - "name": { - "type": "string" + "local_created_at_gt": { + "type": "string", + "nullable": true }, - "password": { - "type": "string" + "local_created_at_gte": { + "type": "string", + "nullable": true }, - "username": { - "type": "string" - } - }, - "required": [ - "role_id", - "name", - "username" - ], - "type": "object" - }, - "UserUpdationParams": { - "properties": { - "data": { - "properties": { - "internal": { - "type": "boolean" - }, - "mobile_phone": { - "type": "string", - "nullable": true - }, - "email_address": { - "type": "string", - "nullable": true - }, - "role_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "password": { - "type": "string" - }, - "username": { - "type": "string" - } + "local_created_at_in": { + "items": { + "type": "string" }, - "type": "object" + "type": "array", + "nullable": true }, - "where": { - "$ref": "#/components/schemas/UserWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "DeleteUser": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "WithTask_DeleteUser_": { - "properties": { - "task_id": { + "local_created_at_lt": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/DeleteUser" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "UserDeletionParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/UserWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "RootUserCreationParams": { - "properties": { - "password": { - "type": "string" - } - }, - "required": [ - "password" - ], - "type": "object" - }, - "VcenterAccount": { - "properties": { - "cluster": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedCluster" - } - ], + "local_created_at_lte": { + "type": "string", "nullable": true }, - "id": { - "type": "string" - }, - "ip": { - "type": "string" + "local_created_at_not": { + "type": "string", + "nullable": true }, - "is_valid": { - "type": "boolean" + "local_created_at_not_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true }, "local_id": { - "type": "string" - }, - "port": { - "type": "integer", - "format": "int32" + "type": "string", + "nullable": true }, - "username": { - "type": "string" - } - }, - "required": [ - "id", - "ip", - "is_valid", - "local_id", - "port", - "username" - ], - "type": "object", - "additionalProperties": false - }, - "WithTask_VcenterAccount_": { - "properties": { - "task_id": { + "local_id_contains": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/VcenterAccount" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "CreateVcenterAccountParamsData": { - "properties": { - "port": { - "type": "integer", - "format": "int32" + "local_id_ends_with": { + "type": "string", + "nullable": true }, - "password": { - "type": "string" + "local_id_gt": { + "type": "string", + "nullable": true }, - "username": { - "type": "string" + "local_id_gte": { + "type": "string", + "nullable": true }, - "ip": { - "type": "string" + "local_id_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true }, - "cluster_id": { - "type": "string" - } - }, - "required": [ - "port", - "password", - "username", - "ip", - "cluster_id" - ], - "type": "object" - }, - "CreateVcenterAccountParams": { - "properties": { - "data": { - "$ref": "#/components/schemas/CreateVcenterAccountParamsData" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "VcenterAccountWhereUniqueInput": { - "properties": { - "id": { + "local_id_lt": { "type": "string", "nullable": true }, - "local_id": { + "local_id_lte": { "type": "string", "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "UpdateVcenterAccountParamsData": { - "properties": { - "port": { - "type": "integer", - "format": "int32" }, - "password": { - "type": "string" + "local_id_not": { + "type": "string", + "nullable": true }, - "username": { - "type": "string" + "local_id_not_contains": { + "type": "string", + "nullable": true }, - "ip": { - "type": "string" - } - }, - "required": [ - "port", - "password", - "username", - "ip" - ], - "type": "object" - }, - "UpdateVcenterAccountParams": { - "properties": { - "data": { - "$ref": "#/components/schemas/UpdateVcenterAccountParamsData" + "local_id_not_ends_with": { + "type": "string", + "nullable": true }, - "where": { - "$ref": "#/components/schemas/VcenterAccountWhereUniqueInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "Vds": { - "properties": { - "bond_mode": { - "type": "string" + "local_id_not_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true }, - "cluster": { - "$ref": "#/components/schemas/NestedCluster" + "local_id_not_starts_with": { + "type": "string", + "nullable": true }, - "entityAsyncStatus": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" - } - ], + "local_id_starts_with": { + "type": "string", "nullable": true }, - "everoute_cluster": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedEverouteCluster" - } - ], + "logical_size": { + "type": "integer", + "format": "int64", "nullable": true }, - "id": { - "type": "string" + "logical_size_gt": { + "type": "integer", + "format": "int64", + "nullable": true }, - "internal": { - "type": "boolean" + "logical_size_gte": { + "type": "integer", + "format": "int64", + "nullable": true }, - "labels": { + "logical_size_in": { "items": { - "$ref": "#/components/schemas/NestedLabel" + "type": "integer", + "format": "int64" }, "type": "array", "nullable": true }, - "local_id": { - "type": "string" + "logical_size_lt": { + "type": "integer", + "format": "int64", + "nullable": true }, - "name": { - "type": "string" + "logical_size_lte": { + "type": "integer", + "format": "int64", + "nullable": true }, - "nics": { + "logical_size_not": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "logical_size_not_in": { "items": { - "$ref": "#/components/schemas/NestedNic" + "type": "integer", + "format": "int64" }, "type": "array", "nullable": true }, - "ovsbr_name": { - "type": "string" + "parent_restore_point": { + "type": "string", + "nullable": true }, - "type": { - "$ref": "#/components/schemas/NetworkType" + "parent_restore_point_contains": { + "type": "string", + "nullable": true }, - "vlans": { + "parent_restore_point_ends_with": { + "type": "string", + "nullable": true + }, + "parent_restore_point_gt": { + "type": "string", + "nullable": true + }, + "parent_restore_point_gte": { + "type": "string", + "nullable": true + }, + "parent_restore_point_in": { "items": { - "$ref": "#/components/schemas/NestedVlan" + "type": "string" }, "type": "array", "nullable": true }, - "vlans_num": { - "type": "integer", - "format": "int32" + "parent_restore_point_lt": { + "type": "string", + "nullable": true }, - "work_mode": { + "parent_restore_point_lte": { "type": "string", "nullable": true - } - }, - "required": [ - "bond_mode", - "cluster", - "id", - "internal", - "local_id", - "name", - "ovsbr_name", - "type", - "vlans_num" - ], - "type": "object", - "additionalProperties": false - }, - "WithTask_Vds_": { - "properties": { - "task_id": { + }, + "parent_restore_point_not": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/Vds" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "VdsCreationParams": { - "properties": { - "nic_ids": { + "parent_restore_point_not_contains": { + "type": "string", + "nullable": true + }, + "parent_restore_point_not_ends_with": { + "type": "string", + "nullable": true + }, + "parent_restore_point_not_in": { "items": { "type": "string" }, - "type": "array" - }, - "cluster_id": { - "type": "string" + "type": "array", + "nullable": true }, - "work_mode": { - "type": "string" + "parent_restore_point_not_starts_with": { + "type": "string", + "nullable": true }, - "bond_mode": { - "type": "string" + "parent_restore_point_starts_with": { + "type": "string", + "nullable": true }, - "name": { - "type": "string" - } - }, - "required": [ - "nic_ids", - "cluster_id", - "name" - ], - "type": "object" - }, - "VdsCreationWithMigrateVlanParams": { - "allOf": [ - { - "$ref": "#/components/schemas/VdsCreationParams" + "physical_size": { + "type": "integer", + "format": "int64", + "nullable": true }, - { - "properties": { - "vlan": { - "properties": { - "extra_ip": { - "items": { - "properties": { - "management_ip": { - "type": "string" - }, - "host_id": { - "type": "string" - } - }, - "required": [ - "management_ip", - "host_id" - ], - "type": "object" - }, - "type": "array" - }, - "subnetmask": { - "type": "string" - }, - "gateway_subnetmask": { - "type": "string" - }, - "gateway_ip": { - "type": "string" - }, - "vlan_id": { - "type": "integer", - "format": "int32" - } - }, - "required": [ - "extra_ip", - "subnetmask", - "vlan_id" - ], - "type": "object" - } - }, - "required": [ - "vlan" - ], - "type": "object" - } - ] - }, - "VdsCreationWithMAccessVlanParams": { - "allOf": [ - { - "$ref": "#/components/schemas/VdsCreationParams" + "physical_size_gt": { + "type": "integer", + "format": "int64", + "nullable": true }, - { - "properties": { - "vlan": { - "properties": { - "extra_ip": { - "items": { - "properties": { - "management_ip": { - "type": "string" - }, - "host_id": { - "type": "string" - } - }, - "required": [ - "management_ip", - "host_id" - ], - "type": "object" - }, - "type": "array" - }, - "subnetmask": { - "type": "string" - }, - "gateway_subnetmask": { - "type": "string" - }, - "gateway_ip": { - "type": "string" - }, - "vlan_id": { - "type": "integer", - "format": "int32" - } - }, - "required": [ - "extra_ip", - "subnetmask", - "vlan_id" - ], - "type": "object" - } - }, - "required": [ - "vlan" - ], - "type": "object" - } - ] - }, - "VdsUpdationParams": { - "properties": { - "data": { - "properties": { - "nicIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "work_mode": { - "type": "string" - }, - "bond_mode": { - "type": "string" - }, - "name": { - "type": "string" - } + "physical_size_gte": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "physical_size_in": { + "items": { + "type": "integer", + "format": "int64" }, - "type": "object" + "type": "array", + "nullable": true }, - "where": { - "$ref": "#/components/schemas/VdsWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "DeleteVds": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "WithTask_DeleteVds_": { - "properties": { - "task_id": { - "type": "string", + "physical_size_lt": { + "type": "integer", + "format": "int64", "nullable": true }, - "data": { - "$ref": "#/components/schemas/DeleteVds" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "VdsDeletionParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/VdsWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "NestedGraph": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object", - "additionalProperties": false - }, - "View": { - "properties": { - "cluster": { - "$ref": "#/components/schemas/NestedCluster" + "physical_size_lte": { + "type": "integer", + "format": "int64", + "nullable": true }, - "entityAsyncStatus": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" - } - ], + "physical_size_not": { + "type": "integer", + "format": "int64", "nullable": true }, - "graphs": { + "physical_size_not_in": { "items": { - "$ref": "#/components/schemas/NestedGraph" + "type": "integer", + "format": "int64" }, "type": "array", "nullable": true }, - "id": { - "type": "string" + "resource_version_gt": { + "type": "integer", + "format": "int32", + "nullable": true }, - "local_id": { - "type": "string" + "resource_version_gte": { + "type": "integer", + "format": "int32", + "nullable": true }, - "name": { - "type": "string" + "resource_version_in": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", + "nullable": true }, - "time_span": { + "resource_version_lt": { "type": "integer", - "format": "int32" + "format": "int32", + "nullable": true }, - "time_unit": { - "$ref": "#/components/schemas/TimeUnit" - } - }, - "required": [ - "cluster", - "id", - "local_id", - "name", - "time_span", - "time_unit" - ], - "type": "object", - "additionalProperties": false - }, - "WithTask_View_": { - "properties": { - "task_id": { - "type": "string", + "resource_version_lte": { + "type": "integer", + "format": "int32", "nullable": true }, - "data": { - "$ref": "#/components/schemas/View" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "ViewCreationParams": { - "properties": { - "time_unit": { - "$ref": "#/components/schemas/TimeUnit" + "resource_version_not": { + "type": "integer", + "format": "int32", + "nullable": true }, - "time_span": { + "resource_version_not_in": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", + "nullable": true + }, + "size": { "type": "integer", - "format": "int32" + "format": "int64", + "nullable": true }, - "cluster_id": { - "type": "string" + "size_gt": { + "type": "integer", + "format": "int64", + "nullable": true }, - "name": { - "type": "string" - } - }, - "required": [ - "time_unit", - "time_span", - "cluster_id", - "name" - ], - "type": "object" - }, - "ViewUpdationParams": { - "properties": { - "data": { - "properties": { - "time_unit": { - "$ref": "#/components/schemas/TimeUnit" - }, - "time_span": { - "type": "integer", - "format": "int32" - }, - "name": { - "type": "string" - } + "size_gte": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "size_in": { + "items": { + "type": "integer", + "format": "int64" }, - "type": "object" + "type": "array", + "nullable": true }, - "where": { - "$ref": "#/components/schemas/ViewWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "DeleteView": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "WithTask_DeleteView_": { - "properties": { - "task_id": { - "type": "string", + "size_lt": { + "type": "integer", + "format": "int64", "nullable": true }, - "data": { - "$ref": "#/components/schemas/DeleteView" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "ViewDeletionParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/ViewWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "NestedVirtualPrivateCloudExternalSubnet": { - "properties": { - "floating_ip_cidr": { - "type": "string", + "size_lte": { + "type": "integer", + "format": "int64", "nullable": true }, - "id": { - "type": "string" + "size_not": { + "type": "integer", + "format": "int64", + "nullable": true }, - "name": { - "type": "string" + "size_not_in": { + "items": { + "type": "integer", + "format": "int64" + }, + "type": "array", + "nullable": true }, - "nat_gateway_cidr": { + "slice": { "type": "string", "nullable": true }, - "router_gateway_cidr": { + "slice_contains": { "type": "string", "nullable": true - } - }, - "required": [ - "id", - "name" - ], - "type": "object", - "additionalProperties": false - }, - "NestedVirtualPrivateCloud": { - "properties": { - "id": { - "type": "string" }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "type": "object", - "additionalProperties": false - }, - "VirtualPrivateCloudFloatingIp": { - "properties": { - "entityAsyncStatus": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" - } - ], + "slice_ends_with": { + "type": "string", "nullable": true }, - "external_ip": { + "slice_gt": { "type": "string", "nullable": true }, - "external_subnet": { - "$ref": "#/components/schemas/NestedVirtualPrivateCloudExternalSubnet" - }, - "id": { - "type": "string" + "slice_gte": { + "type": "string", + "nullable": true }, - "local_id": { - "type": "string" + "slice_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true }, - "vpc": { - "$ref": "#/components/schemas/NestedVirtualPrivateCloud" - } - }, - "required": [ - "external_subnet", - "id", - "local_id", - "vpc" - ], - "type": "object", - "additionalProperties": false - }, - "WithTask_VirtualPrivateCloudFloatingIp_": { - "properties": { - "task_id": { + "slice_lt": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/VirtualPrivateCloudFloatingIp" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "VirtualPrivateCloudFloatingIpCreationParams": { - "properties": { - "external_ip": { - "type": "string" - }, - "external_subnet_id": { - "type": "string" + "slice_lte": { + "type": "string", + "nullable": true }, - "vpc_id": { - "type": "string" - } - }, - "required": [ - "external_subnet_id", - "vpc_id" - ], - "type": "object" - }, - "DeleteVirtualPrivateCloudFloatingIp": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "WithTask_DeleteVirtualPrivateCloudFloatingIp_": { - "properties": { - "task_id": { + "slice_not": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/DeleteVirtualPrivateCloudFloatingIp" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "VirtualPrivateCloudFloatingIpDeletionParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/VirtualPrivateCloudFloatingIpWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "NestedVpcDnatRuleType": { - "properties": { - "port": { - "type": "integer", - "format": "int32" + "slice_not_contains": { + "type": "string", + "nullable": true }, - "target_ip": { - "type": "string" + "slice_not_ends_with": { + "type": "string", + "nullable": true }, - "target_port": { - "type": "integer", - "format": "int32" - } - }, - "required": [ - "port", - "target_ip", - "target_port" - ], - "type": "object", - "additionalProperties": false - }, - "VirtualPrivateCloudNatGateway": { - "properties": { - "dnat_rules": { + "slice_not_in": { "items": { - "$ref": "#/components/schemas/NestedVpcDnatRuleType" + "type": "string" }, "type": "array", "nullable": true }, - "enable_dnat": { - "type": "boolean", + "slice_not_starts_with": { + "type": "string", "nullable": true }, - "enable_snat": { - "type": "boolean", + "slice_starts_with": { + "type": "string", "nullable": true }, - "entityAsyncStatus": { + "snapshot_consistent_type": { "allOf": [ { - "$ref": "#/components/schemas/EntityAsyncStatus" + "$ref": "#/components/schemas/ConsistentType" } ], "nullable": true }, - "external_ip": { - "type": "string", + "snapshot_consistent_type_in": { + "items": { + "$ref": "#/components/schemas/ConsistentType" + }, + "type": "array", "nullable": true }, - "external_subnet": { - "$ref": "#/components/schemas/NestedVirtualPrivateCloudExternalSubnet" + "snapshot_consistent_type_not": { + "allOf": [ + { + "$ref": "#/components/schemas/ConsistentType" + } + ], + "nullable": true }, - "id": { - "type": "string" + "snapshot_consistent_type_not_in": { + "items": { + "$ref": "#/components/schemas/ConsistentType" + }, + "type": "array", + "nullable": true }, - "local_id": { - "type": "string" + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupRestorePointType" + } + ], + "nullable": true }, - "name": { - "type": "string" + "type_in": { + "items": { + "$ref": "#/components/schemas/BackupRestorePointType" + }, + "type": "array", + "nullable": true }, - "vpc": { - "$ref": "#/components/schemas/NestedVirtualPrivateCloud" - } - }, - "required": [ - "external_subnet", - "id", - "local_id", - "name", - "vpc" - ], - "type": "object", - "additionalProperties": false - }, - "WithTask_VirtualPrivateCloudNatGateway_": { - "properties": { - "task_id": { - "type": "string", + "type_not": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupRestorePointType" + } + ], "nullable": true }, - "data": { - "$ref": "#/components/schemas/VirtualPrivateCloudNatGateway" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "VirtualPrivateCloudDnatRuleParams": { - "properties": { - "target_port": { - "type": "integer", - "format": "int32" + "type_not_in": { + "items": { + "$ref": "#/components/schemas/BackupRestorePointType" + }, + "type": "array", + "nullable": true }, - "port": { + "valid_capacity": { "type": "integer", - "format": "int32" + "format": "int64", + "nullable": true }, - "target_ip": { - "type": "string" - } - }, - "required": [ - "target_port", - "port", - "target_ip" - ], - "type": "object" - }, - "VirtualPrivateCloudNatGatewayCreationParams": { - "properties": { - "external_ip": { - "type": "string" + "valid_capacity_gt": { + "type": "integer", + "format": "int64", + "nullable": true }, - "external_subnet_id": { - "type": "string" + "valid_capacity_gte": { + "type": "integer", + "format": "int64", + "nullable": true }, - "dnat_rules": { + "valid_capacity_in": { "items": { - "$ref": "#/components/schemas/VirtualPrivateCloudDnatRuleParams" + "type": "integer", + "format": "int64" }, - "type": "array" + "type": "array", + "nullable": true }, - "enable_dnat": { - "type": "boolean" + "valid_capacity_lt": { + "type": "integer", + "format": "int64", + "nullable": true }, - "enable_snat": { - "type": "boolean" + "valid_capacity_lte": { + "type": "integer", + "format": "int64", + "nullable": true }, - "vpc_id": { - "type": "string" + "valid_capacity_not": { + "type": "integer", + "format": "int64", + "nullable": true }, - "name": { - "type": "string" - } - }, - "required": [ - "external_subnet_id", - "enable_dnat", - "enable_snat", - "vpc_id", - "name" - ], - "type": "object" - }, - "VirtualPrivateCloudNatGatewayUpdationParams": { - "properties": { - "data": { - "properties": { - "external_ip": { - "type": "string" - }, - "dnat_rules": { - "items": { - "$ref": "#/components/schemas/VirtualPrivateCloudDnatRuleParams" - }, - "type": "array" - }, - "enable_dnat": { - "type": "boolean" - }, - "enable_snat": { - "type": "boolean" - }, - "name": { - "type": "string" - } + "valid_capacity_not_in": { + "items": { + "type": "integer", + "format": "int64" }, - "type": "object" + "type": "array", + "nullable": true }, - "where": { - "$ref": "#/components/schemas/VirtualPrivateCloudNatGatewayWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "DeleteVirtualPrivateCloudNatGateway": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "WithTask_DeleteVirtualPrivateCloudNatGateway_": { - "properties": { - "task_id": { - "type": "string", + "valid_size": { + "type": "integer", + "format": "int64", "nullable": true }, - "data": { - "$ref": "#/components/schemas/DeleteVirtualPrivateCloudNatGateway" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "VirtualPrivateCloudNatGatewayDeletionParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/VirtualPrivateCloudNatGatewayWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "NestedVirtualPrivateCloudRoute": { - "properties": { - "destination": { - "type": "string" + "valid_size_gt": { + "type": "integer", + "format": "int64", + "nullable": true }, - "id": { - "type": "string" + "valid_size_gte": { + "type": "integer", + "format": "int64", + "nullable": true }, - "next_hop_local_id": { - "type": "string" + "valid_size_in": { + "items": { + "type": "integer", + "format": "int64" + }, + "type": "array", + "nullable": true }, - "next_hop_type": { - "$ref": "#/components/schemas/VirtualPrivateCloudRouteNextHopType" - } - }, - "required": [ - "destination", - "id", - "next_hop_local_id", - "next_hop_type" - ], - "type": "object", - "additionalProperties": false - }, - "NestedVirtualPrivateCloudSubnet": { - "properties": { - "id": { - "type": "string" + "valid_size_lt": { + "type": "integer", + "format": "int64", + "nullable": true }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "type": "object", - "additionalProperties": false - }, - "VirtualPrivateCloudRouteTable": { - "properties": { - "default_for_vpc": { - "type": "boolean", + "valid_size_lte": { + "type": "integer", + "format": "int64", "nullable": true }, - "description": { - "type": "string", + "valid_size_not": { + "type": "integer", + "format": "int64", "nullable": true }, - "entityAsyncStatus": { + "valid_size_not_in": { + "items": { + "type": "integer", + "format": "int64" + }, + "type": "array", + "nullable": true + }, + "vm": { "allOf": [ { - "$ref": "#/components/schemas/EntityAsyncStatus" + "$ref": "#/components/schemas/VmWhereInput" } ], "nullable": true }, - "id": { - "type": "string" + "vm_local_id": { + "type": "string", + "nullable": true }, - "local_id": { - "type": "string" + "vm_local_id_contains": { + "type": "string", + "nullable": true }, - "name": { - "type": "string" + "vm_local_id_ends_with": { + "type": "string", + "nullable": true }, - "routes": { + "vm_local_id_gt": { + "type": "string", + "nullable": true + }, + "vm_local_id_gte": { + "type": "string", + "nullable": true + }, + "vm_local_id_in": { "items": { - "$ref": "#/components/schemas/NestedVirtualPrivateCloudRoute" + "type": "string" }, "type": "array", "nullable": true }, - "subnets": { + "vm_local_id_lt": { + "type": "string", + "nullable": true + }, + "vm_local_id_lte": { + "type": "string", + "nullable": true + }, + "vm_local_id_not": { + "type": "string", + "nullable": true + }, + "vm_local_id_not_contains": { + "type": "string", + "nullable": true + }, + "vm_local_id_not_ends_with": { + "type": "string", + "nullable": true + }, + "vm_local_id_not_in": { "items": { - "$ref": "#/components/schemas/NestedVirtualPrivateCloudSubnet" + "type": "string" }, "type": "array", "nullable": true }, - "vpc": { - "$ref": "#/components/schemas/NestedVirtualPrivateCloud" - } - }, - "required": [ - "id", - "local_id", - "name", - "vpc" - ], - "type": "object", - "additionalProperties": false - }, - "WithTask_VirtualPrivateCloudRouteTable_": { - "properties": { - "task_id": { + "vm_local_id_not_starts_with": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/VirtualPrivateCloudRouteTable" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "VirtualPrivateCloudRouteParams": { - "properties": { - "destination": { - "type": "string" + "vm_local_id_starts_with": { + "type": "string", + "nullable": true }, - "next_hop_local_id": { - "type": "string" + "vm_name": { + "type": "string", + "nullable": true }, - "next_hop_type": { - "$ref": "#/components/schemas/VirtualPrivateCloudRouteNextHopType" - } - }, - "required": [ - "destination", - "next_hop_local_id", - "next_hop_type" - ], - "type": "object" - }, - "VirtualPrivateCloudRouteTableCreationParams": { - "properties": { - "routes": { + "vm_name_contains": { + "type": "string", + "nullable": true + }, + "vm_name_ends_with": { + "type": "string", + "nullable": true + }, + "vm_name_gt": { + "type": "string", + "nullable": true + }, + "vm_name_gte": { + "type": "string", + "nullable": true + }, + "vm_name_in": { "items": { - "$ref": "#/components/schemas/VirtualPrivateCloudRouteParams" + "type": "string" }, - "type": "array" + "type": "array", + "nullable": true }, - "vpc_id": { - "type": "string" + "vm_name_lt": { + "type": "string", + "nullable": true }, - "description": { - "type": "string" + "vm_name_lte": { + "type": "string", + "nullable": true }, - "name": { - "type": "string" - } - }, - "required": [ - "vpc_id", - "name" - ], - "type": "object" - }, - "VirtualPrivateCloudRouteTableUpdationParams": { - "properties": { - "data": { - "properties": { - "routes": { - "items": { - "$ref": "#/components/schemas/VirtualPrivateCloudRouteParams" - }, - "type": "array" - }, - "description": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "type": "object" + "vm_name_not": { + "type": "string", + "nullable": true }, - "where": { - "$ref": "#/components/schemas/VirtualPrivateCloudRouteTableWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "DeleteVirtualPrivateCloudRouteTable": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "WithTask_DeleteVirtualPrivateCloudRouteTable_": { - "properties": { - "task_id": { + "vm_name_not_contains": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/DeleteVirtualPrivateCloudRouteTable" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "VirtualPrivateCloudRouteTableDeletionParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/VirtualPrivateCloudRouteTableWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "NestedVpcRouterGatewayRuleType": { - "properties": { - "dst": { - "type": "string" + "vm_name_not_ends_with": { + "type": "string", + "nullable": true }, - "nexthop": { + "vm_name_not_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, + "vm_name_not_starts_with": { + "type": "string", + "nullable": true + }, + "vm_name_starts_with": { "type": "string", "nullable": true } }, - "required": [ - "dst" - ], "type": "object", "additionalProperties": false }, - "VirtualPrivateCloudRouterGateway": { + "BackupRestoreExecutionWhereInput": { "properties": { - "associated_subnets": { + "AND": { "items": { - "$ref": "#/components/schemas/NestedVirtualPrivateCloudSubnet" + "$ref": "#/components/schemas/BackupRestoreExecutionWhereInput" + }, + "type": "array", + "nullable": true + }, + "NOT": { + "items": { + "$ref": "#/components/schemas/BackupRestoreExecutionWhereInput" + }, + "type": "array", + "nullable": true + }, + "OR": { + "items": { + "$ref": "#/components/schemas/BackupRestoreExecutionWhereInput" }, "type": "array", "nullable": true @@ -92305,531 +91418,402 @@ ], "nullable": true }, - "external_ip": { - "type": "string", + "entityAsyncStatus_in": { + "items": { + "$ref": "#/components/schemas/EntityAsyncStatus" + }, + "type": "array", "nullable": true }, - "external_subnet": { - "$ref": "#/components/schemas/NestedVirtualPrivateCloudExternalSubnet" + "entityAsyncStatus_not": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], + "nullable": true + }, + "entityAsyncStatus_not_in": { + "items": { + "$ref": "#/components/schemas/EntityAsyncStatus" + }, + "type": "array", + "nullable": true }, "id": { - "type": "string" + "type": "string", + "nullable": true }, - "local_id": { - "type": "string" + "id_contains": { + "type": "string", + "nullable": true }, - "name": { - "type": "string" + "id_ends_with": { + "type": "string", + "nullable": true }, - "nexthop_ip": { + "id_gt": { "type": "string", "nullable": true }, - "rules": { + "id_gte": { + "type": "string", + "nullable": true + }, + "id_in": { "items": { - "$ref": "#/components/schemas/NestedVpcRouterGatewayRuleType" + "type": "string" }, - "type": "array" + "type": "array", + "nullable": true }, - "vpc": { - "$ref": "#/components/schemas/NestedVirtualPrivateCloud" - } - }, - "required": [ - "external_subnet", - "id", - "local_id", - "name", - "rules", - "vpc" - ], - "type": "object", - "additionalProperties": false - }, - "WithTask_VirtualPrivateCloudRouterGateway_": { - "properties": { - "task_id": { + "id_lt": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/VirtualPrivateCloudRouterGateway" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "VirtualPrivateCloudRouterGatewayRuleInputType": { - "properties": { - "dst": { - "type": "string" + "id_lte": { + "type": "string", + "nullable": true }, - "nexthop": { - "type": "string" - } - }, - "required": [ - "dst" - ], - "type": "object" - }, - "VirtualPrivateCloudRouterGatewayCreationParams": { - "properties": { - "rules": { - "items": { - "$ref": "#/components/schemas/VirtualPrivateCloudRouterGatewayRuleInputType" - }, - "type": "array" + "id_not": { + "type": "string", + "nullable": true }, - "associated_subnets_ids": { + "id_not_contains": { + "type": "string", + "nullable": true + }, + "id_not_ends_with": { + "type": "string", + "nullable": true + }, + "id_not_in": { "items": { "type": "string" }, - "type": "array" - }, - "external_ip": { - "type": "string" + "type": "array", + "nullable": true }, - "external_subnet_id": { - "type": "string" + "id_not_starts_with": { + "type": "string", + "nullable": true }, - "vpc_id": { - "type": "string" + "id_starts_with": { + "type": "string", + "nullable": true }, "name": { - "type": "string" - } - }, - "required": [ - "rules", - "associated_subnets_ids", - "external_subnet_id", - "vpc_id", - "name" - ], - "type": "object" - }, - "VirtualPrivateCloudRouterGatewayUpdateDataParams": { - "properties": { - "rules": { - "items": { - "$ref": "#/components/schemas/VirtualPrivateCloudRouterGatewayRuleInputType" - }, - "type": "array" + "type": "string", + "nullable": true }, - "associated_subnets_ids": { + "name_contains": { + "type": "string", + "nullable": true + }, + "name_ends_with": { + "type": "string", + "nullable": true + }, + "name_gt": { + "type": "string", + "nullable": true + }, + "name_gte": { + "type": "string", + "nullable": true + }, + "name_in": { "items": { "type": "string" }, - "type": "array" + "type": "array", + "nullable": true }, - "external_ip": { - "type": "string" + "name_lt": { + "type": "string", + "nullable": true }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "VirtualPrivateCloudRouterGatewayUpdationParams": { - "properties": { - "data": { - "$ref": "#/components/schemas/VirtualPrivateCloudRouterGatewayUpdateDataParams" + "name_lte": { + "type": "string", + "nullable": true }, - "where": { - "$ref": "#/components/schemas/VirtualPrivateCloudRouterGatewayWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "DeleteVirtualPrivateCloudRouterGateway": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "WithTask_DeleteVirtualPrivateCloudRouterGateway_": { - "properties": { - "task_id": { + "name_not": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/DeleteVirtualPrivateCloudRouterGateway" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "VirtualPrivateCloudRouterGatewayDeletionParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/VirtualPrivateCloudRouterGatewayWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "NestedVirtualPrivateCloudLabelGroup": { - "properties": { - "labels": { + "name_not_contains": { + "type": "string", + "nullable": true + }, + "name_not_ends_with": { + "type": "string", + "nullable": true + }, + "name_not_in": { "items": { - "$ref": "#/components/schemas/NestedLabel" + "type": "string" }, - "type": "array" - } - }, - "required": [ - "labels" - ], - "type": "object", - "additionalProperties": false - }, - "VirtualPrivateCloudSecurityGroup": { - "properties": { - "default_for_vpc": { - "type": "boolean", + "type": "array", "nullable": true }, - "description": { + "name_not_starts_with": { "type": "string", "nullable": true }, - "entityAsyncStatus": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" - } - ], + "name_starts_with": { + "type": "string", "nullable": true }, - "id": { - "type": "string" + "resource_version_gt": { + "type": "integer", + "format": "int32", + "nullable": true }, - "label_groups": { + "resource_version_gte": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "resource_version_in": { "items": { - "$ref": "#/components/schemas/NestedVirtualPrivateCloudLabelGroup" + "type": "integer", + "format": "int32" }, "type": "array", "nullable": true }, - "local_id": { - "type": "string" + "resource_version_lt": { + "type": "integer", + "format": "int32", + "nullable": true }, - "name": { - "type": "string" + "resource_version_lte": { + "type": "integer", + "format": "int32", + "nullable": true }, - "vms": { + "resource_version_not": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "resource_version_not_in": { "items": { - "$ref": "#/components/schemas/NestedVm" + "type": "integer", + "format": "int32" }, "type": "array", "nullable": true - }, - "vpc": { - "$ref": "#/components/schemas/NestedVirtualPrivateCloud" } }, - "required": [ - "id", - "local_id", - "name", - "vpc" - ], "type": "object", "additionalProperties": false }, - "WithTask_VirtualPrivateCloudSecurityGroup_": { + "BackupTargetExecutionWhereInput": { "properties": { - "task_id": { - "type": "string", + "AND": { + "items": { + "$ref": "#/components/schemas/BackupTargetExecutionWhereInput" + }, + "type": "array", "nullable": true }, - "data": { - "$ref": "#/components/schemas/VirtualPrivateCloudSecurityGroup" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "LabelGroup": { - "properties": { - "label_ids": { + "NOT": { "items": { - "type": "string" + "$ref": "#/components/schemas/BackupTargetExecutionWhereInput" }, - "type": "array" - } - }, - "required": [ - "label_ids" - ], - "type": "object" - }, - "VirtualPrivateCloudSecurityGroupCreationParams": { - "properties": { - "vm_ids": { - "items": { - "type": "string" - }, - "type": "array" + "type": "array", + "nullable": true }, - "label_groups": { + "OR": { "items": { - "$ref": "#/components/schemas/LabelGroup" + "$ref": "#/components/schemas/BackupTargetExecutionWhereInput" }, - "type": "array" + "type": "array", + "nullable": true }, - "vpc_id": { - "type": "string" + "backup_group": { + "type": "string", + "nullable": true }, - "description": { - "type": "string" + "backup_group_contains": { + "type": "string", + "nullable": true }, - "name": { - "type": "string" - } - }, - "required": [ - "vpc_id", - "name" - ], - "type": "object" - }, - "VirtualPrivateCloudSecurityGroupUpdationParams": { - "properties": { - "data": { - "properties": { - "vm_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "label_groups": { - "items": { - "$ref": "#/components/schemas/LabelGroup" - }, - "type": "array" - }, - "description": { - "type": "string" - }, - "name": { - "type": "string" - } + "backup_group_ends_with": { + "type": "string", + "nullable": true + }, + "backup_group_gt": { + "type": "string", + "nullable": true + }, + "backup_group_gte": { + "type": "string", + "nullable": true + }, + "backup_group_in": { + "items": { + "type": "string" }, - "type": "object" + "type": "array", + "nullable": true }, - "where": { - "$ref": "#/components/schemas/VirtualPrivateCloudSecurityGroupWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "DeleteVirtualPrivateCloudSecurityGroup": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "WithTask_DeleteVirtualPrivateCloudSecurityGroup_": { - "properties": { - "task_id": { + "backup_group_lt": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/DeleteVirtualPrivateCloudSecurityGroup" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "VirtualPrivateCloudSecurityGroupDeletionParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/VirtualPrivateCloudSecurityGroupWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "NestedVirtualPrivateCloudSecurityGroup": { - "properties": { - "id": { - "type": "string" + "backup_group_lte": { + "type": "string", + "nullable": true }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "type": "object", - "additionalProperties": false - }, - "NestedVirtualPrivateCloudSecurityPolicyApply": { - "properties": { - "communicable": { - "type": "boolean" + "backup_group_not": { + "type": "string", + "nullable": true }, - "security_group": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedVirtualPrivateCloudSecurityGroup" - } - ], + "backup_group_not_contains": { + "type": "string", "nullable": true }, - "security_group_id": { - "type": "string" - } - }, - "required": [ - "communicable", - "security_group_id" - ], - "type": "object", - "additionalProperties": false - }, - "VirtualPrivateCloudNetworkPolicyRulePortProtocol": { - "enum": [ - "ICMP", - "TCP", - "UDP" - ], - "type": "string" - }, - "NestedVirtualPrivateCloudNetworkPolicyRulePort": { - "properties": { - "port": { + "backup_group_not_ends_with": { "type": "string", "nullable": true }, - "protocol": { - "$ref": "#/components/schemas/VirtualPrivateCloudNetworkPolicyRulePortProtocol" - } - }, - "required": [ - "protocol" - ], - "type": "object", - "additionalProperties": false - }, - "VirtualPrivateCloudNetworkPolicyRuleType": { - "enum": [ - "ALL", - "IP_BLOCK", - "SECURITY_GROUP", - "SELECTOR" - ], - "type": "string" - }, - "NestedVirtualPrivateCloudNetworkPolicyRule": { - "properties": { - "except_ip_block": { + "backup_group_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "ip_block": { + "backup_group_not_starts_with": { "type": "string", "nullable": true }, - "ports": { - "items": { - "$ref": "#/components/schemas/NestedVirtualPrivateCloudNetworkPolicyRulePort" - }, - "type": "array", + "backup_group_starts_with": { + "type": "string", "nullable": true }, - "security_group": { + "backup_plan_execution": { "allOf": [ { - "$ref": "#/components/schemas/NestedVirtualPrivateCloudSecurityGroup" + "$ref": "#/components/schemas/BackupPlanExecutionWhereInput" } ], "nullable": true }, - "security_group_id": { + "backup_restore_point": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupRestorePointWhereInput" + } + ], + "nullable": true + }, + "cluster_local_id": { "type": "string", "nullable": true }, - "selector": { + "cluster_local_id_contains": { + "type": "string", + "nullable": true + }, + "cluster_local_id_ends_with": { + "type": "string", + "nullable": true + }, + "cluster_local_id_gt": { + "type": "string", + "nullable": true + }, + "cluster_local_id_gte": { + "type": "string", + "nullable": true + }, + "cluster_local_id_in": { "items": { - "$ref": "#/components/schemas/NestedLabel" + "type": "string" }, "type": "array", "nullable": true }, - "selector_ids": { + "cluster_local_id_lt": { + "type": "string", + "nullable": true + }, + "cluster_local_id_lte": { + "type": "string", + "nullable": true + }, + "cluster_local_id_not": { + "type": "string", + "nullable": true + }, + "cluster_local_id_not_contains": { + "type": "string", + "nullable": true + }, + "cluster_local_id_not_ends_with": { + "type": "string", + "nullable": true + }, + "cluster_local_id_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "type": { - "$ref": "#/components/schemas/VirtualPrivateCloudNetworkPolicyRuleType" - } - }, - "required": [ - "type" - ], - "type": "object", - "additionalProperties": false - }, - "VirtualPrivateCloudSecurityPolicy": { - "properties": { - "apply_to": { + "cluster_local_id_not_starts_with": { + "type": "string", + "nullable": true + }, + "cluster_local_id_starts_with": { + "type": "string", + "nullable": true + }, + "duration": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "duration_gt": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "duration_gte": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "duration_in": { "items": { - "$ref": "#/components/schemas/NestedVirtualPrivateCloudSecurityPolicyApply" + "type": "integer", + "format": "int32" }, - "type": "array" + "type": "array", + "nullable": true }, - "description": { - "type": "string", + "duration_lt": { + "type": "integer", + "format": "int32", "nullable": true }, - "egress": { + "duration_lte": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "duration_not": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "duration_not_in": { "items": { - "$ref": "#/components/schemas/NestedVirtualPrivateCloudNetworkPolicyRule" + "type": "integer", + "format": "int32" }, "type": "array", "nullable": true @@ -92842,1388 +91826,1327 @@ ], "nullable": true }, - "id": { - "type": "string" - }, - "ingress": { + "entityAsyncStatus_in": { "items": { - "$ref": "#/components/schemas/NestedVirtualPrivateCloudNetworkPolicyRule" + "$ref": "#/components/schemas/EntityAsyncStatus" }, "type": "array", "nullable": true }, - "local_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "policy_mode": { + "entityAsyncStatus_not": { "allOf": [ { - "$ref": "#/components/schemas/VirtualPrivateCloudSecurityPolicyMode" + "$ref": "#/components/schemas/EntityAsyncStatus" } ], "nullable": true }, - "vpc": { - "$ref": "#/components/schemas/NestedVirtualPrivateCloud" - } - }, - "required": [ - "apply_to", - "id", - "local_id", - "name", - "vpc" - ], - "type": "object", - "additionalProperties": false - }, - "WithTask_VirtualPrivateCloudSecurityPolicy_": { - "properties": { - "task_id": { - "type": "string", + "entityAsyncStatus_not_in": { + "items": { + "$ref": "#/components/schemas/EntityAsyncStatus" + }, + "type": "array", "nullable": true }, - "data": { - "$ref": "#/components/schemas/VirtualPrivateCloudSecurityPolicy" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "VirtualPrivateCloudSecurityPolicyApplyInput": { - "properties": { - "security_group_id": { - "type": "string" + "executed_at": { + "type": "string", + "nullable": true }, - "communicable": { - "type": "boolean" - } - }, - "required": [ - "security_group_id", - "communicable" - ], - "type": "object" - }, - "VirtualPrivateCloudNetworkPolicyRulePortInput": { - "properties": { - "protocol": { - "$ref": "#/components/schemas/VirtualPrivateCloudNetworkPolicyRulePortProtocol" + "executed_at_gt": { + "type": "string", + "nullable": true }, - "port": { + "executed_at_gte": { "type": "string", "nullable": true - } - }, - "required": [ - "protocol" - ], - "type": "object" - }, - "VirtualPrivateCloudNetworkPolicyRuleInput": { - "properties": { - "type": { - "$ref": "#/components/schemas/VirtualPrivateCloudNetworkPolicyRuleType" }, - "selector_ids": { + "executed_at_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "security_group_id": { + "executed_at_lt": { "type": "string", "nullable": true }, - "ports": { + "executed_at_lte": { + "type": "string", + "nullable": true + }, + "executed_at_not": { + "type": "string", + "nullable": true + }, + "executed_at_not_in": { "items": { - "$ref": "#/components/schemas/VirtualPrivateCloudNetworkPolicyRulePortInput" + "type": "string" }, "type": "array", "nullable": true }, - "ip_block": { + "id": { "type": "string", "nullable": true }, - "except_ip_block": { + "id_contains": { + "type": "string", + "nullable": true + }, + "id_ends_with": { + "type": "string", + "nullable": true + }, + "id_gt": { + "type": "string", + "nullable": true + }, + "id_gte": { + "type": "string", + "nullable": true + }, + "id_in": { "items": { "type": "string" }, "type": "array", "nullable": true - } - }, - "required": [ - "type" - ], - "type": "object" - }, - "VirtualPrivateCloudSecurityPolicyCreateParams": { - "properties": { - "egress": { - "items": { - "$ref": "#/components/schemas/VirtualPrivateCloudNetworkPolicyRuleInput" - }, - "type": "array" }, - "ingress": { - "items": { - "$ref": "#/components/schemas/VirtualPrivateCloudNetworkPolicyRuleInput" - }, - "type": "array" + "id_lt": { + "type": "string", + "nullable": true }, - "apply_to": { + "id_lte": { + "type": "string", + "nullable": true + }, + "id_not": { + "type": "string", + "nullable": true + }, + "id_not_contains": { + "type": "string", + "nullable": true + }, + "id_not_ends_with": { + "type": "string", + "nullable": true + }, + "id_not_in": { "items": { - "$ref": "#/components/schemas/VirtualPrivateCloudSecurityPolicyApplyInput" + "type": "string" }, "type": "array", - "minItems": 1 + "nullable": true }, - "policy_mode": { - "$ref": "#/components/schemas/VirtualPrivateCloudSecurityPolicyMode" + "id_not_starts_with": { + "type": "string", + "nullable": true }, - "vpc_id": { - "type": "string" + "id_starts_with": { + "type": "string", + "nullable": true }, - "description": { - "type": "string" + "local_id": { + "type": "string", + "nullable": true }, - "name": { + "local_id_contains": { "type": "string", - "minLength": 1 - } - }, - "required": [ - "apply_to", - "vpc_id", - "name" - ], - "type": "object" - }, - "DeleteVirtualPrivateCloudSecurityPolicy": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "WithTask_DeleteVirtualPrivateCloudSecurityPolicy_": { - "properties": { - "task_id": { + "nullable": true + }, + "local_id_ends_with": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/DeleteVirtualPrivateCloudSecurityPolicy" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "VirtualPrivateCloudSecurityPolicyDeleteParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/VirtualPrivateCloudSecurityPolicyWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "VirtualPrivateCloudSecurityPolicyUpdateParams": { - "properties": { - "ingress": { - "items": { - "$ref": "#/components/schemas/VirtualPrivateCloudNetworkPolicyRuleInput" - }, - "type": "array" + "local_id_gt": { + "type": "string", + "nullable": true }, - "egress": { - "items": { - "$ref": "#/components/schemas/VirtualPrivateCloudNetworkPolicyRuleInput" - }, - "type": "array" + "local_id_gte": { + "type": "string", + "nullable": true }, - "apply_to": { + "local_id_in": { "items": { - "$ref": "#/components/schemas/VirtualPrivateCloudSecurityPolicyApplyInput" + "type": "string" }, - "type": "array" + "type": "array", + "nullable": true }, - "policy_mode": { - "$ref": "#/components/schemas/VirtualPrivateCloudSecurityPolicyMode" + "local_id_lt": { + "type": "string", + "nullable": true }, - "description": { - "type": "string" + "local_id_lte": { + "type": "string", + "nullable": true }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "VirtualPrivateCloudSecurityPolicyUpdateBody": { - "properties": { - "data": { - "$ref": "#/components/schemas/VirtualPrivateCloudSecurityPolicyUpdateParams" + "local_id_not": { + "type": "string", + "nullable": true }, - "where": { - "$ref": "#/components/schemas/VirtualPrivateCloudSecurityPolicyWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "NestedVpcSubnetIpPooType": { - "properties": { - "end": { - "type": "string" + "local_id_not_contains": { + "type": "string", + "nullable": true }, - "start": { - "type": "string" - } - }, - "required": [ - "end", - "start" - ], - "type": "object", - "additionalProperties": false - }, - "NestedVirtualPrivateCloudRouteTable": { - "properties": { - "id": { - "type": "string" + "local_id_not_ends_with": { + "type": "string", + "nullable": true }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "type": "object", - "additionalProperties": false - }, - "VirtualPrivateCloudSubnet": { - "properties": { - "cidr": { - "type": "string" + "local_id_not_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true }, - "description": { + "local_id_not_starts_with": { "type": "string", "nullable": true }, - "entityAsyncStatus": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" - } - ], + "local_id_starts_with": { + "type": "string", "nullable": true }, - "gateway": { + "parent_backup": { "type": "string", "nullable": true }, - "id": { - "type": "string" + "parent_backup_contains": { + "type": "string", + "nullable": true }, - "ip_pools": { - "items": { - "$ref": "#/components/schemas/NestedVpcSubnetIpPooType" - }, - "type": "array", + "parent_backup_ends_with": { + "type": "string", "nullable": true }, - "local_id": { - "type": "string" + "parent_backup_gt": { + "type": "string", + "nullable": true }, - "name": { - "type": "string" + "parent_backup_gte": { + "type": "string", + "nullable": true }, - "route_table": { - "$ref": "#/components/schemas/NestedVirtualPrivateCloudRouteTable" + "parent_backup_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true }, - "total_ip_count": { - "type": "integer", - "format": "int32", + "parent_backup_lt": { + "type": "string", "nullable": true }, - "unused_ip_count": { - "type": "integer", - "format": "int32", + "parent_backup_lte": { + "type": "string", "nullable": true }, - "vpc": { - "$ref": "#/components/schemas/NestedVirtualPrivateCloud" - } - }, - "required": [ - "cidr", - "id", - "local_id", - "name", - "route_table", - "vpc" - ], - "type": "object", - "additionalProperties": false - }, - "WithTask_VirtualPrivateCloudSubnet_": { - "properties": { - "task_id": { + "parent_backup_not": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/VirtualPrivateCloudSubnet" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "VirtualPrivateCloudSubnetIpPoolParams": { - "properties": { - "end": { - "type": "string" + "parent_backup_not_contains": { + "type": "string", + "nullable": true }, - "start": { - "type": "string" - } - }, - "required": [ - "end", - "start" - ], - "type": "object" - }, - "VirtualPrivateCloudSubnetCreationParams": { - "properties": { - "route_table_id": { - "type": "string" + "parent_backup_not_ends_with": { + "type": "string", + "nullable": true }, - "ip_pools": { + "parent_backup_not_in": { "items": { - "$ref": "#/components/schemas/VirtualPrivateCloudSubnetIpPoolParams" + "type": "string" }, - "type": "array" + "type": "array", + "nullable": true }, - "gateway": { - "type": "string" + "parent_backup_not_starts_with": { + "type": "string", + "nullable": true }, - "cidr": { - "type": "string" + "parent_backup_starts_with": { + "type": "string", + "nullable": true }, - "vpc_id": { - "type": "string" + "read_bytes": { + "type": "integer", + "format": "int64", + "nullable": true }, - "description": { - "type": "string" + "read_bytes_gt": { + "type": "integer", + "format": "int64", + "nullable": true }, - "name": { - "type": "string" - } - }, - "required": [ - "route_table_id", - "gateway", - "cidr", - "vpc_id", - "name" - ], - "type": "object" - }, - "VirtualPrivateCloudSubnetUpdateDataParams": { - "properties": { - "route_table_id": { - "type": "string" + "read_bytes_gte": { + "type": "integer", + "format": "int64", + "nullable": true }, - "ip_pools": { + "read_bytes_in": { "items": { - "$ref": "#/components/schemas/VirtualPrivateCloudSubnetIpPoolParams" + "type": "integer", + "format": "int64" }, - "type": "array" + "type": "array", + "nullable": true }, - "gateway": { - "type": "string" + "read_bytes_lt": { + "type": "integer", + "format": "int64", + "nullable": true }, - "cidr": { - "type": "string" + "read_bytes_lte": { + "type": "integer", + "format": "int64", + "nullable": true }, - "description": { - "type": "string" + "read_bytes_not": { + "type": "integer", + "format": "int64", + "nullable": true }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "VirtualPrivateCloudSubnetUpdationParams": { - "properties": { - "data": { - "$ref": "#/components/schemas/VirtualPrivateCloudSubnetUpdateDataParams" + "read_bytes_not_in": { + "items": { + "type": "integer", + "format": "int64" + }, + "type": "array", + "nullable": true }, - "where": { - "$ref": "#/components/schemas/VirtualPrivateCloudSubnetWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "DeleteVirtualPrivateCloudSubnet": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "WithTask_DeleteVirtualPrivateCloudSubnet_": { - "properties": { - "task_id": { - "type": "string", + "resource_version_gt": { + "type": "integer", + "format": "int32", "nullable": true }, - "data": { - "$ref": "#/components/schemas/DeleteVirtualPrivateCloudSubnet" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "VirtualPrivateCloudSubnetDeletionParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/VirtualPrivateCloudSubnetWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "NestedVirtualPrivateCloudIsolationPolicy": { - "properties": { - "id": { - "type": "string" + "resource_version_gte": { + "type": "integer", + "format": "int32", + "nullable": true }, - "vm": { - "$ref": "#/components/schemas/NestedVm" - } - }, - "required": [ - "id", - "vm" - ], - "type": "object", - "additionalProperties": false - }, - "NestedVirtualPrivateCloudSecurityPolicy": { - "properties": { - "id": { - "type": "string" + "resource_version_in": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", + "nullable": true }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "type": "object", - "additionalProperties": false - }, - "VirtualPrivateCloud": { - "properties": { - "associate_external_subnet_num": { + "resource_version_lt": { "type": "integer", "format": "int32", "nullable": true }, - "description": { - "type": "string", + "resource_version_lte": { + "type": "integer", + "format": "int32", "nullable": true }, - "entityAsyncStatus": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" - } - ], + "resource_version_not": { + "type": "integer", + "format": "int32", "nullable": true }, - "id": { - "type": "string" - }, - "isolation_policies": { + "resource_version_not_in": { "items": { - "$ref": "#/components/schemas/NestedVirtualPrivateCloudIsolationPolicy" + "type": "integer", + "format": "int32" }, "type": "array", "nullable": true }, - "local_id": { - "type": "string" + "retry_times": { + "type": "integer", + "format": "int32", + "nullable": true }, - "mtu": { + "retry_times_gt": { "type": "integer", "format": "int32", "nullable": true }, - "name": { - "type": "string" + "retry_times_gte": { + "type": "integer", + "format": "int32", + "nullable": true }, - "route_tables": { + "retry_times_in": { "items": { - "$ref": "#/components/schemas/NestedVirtualPrivateCloudRouteTable" + "type": "integer", + "format": "int32" }, "type": "array", "nullable": true }, - "security_groups": { + "retry_times_lt": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "retry_times_lte": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "retry_times_not": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "retry_times_not_in": { "items": { - "$ref": "#/components/schemas/NestedVirtualPrivateCloudSecurityGroup" + "type": "integer", + "format": "int32" }, "type": "array", "nullable": true }, - "security_policies": { + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupExecutionStatus" + } + ], + "nullable": true + }, + "status_in": { "items": { - "$ref": "#/components/schemas/NestedVirtualPrivateCloudSecurityPolicy" + "$ref": "#/components/schemas/BackupExecutionStatus" }, "type": "array", "nullable": true }, - "subnets": { + "status_not": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupExecutionStatus" + } + ], + "nullable": true + }, + "status_not_in": { "items": { - "$ref": "#/components/schemas/NestedVirtualPrivateCloudSubnet" + "$ref": "#/components/schemas/BackupExecutionStatus" }, "type": "array", "nullable": true - } - }, - "required": [ - "id", - "local_id", - "name" - ], - "type": "object", - "additionalProperties": false - }, - "WithTask_VirtualPrivateCloud_": { - "properties": { - "task_id": { - "type": "string", + }, + "total_bytes": { + "type": "integer", + "format": "int64", "nullable": true }, - "data": { - "$ref": "#/components/schemas/VirtualPrivateCloud" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "VirtualPrivateCloudCreationParams": { - "properties": { - "mtu": { + "total_bytes_gt": { "type": "integer", - "format": "int32" + "format": "int64", + "nullable": true }, - "vpc_service_id": { - "type": "string" + "total_bytes_gte": { + "type": "integer", + "format": "int64", + "nullable": true }, - "description": { - "type": "string" + "total_bytes_in": { + "items": { + "type": "integer", + "format": "int64" + }, + "type": "array", + "nullable": true }, - "name": { - "type": "string" - } - }, - "required": [ - "vpc_service_id", - "name" - ], - "type": "object" - }, - "VirtualPrivateCloudUpdateDataParams": { - "properties": { - "mtu": { + "total_bytes_lt": { "type": "integer", - "format": "int32" + "format": "int64", + "nullable": true }, - "description": { - "type": "string" + "total_bytes_lte": { + "type": "integer", + "format": "int64", + "nullable": true }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "VirtualPrivateCloudUpdationParams": { - "properties": { - "data": { - "$ref": "#/components/schemas/VirtualPrivateCloudUpdateDataParams" + "total_bytes_not": { + "type": "integer", + "format": "int64", + "nullable": true }, - "where": { - "$ref": "#/components/schemas/VirtualPrivateCloudWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "DeleteVirtualPrivateCloud": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "WithTask_DeleteVirtualPrivateCloud_": { - "properties": { - "task_id": { - "type": "string", + "total_bytes_not_in": { + "items": { + "type": "integer", + "format": "int64" + }, + "type": "array", "nullable": true }, - "data": { - "$ref": "#/components/schemas/DeleteVirtualPrivateCloud" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "VirtualPrivateCloudDeletionParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/VirtualPrivateCloudWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "Vlan": { - "properties": { - "entityAsyncStatus": { + "type": { "allOf": [ { - "$ref": "#/components/schemas/EntityAsyncStatus" + "$ref": "#/components/schemas/BackupExecutionType" } ], "nullable": true }, - "gateway_ip": { - "type": "string", + "type_in": { + "items": { + "$ref": "#/components/schemas/BackupExecutionType" + }, + "type": "array", "nullable": true }, - "gateway_subnetmask": { - "type": "string", + "type_not": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupExecutionType" + } + ], "nullable": true }, - "id": { - "type": "string" - }, - "labels": { + "type_not_in": { "items": { - "$ref": "#/components/schemas/NestedLabel" + "$ref": "#/components/schemas/BackupExecutionType" }, "type": "array", "nullable": true }, - "local_id": { - "type": "string" - }, - "mode_type": { + "vm": { "allOf": [ { - "$ref": "#/components/schemas/VlanModeType" + "$ref": "#/components/schemas/VmWhereInput" } ], "nullable": true }, - "name": { - "type": "string" + "vm_local_id": { + "type": "string", + "nullable": true }, - "network_ids": { + "vm_local_id_contains": { + "type": "string", + "nullable": true + }, + "vm_local_id_ends_with": { + "type": "string", + "nullable": true + }, + "vm_local_id_gt": { + "type": "string", + "nullable": true + }, + "vm_local_id_gte": { + "type": "string", + "nullable": true + }, + "vm_local_id_in": { "items": { "type": "string" }, - "type": "array" + "type": "array", + "nullable": true }, - "qos_max_bandwidth": { - "type": "number", - "format": "double", + "vm_local_id_lt": { + "type": "string", "nullable": true }, - "qos_min_bandwidth": { - "type": "number", - "format": "double", + "vm_local_id_lte": { + "type": "string", "nullable": true }, - "qos_priority": { - "type": "integer", - "format": "int32", + "vm_local_id_not": { + "type": "string", "nullable": true }, - "subnetmask": { + "vm_local_id_not_contains": { "type": "string", "nullable": true }, - "type": { - "$ref": "#/components/schemas/NetworkType" + "vm_local_id_not_ends_with": { + "type": "string", + "nullable": true }, - "vds": { - "$ref": "#/components/schemas/NestedVds" + "vm_local_id_not_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true }, - "vlan_id": { - "type": "integer", - "format": "int32" + "vm_local_id_not_starts_with": { + "type": "string", + "nullable": true }, - "vm_nics": { + "vm_local_id_starts_with": { + "type": "string", + "nullable": true + }, + "vm_name": { + "type": "string", + "nullable": true + }, + "vm_name_contains": { + "type": "string", + "nullable": true + }, + "vm_name_ends_with": { + "type": "string", + "nullable": true + }, + "vm_name_gt": { + "type": "string", + "nullable": true + }, + "vm_name_gte": { + "type": "string", + "nullable": true + }, + "vm_name_in": { "items": { - "$ref": "#/components/schemas/NestedVmNic" + "type": "string" + }, + "type": "array", + "nullable": true + }, + "vm_name_lt": { + "type": "string", + "nullable": true + }, + "vm_name_lte": { + "type": "string", + "nullable": true + }, + "vm_name_not": { + "type": "string", + "nullable": true + }, + "vm_name_not_contains": { + "type": "string", + "nullable": true + }, + "vm_name_not_ends_with": { + "type": "string", + "nullable": true + }, + "vm_name_not_in": { + "items": { + "type": "string" }, "type": "array", "nullable": true + }, + "vm_name_not_starts_with": { + "type": "string", + "nullable": true + }, + "vm_name_starts_with": { + "type": "string", + "nullable": true } }, - "required": [ - "id", - "local_id", - "name", - "network_ids", - "type", - "vds", - "vlan_id" - ], "type": "object", "additionalProperties": false }, - "WithTask_Vlan_": { + "BackupPlanExecutionWhereInput": { "properties": { - "task_id": { - "type": "string", + "AND": { + "items": { + "$ref": "#/components/schemas/BackupPlanExecutionWhereInput" + }, + "type": "array", "nullable": true }, - "data": { - "$ref": "#/components/schemas/Vlan" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "VlanId": { - "type": "integer", - "format": "int32", - "minimum": 0, - "maximum": 4095 - }, - "Priority": { - "type": "number", - "format": "double", - "minimum": 0 - }, - "VmVlanCreationParams": { - "properties": { - "qos_burst_unit": { - "$ref": "#/components/schemas/ByteUnit" + "NOT": { + "items": { + "$ref": "#/components/schemas/BackupPlanExecutionWhereInput" + }, + "type": "array", + "nullable": true }, - "qos_burst": { + "OR": { + "items": { + "$ref": "#/components/schemas/BackupPlanExecutionWhereInput" + }, + "type": "array", + "nullable": true + }, + "backup_plan": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupPlanWhereInput" + } + ], + "nullable": true + }, + "deletable_flag_marked": { + "type": "boolean", + "nullable": true + }, + "deletable_flag_marked_not": { + "type": "boolean", + "nullable": true + }, + "duration": { "type": "integer", - "format": "int64", + "format": "int32", "nullable": true }, - "qos_max_bandwidth_unit": { - "$ref": "#/components/schemas/BPSUnit" + "duration_gt": { + "type": "integer", + "format": "int32", + "nullable": true }, - "qos_max_bandwidth": { + "duration_gte": { "type": "integer", - "format": "int64", + "format": "int32", "nullable": true }, - "qos_min_bandwidth_unit": { - "$ref": "#/components/schemas/BPSUnit" + "duration_in": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", + "nullable": true }, - "qos_min_bandwidth": { + "duration_lt": { "type": "integer", - "format": "int64", + "format": "int32", "nullable": true }, - "qos_priority": { - "$ref": "#/components/schemas/Priority" + "duration_lte": { + "type": "integer", + "format": "int32", + "nullable": true }, - "mode_type": { - "$ref": "#/components/schemas/VlanModeType" + "duration_not": { + "type": "integer", + "format": "int32", + "nullable": true }, - "network_ids": { + "duration_not_in": { "items": { - "type": "string" + "type": "integer", + "format": "int32" }, - "type": "array" + "type": "array", + "nullable": true }, - "vds_id": { - "type": "string" + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], + "nullable": true }, - "vlan_id": { - "$ref": "#/components/schemas/VlanId" + "entityAsyncStatus_in": { + "items": { + "$ref": "#/components/schemas/EntityAsyncStatus" + }, + "type": "array", + "nullable": true }, - "name": { - "type": "string" - } - }, - "required": [ - "vds_id", - "name" - ], - "type": "object" - }, - "VmVlanUpdationParams": { - "properties": { - "data": { - "properties": { - "qos_burst_unit": { - "$ref": "#/components/schemas/ByteUnit" - }, - "qos_burst": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "qos_max_bandwidth_unit": { - "$ref": "#/components/schemas/BPSUnit" - }, - "qos_max_bandwidth": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "qos_min_bandwidth_unit": { - "$ref": "#/components/schemas/BPSUnit" - }, - "qos_min_bandwidth": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "qos_priority": { - "$ref": "#/components/schemas/Priority" - }, - "mode_type": { - "$ref": "#/components/schemas/VlanModeType" - }, - "network_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "vlan_id": { - "$ref": "#/components/schemas/VlanId" - }, - "name": { - "type": "string" + "entityAsyncStatus_not": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" } + ], + "nullable": true + }, + "entityAsyncStatus_not_in": { + "items": { + "$ref": "#/components/schemas/EntityAsyncStatus" }, - "type": "object" + "type": "array", + "nullable": true }, - "where": { - "$ref": "#/components/schemas/VlanWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "ExtraIp": { - "properties": { - "management_ip": { - "type": "string" + "executed_at": { + "type": "string", + "nullable": true }, - "host_id": { - "type": "string" - } - }, - "required": [ - "management_ip", - "host_id" - ], - "type": "object" - }, - "ManagementVlanUpdationParams": { - "properties": { - "data": { - "properties": { - "extra_ip": { - "items": { - "$ref": "#/components/schemas/ExtraIp" - }, - "type": "array" - }, - "subnetmask": { - "type": "string" - }, - "gateway_ip": { - "type": "string" - }, - "vlan_id": { - "$ref": "#/components/schemas/VlanId" - } - }, - "type": "object" + "executed_at_gt": { + "type": "string", + "nullable": true }, - "where": { - "$ref": "#/components/schemas/VlanWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "MigrationVlanUpdationParams": { - "properties": { - "data": { - "properties": { - "extra_ip": { - "items": { - "$ref": "#/components/schemas/ExtraIp" - }, - "type": "array" - }, - "subnetmask": { - "type": "string" - }, - "gateway_ip": { - "type": "string" - }, - "vlan_id": { - "$ref": "#/components/schemas/VlanId" - } + "executed_at_gte": { + "type": "string", + "nullable": true + }, + "executed_at_in": { + "items": { + "type": "string" }, - "type": "object" + "type": "array", + "nullable": true }, - "where": { - "$ref": "#/components/schemas/VlanWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "DeleteVlan": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "WithTask_DeleteVlan_": { - "properties": { - "task_id": { + "executed_at_lt": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/DeleteVlan" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "VlanDeletionParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/VlanWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "VmFolder": { - "properties": { - "cluster": { - "$ref": "#/components/schemas/NestedCluster" + "executed_at_lte": { + "type": "string", + "nullable": true + }, + "executed_at_not": { + "type": "string", + "nullable": true + }, + "executed_at_not_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true }, "id": { - "type": "string" + "type": "string", + "nullable": true }, - "local_id": { + "id_contains": { "type": "string", "nullable": true }, - "name": { - "type": "string" + "id_ends_with": { + "type": "string", + "nullable": true }, - "vm_num": { - "type": "integer", - "format": "int32", + "id_gt": { + "type": "string", "nullable": true }, - "vms": { + "id_gte": { + "type": "string", + "nullable": true + }, + "id_in": { "items": { - "$ref": "#/components/schemas/NestedVm" + "type": "string" }, "type": "array", "nullable": true - } - }, - "required": [ - "cluster", - "id", - "name" - ], - "type": "object", - "additionalProperties": false - }, - "WithTask_VmFolder_": { - "properties": { - "task_id": { + }, + "id_lt": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/VmFolder" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "VmFolderCreationParams": { - "properties": { - "cluster_id": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": [ - "cluster_id", - "name" - ], - "type": "object" - }, - "VmFolderUpdationParams": { - "properties": { - "data": { - "properties": { - "name": { - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" + "id_lte": { + "type": "string", + "nullable": true }, - "where": { - "$ref": "#/components/schemas/VmFolderWhereInput" - } - }, - "required": [ - "data", - "where" - ], - "type": "object" - }, - "DeleteVmFolder": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "WithTask_DeleteVmFolder_": { - "properties": { - "task_id": { + "id_not": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/DeleteVmFolder" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "VmFolderDeletionParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/VmFolderWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "VmPlacementGroup": { - "properties": { - "cluster": { - "$ref": "#/components/schemas/NestedCluster" + "id_not_contains": { + "type": "string", + "nullable": true }, - "description": { - "type": "string" + "id_not_ends_with": { + "type": "string", + "nullable": true }, - "enabled": { - "type": "boolean" + "id_not_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true }, - "entityAsyncStatus": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" - } - ], + "id_not_starts_with": { + "type": "string", "nullable": true }, - "id": { - "type": "string" + "id_starts_with": { + "type": "string", + "nullable": true }, "local_created_at": { - "type": "string" - }, - "local_id": { - "type": "string" - }, - "local_updated_at": { - "type": "string" + "type": "string", + "nullable": true }, - "name": { - "type": "string" + "local_created_at_gt": { + "type": "string", + "nullable": true }, - "vm_host_must_enabled": { - "type": "boolean" + "local_created_at_gte": { + "type": "string", + "nullable": true }, - "vm_host_must_host_uuids": { + "local_created_at_in": { "items": { - "$ref": "#/components/schemas/NestedHost" + "type": "string" }, "type": "array", "nullable": true }, - "vm_host_must_policy": { - "type": "boolean" + "local_created_at_lt": { + "type": "string", + "nullable": true }, - "vm_host_prefer_enabled": { - "type": "boolean" + "local_created_at_lte": { + "type": "string", + "nullable": true }, - "vm_host_prefer_host_uuids": { + "local_created_at_not": { + "type": "string", + "nullable": true + }, + "local_created_at_not_in": { "items": { - "$ref": "#/components/schemas/NestedHost" + "type": "string" }, "type": "array", "nullable": true }, - "vm_host_prefer_policy": { - "type": "boolean" + "local_id": { + "type": "string", + "nullable": true }, - "vm_vm_policy": { - "$ref": "#/components/schemas/VmVmPolicy" + "local_id_contains": { + "type": "string", + "nullable": true }, - "vm_vm_policy_enabled": { - "type": "boolean" + "local_id_ends_with": { + "type": "string", + "nullable": true }, - "vms": { + "local_id_gt": { + "type": "string", + "nullable": true + }, + "local_id_gte": { + "type": "string", + "nullable": true + }, + "local_id_in": { "items": { - "$ref": "#/components/schemas/NestedVm" + "type": "string" }, "type": "array", "nullable": true - } - }, - "required": [ - "cluster", - "description", - "enabled", - "id", - "local_created_at", - "local_id", - "local_updated_at", - "name", - "vm_host_must_enabled", - "vm_host_must_policy", - "vm_host_prefer_enabled", - "vm_host_prefer_policy", - "vm_vm_policy", - "vm_vm_policy_enabled" - ], - "type": "object", - "additionalProperties": false - }, - "WithTask_VmPlacementGroup_": { - "properties": { - "task_id": { + }, + "local_id_lt": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/VmPlacementGroup" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "VmPlacementGroupCreationParams": { - "properties": { - "vm_vm_policy": { - "$ref": "#/components/schemas/VmVmPolicy" + "local_id_lte": { + "type": "string", + "nullable": true }, - "vm_host_prefer_enabled": { - "type": "boolean" + "local_id_not": { + "type": "string", + "nullable": true }, - "vm_host_must_policy": { - "type": "boolean" + "local_id_not_contains": { + "type": "string", + "nullable": true }, - "vm_host_must_enabled": { - "type": "boolean" + "local_id_not_ends_with": { + "type": "string", + "nullable": true }, - "vm_host_prefer_policy": { - "type": "boolean" + "local_id_not_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true }, - "vm_vm_policy_enabled": { - "type": "boolean" + "local_id_not_starts_with": { + "type": "string", + "nullable": true }, - "vms": { - "$ref": "#/components/schemas/VmWhereInput" + "local_id_starts_with": { + "type": "string", + "nullable": true }, - "prefer_hosts": { - "$ref": "#/components/schemas/HostWhereInput" + "method": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupExecutionMethod" + } + ], + "nullable": true }, - "must_hosts": { - "$ref": "#/components/schemas/HostWhereInput" + "method_in": { + "items": { + "$ref": "#/components/schemas/BackupExecutionMethod" + }, + "type": "array", + "nullable": true }, - "name": { - "type": "string" + "method_not": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupExecutionMethod" + } + ], + "nullable": true }, - "description": { - "type": "string" + "method_not_in": { + "items": { + "$ref": "#/components/schemas/BackupExecutionMethod" + }, + "type": "array", + "nullable": true }, - "enabled": { - "type": "boolean" + "state": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupPlanExecutionState" + } + ], + "nullable": true }, - "cluster_id": { - "type": "string" - } - }, - "required": [ - "name", - "enabled", - "cluster_id" - ], - "type": "object" - }, - "VmPlacementGroupUpdationParams": { - "properties": { - "data": { - "properties": { - "vm_vm_policy": { - "$ref": "#/components/schemas/VmVmPolicy" - }, - "vms": { - "$ref": "#/components/schemas/VmWhereInput" + "state_in": { + "items": { + "$ref": "#/components/schemas/BackupPlanExecutionState" + }, + "type": "array", + "nullable": true + }, + "state_not": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupPlanExecutionState" + } + ], + "nullable": true + }, + "state_not_in": { + "items": { + "$ref": "#/components/schemas/BackupPlanExecutionState" + }, + "type": "array", + "nullable": true + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupPlanExecutionStatus" + } + ], + "nullable": true + }, + "status_in": { + "items": { + "$ref": "#/components/schemas/BackupPlanExecutionStatus" + }, + "type": "array", + "nullable": true + }, + "status_not": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupPlanExecutionStatus" + } + ], + "nullable": true + }, + "status_not_in": { + "items": { + "$ref": "#/components/schemas/BackupPlanExecutionStatus" + }, + "type": "array", + "nullable": true + }, + "success_job_count": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "success_job_count_gt": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "success_job_count_gte": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "success_job_count_in": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", + "nullable": true + }, + "success_job_count_lt": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "success_job_count_lte": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "success_job_count_not": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "success_job_count_not_in": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", + "nullable": true + }, + "total_job_count": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "total_job_count_gt": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "total_job_count_gte": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "total_job_count_in": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", + "nullable": true + }, + "total_job_count_lt": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "total_job_count_lte": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "total_job_count_not": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "total_job_count_not_in": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", + "nullable": true + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupExecutionType" + } + ], + "nullable": true + }, + "type_in": { + "items": { + "$ref": "#/components/schemas/BackupExecutionType" + }, + "type": "array", + "nullable": true + }, + "type_not": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupExecutionType" + } + ], + "nullable": true + }, + "type_not_in": { + "items": { + "$ref": "#/components/schemas/BackupExecutionType" + }, + "type": "array", + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "BackupExecutionMethod": { + "enum": [ + "AUTO", + "MANUAL" + ], + "type": "string" + }, + "BackupPlanExecutionState": { + "enum": [ + "FAILED", + "PARTLY_FAILED", + "PAUSED", + "PAUSING", + "RUNNING", + "STARTING", + "SUCCEED" + ], + "type": "string" + }, + "BackupExecutionType": { + "enum": [ + "FULL", + "INCREMENTAL" + ], + "type": "string" + }, + "BackupExecutionStatus": { + "enum": [ + "ABORTED", + "FAILED", + "INITIALIZING", + "PAUSED", + "PENDING", + "RUNNING", + "SUCCESS" + ], + "type": "string" + }, + "BackupRestorePointCreation": { + "enum": [ + "AUTO", + "FAILBACK", + "FAILOVER", + "MANUAL" + ], + "type": "string" + }, + "BackupRestorePointType": { + "enum": [ + "FULL", + "INCREMENTAL" + ], + "type": "string" + }, + "BackupStoreStatus": { + "enum": [ + "CONNECTED", + "CONNECTING", + "DISABLED", + "ERROR", + "INIT", + "INIT_ERROR" + ], + "type": "string" + }, + "BackupStoreType": { + "enum": [ + "ISCSI", + "NFS3", + "NFS4" + ], + "type": "string" + }, + "BackupServiceStatus": { + "enum": [ + "ERROR", + "INITIALIZING", + "INSTALLING", + "INSTALL_FAILED", + "RUNNING", + "TERMINATE_FAILED", + "TERMINATING", + "UPGRADE_FAILED", + "UPGRADING" + ], + "type": "string" + }, + "BackupPlanDeleteStrategy": { + "enum": [ + "DELETE_RESTORE_POINT", + "KEEP_RESTORE_POINT" + ], + "type": "string" + }, + "BackupPlanUpdationParams": { + "properties": { + "data": { + "properties": { + "disconnect_strategy": { + "$ref": "#/components/schemas/BackupPlanDeleteStrategy" }, - "prefer_hosts": { - "$ref": "#/components/schemas/HostWhereInput" + "keep_policy_value": { + "type": "integer", + "format": "int32" }, - "must_hosts": { - "$ref": "#/components/schemas/HostWhereInput" + "keep_policy": { + "$ref": "#/components/schemas/BackupPlanKeepPolicy" }, - "vm_host_prefer_enabled": { - "type": "boolean" + "backup_delay_option": { + "$ref": "#/components/schemas/BackupPlanDelayOption" }, - "vm_host_must_policy": { - "type": "boolean" + "window_end": { + "type": "string" }, - "vm_host_must_enabled": { - "type": "boolean" + "window_start": { + "type": "string" }, - "vm_host_prefer_policy": { + "enable_window": { "type": "boolean" }, - "vm_vm_policy_enabled": { + "full_time_point": { + "$ref": "#/components/schemas/BackupPlanTimePoint" + }, + "full_period": { + "$ref": "#/components/schemas/BackupPlanPeriod" + }, + "full_interval": { + "type": "integer", + "format": "int32" + }, + "incremental_weekdays": { + "items": { + "$ref": "#/components/schemas/WeekdayTypeEnum" + }, + "type": "array" + }, + "incremental_time_points": { + "items": { + "$ref": "#/components/schemas/BackupPlanTimePoint" + }, + "type": "array" + }, + "incremental_interval": { + "type": "integer", + "format": "int32" + }, + "incremental_period": { + "$ref": "#/components/schemas/BackupPlanPeriod" + }, + "snapshot_consistent_type": { + "$ref": "#/components/schemas/ConsistentType" + }, + "compression": { "type": "boolean" }, - "name": { - "type": "string" + "vms": { + "$ref": "#/components/schemas/VmWhereInput" }, "description": { "type": "string" }, - "enabled": { - "type": "boolean" + "name": { + "type": "string" } }, "type": "object" }, "where": { - "$ref": "#/components/schemas/VmPlacementGroupWhereInput" + "$ref": "#/components/schemas/BackupPlanWhereInput" } }, "required": [ @@ -94232,8 +93155,16 @@ ], "type": "object" }, - "DeleteVmPlacementGroup": { + "DeleteBackupPlan": { "properties": { + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], + "nullable": true + }, "id": { "type": "string" } @@ -94243,14 +93174,14 @@ ], "type": "object" }, - "WithTask_DeleteVmPlacementGroup_": { + "WithTask_DeleteBackupPlan_": { "properties": { "task_id": { "type": "string", "nullable": true }, "data": { - "$ref": "#/components/schemas/DeleteVmPlacementGroup" + "$ref": "#/components/schemas/DeleteBackupPlan" } }, "required": [ @@ -94258,18 +93189,52 @@ ], "type": "object" }, - "VmPlacementGroupDeletionParams": { + "BackupPlanDeletionParams": { "properties": { + "data": { + "properties": { + "delete_strategy": { + "$ref": "#/components/schemas/BackupPlanDeleteStrategy" + } + }, + "required": [ + "delete_strategy" + ], + "type": "object" + }, "where": { - "$ref": "#/components/schemas/VmPlacementGroupWhereInput" + "$ref": "#/components/schemas/BackupPlanWhereInput" } }, "required": [ + "data", "where" ], "type": "object" }, - "NestedSnapshotGroup": { + "BackupPlanSuspendParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/BackupPlanWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "BackupPlanResumeParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/BackupPlanWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "NestedBackupPlan": { "properties": { "id": { "type": "string" @@ -94285,206 +93250,125 @@ "type": "object", "additionalProperties": false }, - "NestedFrozenDisks": { + "BackupPlanExecution": { "properties": { - "boot": { - "type": "integer", - "format": "int32" - }, - "bus": { - "$ref": "#/components/schemas/Bus" - }, - "disabled": { - "type": "boolean", - "nullable": true - }, - "disk_name": { - "type": "string", - "nullable": true - }, - "elf_image_local_id": { - "type": "string" - }, - "image_name": { - "type": "string", - "nullable": true - }, - "index": { - "type": "integer", - "format": "int32" - }, - "key": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "max_bandwidth": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "max_bandwidth_policy": { + "backup_plan": { "allOf": [ { - "$ref": "#/components/schemas/VmDiskIoRestrictType" + "$ref": "#/components/schemas/NestedBackupPlan" } ], "nullable": true }, - "max_iops": { + "deletable_flag_marked": { + "type": "boolean", + "nullable": true + }, + "duration": { "type": "integer", "format": "int32", "nullable": true }, - "max_iops_policy": { + "entityAsyncStatus": { "allOf": [ { - "$ref": "#/components/schemas/VmDiskIoRestrictType" + "$ref": "#/components/schemas/EntityAsyncStatus" } ], "nullable": true }, - "path": { - "type": "string" - }, - "size": { - "type": "integer", - "format": "int64" - }, - "snapshot_local_id": { + "executed_at": { "type": "string", "nullable": true }, - "storage_policy_uuid": { + "id": { "type": "string" }, - "svt_image_local_id": { + "local_created_at": { "type": "string" }, - "type": { - "$ref": "#/components/schemas/VmDiskType" - }, - "vm_volume_local_id": { + "local_id": { "type": "string" }, - "vm_volume_snapshot_uuid": { - "type": "string", + "method": { + "$ref": "#/components/schemas/BackupExecutionMethod" + }, + "state": { + "allOf": [ + { + "$ref": "#/components/schemas/BackupPlanExecutionState" + } + ], "nullable": true }, - "vm_volume_template_uuid": { - "type": "string", + "status": { + "$ref": "#/components/schemas/BackupPlanExecutionStatus" + }, + "success_job_count": { + "type": "integer", + "format": "int32", "nullable": true + }, + "total_job_count": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/BackupExecutionType" } }, "required": [ - "boot", - "bus", - "elf_image_local_id", - "index", - "path", - "size", - "storage_policy_uuid", - "svt_image_local_id", - "type", - "vm_volume_local_id" + "id", + "local_created_at", + "local_id", + "method", + "status", + "type" ], "type": "object", "additionalProperties": false }, - "NestedFrozenVlan": { + "WithTask_BackupPlanExecution_": { "properties": { - "name": { - "type": "string" - }, - "vds_ovs": { - "type": "string" - }, - "vlan_id": { - "type": "integer", - "format": "int32" + "task_id": { + "type": "string", + "nullable": true }, - "vlan_local_id": { - "type": "string" + "data": { + "$ref": "#/components/schemas/BackupPlanExecution" } }, "required": [ - "name", - "vds_ovs", - "vlan_id", - "vlan_local_id" + "data" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "NestedFrozenNic": { + "BackupPlanExecuteParams": { "properties": { - "enabled": { - "type": "boolean", - "nullable": true - }, - "gateway": { - "type": "string" - }, - "index": { - "type": "integer", - "format": "int32" - }, - "ip_address": { - "type": "string" - }, - "mac_address": { - "type": "string" - }, - "mirror": { - "type": "boolean", - "nullable": true - }, - "model": { - "allOf": [ - { - "$ref": "#/components/schemas/VmNicModel" + "data": { + "properties": { + "type": { + "$ref": "#/components/schemas/BackupExecutionType" } + }, + "required": [ + "type" ], - "nullable": true - }, - "subnet_mask": { - "type": "string" + "type": "object" }, - "vlan": { - "$ref": "#/components/schemas/NestedFrozenVlan" + "where": { + "$ref": "#/components/schemas/BackupPlanWhereInput" } }, "required": [ - "gateway", - "index", - "ip_address", - "mac_address", - "subnet_mask", - "vlan" + "data", + "where" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "VmSnapshot": { + "BackupRestoreExecution": { "properties": { - "clock_offset": { - "$ref": "#/components/schemas/VmClockOffset" - }, - "cluster": { - "$ref": "#/components/schemas/NestedCluster" - }, - "consistent_type": { - "$ref": "#/components/schemas/ConsistentType" - }, - "cpu": { - "$ref": "#/components/schemas/NestedCpu" - }, - "cpu_model": { - "type": "string" - }, - "description": { - "type": "string" - }, "entityAsyncStatus": { "allOf": [ { @@ -94493,140 +93377,28 @@ ], "nullable": true }, - "firmware": { - "$ref": "#/components/schemas/VmFirmware" - }, - "ha": { - "type": "boolean" - }, "id": { "type": "string" }, - "io_policy": { - "allOf": [ - { - "$ref": "#/components/schemas/VmDiskIoPolicy" - } - ], - "nullable": true - }, - "labels": { - "items": { - "$ref": "#/components/schemas/NestedLabel" - }, - "type": "array", - "nullable": true - }, - "local_created_at": { - "type": "string", - "nullable": true - }, - "local_id": { - "type": "string" - }, - "max_bandwidth": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "max_bandwidth_policy": { - "allOf": [ - { - "$ref": "#/components/schemas/VmDiskIoRestrictType" - } - ], - "nullable": true - }, - "max_iops": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "max_iops_policy": { - "allOf": [ - { - "$ref": "#/components/schemas/VmDiskIoRestrictType" - } - ], - "nullable": true - }, - "memory": { - "type": "integer", - "format": "int64" - }, "name": { "type": "string" - }, - "size": { - "type": "integer", - "format": "int64" - }, - "snapshot_group": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedSnapshotGroup" - } - ], - "nullable": true - }, - "vcpu": { - "type": "integer", - "format": "int32" - }, - "vm": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedVm" - } - ], - "nullable": true - }, - "vm_disks": { - "items": { - "$ref": "#/components/schemas/NestedFrozenDisks" - }, - "type": "array", - "nullable": true - }, - "vm_nics": { - "items": { - "$ref": "#/components/schemas/NestedFrozenNic" - }, - "type": "array", - "nullable": true - }, - "win_opt": { - "type": "boolean" } }, "required": [ - "clock_offset", - "cluster", - "consistent_type", - "cpu", - "cpu_model", - "description", - "firmware", - "ha", "id", - "local_id", - "memory", - "name", - "size", - "vcpu", - "win_opt" + "name" ], "type": "object", "additionalProperties": false }, - "WithTask_VmSnapshot_": { + "WithTask_BackupRestoreExecution_": { "properties": { "task_id": { "type": "string", "nullable": true }, "data": { - "$ref": "#/components/schemas/VmSnapshot" + "$ref": "#/components/schemas/BackupRestoreExecution" } }, "required": [ @@ -94634,40 +93406,103 @@ ], "type": "object" }, - "VmSnapshotCreationParamsData": { + "BackupRestoreExecutionNetworkMapping": { "properties": { - "consistent_type": { - "$ref": "#/components/schemas/ConsistentType" - }, - "name": { + "src_vlan_id": { "type": "string" }, - "vm_id": { + "dst_vlan_id": { "type": "string" + }, + "__typename": { + "type": "string", + "enum": [ + "BackupRestoreExecutionNetworkMapping" + ], + "nullable": false } }, "required": [ - "name", - "vm_id" + "src_vlan_id", + "dst_vlan_id" ], "type": "object" }, - "VmSnapshotCreationParams": { + "BackupRestorePointRebuildParams": { "properties": { "data": { - "items": { - "$ref": "#/components/schemas/VmSnapshotCreationParamsData" + "properties": { + "rebuild_network_mapping": { + "items": { + "$ref": "#/components/schemas/BackupRestoreExecutionNetworkMapping" + }, + "type": "array" + }, + "rebuild_target_host_id": { + "type": "string" + }, + "rebuild_target_cluster_id": { + "type": "string" + }, + "rebuild_name": { + "type": "string" + }, + "startup_after_restore": { + "type": "boolean" + } }, - "type": "array" + "required": [ + "rebuild_network_mapping", + "rebuild_target_host_id", + "rebuild_target_cluster_id", + "rebuild_name", + "startup_after_restore" + ], + "type": "object" + }, + "where": { + "$ref": "#/components/schemas/BackupRestorePointWhereInput" } }, "required": [ - "data" + "data", + "where" ], "type": "object" }, - "DeleteVmSnapshot": { + "BackupRestorePointRestoreInPlaceParams": { + "properties": { + "data": { + "properties": { + "startup_after_restore": { + "type": "boolean" + } + }, + "required": [ + "startup_after_restore" + ], + "type": "object" + }, + "where": { + "$ref": "#/components/schemas/BackupRestorePointWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "DeleteBackupRestorePoint": { "properties": { + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], + "nullable": true + }, "id": { "type": "string" } @@ -94677,14 +93512,17 @@ ], "type": "object" }, - "WithTask_DeleteVmSnapshot_": { + "WithTask_DeleteBackupRestorePoint-Array_": { "properties": { "task_id": { "type": "string", "nullable": true }, "data": { - "$ref": "#/components/schemas/DeleteVmSnapshot" + "items": { + "$ref": "#/components/schemas/DeleteBackupRestorePoint" + }, + "type": "array" } }, "required": [ @@ -94692,10 +93530,10 @@ ], "type": "object" }, - "VmSnapshotDeletionParams": { + "BackupRestorePointDeletionParams": { "properties": { "where": { - "$ref": "#/components/schemas/VmSnapshotWhereInput" + "$ref": "#/components/schemas/BackupRestorePointWhereInput" } }, "required": [ @@ -94703,237 +93541,334 @@ ], "type": "object" }, - "NestedTemplateVpcNic": { + "DisassociateSystemServiceFromObsServiceResultType": { + "enum": [ + "FAIL", + "SUCCESS" + ], + "type": "string" + }, + "DisassociateSystemServiceFromObsServiceResult": { "properties": { - "vpc_local_id": { + "errorMessage": { "type": "string" }, - "vpc_subnet_local_id": { + "errorCode": { "type": "string" + }, + "result": { + "$ref": "#/components/schemas/DisassociateSystemServiceFromObsServiceResultType" } }, "required": [ - "vpc_local_id", - "vpc_subnet_local_id" + "result" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "NestedTemplateNic": { + "WithTask_DisassociateSystemServiceFromObsServiceResult_": { "properties": { - "enabled": { - "type": "boolean", - "nullable": true - }, - "index": { - "type": "integer", - "format": "int32" - }, - "ip_address": { + "task_id": { "type": "string", "nullable": true }, - "mac_address": { - "type": "string", - "nullable": true + "data": { + "$ref": "#/components/schemas/DisassociateSystemServiceFromObsServiceResult" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "ObservabilityConnectedSystemServiceType": { + "enum": [ + "BACKUP_SERVICE", + "CLOUDTOWER", + "EVEROUTE_SERVICE", + "OBSERVABILITY_SERVICE", + "REPLICATION_SERVICE", + "SFS_SERVICE" + ], + "type": "string" + }, + "DisassociateSystemServiceFromObsServiceParams": { + "properties": { + "system_service_type": { + "$ref": "#/components/schemas/ObservabilityConnectedSystemServiceType" }, - "mirror": { - "type": "boolean", + "system_service_id": { + "type": "string" + } + }, + "required": [ + "system_service_id" + ], + "type": "object" + }, + "WithTask_Task_": { + "properties": { + "task_id": { + "type": "string", "nullable": true }, - "model": { - "allOf": [ - { - "$ref": "#/components/schemas/VmNicModel" - } - ], - "nullable": true + "data": { + "$ref": "#/components/schemas/Task" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "TaskDescription": { + "properties": { + "en-US": { + "type": "string" }, - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/VmNicType" - } - ], - "nullable": true + "zh-CN": { + "type": "string" + } + }, + "required": [ + "en-US", + "zh-CN" + ], + "type": "object" + }, + "TaskStepCreationParams": { + "properties": { + "description": { + "type": "string" }, - "vlan": { - "$ref": "#/components/schemas/NestedFrozenVlan" + "finished": { + "type": "boolean" }, - "vpc_nic": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedTemplateVpcNic" - } - ], - "nullable": true + "key": { + "type": "string", + "minLength": 1 } }, "required": [ - "index", - "vlan" + "finished", + "key" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "VmTemplate": { + "TaskCreationParams": { "properties": { - "clock_offset": { - "$ref": "#/components/schemas/VmClockOffset" + "steps": { + "items": { + "$ref": "#/components/schemas/TaskStepCreationParams" + }, + "type": "array" }, - "cloud_init_supported": { - "type": "boolean" + "args": { + "additionalProperties": false, + "type": "object" }, - "cluster": { - "$ref": "#/components/schemas/NestedCluster" + "key": { + "type": "string" }, - "content_library_vm_template": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedContentLibraryVmTemplate" - } - ], - "nullable": true + "internal": { + "type": "boolean" }, - "cpu": { - "$ref": "#/components/schemas/NestedCpu" + "type": { + "$ref": "#/components/schemas/TaskType" }, - "cpu_model": { + "resource_id": { "type": "string" }, - "description": { + "cluster_id": { "type": "string" }, - "entityAsyncStatus": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" - } - ], - "nullable": true + "user_id": { + "type": "string" }, - "firmware": { - "$ref": "#/components/schemas/VmFirmware" + "description": { + "$ref": "#/components/schemas/TaskDescription" }, - "ha": { - "type": "boolean" + "resource_mutation": { + "type": "string", + "minLength": 1 }, - "id": { - "type": "string" - }, - "io_policy": { - "allOf": [ - { - "$ref": "#/components/schemas/VmDiskIoPolicy" + "resource_type": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "user_id", + "description", + "resource_mutation", + "resource_type" + ], + "type": "object" + }, + "TaskUpdateParams": { + "properties": { + "data": { + "properties": { + "resource_rollback_retry_count": { + "type": "integer", + "format": "int32" + }, + "resource_rollback_error": { + "type": "string" + }, + "resource_rollbacked": { + "type": "boolean" + }, + "steps": { + "items": { + "$ref": "#/components/schemas/TaskStepCreationParams" + }, + "type": "array" + }, + "error_message": { + "type": "string" + }, + "error_code": { + "type": "string" + }, + "progress": { + "type": "number", + "format": "float" + }, + "status": { + "$ref": "#/components/schemas/TaskStatus" + }, + "snapshot": { + "type": "string" + }, + "args": { + "additionalProperties": false, + "type": "object" + }, + "key": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/TaskType" + }, + "resource_id": { + "type": "string" + }, + "cluster_id": { + "type": "string" + }, + "user_id": { + "type": "string" + }, + "resource_mutation": { + "type": "string" + }, + "resource_type": { + "type": "string" + }, + "description": { + "type": "string" } - ], - "nullable": true - }, - "labels": { - "items": { - "$ref": "#/components/schemas/NestedLabel" }, - "type": "array", - "nullable": true + "type": "object" }, - "local_created_at": { + "where": { + "$ref": "#/components/schemas/TaskWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "NestedVirtualPrivateCloudExternalSubnet": { + "properties": { + "floating_ip_cidr": { "type": "string", "nullable": true }, - "local_id": { + "id": { "type": "string" }, - "max_bandwidth": { - "type": "integer", - "format": "int64", - "nullable": true + "name": { + "type": "string" }, - "max_bandwidth_policy": { - "allOf": [ - { - "$ref": "#/components/schemas/VmDiskIoRestrictType" - } - ], + "nat_gateway_cidr": { + "type": "string", "nullable": true }, - "max_iops": { - "type": "integer", - "format": "int32", + "router_gateway_cidr": { + "type": "string", "nullable": true + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "NestedVirtualPrivateCloud": { + "properties": { + "id": { + "type": "string" }, - "max_iops_policy": { + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "VirtualPrivateCloudFloatingIp": { + "properties": { + "entityAsyncStatus": { "allOf": [ { - "$ref": "#/components/schemas/VmDiskIoRestrictType" + "$ref": "#/components/schemas/EntityAsyncStatus" } ], "nullable": true }, - "memory": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - }, - "size": { - "type": "integer", - "format": "int64" - }, - "vcpu": { - "type": "integer", - "format": "int32" - }, - "video_type": { + "external_ip": { "type": "string", "nullable": true }, - "vm_disks": { - "items": { - "$ref": "#/components/schemas/NestedFrozenDisks" - }, - "type": "array", - "nullable": true + "external_subnet": { + "$ref": "#/components/schemas/NestedVirtualPrivateCloudExternalSubnet" }, - "vm_nics": { - "items": { - "$ref": "#/components/schemas/NestedTemplateNic" - }, - "type": "array", - "nullable": true + "id": { + "type": "string" }, - "win_opt": { - "type": "boolean" + "local_id": { + "type": "string" + }, + "vpc": { + "$ref": "#/components/schemas/NestedVirtualPrivateCloud" } }, "required": [ - "clock_offset", - "cloud_init_supported", - "cluster", - "cpu", - "cpu_model", - "description", - "firmware", - "ha", + "external_subnet", "id", "local_id", - "memory", - "name", - "size", - "vcpu", - "win_opt" + "vpc" ], "type": "object", "additionalProperties": false }, - "WithTask_VmTemplate_": { + "WithTask_VirtualPrivateCloudFloatingIp_": { "properties": { "task_id": { "type": "string", "nullable": true }, "data": { - "$ref": "#/components/schemas/VmTemplate" + "$ref": "#/components/schemas/VirtualPrivateCloudFloatingIp" } }, "required": [ @@ -94941,57 +93876,25 @@ ], "type": "object" }, - "VmTemplateCreationParams": { + "VirtualPrivateCloudFloatingIpCreationParams": { "properties": { - "cluster_id": { - "type": "string" - }, - "cloud_init_supported": { - "type": "boolean" - }, - "vm_id": { + "external_ip": { "type": "string" }, - "description": { + "external_subnet_id": { "type": "string" }, - "name": { + "vpc_id": { "type": "string" } }, "required": [ - "cloud_init_supported", - "vm_id", - "name" - ], - "type": "object" - }, - "VmTemplateUpdationParams": { - "properties": { - "data": { - "properties": { - "cloud_init_supported": { - "type": "boolean" - }, - "description": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "where": { - "$ref": "#/components/schemas/VmTemplateWhereInput" - } - }, - "required": [ - "where" + "external_subnet_id", + "vpc_id" ], "type": "object" }, - "DeleteVmTemplate": { + "DeleteVirtualPrivateCloudFloatingIp": { "properties": { "id": { "type": "string" @@ -95002,14 +93905,14 @@ ], "type": "object" }, - "WithTask_DeleteVmTemplate_": { + "WithTask_DeleteVirtualPrivateCloudFloatingIp_": { "properties": { "task_id": { "type": "string", "nullable": true }, "data": { - "$ref": "#/components/schemas/DeleteVmTemplate" + "$ref": "#/components/schemas/DeleteVirtualPrivateCloudFloatingIp" } }, "required": [ @@ -95017,10 +93920,10 @@ ], "type": "object" }, - "VmTemplateDeletionParams": { + "VirtualPrivateCloudFloatingIpDeletionParams": { "properties": { "where": { - "$ref": "#/components/schemas/VmTemplateWhereInput" + "$ref": "#/components/schemas/VirtualPrivateCloudFloatingIpWhereInput" } }, "required": [ @@ -95028,20 +93931,44 @@ ], "type": "object" }, - "VmVolumeSnapshot": { + "NestedVpcDnatRuleType": { "properties": { - "cluster": { - "$ref": "#/components/schemas/NestedCluster" + "port": { + "type": "integer", + "format": "int32" }, - "createAt": { - "type": "string", + "target_ip": { + "type": "string" + }, + "target_port": { + "type": "integer", + "format": "int32" + } + }, + "required": [ + "port", + "target_ip", + "target_port" + ], + "type": "object", + "additionalProperties": false + }, + "VirtualPrivateCloudNatGateway": { + "properties": { + "dnat_rules": { + "items": { + "$ref": "#/components/schemas/NestedVpcDnatRuleType" + }, + "type": "array", "nullable": true }, - "description": { - "type": "string" + "enable_dnat": { + "type": "boolean", + "nullable": true }, - "elf_storage_policy": { - "$ref": "#/components/schemas/VmVolumeElfStoragePolicyType" + "enable_snat": { + "type": "boolean", + "nullable": true }, "entityAsyncStatus": { "allOf": [ @@ -95051,17 +93978,14 @@ ], "nullable": true }, - "id": { - "type": "string" - }, - "labels": { - "items": { - "$ref": "#/components/schemas/NestedLabel" - }, - "type": "array", + "external_ip": { + "type": "string", "nullable": true }, - "local_created_at": { + "external_subnet": { + "$ref": "#/components/schemas/NestedVirtualPrivateCloudExternalSubnet" + }, + "id": { "type": "string" }, "local_id": { @@ -95070,67 +93994,28 @@ "name": { "type": "string" }, - "shared_size": { - "type": "number", - "format": "double", - "nullable": true - }, - "size": { - "type": "number", - "format": "double", - "nullable": true - }, - "type": { - "$ref": "#/components/schemas/VmVolumeSnapshotType" - }, - "unique_size": { - "type": "number", - "format": "double", - "nullable": true - }, - "vm_volume": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedVmVolume" - } - ], - "nullable": true - }, - "volume_sharing": { - "type": "boolean", - "nullable": true - }, - "volume_size": { - "type": "number", - "format": "double", - "nullable": true - }, - "zbs_snapshot_uuid": { - "type": "string", - "nullable": true + "vpc": { + "$ref": "#/components/schemas/NestedVirtualPrivateCloud" } }, "required": [ - "cluster", - "description", - "elf_storage_policy", + "external_subnet", "id", - "local_created_at", "local_id", "name", - "type" + "vpc" ], "type": "object", "additionalProperties": false }, - "WithTask_VmVolumeSnapshot_": { + "WithTask_VirtualPrivateCloudNatGateway_": { "properties": { "task_id": { "type": "string", "nullable": true }, "data": { - "$ref": "#/components/schemas/VmVolumeSnapshot" + "$ref": "#/components/schemas/VirtualPrivateCloudNatGateway" } }, "required": [ @@ -95138,12 +94023,48 @@ ], "type": "object" }, - "VmVolumeSnapshotCreationParams": { + "VirtualPrivateCloudDnatRuleParams": { "properties": { - "volume_id": { + "target_port": { + "type": "integer", + "format": "int32" + }, + "port": { + "type": "integer", + "format": "int32" + }, + "target_ip": { + "type": "string" + } + }, + "required": [ + "target_port", + "port", + "target_ip" + ], + "type": "object" + }, + "VirtualPrivateCloudNatGatewayCreationParams": { + "properties": { + "external_ip": { "type": "string" }, - "description": { + "external_subnet_id": { + "type": "string" + }, + "dnat_rules": { + "items": { + "$ref": "#/components/schemas/VirtualPrivateCloudDnatRuleParams" + }, + "type": "array" + }, + "enable_dnat": { + "type": "boolean" + }, + "enable_snat": { + "type": "boolean" + }, + "vpc_id": { "type": "string" }, "name": { @@ -95151,13 +94072,50 @@ } }, "required": [ - "volume_id", - "description", + "external_subnet_id", + "enable_dnat", + "enable_snat", + "vpc_id", "name" ], "type": "object" }, - "DeleteVmVolumeSnapshot": { + "VirtualPrivateCloudNatGatewayUpdationParams": { + "properties": { + "data": { + "properties": { + "external_ip": { + "type": "string" + }, + "dnat_rules": { + "items": { + "$ref": "#/components/schemas/VirtualPrivateCloudDnatRuleParams" + }, + "type": "array" + }, + "enable_dnat": { + "type": "boolean" + }, + "enable_snat": { + "type": "boolean" + }, + "name": { + "type": "string" + } + }, + "type": "object" + }, + "where": { + "$ref": "#/components/schemas/VirtualPrivateCloudNatGatewayWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "DeleteVirtualPrivateCloudNatGateway": { "properties": { "id": { "type": "string" @@ -95168,14 +94126,14 @@ ], "type": "object" }, - "WithTask_DeleteVmVolumeSnapshot_": { + "WithTask_DeleteVirtualPrivateCloudNatGateway_": { "properties": { "task_id": { "type": "string", "nullable": true }, "data": { - "$ref": "#/components/schemas/DeleteVmVolumeSnapshot" + "$ref": "#/components/schemas/DeleteVirtualPrivateCloudNatGateway" } }, "required": [ @@ -95183,10 +94141,10 @@ ], "type": "object" }, - "VmVolumeSnapshotDeletionParams": { + "VirtualPrivateCloudNatGatewayDeletionParams": { "properties": { "where": { - "$ref": "#/components/schemas/VmVolumeSnapshotWhereInput" + "$ref": "#/components/schemas/VirtualPrivateCloudNatGatewayWhereInput" } }, "required": [ @@ -95194,125 +94152,108 @@ ], "type": "object" }, - "VmVolume": { + "NestedVirtualPrivateCloudRoute": { "properties": { - "cluster": { - "$ref": "#/components/schemas/NestedCluster" - }, - "description": { - "type": "string", - "nullable": true - }, - "elf_storage_policy": { - "$ref": "#/components/schemas/VmVolumeElfStoragePolicyType" - }, - "entityAsyncStatus": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityAsyncStatus" - } - ], - "nullable": true - }, - "guest_size_usage": { - "type": "number", - "format": "double", - "nullable": true - }, - "guest_used_size": { - "type": "integer", - "format": "int64", - "nullable": true + "destination": { + "type": "string" }, "id": { "type": "string" }, - "labels": { - "items": { - "$ref": "#/components/schemas/NestedLabel" - }, - "type": "array", - "nullable": true - }, - "local_created_at": { + "next_hop_local_id": { "type": "string" }, - "local_id": { - "type": "string" - }, - "lun": { - "allOf": [ - { - "$ref": "#/components/schemas/NestedIscsiLun" - } - ], - "nullable": true - }, - "mounting": { - "type": "boolean" - }, - "name": { + "next_hop_type": { + "$ref": "#/components/schemas/VirtualPrivateCloudRouteNextHopType" + } + }, + "required": [ + "destination", + "id", + "next_hop_local_id", + "next_hop_type" + ], + "type": "object", + "additionalProperties": false + }, + "NestedVirtualPrivateCloudSubnet": { + "properties": { + "id": { "type": "string" }, - "path": { + "name": { "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "VirtualPrivateCloudRouteTable": { + "properties": { + "default_for_vpc": { + "type": "boolean", + "nullable": true }, - "sharing": { - "type": "boolean" - }, - "size": { - "type": "integer", - "format": "int64" + "description": { + "type": "string", + "nullable": true }, - "type": { + "entityAsyncStatus": { "allOf": [ { - "$ref": "#/components/schemas/VmVolumeType" + "$ref": "#/components/schemas/EntityAsyncStatus" } ], "nullable": true }, - "unique_logical_size": { - "type": "number", - "format": "double", - "nullable": true + "id": { + "type": "string" }, - "unique_size": { - "type": "integer", - "format": "int64", + "local_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "routes": { + "items": { + "$ref": "#/components/schemas/NestedVirtualPrivateCloudRoute" + }, + "type": "array", "nullable": true }, - "vm_disks": { + "subnets": { "items": { - "$ref": "#/components/schemas/NestedVmDisk" + "$ref": "#/components/schemas/NestedVirtualPrivateCloudSubnet" }, "type": "array", "nullable": true + }, + "vpc": { + "$ref": "#/components/schemas/NestedVirtualPrivateCloud" } }, "required": [ - "cluster", - "elf_storage_policy", "id", - "local_created_at", "local_id", - "mounting", "name", - "path", - "sharing", - "size" + "vpc" ], "type": "object", "additionalProperties": false }, - "WithTask_VmVolume_": { + "WithTask_VirtualPrivateCloudRouteTable_": { "properties": { "task_id": { "type": "string", "nullable": true }, "data": { - "$ref": "#/components/schemas/VmVolume" + "$ref": "#/components/schemas/VirtualPrivateCloudRouteTable" } }, "required": [ @@ -95320,22 +94261,37 @@ ], "type": "object" }, - "VmVolumeCreationParams": { + "VirtualPrivateCloudRouteParams": { "properties": { - "elf_storage_policy": { - "$ref": "#/components/schemas/VmVolumeElfStoragePolicyType" + "destination": { + "type": "string" }, - "size_unit": { - "$ref": "#/components/schemas/ByteUnit" + "next_hop_local_id": { + "type": "string" }, - "size": { - "type": "integer", - "format": "int64" + "next_hop_type": { + "$ref": "#/components/schemas/VirtualPrivateCloudRouteNextHopType" + } + }, + "required": [ + "destination", + "next_hop_local_id", + "next_hop_type" + ], + "type": "object" + }, + "VirtualPrivateCloudRouteTableCreationParams": { + "properties": { + "routes": { + "items": { + "$ref": "#/components/schemas/VirtualPrivateCloudRouteParams" + }, + "type": "array" }, - "sharing": { - "type": "boolean" + "vpc_id": { + "type": "string" }, - "cluster_id": { + "description": { "type": "string" }, "name": { @@ -95343,15 +94299,41 @@ } }, "required": [ - "elf_storage_policy", - "size", - "sharing", - "cluster_id", + "vpc_id", "name" ], "type": "object" }, - "DeleteVmVolume": { + "VirtualPrivateCloudRouteTableUpdationParams": { + "properties": { + "data": { + "properties": { + "routes": { + "items": { + "$ref": "#/components/schemas/VirtualPrivateCloudRouteParams" + }, + "type": "array" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "type": "object" + }, + "where": { + "$ref": "#/components/schemas/VirtualPrivateCloudRouteTableWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "DeleteVirtualPrivateCloudRouteTable": { "properties": { "id": { "type": "string" @@ -95362,14 +94344,14 @@ ], "type": "object" }, - "WithTask_DeleteVmVolume_": { + "WithTask_DeleteVirtualPrivateCloudRouteTable_": { "properties": { "task_id": { "type": "string", "nullable": true }, "data": { - "$ref": "#/components/schemas/DeleteVmVolume" + "$ref": "#/components/schemas/DeleteVirtualPrivateCloudRouteTable" } }, "required": [ @@ -95377,21 +94359,10 @@ ], "type": "object" }, - "VmVolumeDeletionParamsEffect": { - "properties": { - "include_snapshots": { - "type": "boolean" - } - }, - "type": "object" - }, - "VmVolumeDeletionParams": { + "VirtualPrivateCloudRouteTableDeletionParams": { "properties": { - "effect": { - "$ref": "#/components/schemas/VmVolumeDeletionParamsEffect" - }, "where": { - "$ref": "#/components/schemas/VmVolumeWhereInput" + "$ref": "#/components/schemas/VirtualPrivateCloudRouteTableWhereInput" } }, "required": [ @@ -95399,207 +94370,202 @@ ], "type": "object" }, - "VmVolumeRebuildParams": { + "NestedVpcRouterGatewayRuleType": { "properties": { - "name": { - "type": "string" - }, - "description": { + "dst": { "type": "string" }, - "volume_snapshot_id": { - "type": "string" - } - }, - "required": [ - "name", - "description", - "volume_snapshot_id" - ], - "type": "object" - }, - "VmVolumeRollbackParams": { - "properties": { - "volume_snapshot_id": { - "type": "string" + "nexthop": { + "type": "string", + "nullable": true } }, "required": [ - "volume_snapshot_id" + "dst" ], - "type": "object" + "type": "object", + "additionalProperties": false }, - "VmVolumeWhereUniqueInput": { + "VirtualPrivateCloudRouterGateway": { "properties": { - "id": { + "associated_subnets": { + "items": { + "$ref": "#/components/schemas/NestedVirtualPrivateCloudSubnet" + }, + "type": "array", + "nullable": true + }, + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], + "nullable": true + }, + "external_ip": { "type": "string", "nullable": true }, + "external_subnet": { + "$ref": "#/components/schemas/NestedVirtualPrivateCloudExternalSubnet" + }, + "id": { + "type": "string" + }, "local_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "nexthop_ip": { "type": "string", "nullable": true + }, + "rules": { + "items": { + "$ref": "#/components/schemas/NestedVpcRouterGatewayRuleType" + }, + "type": "array" + }, + "vpc": { + "$ref": "#/components/schemas/NestedVirtualPrivateCloud" } }, + "required": [ + "external_subnet", + "id", + "local_id", + "name", + "rules", + "vpc" + ], "type": "object", "additionalProperties": false }, - "CloneVmVolumeParams": { + "WithTask_VirtualPrivateCloudRouterGateway_": { "properties": { - "where": { - "$ref": "#/components/schemas/VmVolumeWhereUniqueInput" + "task_id": { + "type": "string", + "nullable": true }, "data": { - "properties": { - "description": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" + "$ref": "#/components/schemas/VirtualPrivateCloudRouterGateway" } }, "required": [ - "where", "data" ], "type": "object" }, - "UpdateVmVolumeParams": { + "VirtualPrivateCloudRouterGatewayRuleInputType": { "properties": { - "where": { - "$ref": "#/components/schemas/VmVolumeWhereInput" + "dst": { + "type": "string" }, - "data": { - "properties": { - "size_unit": { - "$ref": "#/components/schemas/ByteUnit" - }, - "size": { - "type": "integer", - "format": "int64" - }, - "description": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "type": "object" + "nexthop": { + "type": "string" } }, "required": [ - "where", - "data" + "dst" ], "type": "object" }, - "VmVolumeExportFileType": { - "type": "string", - "enum": [ - "QCOW2", - "RAW" - ] - }, - "ExportVmVolumeParams": { + "VirtualPrivateCloudRouterGatewayCreationParams": { "properties": { - "data": { - "properties": { - "type": { - "$ref": "#/components/schemas/VmVolumeExportFileType" - } + "rules": { + "items": { + "$ref": "#/components/schemas/VirtualPrivateCloudRouterGatewayRuleInputType" }, - "required": [ - "type" - ], - "type": "object" + "type": "array" }, - "where": { - "$ref": "#/components/schemas/VmVolumeWhereInput" + "associated_subnets_ids": { + "items": { + "type": "string" + }, + "type": "array" + }, + "external_ip": { + "type": "string" + }, + "external_subnet_id": { + "type": "string" + }, + "vpc_id": { + "type": "string" + }, + "name": { + "type": "string" } }, "required": [ - "data", - "where" + "rules", + "associated_subnets_ids", + "external_subnet_id", + "vpc_id", + "name" ], "type": "object" }, - "ImportVmVolumeParams": { + "VirtualPrivateCloudRouterGatewayUpdateDataParams": { "properties": { - "upload_task_id": { + "rules": { + "items": { + "$ref": "#/components/schemas/VirtualPrivateCloudRouterGatewayRuleInputType" + }, + "type": "array" + }, + "associated_subnets_ids": { + "items": { + "type": "string" + }, + "type": "array" + }, + "external_ip": { "type": "string" }, "name": { "type": "string" + } + }, + "type": "object" + }, + "VirtualPrivateCloudRouterGatewayUpdationParams": { + "properties": { + "data": { + "$ref": "#/components/schemas/VirtualPrivateCloudRouterGatewayUpdateDataParams" }, - "storage_policy": { - "$ref": "#/components/schemas/VmVolumeElfStoragePolicyType" - }, - "cluster_id": { - "type": "string" + "where": { + "$ref": "#/components/schemas/VirtualPrivateCloudRouterGatewayWhereInput" } }, "required": [ - "upload_task_id", - "name", - "storage_policy", - "cluster_id" + "data", + "where" ], "type": "object" }, - "VsphereEsxiAccount": { + "DeleteVirtualPrivateCloudRouterGateway": { "properties": { - "host": { - "$ref": "#/components/schemas/NestedHost" - }, "id": { "type": "string" - }, - "ip": { - "type": "string" - }, - "is_valid": { - "type": "boolean" - }, - "local_id": { - "type": "string" - }, - "port": { - "type": "integer", - "format": "int32" - }, - "username": { - "type": "string" } }, "required": [ - "host", - "id", - "ip", - "is_valid", - "local_id", - "port", - "username" + "id" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "WithTask_VsphereEsxiAccount-Array_": { + "WithTask_DeleteVirtualPrivateCloudRouterGateway_": { "properties": { "task_id": { "type": "string", "nullable": true }, "data": { - "items": { - "$ref": "#/components/schemas/VsphereEsxiAccount" - }, - "type": "array" + "$ref": "#/components/schemas/DeleteVirtualPrivateCloudRouterGateway" } }, "required": [ @@ -95607,99 +94573,42 @@ ], "type": "object" }, - "UpdateVsphereEsxiAccountParamsData": { + "VirtualPrivateCloudRouterGatewayDeletionParams": { "properties": { - "port": { - "type": "integer", - "format": "int32" - }, - "password": { - "type": "string" - }, - "username": { - "type": "string" - }, - "ip": { - "type": "string" - }, - "esxi_account_id": { - "type": "string" + "where": { + "$ref": "#/components/schemas/VirtualPrivateCloudRouterGatewayWhereInput" } }, "required": [ - "username", - "ip", - "esxi_account_id" + "where" ], "type": "object" }, - "UpdateVsphereEsxiAccountParams": { + "NestedVirtualPrivateCloudLabelGroup": { "properties": { - "data": { + "labels": { "items": { - "$ref": "#/components/schemas/UpdateVsphereEsxiAccountParamsData" + "$ref": "#/components/schemas/NestedLabel" }, "type": "array" } }, "required": [ - "data" - ], - "type": "object" - }, - "NotifierLanguageCode": { - "enum": [ - "EN_US", - "ZH_CN" - ], - "type": "string" - }, - "NotifierSecurityMode": { - "enum": [ - "SSL", - "STARTTLS", - "UNSPECIFIED" - ], - "type": "string" - }, - "NestedSmtpServer": { - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" + "labels" ], "type": "object", "additionalProperties": false }, - "AlertNotifier": { + "VirtualPrivateCloudSecurityGroup": { "properties": { - "clusters": { - "items": { - "$ref": "#/components/schemas/NestedCluster" - }, - "type": "array", + "default_for_vpc": { + "type": "boolean", "nullable": true }, - "disabled": { - "type": "boolean" - }, - "email_from": { + "description": { "type": "string", "nullable": true }, - "email_tos": { - "items": { - "type": "string" - }, - "type": "array" - }, "entityAsyncStatus": { "allOf": [ { @@ -95711,205 +94620,318 @@ "id": { "type": "string" }, - "language_code": { - "allOf": [ - { - "$ref": "#/components/schemas/NotifierLanguageCode" - } - ], + "label_groups": { + "items": { + "$ref": "#/components/schemas/NestedVirtualPrivateCloudLabelGroup" + }, + "type": "array", "nullable": true }, + "local_id": { + "type": "string" + }, "name": { + "type": "string" + }, + "vms": { + "items": { + "$ref": "#/components/schemas/NestedVm" + }, + "type": "array", + "nullable": true + }, + "vpc": { + "$ref": "#/components/schemas/NestedVirtualPrivateCloud" + } + }, + "required": [ + "id", + "local_id", + "name", + "vpc" + ], + "type": "object", + "additionalProperties": false + }, + "WithTask_VirtualPrivateCloudSecurityGroup_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "notice_severities": { + "data": { + "$ref": "#/components/schemas/VirtualPrivateCloudSecurityGroup" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "LabelGroup": { + "properties": { + "label_ids": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "label_ids" + ], + "type": "object" + }, + "VirtualPrivateCloudSecurityGroupCreationParams": { + "properties": { + "vm_ids": { "items": { "type": "string" }, "type": "array" }, - "security_mode": { - "allOf": [ - { - "$ref": "#/components/schemas/NotifierSecurityMode" + "label_groups": { + "items": { + "$ref": "#/components/schemas/LabelGroup" + }, + "type": "array" + }, + "vpc_id": { + "type": "string" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "vpc_id", + "name" + ], + "type": "object" + }, + "VirtualPrivateCloudSecurityGroupUpdationParams": { + "properties": { + "data": { + "properties": { + "vm_ids": { + "items": { + "type": "string" + }, + "type": "array" + }, + "label_groups": { + "items": { + "$ref": "#/components/schemas/LabelGroup" + }, + "type": "array" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" } - ], + }, + "type": "object" + }, + "where": { + "$ref": "#/components/schemas/VirtualPrivateCloudSecurityGroupWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "DeleteVirtualPrivateCloudSecurityGroup": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "WithTask_DeleteVirtualPrivateCloudSecurityGroup_": { + "properties": { + "task_id": { + "type": "string", "nullable": true }, - "smtp_server_config": { + "data": { + "$ref": "#/components/schemas/DeleteVirtualPrivateCloudSecurityGroup" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "VirtualPrivateCloudSecurityGroupDeletionParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/VirtualPrivateCloudSecurityGroupWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "NestedVirtualPrivateCloudSecurityGroup": { + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "NestedVirtualPrivateCloudSecurityPolicyApply": { + "properties": { + "communicable": { + "type": "boolean" + }, + "security_group": { "allOf": [ { - "$ref": "#/components/schemas/NestedSmtpServer" + "$ref": "#/components/schemas/NestedVirtualPrivateCloudSecurityGroup" } ], "nullable": true }, - "smtp_server_host": { + "security_group_id": { + "type": "string" + } + }, + "required": [ + "communicable", + "security_group_id" + ], + "type": "object", + "additionalProperties": false + }, + "VirtualPrivateCloudNetworkPolicyRulePortProtocol": { + "enum": [ + "ICMP", + "TCP", + "UDP" + ], + "type": "string" + }, + "NestedVirtualPrivateCloudNetworkPolicyRulePort": { + "properties": { + "port": { "type": "string", "nullable": true }, - "smtp_server_port": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "username": { - "type": "string", - "nullable": true + "protocol": { + "$ref": "#/components/schemas/VirtualPrivateCloudNetworkPolicyRulePortProtocol" } }, "required": [ - "disabled", - "email_tos", - "id", - "notice_severities" + "protocol" ], "type": "object", "additionalProperties": false }, - "AlertNotifierOrderByInput": { + "VirtualPrivateCloudNetworkPolicyRuleType": { "enum": [ - "disabled_ASC", - "disabled_DESC", - "email_from_ASC", - "email_from_DESC", - "entityAsyncStatus_ASC", - "entityAsyncStatus_DESC", - "id_ASC", - "id_DESC", - "language_code_ASC", - "language_code_DESC", - "name_ASC", - "name_DESC", - "security_mode_ASC", - "security_mode_DESC", - "smtp_server_host_ASC", - "smtp_server_host_DESC", - "smtp_server_port_ASC", - "smtp_server_port_DESC", - "username_ASC", - "username_DESC" + "ALL", + "IP_BLOCK", + "SECURITY_GROUP", + "SELECTOR" ], "type": "string" }, - "AlertNotifierWhereInput": { + "NestedVirtualPrivateCloudNetworkPolicyRule": { "properties": { - "AND": { + "except_ip_block": { "items": { - "$ref": "#/components/schemas/AlertNotifierWhereInput" + "type": "string" }, "type": "array", "nullable": true }, - "NOT": { - "items": { - "$ref": "#/components/schemas/AlertNotifierWhereInput" - }, - "type": "array", + "ip_block": { + "type": "string", "nullable": true }, - "OR": { + "ports": { "items": { - "$ref": "#/components/schemas/AlertNotifierWhereInput" + "$ref": "#/components/schemas/NestedVirtualPrivateCloudNetworkPolicyRulePort" }, "type": "array", "nullable": true }, - "clusters_every": { - "allOf": [ - { - "$ref": "#/components/schemas/ClusterWhereInput" - } - ], - "nullable": true - }, - "clusters_none": { - "allOf": [ - { - "$ref": "#/components/schemas/ClusterWhereInput" - } - ], - "nullable": true - }, - "clusters_some": { + "security_group": { "allOf": [ { - "$ref": "#/components/schemas/ClusterWhereInput" + "$ref": "#/components/schemas/NestedVirtualPrivateCloudSecurityGroup" } ], "nullable": true }, - "disabled": { - "type": "boolean", - "nullable": true - }, - "disabled_not": { - "type": "boolean", - "nullable": true - }, - "email_from": { - "type": "string", - "nullable": true - }, - "email_from_contains": { - "type": "string", - "nullable": true - }, - "email_from_ends_with": { - "type": "string", - "nullable": true - }, - "email_from_gt": { + "security_group_id": { "type": "string", "nullable": true }, - "email_from_gte": { - "type": "string", + "selector": { + "items": { + "$ref": "#/components/schemas/NestedLabel" + }, + "type": "array", "nullable": true }, - "email_from_in": { + "selector_ids": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "email_from_lt": { - "type": "string", - "nullable": true - }, - "email_from_lte": { - "type": "string", - "nullable": true - }, - "email_from_not": { - "type": "string", - "nullable": true - }, - "email_from_not_contains": { - "type": "string", - "nullable": true + "type": { + "$ref": "#/components/schemas/VirtualPrivateCloudNetworkPolicyRuleType" + } + }, + "required": [ + "type" + ], + "type": "object", + "additionalProperties": false + }, + "VirtualPrivateCloudSecurityPolicy": { + "properties": { + "apply_to": { + "items": { + "$ref": "#/components/schemas/NestedVirtualPrivateCloudSecurityPolicyApply" + }, + "type": "array" }, - "email_from_not_ends_with": { + "description": { "type": "string", "nullable": true }, - "email_from_not_in": { + "egress": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedVirtualPrivateCloudNetworkPolicyRule" }, "type": "array", "nullable": true }, - "email_from_not_starts_with": { - "type": "string", - "nullable": true - }, - "email_from_starts_with": { - "type": "string", - "nullable": true - }, "entityAsyncStatus": { "allOf": [ { @@ -95918,539 +94940,1000 @@ ], "nullable": true }, - "entityAsyncStatus_in": { + "id": { + "type": "string" + }, + "ingress": { "items": { - "$ref": "#/components/schemas/EntityAsyncStatus" + "$ref": "#/components/schemas/NestedVirtualPrivateCloudNetworkPolicyRule" }, "type": "array", "nullable": true }, - "entityAsyncStatus_not": { + "local_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "policy_mode": { "allOf": [ { - "$ref": "#/components/schemas/EntityAsyncStatus" + "$ref": "#/components/schemas/VirtualPrivateCloudSecurityPolicyMode" } ], "nullable": true }, - "entityAsyncStatus_not_in": { - "items": { - "$ref": "#/components/schemas/EntityAsyncStatus" - }, - "type": "array", - "nullable": true - }, - "id": { - "type": "string", - "nullable": true - }, - "id_contains": { + "vpc": { + "$ref": "#/components/schemas/NestedVirtualPrivateCloud" + } + }, + "required": [ + "apply_to", + "id", + "local_id", + "name", + "vpc" + ], + "type": "object", + "additionalProperties": false + }, + "WithTask_VirtualPrivateCloudSecurityPolicy_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "id_ends_with": { - "type": "string", - "nullable": true + "data": { + "$ref": "#/components/schemas/VirtualPrivateCloudSecurityPolicy" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "VirtualPrivateCloudSecurityPolicyApplyInput": { + "properties": { + "security_group_id": { + "type": "string" }, - "id_gt": { - "type": "string", - "nullable": true + "communicable": { + "type": "boolean" + } + }, + "required": [ + "security_group_id", + "communicable" + ], + "type": "object" + }, + "VirtualPrivateCloudNetworkPolicyRulePortInput": { + "properties": { + "protocol": { + "$ref": "#/components/schemas/VirtualPrivateCloudNetworkPolicyRulePortProtocol" }, - "id_gte": { + "port": { "type": "string", "nullable": true + } + }, + "required": [ + "protocol" + ], + "type": "object" + }, + "VirtualPrivateCloudNetworkPolicyRuleInput": { + "properties": { + "type": { + "$ref": "#/components/schemas/VirtualPrivateCloudNetworkPolicyRuleType" }, - "id_in": { + "selector_ids": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "id_lt": { - "type": "string", - "nullable": true - }, - "id_lte": { - "type": "string", - "nullable": true - }, - "id_not": { - "type": "string", - "nullable": true - }, - "id_not_contains": { - "type": "string", - "nullable": true - }, - "id_not_ends_with": { + "security_group_id": { "type": "string", "nullable": true }, - "id_not_in": { + "ports": { "items": { - "type": "string" + "$ref": "#/components/schemas/VirtualPrivateCloudNetworkPolicyRulePortInput" }, "type": "array", "nullable": true }, - "id_not_starts_with": { - "type": "string", - "nullable": true - }, - "id_starts_with": { + "ip_block": { "type": "string", "nullable": true }, - "language_code": { - "allOf": [ - { - "$ref": "#/components/schemas/NotifierLanguageCode" - } - ], - "nullable": true - }, - "language_code_in": { + "except_ip_block": { "items": { - "$ref": "#/components/schemas/NotifierLanguageCode" + "type": "string" }, "type": "array", "nullable": true + } + }, + "required": [ + "type" + ], + "type": "object" + }, + "VirtualPrivateCloudSecurityPolicyCreateParams": { + "properties": { + "egress": { + "items": { + "$ref": "#/components/schemas/VirtualPrivateCloudNetworkPolicyRuleInput" + }, + "type": "array" }, - "language_code_not": { - "allOf": [ - { - "$ref": "#/components/schemas/NotifierLanguageCode" - } - ], - "nullable": true - }, - "language_code_not_in": { + "ingress": { "items": { - "$ref": "#/components/schemas/NotifierLanguageCode" + "$ref": "#/components/schemas/VirtualPrivateCloudNetworkPolicyRuleInput" + }, + "type": "array" + }, + "apply_to": { + "items": { + "$ref": "#/components/schemas/VirtualPrivateCloudSecurityPolicyApplyInput" }, "type": "array", - "nullable": true + "minItems": 1 }, - "name": { - "type": "string", - "nullable": true + "policy_mode": { + "$ref": "#/components/schemas/VirtualPrivateCloudSecurityPolicyMode" }, - "name_contains": { - "type": "string", - "nullable": true + "vpc_id": { + "type": "string" }, - "name_ends_with": { - "type": "string", - "nullable": true + "description": { + "type": "string" }, - "name_gt": { + "name": { "type": "string", - "nullable": true - }, - "name_gte": { + "minLength": 1 + } + }, + "required": [ + "apply_to", + "vpc_id", + "name" + ], + "type": "object" + }, + "DeleteVirtualPrivateCloudSecurityPolicy": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "WithTask_DeleteVirtualPrivateCloudSecurityPolicy_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "name_in": { + "data": { + "$ref": "#/components/schemas/DeleteVirtualPrivateCloudSecurityPolicy" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "VirtualPrivateCloudSecurityPolicyDeleteParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/VirtualPrivateCloudSecurityPolicyWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "VirtualPrivateCloudSecurityPolicyUpdateParams": { + "properties": { + "ingress": { "items": { - "type": "string" + "$ref": "#/components/schemas/VirtualPrivateCloudNetworkPolicyRuleInput" }, - "type": "array", - "nullable": true + "type": "array" }, - "name_lt": { - "type": "string", - "nullable": true + "egress": { + "items": { + "$ref": "#/components/schemas/VirtualPrivateCloudNetworkPolicyRuleInput" + }, + "type": "array" }, - "name_lte": { - "type": "string", - "nullable": true + "apply_to": { + "items": { + "$ref": "#/components/schemas/VirtualPrivateCloudSecurityPolicyApplyInput" + }, + "type": "array" }, - "name_not": { - "type": "string", - "nullable": true + "policy_mode": { + "$ref": "#/components/schemas/VirtualPrivateCloudSecurityPolicyMode" }, - "name_not_contains": { - "type": "string", - "nullable": true + "description": { + "type": "string" }, - "name_not_ends_with": { - "type": "string", - "nullable": true + "name": { + "type": "string" + } + }, + "type": "object" + }, + "VirtualPrivateCloudSecurityPolicyUpdateBody": { + "properties": { + "data": { + "$ref": "#/components/schemas/VirtualPrivateCloudSecurityPolicyUpdateParams" }, - "name_not_in": { - "items": { - "type": "string" - }, - "type": "array", - "nullable": true + "where": { + "$ref": "#/components/schemas/VirtualPrivateCloudSecurityPolicyWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "NestedVpcSubnetIpPooType": { + "properties": { + "end": { + "type": "string" }, - "name_not_starts_with": { - "type": "string", - "nullable": true + "start": { + "type": "string" + } + }, + "required": [ + "end", + "start" + ], + "type": "object", + "additionalProperties": false + }, + "NestedVirtualPrivateCloudRouteTable": { + "properties": { + "id": { + "type": "string" }, - "name_starts_with": { + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "VirtualPrivateCloudSubnet": { + "properties": { + "cidr": { + "type": "string" + }, + "description": { "type": "string", "nullable": true }, - "security_mode": { + "entityAsyncStatus": { "allOf": [ { - "$ref": "#/components/schemas/NotifierSecurityMode" + "$ref": "#/components/schemas/EntityAsyncStatus" } ], "nullable": true }, - "security_mode_in": { - "items": { - "$ref": "#/components/schemas/NotifierSecurityMode" - }, - "type": "array", + "gateway": { + "type": "string", "nullable": true }, - "security_mode_not": { - "allOf": [ - { - "$ref": "#/components/schemas/NotifierSecurityMode" - } - ], - "nullable": true + "id": { + "type": "string" }, - "security_mode_not_in": { + "ip_pools": { "items": { - "$ref": "#/components/schemas/NotifierSecurityMode" + "$ref": "#/components/schemas/NestedVpcSubnetIpPooType" }, "type": "array", "nullable": true }, - "smtp_server_config": { - "allOf": [ - { - "$ref": "#/components/schemas/SmtpServerWhereInput" - } - ], - "nullable": true + "local_id": { + "type": "string" }, - "smtp_server_host": { - "type": "string", - "nullable": true + "name": { + "type": "string" }, - "smtp_server_host_contains": { - "type": "string", - "nullable": true + "route_table": { + "$ref": "#/components/schemas/NestedVirtualPrivateCloudRouteTable" }, - "smtp_server_host_ends_with": { - "type": "string", + "total_ip_count": { + "type": "integer", + "format": "int32", "nullable": true }, - "smtp_server_host_gt": { - "type": "string", + "unused_ip_count": { + "type": "integer", + "format": "int32", "nullable": true }, - "smtp_server_host_gte": { + "vpc": { + "$ref": "#/components/schemas/NestedVirtualPrivateCloud" + } + }, + "required": [ + "cidr", + "id", + "local_id", + "name", + "route_table", + "vpc" + ], + "type": "object", + "additionalProperties": false + }, + "WithTask_VirtualPrivateCloudSubnet_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "smtp_server_host_in": { + "data": { + "$ref": "#/components/schemas/VirtualPrivateCloudSubnet" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "VirtualPrivateCloudSubnetIpPoolParams": { + "properties": { + "end": { + "type": "string" + }, + "start": { + "type": "string" + } + }, + "required": [ + "end", + "start" + ], + "type": "object" + }, + "VirtualPrivateCloudSubnetCreationParams": { + "properties": { + "route_table_id": { + "type": "string" + }, + "ip_pools": { "items": { - "type": "string" + "$ref": "#/components/schemas/VirtualPrivateCloudSubnetIpPoolParams" }, - "type": "array", - "nullable": true + "type": "array" }, - "smtp_server_host_lt": { - "type": "string", - "nullable": true + "gateway": { + "type": "string" }, - "smtp_server_host_lte": { - "type": "string", - "nullable": true + "cidr": { + "type": "string" }, - "smtp_server_host_not": { - "type": "string", - "nullable": true + "vpc_id": { + "type": "string" }, - "smtp_server_host_not_contains": { - "type": "string", - "nullable": true + "description": { + "type": "string" }, - "smtp_server_host_not_ends_with": { - "type": "string", - "nullable": true + "name": { + "type": "string" + } + }, + "required": [ + "route_table_id", + "gateway", + "cidr", + "vpc_id", + "name" + ], + "type": "object" + }, + "VirtualPrivateCloudSubnetUpdateDataParams": { + "properties": { + "route_table_id": { + "type": "string" }, - "smtp_server_host_not_in": { + "ip_pools": { "items": { - "type": "string" + "$ref": "#/components/schemas/VirtualPrivateCloudSubnetIpPoolParams" }, - "type": "array", - "nullable": true + "type": "array" }, - "smtp_server_host_not_starts_with": { - "type": "string", - "nullable": true + "gateway": { + "type": "string" }, - "smtp_server_host_starts_with": { + "cidr": { + "type": "string" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "type": "object" + }, + "VirtualPrivateCloudSubnetUpdationParams": { + "properties": { + "data": { + "$ref": "#/components/schemas/VirtualPrivateCloudSubnetUpdateDataParams" + }, + "where": { + "$ref": "#/components/schemas/VirtualPrivateCloudSubnetWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "DeleteVirtualPrivateCloudSubnet": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "WithTask_DeleteVirtualPrivateCloudSubnet_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "smtp_server_port": { + "data": { + "$ref": "#/components/schemas/DeleteVirtualPrivateCloudSubnet" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "VirtualPrivateCloudSubnetDeletionParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/VirtualPrivateCloudSubnetWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "NestedVirtualPrivateCloudIsolationPolicy": { + "properties": { + "id": { + "type": "string" + }, + "vm": { + "$ref": "#/components/schemas/NestedVm" + } + }, + "required": [ + "id", + "vm" + ], + "type": "object", + "additionalProperties": false + }, + "NestedVirtualPrivateCloudSecurityPolicy": { + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "VirtualPrivateCloud": { + "properties": { + "associate_external_subnet_num": { "type": "integer", "format": "int32", "nullable": true }, - "smtp_server_port_gt": { - "type": "integer", - "format": "int32", + "description": { + "type": "string", "nullable": true }, - "smtp_server_port_gte": { - "type": "integer", - "format": "int32", + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], "nullable": true }, - "smtp_server_port_in": { + "id": { + "type": "string" + }, + "isolation_policies": { "items": { - "type": "integer", - "format": "int32" + "$ref": "#/components/schemas/NestedVirtualPrivateCloudIsolationPolicy" }, "type": "array", "nullable": true }, - "smtp_server_port_lt": { - "type": "integer", - "format": "int32", - "nullable": true + "local_id": { + "type": "string" }, - "smtp_server_port_lte": { + "mtu": { "type": "integer", "format": "int32", "nullable": true }, - "smtp_server_port_not": { - "type": "integer", - "format": "int32", - "nullable": true + "name": { + "type": "string" }, - "smtp_server_port_not_in": { + "route_tables": { "items": { - "type": "integer", - "format": "int32" + "$ref": "#/components/schemas/NestedVirtualPrivateCloudRouteTable" }, "type": "array", "nullable": true }, - "username": { - "type": "string", + "security_groups": { + "items": { + "$ref": "#/components/schemas/NestedVirtualPrivateCloudSecurityGroup" + }, + "type": "array", "nullable": true }, - "username_contains": { - "type": "string", + "security_policies": { + "items": { + "$ref": "#/components/schemas/NestedVirtualPrivateCloudSecurityPolicy" + }, + "type": "array", "nullable": true }, - "username_ends_with": { - "type": "string", + "subnets": { + "items": { + "$ref": "#/components/schemas/NestedVirtualPrivateCloudSubnet" + }, + "type": "array", "nullable": true - }, - "username_gt": { + } + }, + "required": [ + "id", + "local_id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "WithTask_VirtualPrivateCloud_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "username_gte": { + "data": { + "$ref": "#/components/schemas/VirtualPrivateCloud" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "VirtualPrivateCloudCreationParams": { + "properties": { + "mtu": { + "type": "integer", + "format": "int32" + }, + "vpc_service_id": { + "type": "string" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "vpc_service_id", + "name" + ], + "type": "object" + }, + "VirtualPrivateCloudUpdateDataParams": { + "properties": { + "mtu": { + "type": "integer", + "format": "int32" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "type": "object" + }, + "VirtualPrivateCloudUpdationParams": { + "properties": { + "data": { + "$ref": "#/components/schemas/VirtualPrivateCloudUpdateDataParams" + }, + "where": { + "$ref": "#/components/schemas/VirtualPrivateCloudWhereInput" + } + }, + "required": [ + "data", + "where" + ], + "type": "object" + }, + "DeleteVirtualPrivateCloud": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "WithTask_DeleteVirtualPrivateCloud_": { + "properties": { + "task_id": { "type": "string", "nullable": true }, - "username_in": { + "data": { + "$ref": "#/components/schemas/DeleteVirtualPrivateCloud" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "VirtualPrivateCloudDeletionParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/VirtualPrivateCloudWhereInput" + } + }, + "required": [ + "where" + ], + "type": "object" + }, + "NotifierLanguageCode": { + "enum": [ + "EN_US", + "ZH_CN" + ], + "type": "string" + }, + "NotifierSecurityMode": { + "enum": [ + "SSL", + "STARTTLS", + "UNSPECIFIED" + ], + "type": "string" + }, + "NestedSmtpServer": { + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "AlertNotifier": { + "properties": { + "clusters": { "items": { - "type": "string" + "$ref": "#/components/schemas/NestedCluster" }, "type": "array", "nullable": true }, - "username_lt": { - "type": "string", - "nullable": true + "disabled": { + "type": "boolean" }, - "username_lte": { + "email_from": { "type": "string", "nullable": true }, - "username_not": { - "type": "string", + "email_tos": { + "items": { + "type": "string" + }, + "type": "array" + }, + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], "nullable": true }, - "username_not_contains": { - "type": "string", + "id": { + "type": "string" + }, + "language_code": { + "allOf": [ + { + "$ref": "#/components/schemas/NotifierLanguageCode" + } + ], "nullable": true }, - "username_not_ends_with": { + "name": { "type": "string", "nullable": true }, - "username_not_in": { + "notice_severities": { "items": { "type": "string" }, - "type": "array", + "type": "array" + }, + "security_mode": { + "allOf": [ + { + "$ref": "#/components/schemas/NotifierSecurityMode" + } + ], "nullable": true }, - "username_not_starts_with": { + "smtp_server_config": { + "allOf": [ + { + "$ref": "#/components/schemas/NestedSmtpServer" + } + ], + "nullable": true + }, + "smtp_server_host": { "type": "string", "nullable": true }, - "username_starts_with": { + "smtp_server_port": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "username": { "type": "string", "nullable": true } }, + "required": [ + "disabled", + "email_tos", + "id", + "notice_severities" + ], "type": "object", "additionalProperties": false }, - "SmtpServerWhereInput": { + "AlertNotifierOrderByInput": { + "enum": [ + "disabled_ASC", + "disabled_DESC", + "email_from_ASC", + "email_from_DESC", + "entityAsyncStatus_ASC", + "entityAsyncStatus_DESC", + "id_ASC", + "id_DESC", + "language_code_ASC", + "language_code_DESC", + "name_ASC", + "name_DESC", + "security_mode_ASC", + "security_mode_DESC", + "smtp_server_host_ASC", + "smtp_server_host_DESC", + "smtp_server_port_ASC", + "smtp_server_port_DESC", + "username_ASC", + "username_DESC" + ], + "type": "string" + }, + "AlertNotifierWhereInput": { "properties": { "AND": { "items": { - "$ref": "#/components/schemas/SmtpServerWhereInput" + "$ref": "#/components/schemas/AlertNotifierWhereInput" }, "type": "array", "nullable": true }, "NOT": { "items": { - "$ref": "#/components/schemas/SmtpServerWhereInput" + "$ref": "#/components/schemas/AlertNotifierWhereInput" }, "type": "array", "nullable": true }, "OR": { "items": { - "$ref": "#/components/schemas/SmtpServerWhereInput" + "$ref": "#/components/schemas/AlertNotifierWhereInput" }, "type": "array", "nullable": true }, - "description": { - "type": "string", - "nullable": true - }, - "description_contains": { - "type": "string", + "clusters_every": { + "allOf": [ + { + "$ref": "#/components/schemas/ClusterWhereInput" + } + ], "nullable": true }, - "description_ends_with": { - "type": "string", + "clusters_none": { + "allOf": [ + { + "$ref": "#/components/schemas/ClusterWhereInput" + } + ], "nullable": true }, - "description_gt": { - "type": "string", + "clusters_some": { + "allOf": [ + { + "$ref": "#/components/schemas/ClusterWhereInput" + } + ], "nullable": true }, - "description_gte": { - "type": "string", + "disabled": { + "type": "boolean", "nullable": true }, - "description_in": { - "items": { - "type": "string" - }, - "type": "array", + "disabled_not": { + "type": "boolean", "nullable": true }, - "description_lt": { + "email_from": { "type": "string", "nullable": true }, - "description_lte": { + "email_from_contains": { "type": "string", "nullable": true }, - "description_not": { + "email_from_ends_with": { "type": "string", "nullable": true }, - "description_not_contains": { + "email_from_gt": { "type": "string", "nullable": true }, - "description_not_ends_with": { + "email_from_gte": { "type": "string", "nullable": true }, - "description_not_in": { + "email_from_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "description_not_starts_with": { - "type": "string", - "nullable": true - }, - "description_starts_with": { - "type": "string", - "nullable": true - }, - "host": { + "email_from_lt": { "type": "string", "nullable": true }, - "host_contains": { + "email_from_lte": { "type": "string", "nullable": true }, - "host_ends_with": { + "email_from_not": { "type": "string", "nullable": true }, - "host_gt": { + "email_from_not_contains": { "type": "string", "nullable": true }, - "host_gte": { + "email_from_not_ends_with": { "type": "string", "nullable": true }, - "host_in": { + "email_from_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "host_lt": { - "type": "string", - "nullable": true - }, - "host_lte": { - "type": "string", - "nullable": true - }, - "host_not": { + "email_from_not_starts_with": { "type": "string", "nullable": true }, - "host_not_contains": { + "email_from_starts_with": { "type": "string", "nullable": true }, - "host_not_ends_with": { - "type": "string", + "entityAsyncStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], "nullable": true }, - "host_not_in": { + "entityAsyncStatus_in": { "items": { - "type": "string" + "$ref": "#/components/schemas/EntityAsyncStatus" }, "type": "array", "nullable": true }, - "host_not_starts_with": { - "type": "string", + "entityAsyncStatus_not": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityAsyncStatus" + } + ], "nullable": true }, - "host_starts_with": { - "type": "string", + "entityAsyncStatus_not_in": { + "items": { + "$ref": "#/components/schemas/EntityAsyncStatus" + }, + "type": "array", "nullable": true }, "id": { @@ -96515,12 +95998,34 @@ "type": "string", "nullable": true }, - "is_record_password": { - "type": "boolean", + "language_code": { + "allOf": [ + { + "$ref": "#/components/schemas/NotifierLanguageCode" + } + ], "nullable": true }, - "is_record_password_not": { - "type": "boolean", + "language_code_in": { + "items": { + "$ref": "#/components/schemas/NotifierLanguageCode" + }, + "type": "array", + "nullable": true + }, + "language_code_not": { + "allOf": [ + { + "$ref": "#/components/schemas/NotifierLanguageCode" + } + ], + "nullable": true + }, + "language_code_not_in": { + "items": { + "$ref": "#/components/schemas/NotifierLanguageCode" + }, + "type": "array", "nullable": true }, "name": { @@ -96585,84 +96090,122 @@ "type": "string", "nullable": true }, - "password": { + "security_mode": { + "allOf": [ + { + "$ref": "#/components/schemas/NotifierSecurityMode" + } + ], + "nullable": true + }, + "security_mode_in": { + "items": { + "$ref": "#/components/schemas/NotifierSecurityMode" + }, + "type": "array", + "nullable": true + }, + "security_mode_not": { + "allOf": [ + { + "$ref": "#/components/schemas/NotifierSecurityMode" + } + ], + "nullable": true + }, + "security_mode_not_in": { + "items": { + "$ref": "#/components/schemas/NotifierSecurityMode" + }, + "type": "array", + "nullable": true + }, + "smtp_server_config": { + "allOf": [ + { + "$ref": "#/components/schemas/SmtpServerWhereInput" + } + ], + "nullable": true + }, + "smtp_server_host": { "type": "string", "nullable": true }, - "password_contains": { + "smtp_server_host_contains": { "type": "string", "nullable": true }, - "password_ends_with": { + "smtp_server_host_ends_with": { "type": "string", "nullable": true }, - "password_gt": { + "smtp_server_host_gt": { "type": "string", "nullable": true }, - "password_gte": { + "smtp_server_host_gte": { "type": "string", "nullable": true }, - "password_in": { + "smtp_server_host_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "password_lt": { + "smtp_server_host_lt": { "type": "string", "nullable": true }, - "password_lte": { + "smtp_server_host_lte": { "type": "string", "nullable": true }, - "password_not": { + "smtp_server_host_not": { "type": "string", "nullable": true }, - "password_not_contains": { + "smtp_server_host_not_contains": { "type": "string", "nullable": true }, - "password_not_ends_with": { + "smtp_server_host_not_ends_with": { "type": "string", "nullable": true }, - "password_not_in": { + "smtp_server_host_not_in": { "items": { "type": "string" }, "type": "array", "nullable": true }, - "password_not_starts_with": { + "smtp_server_host_not_starts_with": { "type": "string", "nullable": true }, - "password_starts_with": { + "smtp_server_host_starts_with": { "type": "string", "nullable": true }, - "port": { + "smtp_server_port": { "type": "integer", "format": "int32", "nullable": true }, - "port_gt": { + "smtp_server_port_gt": { "type": "integer", "format": "int32", "nullable": true }, - "port_gte": { + "smtp_server_port_gte": { "type": "integer", "format": "int32", "nullable": true }, - "port_in": { + "smtp_server_port_in": { "items": { "type": "integer", "format": "int32" @@ -96670,22 +96213,22 @@ "type": "array", "nullable": true }, - "port_lt": { + "smtp_server_port_lt": { "type": "integer", "format": "int32", "nullable": true }, - "port_lte": { + "smtp_server_port_lte": { "type": "integer", "format": "int32", "nullable": true }, - "port_not": { + "smtp_server_port_not": { "type": "integer", "format": "int32", "nullable": true }, - "port_not_in": { + "smtp_server_port_not_in": { "items": { "type": "integer", "format": "int32" @@ -96693,36 +96236,6 @@ "type": "array", "nullable": true }, - "secure_mode": { - "allOf": [ - { - "$ref": "#/components/schemas/SmtpSecureMode" - } - ], - "nullable": true - }, - "secure_mode_in": { - "items": { - "$ref": "#/components/schemas/SmtpSecureMode" - }, - "type": "array", - "nullable": true - }, - "secure_mode_not": { - "allOf": [ - { - "$ref": "#/components/schemas/SmtpSecureMode" - } - ], - "nullable": true - }, - "secure_mode_not_in": { - "items": { - "$ref": "#/components/schemas/SmtpSecureMode" - }, - "type": "array", - "nullable": true - }, "username": { "type": "string", "nullable": true @@ -96789,11 +96302,494 @@ "type": "object", "additionalProperties": false }, - "SmtpSecureMode": { - "enum": [ - "SSL", - "STARTTLS", - "UNSPECIFIED" + "SmtpServerWhereInput": { + "properties": { + "AND": { + "items": { + "$ref": "#/components/schemas/SmtpServerWhereInput" + }, + "type": "array", + "nullable": true + }, + "NOT": { + "items": { + "$ref": "#/components/schemas/SmtpServerWhereInput" + }, + "type": "array", + "nullable": true + }, + "OR": { + "items": { + "$ref": "#/components/schemas/SmtpServerWhereInput" + }, + "type": "array", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "description_contains": { + "type": "string", + "nullable": true + }, + "description_ends_with": { + "type": "string", + "nullable": true + }, + "description_gt": { + "type": "string", + "nullable": true + }, + "description_gte": { + "type": "string", + "nullable": true + }, + "description_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, + "description_lt": { + "type": "string", + "nullable": true + }, + "description_lte": { + "type": "string", + "nullable": true + }, + "description_not": { + "type": "string", + "nullable": true + }, + "description_not_contains": { + "type": "string", + "nullable": true + }, + "description_not_ends_with": { + "type": "string", + "nullable": true + }, + "description_not_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, + "description_not_starts_with": { + "type": "string", + "nullable": true + }, + "description_starts_with": { + "type": "string", + "nullable": true + }, + "host": { + "type": "string", + "nullable": true + }, + "host_contains": { + "type": "string", + "nullable": true + }, + "host_ends_with": { + "type": "string", + "nullable": true + }, + "host_gt": { + "type": "string", + "nullable": true + }, + "host_gte": { + "type": "string", + "nullable": true + }, + "host_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, + "host_lt": { + "type": "string", + "nullable": true + }, + "host_lte": { + "type": "string", + "nullable": true + }, + "host_not": { + "type": "string", + "nullable": true + }, + "host_not_contains": { + "type": "string", + "nullable": true + }, + "host_not_ends_with": { + "type": "string", + "nullable": true + }, + "host_not_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, + "host_not_starts_with": { + "type": "string", + "nullable": true + }, + "host_starts_with": { + "type": "string", + "nullable": true + }, + "id": { + "type": "string", + "nullable": true + }, + "id_contains": { + "type": "string", + "nullable": true + }, + "id_ends_with": { + "type": "string", + "nullable": true + }, + "id_gt": { + "type": "string", + "nullable": true + }, + "id_gte": { + "type": "string", + "nullable": true + }, + "id_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, + "id_lt": { + "type": "string", + "nullable": true + }, + "id_lte": { + "type": "string", + "nullable": true + }, + "id_not": { + "type": "string", + "nullable": true + }, + "id_not_contains": { + "type": "string", + "nullable": true + }, + "id_not_ends_with": { + "type": "string", + "nullable": true + }, + "id_not_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, + "id_not_starts_with": { + "type": "string", + "nullable": true + }, + "id_starts_with": { + "type": "string", + "nullable": true + }, + "is_record_password": { + "type": "boolean", + "nullable": true + }, + "is_record_password_not": { + "type": "boolean", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "name_contains": { + "type": "string", + "nullable": true + }, + "name_ends_with": { + "type": "string", + "nullable": true + }, + "name_gt": { + "type": "string", + "nullable": true + }, + "name_gte": { + "type": "string", + "nullable": true + }, + "name_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, + "name_lt": { + "type": "string", + "nullable": true + }, + "name_lte": { + "type": "string", + "nullable": true + }, + "name_not": { + "type": "string", + "nullable": true + }, + "name_not_contains": { + "type": "string", + "nullable": true + }, + "name_not_ends_with": { + "type": "string", + "nullable": true + }, + "name_not_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, + "name_not_starts_with": { + "type": "string", + "nullable": true + }, + "name_starts_with": { + "type": "string", + "nullable": true + }, + "password": { + "type": "string", + "nullable": true + }, + "password_contains": { + "type": "string", + "nullable": true + }, + "password_ends_with": { + "type": "string", + "nullable": true + }, + "password_gt": { + "type": "string", + "nullable": true + }, + "password_gte": { + "type": "string", + "nullable": true + }, + "password_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, + "password_lt": { + "type": "string", + "nullable": true + }, + "password_lte": { + "type": "string", + "nullable": true + }, + "password_not": { + "type": "string", + "nullable": true + }, + "password_not_contains": { + "type": "string", + "nullable": true + }, + "password_not_ends_with": { + "type": "string", + "nullable": true + }, + "password_not_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, + "password_not_starts_with": { + "type": "string", + "nullable": true + }, + "password_starts_with": { + "type": "string", + "nullable": true + }, + "port": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "port_gt": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "port_gte": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "port_in": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", + "nullable": true + }, + "port_lt": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "port_lte": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "port_not": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "port_not_in": { + "items": { + "type": "integer", + "format": "int32" + }, + "type": "array", + "nullable": true + }, + "secure_mode": { + "allOf": [ + { + "$ref": "#/components/schemas/SmtpSecureMode" + } + ], + "nullable": true + }, + "secure_mode_in": { + "items": { + "$ref": "#/components/schemas/SmtpSecureMode" + }, + "type": "array", + "nullable": true + }, + "secure_mode_not": { + "allOf": [ + { + "$ref": "#/components/schemas/SmtpSecureMode" + } + ], + "nullable": true + }, + "secure_mode_not_in": { + "items": { + "$ref": "#/components/schemas/SmtpSecureMode" + }, + "type": "array", + "nullable": true + }, + "username": { + "type": "string", + "nullable": true + }, + "username_contains": { + "type": "string", + "nullable": true + }, + "username_ends_with": { + "type": "string", + "nullable": true + }, + "username_gt": { + "type": "string", + "nullable": true + }, + "username_gte": { + "type": "string", + "nullable": true + }, + "username_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, + "username_lt": { + "type": "string", + "nullable": true + }, + "username_lte": { + "type": "string", + "nullable": true + }, + "username_not": { + "type": "string", + "nullable": true + }, + "username_not_contains": { + "type": "string", + "nullable": true + }, + "username_not_ends_with": { + "type": "string", + "nullable": true + }, + "username_not_in": { + "items": { + "type": "string" + }, + "type": "array", + "nullable": true + }, + "username_not_starts_with": { + "type": "string", + "nullable": true + }, + "username_starts_with": { + "type": "string", + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "SmtpSecureMode": { + "enum": [ + "SSL", + "STARTTLS", + "UNSPECIFIED" ], "type": "string" }, @@ -116162,1173 +116158,319 @@ "type": "string", "nullable": true }, - "first": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "last": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "orderBy": { - "allOf": [ - { - "$ref": "#/components/schemas/ZoneOrderByInput" - } - ], - "nullable": true - }, - "skip": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "where": { - "allOf": [ - { - "$ref": "#/components/schemas/ZoneWhereInput" - } - ], - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "NestedAggregateZone": { - "properties": { - "count": { - "type": "integer", - "format": "int32" - } - }, - "required": [ - "count" - ], - "type": "object", - "additionalProperties": false - }, - "ZoneConnection": { - "properties": { - "aggregate": { - "$ref": "#/components/schemas/NestedAggregateZone" - } - }, - "required": [ - "aggregate" - ], - "type": "object", - "additionalProperties": false - }, - "GetZonesConnectionRequestBody": { - "properties": { - "after": { - "type": "string", - "nullable": true - }, - "before": { - "type": "string", - "nullable": true - }, - "first": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "last": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "orderBy": { - "allOf": [ - { - "$ref": "#/components/schemas/ZoneOrderByInput" - } - ], - "nullable": true - }, - "skip": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "where": { - "allOf": [ - { - "$ref": "#/components/schemas/ZoneWhereInput" - } - ], - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "WithTask_AlertNotifier_": { - "properties": { - "task_id": { - "type": "string", - "nullable": true - }, - "data": { - "$ref": "#/components/schemas/AlertNotifier" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "AlertNotifierCreationParams": { - "properties": { - "notice_severities": { - "items": { - "type": "string", - "enum": [ - "CRITICAL", - "NOTICE", - "INFO" - ] - }, - "type": "array" - }, - "language_code": { - "$ref": "#/components/schemas/NotifierLanguageCode" - }, - "email_tos": { - "items": { - "type": "string" - }, - "type": "array" - }, - "email_from": { - "type": "string" - }, - "disabled": { - "type": "boolean" - }, - "smtp_server_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "clusters": { - "$ref": "#/components/schemas/ClusterWhereInput" - } - }, - "required": [ - "notice_severities", - "language_code", - "email_tos", - "email_from", - "disabled", - "smtp_server_id", - "name", - "clusters" - ], - "type": "object" - }, - "AlertNotifierUpdationParams": { - "properties": { - "notice_severities": { - "items": { - "type": "string", - "enum": [ - "CRITICAL", - "NOTICE", - "INFO" - ] - }, - "type": "array" - }, - "language_code": { - "$ref": "#/components/schemas/NotifierLanguageCode" - }, - "email_tos": { - "items": { - "type": "string" - }, - "type": "array" - }, - "email_from": { - "type": "string" - }, - "disabled": { - "type": "boolean" - }, - "smtp_server_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "clusters": { - "$ref": "#/components/schemas/ClusterWhereInput" - }, - "id": { - "type": "string" - } - }, - "type": "object" - }, - "AlertNotifierManyUpdationParams": { - "properties": { - "notice_severities": { - "items": { - "type": "string", - "enum": [ - "CRITICAL", - "NOTICE", - "INFO" - ] - }, - "type": "array" - }, - "language_code": { - "$ref": "#/components/schemas/NotifierLanguageCode" - }, - "email_tos": { - "items": { - "type": "string" - }, - "type": "array" - }, - "email_from": { - "type": "string" - }, - "disabled": { - "type": "boolean" - }, - "smtp_server_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "where": { - "$ref": "#/components/schemas/AlertNotifierWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - }, - "DeleteAlertNotifier": { - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "WithTask_DeleteAlertNotifier_": { - "properties": { - "task_id": { - "type": "string", - "nullable": true - }, - "data": { - "$ref": "#/components/schemas/DeleteAlertNotifier" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "DeleteAlertNotifierParams": { - "properties": { - "where": { - "$ref": "#/components/schemas/AlertNotifierWhereInput" - } - }, - "required": [ - "where" - ], - "type": "object" - } - }, - "securitySchemes": { - "Authorization": { - "type": "apiKey", - "name": "Authorization", - "in": "header", - "description": "通过 post /v2/api/login 获取到 token" - } - } - }, - "info": { - "title": "CloudTower APIs", - "version": "2.3.0", - "description": "cloudtower operation API and SDK" - }, - "openapi": "3.0.0", - "paths": { - "/update-global-alert-rule": { - "post": { - "operationId": "UpdateGlobalAlertRule", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/WithTask_GlobalAlertRule_" - }, - "type": "array" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorBody" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - }, - "404": { - "description": "Not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorBody" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - }, - "500": { - "description": "Server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorBody" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - } - }, - "tags": [ - "GlobalAlertRule" - ], - "security": [ - { - "Authorization": [] - } - ], - "parameters": [ - { - "in": "header", - "name": "content-language", - "required": false, - "schema": { - "$ref": "#/components/schemas/ContentLanguage" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GlobalAlertRuleUpdationParams" - } - } - } - } - } - }, - "/update-customize-alert-rule": { - "post": { - "operationId": "UpdateCustomizeAlertRule", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/WithTask_GlobalAlertRule_" - }, - "type": "array" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorBody" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - }, - "404": { - "description": "Not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorBody" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - }, - "500": { - "description": "Server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorBody" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - } - }, - "tags": [ - "GlobalAlertRule" - ], - "security": [ - { - "Authorization": [] - } - ], - "parameters": [ - { - "in": "header", - "name": "content-language", - "required": false, - "schema": { - "$ref": "#/components/schemas/ContentLanguage" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomizeAlertRuleUpdationParams" - } - } - } - } - } - }, - "/resolve-alert": { - "post": { - "operationId": "ResolveAlert", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/WithTask_Alert_" - }, - "type": "array" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorBody" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - }, - "404": { - "description": "Not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorBody" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - }, - "500": { - "description": "Server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorBody" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - } - }, - "tags": [ - "Alert" - ], - "security": [ - { - "Authorization": [] - } - ], - "parameters": [ - { - "in": "header", - "name": "content-language", - "required": false, - "schema": { - "$ref": "#/components/schemas/ContentLanguage" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResolveAlertParams" - } - } - } - } - } - }, - "/create-user-audit-log": { - "post": { - "operationId": "CreateUserAuditLog", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/WithTask_UserAuditLog_" - }, - "type": "array" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorBody" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - }, - "404": { - "description": "Not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorBody" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - }, - "500": { - "description": "Server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorBody" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - } - }, - "tags": [ - "UserAuditLog" - ], - "security": [ - { - "Authorization": [] - } - ], - "parameters": [ - { - "in": "header", - "name": "content-language", - "required": false, - "schema": { - "$ref": "#/components/schemas/ContentLanguage" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/UserAuditLogCreationParams" - }, - "type": "array" - } - } - } - } - } - }, - "/create-backup-plan": { - "post": { - "operationId": "CreateBackupPlan", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/WithTask_BackupPlan_" - }, - "type": "array" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorBody" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - }, - "404": { - "description": "Not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorBody" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - }, - "500": { - "description": "Server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorBody" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - } - }, - "tags": [ - "BackupPlan" - ], - "security": [ - { - "Authorization": [] - } - ], - "parameters": [ - { - "in": "header", - "name": "content-language", - "required": false, - "schema": { - "$ref": "#/components/schemas/ContentLanguage" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/BackupPlanCreationParams" - }, - "type": "array" - } - } - } - } - } - }, - "/update-backup-plan": { - "post": { - "operationId": "UpdateBackupPlan", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/WithTask_BackupPlan_" - }, - "type": "array" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorBody" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - }, - "404": { - "description": "Not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorBody" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } + "first": { + "type": "integer", + "format": "int32", + "nullable": true }, - "500": { - "description": "Server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorBody" - } + "last": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "orderBy": { + "allOf": [ + { + "$ref": "#/components/schemas/ZoneOrderByInput" } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } + ], + "nullable": true + }, + "skip": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "where": { + "allOf": [ + { + "$ref": "#/components/schemas/ZoneWhereInput" } - } + ], + "nullable": true } }, - "tags": [ - "BackupPlan" - ], - "security": [ - { - "Authorization": [] + "type": "object", + "additionalProperties": false + }, + "NestedAggregateZone": { + "properties": { + "count": { + "type": "integer", + "format": "int32" } + }, + "required": [ + "count" ], - "parameters": [ - { - "in": "header", - "name": "content-language", - "required": false, - "schema": { - "$ref": "#/components/schemas/ContentLanguage" - } + "type": "object", + "additionalProperties": false + }, + "ZoneConnection": { + "properties": { + "aggregate": { + "$ref": "#/components/schemas/NestedAggregateZone" } + }, + "required": [ + "aggregate" ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BackupPlanUpdationParams" - } - } - } - } - } - }, - "/delete-backup-plan": { - "post": { - "operationId": "DeleteBackupPlan", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/WithTask_DeleteBackupPlan_" - }, - "type": "array" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } + "type": "object", + "additionalProperties": false + }, + "GetZonesConnectionRequestBody": { + "properties": { + "after": { + "type": "string", + "nullable": true }, - "400": { - "description": "Bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorBody" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } + "before": { + "type": "string", + "nullable": true }, - "404": { - "description": "Not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorBody" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } + "first": { + "type": "integer", + "format": "int32", + "nullable": true }, - "500": { - "description": "Server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorBody" - } + "last": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "orderBy": { + "allOf": [ + { + "$ref": "#/components/schemas/ZoneOrderByInput" } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } + ], + "nullable": true + }, + "skip": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "where": { + "allOf": [ + { + "$ref": "#/components/schemas/ZoneWhereInput" } - } + ], + "nullable": true } }, - "tags": [ - "BackupPlan" - ], - "security": [ - { - "Authorization": [] + "type": "object", + "additionalProperties": false + }, + "WithTask_AlertNotifier_": { + "properties": { + "task_id": { + "type": "string", + "nullable": true + }, + "data": { + "$ref": "#/components/schemas/AlertNotifier" } + }, + "required": [ + "data" ], - "parameters": [ - { - "in": "header", - "name": "content-language", - "required": false, - "schema": { - "$ref": "#/components/schemas/ContentLanguage" - } + "type": "object" + }, + "AlertNotifierCreationParams": { + "properties": { + "notice_severities": { + "items": { + "type": "string", + "enum": [ + "CRITICAL", + "NOTICE", + "INFO" + ] + }, + "type": "array" + }, + "language_code": { + "$ref": "#/components/schemas/NotifierLanguageCode" + }, + "email_tos": { + "items": { + "type": "string" + }, + "type": "array" + }, + "email_from": { + "type": "string" + }, + "disabled": { + "type": "boolean" + }, + "smtp_server_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "clusters": { + "$ref": "#/components/schemas/ClusterWhereInput" } + }, + "required": [ + "notice_severities", + "language_code", + "email_tos", + "email_from", + "disabled", + "smtp_server_id", + "name", + "clusters" ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BackupPlanDeletionParams" - } - } - } - } - } - }, - "/suspend-backup-plan": { - "post": { - "operationId": "SuspendBackupPlan", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/WithTask_BackupPlan_" - }, - "type": "array" - } - } + "type": "object" + }, + "AlertNotifierUpdationParams": { + "properties": { + "notice_severities": { + "items": { + "type": "string", + "enum": [ + "CRITICAL", + "NOTICE", + "INFO" + ] }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } + "type": "array" }, - "400": { - "description": "Bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorBody" - } - } + "language_code": { + "$ref": "#/components/schemas/NotifierLanguageCode" + }, + "email_tos": { + "items": { + "type": "string" }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } + "type": "array" }, - "404": { - "description": "Not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorBody" - } - } + "email_from": { + "type": "string" + }, + "disabled": { + "type": "boolean" + }, + "smtp_server_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "clusters": { + "$ref": "#/components/schemas/ClusterWhereInput" + }, + "id": { + "type": "string" + } + }, + "type": "object" + }, + "AlertNotifierManyUpdationParams": { + "properties": { + "notice_severities": { + "items": { + "type": "string", + "enum": [ + "CRITICAL", + "NOTICE", + "INFO" + ] }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } + "type": "array" }, - "500": { - "description": "Server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorBody" - } - } + "language_code": { + "$ref": "#/components/schemas/NotifierLanguageCode" + }, + "email_tos": { + "items": { + "type": "string" }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } + "type": "array" + }, + "email_from": { + "type": "string" + }, + "disabled": { + "type": "boolean" + }, + "smtp_server_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "where": { + "$ref": "#/components/schemas/AlertNotifierWhereInput" } }, - "tags": [ - "BackupPlan" + "required": [ + "where" ], - "security": [ - { - "Authorization": [] + "type": "object" + }, + "DeleteAlertNotifier": { + "properties": { + "id": { + "type": "string" } + }, + "required": [ + "id" ], - "parameters": [ - { - "in": "header", - "name": "content-language", - "required": false, - "schema": { - "$ref": "#/components/schemas/ContentLanguage" - } + "type": "object" + }, + "WithTask_DeleteAlertNotifier_": { + "properties": { + "task_id": { + "type": "string", + "nullable": true + }, + "data": { + "$ref": "#/components/schemas/DeleteAlertNotifier" } + }, + "required": [ + "data" ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BackupPlanSuspendParams" - } - } + "type": "object" + }, + "DeleteAlertNotifierParams": { + "properties": { + "where": { + "$ref": "#/components/schemas/AlertNotifierWhereInput" } - } + }, + "required": [ + "where" + ], + "type": "object" } }, - "/resume-backup-plan": { + "securitySchemes": { + "Authorization": { + "type": "apiKey", + "name": "Authorization", + "in": "header", + "description": "通过 post /v2/api/login 获取到 token" + } + } + }, + "info": { + "title": "CloudTower APIs", + "version": "4.4.0", + "description": "cloudtower operation API and SDK" + }, + "openapi": "3.0.0", + "paths": { + "/update-global-alert-rule": { "post": { - "operationId": "ResumeBackupPlan", + "operationId": "UpdateGlobalAlertRule", "responses": { "200": { "description": "", @@ -117336,7 +116478,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_BackupPlan_" + "$ref": "#/components/schemas/WithTask_GlobalAlertRule_" }, "type": "array" } @@ -117403,7 +116545,7 @@ } }, "tags": [ - "BackupPlan" + "GlobalAlertRule" ], "security": [ { @@ -117425,16 +116567,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BackupPlanResumeParams" + "$ref": "#/components/schemas/GlobalAlertRuleUpdationParams" } } } } } }, - "/execute-backup-plan": { + "/update-customize-alert-rule": { "post": { - "operationId": "ExecuteBackupPlan", + "operationId": "UpdateCustomizeAlertRule", "responses": { "200": { "description": "", @@ -117442,7 +116584,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_BackupPlanExecution_" + "$ref": "#/components/schemas/WithTask_GlobalAlertRule_" }, "type": "array" } @@ -117509,7 +116651,7 @@ } }, "tags": [ - "BackupPlan" + "GlobalAlertRule" ], "security": [ { @@ -117531,16 +116673,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BackupPlanExecuteParams" + "$ref": "#/components/schemas/CustomizeAlertRuleUpdationParams" } } } } } }, - "/backup-rebuild-vm": { + "/resolve-alert": { "post": { - "operationId": "BackupRebuildVm", + "operationId": "ResolveAlert", "responses": { "200": { "description": "", @@ -117548,7 +116690,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_BackupRestoreExecution_" + "$ref": "#/components/schemas/WithTask_Alert_" }, "type": "array" } @@ -117615,7 +116757,7 @@ } }, "tags": [ - "BackupPlan" + "Alert" ], "security": [ { @@ -117637,16 +116779,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BackupRestorePointRebuildParams" + "$ref": "#/components/schemas/ResolveAlertParams" } } } } } }, - "/backup-restore-vm-in-place": { + "/create-brick-topo": { "post": { - "operationId": "BackupRestoreVmInPlace", + "operationId": "CreateBrickTopo", "responses": { "200": { "description": "", @@ -117654,7 +116796,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_BackupRestoreExecution_" + "$ref": "#/components/schemas/WithTask_BrickTopo_" }, "type": "array" } @@ -117721,7 +116863,7 @@ } }, "tags": [ - "BackupPlan" + "BrickTopo" ], "security": [ { @@ -117743,16 +116885,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BackupRestorePointRestoreInPlaceParams" + "items": { + "$ref": "#/components/schemas/BrickTopoCreationParams" + }, + "type": "array" } } } } } }, - "/delete-backup-restore-point": { + "/update-brick-topo": { "post": { - "operationId": "DeleteBackupRestorePoint", + "operationId": "UpdateBrickTopo", "responses": { "200": { "description": "", @@ -117760,7 +116905,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteBackupRestorePoint-Array_" + "$ref": "#/components/schemas/WithTask_BrickTopo_" }, "type": "array" } @@ -117827,7 +116972,7 @@ } }, "tags": [ - "BackupPlan" + "BrickTopo" ], "security": [ { @@ -117849,16 +116994,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BackupRestorePointDeletionParams" + "$ref": "#/components/schemas/BrickTopoUpdationParams" } } } } } }, - "/create-brick-topo": { + "/move-brick-topo": { "post": { - "operationId": "CreateBrickTopo", + "operationId": "MoveBrickTopo", "responses": { "200": { "description": "", @@ -117955,19 +117100,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/BrickTopoCreationParams" - }, - "type": "array" + "$ref": "#/components/schemas/BrickTopoMoveParams" } } } } } }, - "/update-brick-topo": { + "/delete-brick-topo": { "post": { - "operationId": "UpdateBrickTopo", + "operationId": "DeleteBrickTopo", "responses": { "200": { "description": "", @@ -117975,7 +117117,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_BrickTopo_" + "$ref": "#/components/schemas/WithTask_DeleteBrickTopo_" }, "type": "array" } @@ -118064,26 +117206,256 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BrickTopoUpdationParams" + "$ref": "#/components/schemas/BrickTopoDeletionParams" + } + } + } + } + } + }, + "/upload-cloudtower-application-package": { + "post": { + "operationId": "UploadCloudTowerApplicationPackage", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/UploadTask" + }, + "type": "array" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBody" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBody" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBody" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + } + }, + "tags": [ + "CloudTowerApplication" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "header", + "name": "content-language", + "required": false, + "schema": { + "$ref": "#/components/schemas/ContentLanguage" + } + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary" + }, + "name": { + "type": "string" + }, + "size": { + "type": "string" + }, + "size_unit": { + "type": "string" + }, + "upload_task_id": { + "type": "string" + } + }, + "required": [ + "file" + ] + } + } + } + } + } + }, + "/delete-cloudtower-application-package": { + "post": { + "operationId": "DeleteCloudTowerApplicationPackage", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/DeleteCloudTowerApplicationPackage" + }, + "type": "array" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBody" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBody" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBody" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + } + }, + "tags": [ + "CloudTowerApplication" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "header", + "name": "content-language", + "required": false, + "schema": { + "$ref": "#/components/schemas/ContentLanguage" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteCloudTowerApplicationPackageParams" } } } } } }, - "/move-brick-topo": { + "/deploy-cloudtower-application": { "post": { - "operationId": "MoveBrickTopo", + "operationId": "DeployCloudTowerApplication", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/WithTask_BrickTopo_" - }, - "type": "array" + "$ref": "#/components/schemas/CloudTowerApplication" } } }, @@ -118148,7 +117520,7 @@ } }, "tags": [ - "BrickTopo" + "CloudTowerApplication" ], "security": [ { @@ -118170,26 +117542,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BrickTopoMoveParams" + "$ref": "#/components/schemas/DeployCloudTowerApplicationParams" } } } } } }, - "/delete-brick-topo": { + "/upgrade-cloudtower-application": { "post": { - "operationId": "DeleteBrickTopo", + "operationId": "UpgradeCloudTowerApplication", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/WithTask_DeleteBrickTopo_" - }, - "type": "array" + "$ref": "#/components/schemas/CloudTowerApplication" } } }, @@ -118254,7 +117623,7 @@ } }, "tags": [ - "BrickTopo" + "CloudTowerApplication" ], "security": [ { @@ -118276,16 +117645,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BrickTopoDeletionParams" + "$ref": "#/components/schemas/UpgradeCloudTowerApplicationParams" } } } } } }, - "/upload-cloudtower-application-package": { + "/uninstall-cloudtower-application": { "post": { - "operationId": "UploadCloudTowerApplicationPackage", + "operationId": "UninstallCloudTowerApplication", "responses": { "200": { "description": "", @@ -118293,7 +117662,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/UploadTask" + "$ref": "#/components/schemas/CloudTowerApplication" }, "type": "array" } @@ -118380,39 +117749,18 @@ "requestBody": { "required": true, "content": { - "multipart/form-data": { + "application/json": { "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - }, - "name": { - "type": "string" - }, - "size": { - "type": "string" - }, - "size_unit": { - "type": "string" - }, - "upload_task_id": { - "type": "string" - } - }, - "required": [ - "file" - ] + "$ref": "#/components/schemas/UninstallCloudTowerApplicationParams" } } } } } }, - "/delete-cloudtower-application-package": { + "/connect-cluster": { "post": { - "operationId": "DeleteCloudTowerApplicationPackage", + "operationId": "ConnectCluster", "responses": { "200": { "description": "", @@ -118420,7 +117768,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/DeleteCloudTowerApplicationPackage" + "$ref": "#/components/schemas/WithTask_Cluster_" }, "type": "array" } @@ -118487,7 +117835,7 @@ } }, "tags": [ - "CloudTowerApplication" + "Cluster" ], "security": [ { @@ -118509,23 +117857,29 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteCloudTowerApplicationPackageParams" + "items": { + "$ref": "#/components/schemas/ClusterCreationParams" + }, + "type": "array" } } } } } }, - "/deploy-cloudtower-application": { + "/update-cluster": { "post": { - "operationId": "DeployCloudTowerApplication", + "operationId": "UpdateCluster", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CloudTowerApplication" + "items": { + "$ref": "#/components/schemas/WithTask_Cluster_" + }, + "type": "array" } } }, @@ -118590,7 +117944,7 @@ } }, "tags": [ - "CloudTowerApplication" + "Cluster" ], "security": [ { @@ -118612,23 +117966,26 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeployCloudTowerApplicationParams" + "$ref": "#/components/schemas/ClusterUpdationParams" } } } } } }, - "/upgrade-cloudtower-application": { + "/update-cluster-license": { "post": { - "operationId": "UpgradeCloudTowerApplication", + "operationId": "UpdateClusterLicense", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CloudTowerApplication" + "items": { + "$ref": "#/components/schemas/WithTask_Cluster_" + }, + "type": "array" } } }, @@ -118693,7 +118050,7 @@ } }, "tags": [ - "CloudTowerApplication" + "Cluster" ], "security": [ { @@ -118715,16 +118072,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpgradeCloudTowerApplicationParams" + "$ref": "#/components/schemas/ClusterLicenseUpdationParams" } } } } } }, - "/uninstall-cloudtower-application": { + "/update-cluster-network-setting": { "post": { - "operationId": "UninstallCloudTowerApplication", + "operationId": "UpdateClusterNetworkSetting", "responses": { "200": { "description": "", @@ -118732,7 +118089,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/CloudTowerApplication" + "$ref": "#/components/schemas/WithTask_Cluster_" }, "type": "array" } @@ -118799,7 +118156,7 @@ } }, "tags": [ - "CloudTowerApplication" + "Cluster" ], "security": [ { @@ -118821,16 +118178,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UninstallCloudTowerApplicationParams" + "$ref": "#/components/schemas/ClusterNetworkSettingUpdationParams" } } } } } }, - "/connect-cluster": { + "/update-cluster-virtualization-setting": { "post": { - "operationId": "ConnectCluster", + "operationId": "UpdateClusterVirtualizationSetting", "responses": { "200": { "description": "", @@ -118927,19 +118284,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/ClusterCreationParams" - }, - "type": "array" + "$ref": "#/components/schemas/ClusterVirtualizationUpdationParams" } } } } } }, - "/update-cluster": { + "/update-cluster-ha-setting": { "post": { - "operationId": "UpdateCluster", + "operationId": "UpdateClusterHaSetting", "responses": { "200": { "description": "", @@ -118947,7 +118301,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Cluster_" + "$ref": "#/components/schemas/WithTask_ClusterSettings_" }, "type": "array" } @@ -119036,16 +118390,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ClusterUpdationParams" + "$ref": "#/components/schemas/ClusterHaUpdationParams" } } } } } }, - "/update-cluster-license": { + "/update-cluster-enable-iscsi-setting": { "post": { - "operationId": "UpdateClusterLicense", + "operationId": "UpdateClusterEnableISCSISetting", "responses": { "200": { "description": "", @@ -119053,7 +118407,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Cluster_" + "$ref": "#/components/schemas/WithTask_ClusterSettings_" }, "type": "array" } @@ -119142,16 +118496,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ClusterLicenseUpdationParams" + "$ref": "#/components/schemas/ClusterEnableIscsiUpdationParams" } } } } } }, - "/update-cluster-network-setting": { + "/delete-cluster": { "post": { - "operationId": "UpdateClusterNetworkSetting", + "operationId": "DeleteCluster", "responses": { "200": { "description": "", @@ -119159,7 +118513,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Cluster_" + "$ref": "#/components/schemas/WithTask_DeleteCluster_" }, "type": "array" } @@ -119248,16 +118602,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ClusterNetworkSettingUpdationParams" + "$ref": "#/components/schemas/ClusterDeletionParams" } } } } } }, - "/update-cluster-virtualization-setting": { + "/get-meta-leader": { "post": { - "operationId": "UpdateClusterVirtualizationSetting", + "operationId": "GetMetaLeader", "responses": { "200": { "description": "", @@ -119265,7 +118619,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Cluster_" + "$ref": "#/components/schemas/MetaLeader" }, "type": "array" } @@ -119339,6 +118693,103 @@ "Authorization": [] } ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetMetaLeaderRequestBody" + } + } + } + } + } + }, + "/create-consistency-snapshot-group": { + "post": { + "operationId": "CreateConsistencyGroupSnapshot", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/WithTask_ConsistencyGroupSnapshot_" + }, + "type": "array" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBody" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBody" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBody" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + } + }, + "tags": [ + "ConsistencyGroupSnapshot" + ], + "security": [ + { + "Authorization": [] + } + ], "parameters": [ { "in": "header", @@ -119354,16 +118805,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ClusterVirtualizationUpdationParams" + "items": { + "$ref": "#/components/schemas/ConsistencyGroupSnapshotCreationParams" + }, + "type": "array" } } } } } }, - "/update-cluster-ha-setting": { + "/rollback-consistency-snapshot-group": { "post": { - "operationId": "UpdateClusterHaSetting", + "operationId": "UpdateConsistencyGroupSnapshot", "responses": { "200": { "description": "", @@ -119371,7 +118825,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_ClusterSettings_" + "$ref": "#/components/schemas/WithTask_ConsistencyGroupSnapshot_" }, "type": "array" } @@ -119438,7 +118892,7 @@ } }, "tags": [ - "Cluster" + "ConsistencyGroupSnapshot" ], "security": [ { @@ -119460,16 +118914,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ClusterHaUpdationParams" + "$ref": "#/components/schemas/ConsistencyGroupSnapshotUpdationParams" } } } } } }, - "/update-cluster-enable-iscsi-setting": { + "/delete-consistency-snapshot-group": { "post": { - "operationId": "UpdateClusterEnableISCSISetting", + "operationId": "DeleteConsistencyGroupSnapshot", "responses": { "200": { "description": "", @@ -119477,7 +118931,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_ClusterSettings_" + "$ref": "#/components/schemas/WithTask_DeleteConsistencyGroupSnapshot_" }, "type": "array" } @@ -119544,7 +118998,7 @@ } }, "tags": [ - "Cluster" + "ConsistencyGroupSnapshot" ], "security": [ { @@ -119566,16 +119020,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ClusterEnableIscsiUpdationParams" + "$ref": "#/components/schemas/ConsistencyGroupSnapshotDeletionParams" } } } } } }, - "/delete-cluster": { + "/create-consistency-group": { "post": { - "operationId": "DeleteCluster", + "operationId": "CreateConsistencyGroup", "responses": { "200": { "description": "", @@ -119583,7 +119037,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteCluster_" + "$ref": "#/components/schemas/WithTask_ConsistencyGroup_" }, "type": "array" } @@ -119650,7 +119104,7 @@ } }, "tags": [ - "Cluster" + "ConsistencyGroup" ], "security": [ { @@ -119672,16 +119126,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ClusterDeletionParams" + "items": { + "$ref": "#/components/schemas/ConsistencyGroupCreationParams" + }, + "type": "array" } } } } } }, - "/get-meta-leader": { + "/update-consistency-group": { "post": { - "operationId": "GetMetaLeader", + "operationId": "UpdateConsistencyGroup", "responses": { "200": { "description": "", @@ -119689,7 +119146,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/MetaLeader" + "$ref": "#/components/schemas/WithTask_ConsistencyGroup_" }, "type": "array" } @@ -119756,29 +119213,38 @@ } }, "tags": [ - "Cluster" + "ConsistencyGroup" ], "security": [ { "Authorization": [] } ], - "parameters": [], + "parameters": [ + { + "in": "header", + "name": "content-language", + "required": false, + "schema": { + "$ref": "#/components/schemas/ContentLanguage" + } + } + ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetMetaLeaderRequestBody" + "$ref": "#/components/schemas/ConsistencyGroupUpdationParams" } } } } } }, - "/create-consistency-snapshot-group": { + "/delete-consistency-group": { "post": { - "operationId": "CreateConsistencyGroupSnapshot", + "operationId": "DeleteConsistencyGroup", "responses": { "200": { "description": "", @@ -119786,7 +119252,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_ConsistencyGroupSnapshot_" + "$ref": "#/components/schemas/WithTask_DeleteConsistencyGroup_" }, "type": "array" } @@ -119853,7 +119319,7 @@ } }, "tags": [ - "ConsistencyGroupSnapshot" + "ConsistencyGroup" ], "security": [ { @@ -119875,19 +119341,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/ConsistencyGroupSnapshotCreationParams" - }, - "type": "array" + "$ref": "#/components/schemas/ConsistencyGroupDeletionParams" } } } } } }, - "/rollback-consistency-snapshot-group": { + "/upload-content-library-image": { "post": { - "operationId": "UpdateConsistencyGroupSnapshot", + "operationId": "CreateContentLibraryImage", "responses": { "200": { "description": "", @@ -119895,7 +119358,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_ConsistencyGroupSnapshot_" + "$ref": "#/components/schemas/UploadTask" }, "type": "array" } @@ -119909,6 +119372,9 @@ } } }, + "304": { + "description": "Not modified" + }, "400": { "description": "Bad request", "content": { @@ -119962,7 +119428,7 @@ } }, "tags": [ - "ConsistencyGroupSnapshot" + "ContentLibraryImage" ], "security": [ { @@ -119982,18 +119448,46 @@ "requestBody": { "required": true, "content": { - "application/json": { + "multipart/form-data": { "schema": { - "$ref": "#/components/schemas/ConsistencyGroupSnapshotUpdationParams" + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary" + }, + "clusters": { + "type": "string" + }, + "name": { + "type": "string" + }, + "size": { + "type": "string" + }, + "size_unit": { + "type": "string" + }, + "description": { + "type": "string" + }, + "upload_task_id": { + "type": "string" + } + }, + "required": [ + "file", + "clusters" + ] } } } } } }, - "/delete-consistency-snapshot-group": { + "/update-content-library-image": { "post": { - "operationId": "DeleteConsistencyGroupSnapshot", + "operationId": "UpdateContentLibraryImage", "responses": { "200": { "description": "", @@ -120001,7 +119495,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteConsistencyGroupSnapshot_" + "$ref": "#/components/schemas/WithTask_ContentLibraryImage_" }, "type": "array" } @@ -120068,7 +119562,7 @@ } }, "tags": [ - "ConsistencyGroupSnapshot" + "ContentLibraryImage" ], "security": [ { @@ -120090,16 +119584,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ConsistencyGroupSnapshotDeletionParams" + "$ref": "#/components/schemas/ContentLibraryImageUpdationParams" } } } } } }, - "/create-consistency-group": { + "/distribute-content-library-image-clusters": { "post": { - "operationId": "CreateConsistencyGroup", + "operationId": "DistributeContentLibraryImageClusters", "responses": { "200": { "description": "", @@ -120107,7 +119601,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_ConsistencyGroup_" + "$ref": "#/components/schemas/WithTask_ContentLibraryImage_" }, "type": "array" } @@ -120174,7 +119668,7 @@ } }, "tags": [ - "ConsistencyGroup" + "ContentLibraryImage" ], "security": [ { @@ -120196,19 +119690,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/ConsistencyGroupCreationParams" - }, - "type": "array" + "$ref": "#/components/schemas/ContentLibraryImageUpdationClusterParams" } } } } } }, - "/update-consistency-group": { + "/remove-content-library-image-clusters": { "post": { - "operationId": "UpdateConsistencyGroup", + "operationId": "RemoveContentLibraryImageClusters", "responses": { "200": { "description": "", @@ -120216,7 +119707,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_ConsistencyGroup_" + "$ref": "#/components/schemas/WithTask_ContentLibraryImage_" }, "type": "array" } @@ -120283,7 +119774,7 @@ } }, "tags": [ - "ConsistencyGroup" + "ContentLibraryImage" ], "security": [ { @@ -120305,16 +119796,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ConsistencyGroupUpdationParams" + "$ref": "#/components/schemas/ContentLibraryImageUpdationClusterParams" } } } } } }, - "/delete-consistency-group": { + "/delete-content-library-image": { "post": { - "operationId": "DeleteConsistencyGroup", + "operationId": "DeleteContentLibraryImage", "responses": { "200": { "description": "", @@ -120322,7 +119813,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteConsistencyGroup_" + "$ref": "#/components/schemas/WithTask_DeleteContentLibraryImage_" }, "type": "array" } @@ -120389,7 +119880,7 @@ } }, "tags": [ - "ConsistencyGroup" + "ContentLibraryImage" ], "security": [ { @@ -120411,26 +119902,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ConsistencyGroupDeletionParams" + "$ref": "#/components/schemas/ContentLibraryImageDeletionParams" } } } } } }, - "/upload-content-library-image": { + "/import-content-library-image": { "post": { - "operationId": "CreateContentLibraryImage", + "operationId": "ImportContentLibraryImage", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/UploadTask" - }, - "type": "array" + "$ref": "#/components/schemas/UploadTask" } } }, @@ -120442,8 +119930,108 @@ } } }, - "304": { - "description": "Not modified" + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBody" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBody" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBody" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + } + }, + "tags": [ + "ContentLibraryImage" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "header", + "name": "content-language", + "required": false, + "schema": { + "$ref": "#/components/schemas/ContentLanguage" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContentLibraryImageImportParams" + } + } + } + } + } + }, + "/upload-elf-file": { + "post": { + "operationId": "UploadElfFile", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UploadTask" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } }, "400": { "description": "Bad request", @@ -120498,7 +120086,7 @@ } }, "tags": [ - "ContentLibraryImage" + "Ovf" ], "security": [ { @@ -120526,7 +120114,7 @@ "type": "string", "format": "binary" }, - "clusters": { + "cluster_id": { "type": "string" }, "name": { @@ -120538,16 +120126,12 @@ "size_unit": { "type": "string" }, - "description": { - "type": "string" - }, "upload_task_id": { "type": "string" } }, "required": [ - "file", - "clusters" + "file" ] } } @@ -120555,19 +120139,16 @@ } } }, - "/update-content-library-image": { + "/parse-ovf": { "post": { - "operationId": "UpdateContentLibraryImage", + "operationId": "ParseOvf", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/WithTask_ContentLibraryImage_" - }, - "type": "array" + "$ref": "#/components/schemas/ParsedOVF" } } }, @@ -120632,7 +120213,7 @@ } }, "tags": [ - "ContentLibraryImage" + "Ovf" ], "security": [ { @@ -120652,18 +120233,31 @@ "requestBody": { "required": true, "content": { - "application/json": { + "multipart/form-data": { "schema": { - "$ref": "#/components/schemas/ContentLibraryImageUpdationParams" + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary" + }, + "cluster_id": { + "type": "string" + } + }, + "required": [ + "file", + "cluster_id" + ] } } } } } }, - "/distribute-content-library-image-clusters": { + "/get-export-file-download-links": { "post": { - "operationId": "DistributeContentLibraryImageClusters", + "operationId": "GetExportFileDownloadLinks", "responses": { "200": { "description": "", @@ -120671,7 +120265,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_ContentLibraryImage_" + "$ref": "#/components/schemas/ExportFileDownloadLinks" }, "type": "array" } @@ -120738,7 +120332,7 @@ } }, "tags": [ - "ContentLibraryImage" + "Ovf" ], "security": [ { @@ -120760,16 +120354,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ContentLibraryImageUpdationClusterParams" + "$ref": "#/components/schemas/GetExportFileDownloadLinksParams" } } } } } }, - "/remove-content-library-image-clusters": { + "/create-vm": { "post": { - "operationId": "RemoveContentLibraryImageClusters", + "operationId": "CreateVm", "responses": { "200": { "description": "", @@ -120777,7 +120371,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_ContentLibraryImage_" + "$ref": "#/components/schemas/WithTask_Vm_" }, "type": "array" } @@ -120844,7 +120438,7 @@ } }, "tags": [ - "ContentLibraryImage" + "Vm" ], "security": [ { @@ -120866,16 +120460,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ContentLibraryImageUpdationClusterParams" + "items": { + "$ref": "#/components/schemas/VmCreationParams" + }, + "type": "array" } } } } } }, - "/delete-content-library-image": { + "/create-vm-from-template": { "post": { - "operationId": "DeleteContentLibraryImage", + "operationId": "CreateVmFromTemplate", "responses": { "200": { "description": "", @@ -120883,7 +120480,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteContentLibraryImage_" + "$ref": "#/components/schemas/WithTask_Vm_" }, "type": "array" } @@ -120950,7 +120547,7 @@ } }, "tags": [ - "ContentLibraryImage" + "Vm" ], "security": [ { @@ -120972,23 +120569,29 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ContentLibraryImageDeletionParams" + "items": { + "$ref": "#/components/schemas/VmCreateVmFromTemplateParams" + }, + "type": "array" } } } } } }, - "/import-content-library-image": { + "/create-vm-from-content-library-template": { "post": { - "operationId": "ImportContentLibraryImage", + "operationId": "CreateVmFromContentLibraryTemplate", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UploadTask" + "items": { + "$ref": "#/components/schemas/WithTask_Vm_" + }, + "type": "array" } } }, @@ -121053,7 +120656,7 @@ } }, "tags": [ - "ContentLibraryImage" + "Vm" ], "security": [ { @@ -121075,23 +120678,26 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ContentLibraryImageImportParams" + "items": { + "$ref": "#/components/schemas/VmCreateVmFromContentLibraryTemplateParams" + }, + "type": "array" } } } } } }, - "/upload-elf-file": { + "/create-vm-from-content-library-template-batch": { "post": { - "operationId": "UploadElfFile", + "operationId": "CreateVmFromContentLibraryTemplateBatch", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UploadTask" + "$ref": "#/components/schemas/WithTask_Vm-Array_" } } }, @@ -121156,7 +120762,7 @@ } }, "tags": [ - "Ovf" + "Vm" ], "security": [ { @@ -121176,49 +120782,28 @@ "requestBody": { "required": true, "content": { - "multipart/form-data": { + "application/json": { "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - }, - "cluster_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "size": { - "type": "string" - }, - "size_unit": { - "type": "string" - }, - "upload_task_id": { - "type": "string" - } - }, - "required": [ - "file" - ] + "$ref": "#/components/schemas/VmCreateVmFromContentLibraryTemplateBatchParams" } } } } } }, - "/parse-ovf": { + "/convert-vm-template-to-vm": { "post": { - "operationId": "ParseOvf", + "operationId": "ConvertVmTemplateToVm", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ParsedOVF" + "items": { + "$ref": "#/components/schemas/WithTask_Vm_" + }, + "type": "array" } } }, @@ -121283,7 +120868,7 @@ } }, "tags": [ - "Ovf" + "Vm" ], "security": [ { @@ -121303,31 +120888,21 @@ "requestBody": { "required": true, "content": { - "multipart/form-data": { + "application/json": { "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - }, - "cluster_id": { - "type": "string" - } + "items": { + "$ref": "#/components/schemas/ConvertVmTemplateToVmParams" }, - "required": [ - "file", - "cluster_id" - ] + "type": "array" } } } } } }, - "/get-export-file-download-links": { + "/clone-vm": { "post": { - "operationId": "GetExportFileDownloadLinks", + "operationId": "CloneVm", "responses": { "200": { "description": "", @@ -121335,7 +120910,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/ExportFileDownloadLinks" + "$ref": "#/components/schemas/WithTask_Vm_" }, "type": "array" } @@ -121402,7 +120977,7 @@ } }, "tags": [ - "Ovf" + "Vm" ], "security": [ { @@ -121424,16 +120999,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetExportFileDownloadLinksParams" + "items": { + "$ref": "#/components/schemas/VmCloneParams" + }, + "type": "array" } } } } } }, - "/create-vm": { + "/rebuild-vm-from-snapshot": { "post": { - "operationId": "CreateVm", + "operationId": "RebuildVm", "responses": { "200": { "description": "", @@ -121531,7 +121109,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/VmCreationParams" + "$ref": "#/components/schemas/VmRebuildParams" }, "type": "array" } @@ -121540,9 +121118,9 @@ } } }, - "/create-vm-from-template": { + "/rollback-vm": { "post": { - "operationId": "CreateVmFromTemplate", + "operationId": "RollbackVm", "responses": { "200": { "description": "", @@ -121639,19 +121217,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/VmCreateVmFromTemplateParams" - }, - "type": "array" + "$ref": "#/components/schemas/VmRollbackParams" } } } } } }, - "/create-vm-from-content-library-template": { + "/update-vm-basic-info": { "post": { - "operationId": "CreateVmFromContentLibraryTemplate", + "operationId": "UpdateVm", "responses": { "200": { "description": "", @@ -121748,26 +121323,26 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/VmCreateVmFromContentLibraryTemplateParams" - }, - "type": "array" + "$ref": "#/components/schemas/VmUpdateParams" } } } } } }, - "/create-vm-from-content-library-template-batch": { + "/move-vm-to-recycle": { "post": { - "operationId": "CreateVmFromContentLibraryTemplateBatch", + "operationId": "MoveVmToRecycleBin", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WithTask_Vm-Array_" + "items": { + "$ref": "#/components/schemas/WithTask_DeleteVm_" + }, + "type": "array" } } }, @@ -121854,16 +121429,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmCreateVmFromContentLibraryTemplateBatchParams" + "$ref": "#/components/schemas/VmOperateParams" } } } } } }, - "/convert-vm-template-to-vm": { + "/recover-vm-from-recycle": { "post": { - "operationId": "ConvertVmTemplateToVm", + "operationId": "RecoverVmFromRecycleBin", "responses": { "200": { "description": "", @@ -121871,7 +121446,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Vm_" + "$ref": "#/components/schemas/WithTask_DeleteVm_" }, "type": "array" } @@ -121960,19 +121535,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/ConvertVmTemplateToVmParams" - }, - "type": "array" + "$ref": "#/components/schemas/VmOperateParams" } } } } } }, - "/clone-vm": { + "/delete-vm": { "post": { - "operationId": "CloneVm", + "operationId": "DeleteVm", "responses": { "200": { "description": "", @@ -121980,7 +121552,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Vm_" + "$ref": "#/components/schemas/WithTask_DeleteVm_" }, "type": "array" } @@ -122069,19 +121641,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/VmCloneParams" - }, - "type": "array" + "$ref": "#/components/schemas/VmDeleteParams" } } } } } }, - "/rebuild-vm-from-snapshot": { + "/start-vm": { "post": { - "operationId": "RebuildVm", + "operationId": "StartVm", "responses": { "200": { "description": "", @@ -122178,19 +121747,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/VmRebuildParams" - }, - "type": "array" + "$ref": "#/components/schemas/VmStartParams" } } } } } }, - "/rollback-vm": { + "/restart-vm": { "post": { - "operationId": "RollbackVm", + "operationId": "RestartVm", "responses": { "200": { "description": "", @@ -122287,16 +121853,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmRollbackParams" + "$ref": "#/components/schemas/VmOperateParams" } } } } } }, - "/update-vm-basic-info": { + "/force-restart-vm": { "post": { - "operationId": "UpdateVm", + "operationId": "ForceRestartVm", "responses": { "200": { "description": "", @@ -122393,16 +121959,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmUpdateParams" + "$ref": "#/components/schemas/VmOperateParams" } } } } } }, - "/move-vm-to-recycle": { + "/shutdown-vm": { "post": { - "operationId": "MoveVmToRecycleBin", + "operationId": "ShutDownVm", "responses": { "200": { "description": "", @@ -122410,7 +121976,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteVm_" + "$ref": "#/components/schemas/WithTask_Vm_" }, "type": "array" } @@ -122506,9 +122072,9 @@ } } }, - "/recover-vm-from-recycle": { + "/poweroff-vm": { "post": { - "operationId": "RecoverVmFromRecycleBin", + "operationId": "PoweroffVm", "responses": { "200": { "description": "", @@ -122516,7 +122082,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteVm_" + "$ref": "#/components/schemas/WithTask_Vm_" }, "type": "array" } @@ -122612,221 +122178,9 @@ } } }, - "/delete-vm": { - "post": { - "operationId": "DeleteVm", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/WithTask_DeleteVm_" - }, - "type": "array" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorBody" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - }, - "404": { - "description": "Not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorBody" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - }, - "500": { - "description": "Server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorBody" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - } - }, - "tags": [ - "Vm" - ], - "security": [ - { - "Authorization": [] - } - ], - "parameters": [ - { - "in": "header", - "name": "content-language", - "required": false, - "schema": { - "$ref": "#/components/schemas/ContentLanguage" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VmDeleteParams" - } - } - } - } - } - }, - "/start-vm": { - "post": { - "operationId": "StartVm", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/WithTask_Vm_" - }, - "type": "array" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorBody" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - }, - "404": { - "description": "Not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorBody" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - }, - "500": { - "description": "Server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorBody" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - } - }, - "tags": [ - "Vm" - ], - "security": [ - { - "Authorization": [] - } - ], - "parameters": [ - { - "in": "header", - "name": "content-language", - "required": false, - "schema": { - "$ref": "#/components/schemas/ContentLanguage" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VmStartParams" - } - } - } - } - } - }, - "/restart-vm": { + "/suspend-vm": { "post": { - "operationId": "RestartVm", + "operationId": "SuspendVm", "responses": { "200": { "description": "", @@ -122930,9 +122284,9 @@ } } }, - "/force-restart-vm": { + "/resume-vm": { "post": { - "operationId": "ForceRestartVm", + "operationId": "ResumeVm", "responses": { "200": { "description": "", @@ -123036,9 +122390,9 @@ } } }, - "/shutdown-vm": { + "/add-vm-disk": { "post": { - "operationId": "ShutDownVm", + "operationId": "AddVmDisk", "responses": { "200": { "description": "", @@ -123135,16 +122489,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmOperateParams" + "$ref": "#/components/schemas/VmAddDiskParams" } } } } } }, - "/poweroff-vm": { + "/update-vm-disk": { "post": { - "operationId": "PoweroffVm", + "operationId": "UpdateVmDisk", "responses": { "200": { "description": "", @@ -123241,16 +122595,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmOperateParams" + "$ref": "#/components/schemas/VmUpdateDiskParams" } } } } } }, - "/suspend-vm": { + "/expand-vm-disk": { "post": { - "operationId": "SuspendVm", + "operationId": "ExpandVmDisk", "responses": { "200": { "description": "", @@ -123347,16 +122701,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmOperateParams" + "$ref": "#/components/schemas/VmExpandVmDiskParams" } } } } } }, - "/resume-vm": { + "/remove-vm-disk": { "post": { - "operationId": "ResumeVm", + "operationId": "RemoveVmDisk", "responses": { "200": { "description": "", @@ -123453,16 +122807,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmOperateParams" + "$ref": "#/components/schemas/VmRemoveDiskParams" } } } } } }, - "/add-vm-disk": { + "/add-vm-cd-rom": { "post": { - "operationId": "AddVmDisk", + "operationId": "AddVmCdRom", "responses": { "200": { "description": "", @@ -123484,6 +122838,9 @@ } } }, + "304": { + "description": "Not modified" + }, "400": { "description": "Bad request", "content": { @@ -123559,16 +122916,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmAddDiskParams" + "$ref": "#/components/schemas/VmAddCdRomParams" } } } } } }, - "/update-vm-disk": { + "/remove-vm-cd-rom": { "post": { - "operationId": "UpdateVmDisk", + "operationId": "RemoveVmCdRom", "responses": { "200": { "description": "", @@ -123665,16 +123022,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmUpdateDiskParams" + "$ref": "#/components/schemas/VmRemoveCdRomParams" } } } } } }, - "/expand-vm-disk": { + "/eject-iso-from-vm-cd-rom": { "post": { - "operationId": "ExpandVmDisk", + "operationId": "EjectIsoFromVmCdRom", "responses": { "200": { "description": "", @@ -123771,16 +123128,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmExpandVmDiskParams" + "$ref": "#/components/schemas/VmEjectCdRomParams" } } } } } }, - "/remove-vm-disk": { + "/toggle-vm-cd-rom-disable": { "post": { - "operationId": "RemoveVmDisk", + "operationId": "ToggleVmCdRomDisable", "responses": { "200": { "description": "", @@ -123877,16 +123234,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmRemoveDiskParams" + "$ref": "#/components/schemas/VmToggleCdRomDisableParams" } } } } } }, - "/add-vm-cd-rom": { + "/add-vm-nic": { "post": { - "operationId": "AddVmCdRom", + "operationId": "AddVmNic", "responses": { "200": { "description": "", @@ -123908,9 +123265,6 @@ } } }, - "304": { - "description": "Not modified" - }, "400": { "description": "Bad request", "content": { @@ -123986,16 +123340,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmAddCdRomParams" + "$ref": "#/components/schemas/VmAddNicParams" } } } } } }, - "/remove-vm-cd-rom": { + "/update-vm-nic": { "post": { - "operationId": "RemoveVmCdRom", + "operationId": "UpdateVmNic", "responses": { "200": { "description": "", @@ -124092,16 +123446,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmRemoveCdRomParams" + "$ref": "#/components/schemas/VmUpdateNicParams" } } } } } }, - "/eject-iso-from-vm-cd-rom": { + "/update-vm-nic-basic-info": { "post": { - "operationId": "EjectIsoFromVmCdRom", + "operationId": "UpdateVmNicBasicInfo", "responses": { "200": { "description": "", @@ -124123,6 +123477,9 @@ } } }, + "304": { + "description": "Not modified" + }, "400": { "description": "Bad request", "content": { @@ -124198,16 +123555,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmEjectCdRomParams" + "$ref": "#/components/schemas/VmUpdateNicBasicInfoParams" } } } } } }, - "/toggle-vm-cd-rom-disable": { + "/update-vm-nic-advance-info": { "post": { - "operationId": "ToggleVmCdRomDisable", + "operationId": "UpdateVmNicAdvanceInfo", "responses": { "200": { "description": "", @@ -124229,6 +123586,9 @@ } } }, + "304": { + "description": "Not modified" + }, "400": { "description": "Bad request", "content": { @@ -124304,16 +123664,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmToggleCdRomDisableParams" + "$ref": "#/components/schemas/VmUpdateNicAdvanceInfoParams" } } } } } }, - "/add-vm-nic": { + "/update-vm-nic-qos-option": { "post": { - "operationId": "AddVmNic", + "operationId": "UpdateVmNicQosOption", "responses": { "200": { "description": "", @@ -124335,6 +123695,9 @@ } } }, + "304": { + "description": "Not modified" + }, "400": { "description": "Bad request", "content": { @@ -124410,16 +123773,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmAddNicParams" + "$ref": "#/components/schemas/VmUpdateNicQosOptionsParams" } } } } } }, - "/update-vm-nic": { + "/add-vm-pci-nic": { "post": { - "operationId": "UpdateVmNic", + "operationId": "AddVmPciNic", "responses": { "200": { "description": "", @@ -124441,6 +123804,9 @@ } } }, + "304": { + "description": "Not modified" + }, "400": { "description": "Bad request", "content": { @@ -124516,16 +123882,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmUpdateNicParams" + "$ref": "#/components/schemas/VmOperatePciNicParams" } } } } } }, - "/update-vm-nic-basic-info": { + "/remove-vm-pci-nic": { "post": { - "operationId": "UpdateVmNicBasicInfo", + "operationId": "RemoveVmPciNic", "responses": { "200": { "description": "", @@ -124625,16 +123991,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmUpdateNicBasicInfoParams" + "$ref": "#/components/schemas/VmOperatePciNicParams" } } } } } }, - "/update-vm-nic-advance-info": { + "/remove-vm-nic": { "post": { - "operationId": "UpdateVmNicAdvanceInfo", + "operationId": "RemoveVmNic", "responses": { "200": { "description": "", @@ -124656,9 +124022,6 @@ } } }, - "304": { - "description": "Not modified" - }, "400": { "description": "Bad request", "content": { @@ -124714,6 +124077,7 @@ "tags": [ "Vm" ], + "deprecated": true, "security": [ { "Authorization": [] @@ -124734,16 +124098,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmUpdateNicAdvanceInfoParams" + "$ref": "#/components/schemas/VmRemoveNicParams" } } } } } }, - "/update-vm-nic-qos-option": { + "/remove-vm-nic-by-where": { "post": { - "operationId": "UpdateVmNicQosOption", + "operationId": "RemoveVmNicByWhere", "responses": { "200": { "description": "", @@ -124765,9 +124129,6 @@ } } }, - "304": { - "description": "Not modified" - }, "400": { "description": "Bad request", "content": { @@ -124843,16 +124204,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmUpdateNicQosOptionsParams" + "$ref": "#/components/schemas/VmRemoveNicByWhereParams" } } } } } }, - "/add-vm-pci-nic": { + "/add-vm-gpu-device": { "post": { - "operationId": "AddVmPciNic", + "operationId": "AddVmGpuDevice", "responses": { "200": { "description": "", @@ -124874,9 +124235,6 @@ } } }, - "304": { - "description": "Not modified" - }, "400": { "description": "Bad request", "content": { @@ -124952,16 +124310,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmOperatePciNicParams" + "$ref": "#/components/schemas/VmAddGpuDeviceParams" } } } } } }, - "/remove-vm-pci-nic": { + "/remove-vm-gpu-device": { "post": { - "operationId": "RemoveVmPciNic", + "operationId": "RemoveVmGpuDevice", "responses": { "200": { "description": "", @@ -124983,9 +124341,6 @@ } } }, - "304": { - "description": "Not modified" - }, "400": { "description": "Bad request", "content": { @@ -125061,16 +124416,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmOperatePciNicParams" + "$ref": "#/components/schemas/VmRemoveGpuDeviceParams" } } } } } }, - "/remove-vm-nic": { + "/install-vmtools": { "post": { - "operationId": "RemoveVmNic", + "operationId": "InstallVmtools", "responses": { "200": { "description": "", @@ -125147,7 +124502,6 @@ "tags": [ "Vm" ], - "deprecated": true, "security": [ { "Authorization": [] @@ -125168,16 +124522,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmRemoveNicParams" + "$ref": "#/components/schemas/InstallVmtoolsParams" } } } } } }, - "/remove-vm-nic-by-where": { + "/migrate-vm": { "post": { - "operationId": "RemoveVmNicByWhere", + "operationId": "MigrateVm", "responses": { "200": { "description": "", @@ -125274,16 +124628,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmRemoveNicByWhereParams" + "$ref": "#/components/schemas/VmMigrateParams" } } } } } }, - "/add-vm-gpu-device": { + "/migrate-vm-across-cluster": { "post": { - "operationId": "AddVmGpuDevice", + "operationId": "MigrateVmAcrossCluster", "responses": { "200": { "description": "", @@ -125305,6 +124659,9 @@ } } }, + "304": { + "description": "Not modified" + }, "400": { "description": "Bad request", "content": { @@ -125380,16 +124737,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmAddGpuDeviceParams" + "$ref": "#/components/schemas/VmMigrateAcrossClusterParams" } } } } } }, - "/remove-vm-gpu-device": { + "/stop-vm-in-cutover-migration": { "post": { - "operationId": "RemoveVmGpuDevice", + "operationId": "StopVmInCutoverMigration", "responses": { "200": { "description": "", @@ -125486,16 +124843,122 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmRemoveGpuDeviceParams" + "$ref": "#/components/schemas/StopVmInCutoverMigrationParams" } } } } } }, - "/install-vmtools": { + "/abort-migrate-vm-across-cluster": { "post": { - "operationId": "InstallVmtools", + "operationId": "AbortMigrateVmAcrossCluster", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Task" + }, + "type": "array" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBody" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBody" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBody" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + } + }, + "tags": [ + "Vm" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "header", + "name": "content-language", + "required": false, + "schema": { + "$ref": "#/components/schemas/ContentLanguage" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AbortMigrateVmAcrossClusterParams" + } + } + } + } + } + }, + "/add-vm-to-folder": { + "post": { + "operationId": "AddVmToFolder", "responses": { "200": { "description": "", @@ -125592,16 +125055,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InstallVmtoolsParams" + "$ref": "#/components/schemas/VmAddFolderParams" } } } } } }, - "/migrate-vm": { + "/remove-vm-from-folder": { "post": { - "operationId": "MigrateVm", + "operationId": "RemoveVmToFolder", "responses": { "200": { "description": "", @@ -125698,16 +125161,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmMigrateParams" + "$ref": "#/components/schemas/VmOperateParams" } } } } } }, - "/migrate-vm-across-cluster": { + "/update-vm-advanced-options": { "post": { - "operationId": "MigrateVmAcrossCluster", + "operationId": "UpdateVmAdvancedOptions", "responses": { "200": { "description": "", @@ -125807,16 +125270,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmMigrateAcrossClusterParams" + "$ref": "#/components/schemas/VmUpdateAdvancedOptionsParams" } } } } } }, - "/stop-vm-in-cutover-migration": { + "/update-vm-host-options": { "post": { - "operationId": "StopVmInCutoverMigration", + "operationId": "UpdateVmHostOptions", "responses": { "200": { "description": "", @@ -125838,6 +125301,9 @@ } } }, + "304": { + "description": "Not modified" + }, "400": { "description": "Bad request", "content": { @@ -125913,16 +125379,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StopVmInCutoverMigrationParams" + "$ref": "#/components/schemas/VmUpdateHostOptionsParams" } } } } } }, - "/abort-migrate-vm-across-cluster": { + "/reset-vm-guest-os-password": { "post": { - "operationId": "AbortMigrateVmAcrossCluster", + "operationId": "ResetVmGuestOsPassword", "responses": { "200": { "description": "", @@ -125930,7 +125396,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/Task" + "$ref": "#/components/schemas/WithTask_Vm_" }, "type": "array" } @@ -125944,6 +125410,9 @@ } } }, + "304": { + "description": "Not modified" + }, "400": { "description": "Bad request", "content": { @@ -126019,16 +125488,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AbortMigrateVmAcrossClusterParams" + "$ref": "#/components/schemas/VmResetGuestOsPasswordParams" } } } } } }, - "/add-vm-to-folder": { + "/update-vm-owner": { "post": { - "operationId": "AddVmToFolder", + "operationId": "UpdateVmOwner", "responses": { "200": { "description": "", @@ -126050,6 +125519,9 @@ } } }, + "304": { + "description": "Not modified" + }, "400": { "description": "Bad request", "content": { @@ -126077,10 +125549,11 @@ } }, "headers": { - "CommonHeader": { + "x-tower-request-id": { "schema": { - "$ref": "#/components/schemas/CommonHeader" - } + "type": "string" + }, + "required": true } } }, @@ -126125,16 +125598,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmAddFolderParams" + "$ref": "#/components/schemas/VmUpdateOwnerParams" } } } } } }, - "/remove-vm-from-folder": { + "/update-vm-io-policy": { "post": { - "operationId": "RemoveVmToFolder", + "operationId": "UpdateVmIoPolicy", "responses": { "200": { "description": "", @@ -126156,6 +125629,9 @@ } } }, + "304": { + "description": "Not modified" + }, "400": { "description": "Bad request", "content": { @@ -126231,16 +125707,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmOperateParams" + "$ref": "#/components/schemas/VmUpdateIoPolicyParams" } } } } } }, - "/update-vm-advanced-options": { + "/export-vm": { "post": { - "operationId": "UpdateVmAdvancedOptions", + "operationId": "ExportVm", "responses": { "200": { "description": "", @@ -126248,7 +125724,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Vm_" + "$ref": "#/components/schemas/WithTask_VmExportFile_" }, "type": "array" } @@ -126340,16 +125816,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmUpdateAdvancedOptionsParams" + "$ref": "#/components/schemas/VmExportParams" } } } } } }, - "/update-vm-host-options": { + "/import-vm": { "post": { - "operationId": "UpdateVmHostOptions", + "operationId": "ImportVm", "responses": { "200": { "description": "", @@ -126371,9 +125847,6 @@ } } }, - "304": { - "description": "Not modified" - }, "400": { "description": "Bad request", "content": { @@ -126449,16 +125922,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmUpdateHostOptionsParams" + "items": { + "$ref": "#/components/schemas/VmImportParams" + }, + "type": "array" } } } } } }, - "/reset-vm-guest-os-password": { + "/get-vm-gpu-device-info": { "post": { - "operationId": "ResetVmGuestOsPassword", + "operationId": "GetVmGpuDeviceInfo", "responses": { "200": { "description": "", @@ -126466,7 +125942,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Vm_" + "$ref": "#/components/schemas/VmGpuInfo" }, "type": "array" } @@ -126480,9 +125956,6 @@ } } }, - "304": { - "description": "Not modified" - }, "400": { "description": "Bad request", "content": { @@ -126558,26 +126031,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmResetGuestOsPasswordParams" + "$ref": "#/components/schemas/GetVmsRequestBody" } } } } } }, - "/update-vm-owner": { + "/get-vm-vnc-info": { "post": { - "operationId": "UpdateVmOwner", + "operationId": "GetVmVncInfo", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/WithTask_Vm_" - }, - "type": "array" + "$ref": "#/components/schemas/VmVncInfo" } } }, @@ -126589,9 +126059,6 @@ } } }, - "304": { - "description": "Not modified" - }, "400": { "description": "Bad request", "content": { @@ -126619,11 +126086,10 @@ } }, "headers": { - "x-tower-request-id": { + "CommonHeader": { "schema": { - "type": "string" - }, - "required": true + "$ref": "#/components/schemas/CommonHeader" + } } } }, @@ -126668,16 +126134,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmUpdateOwnerParams" + "$ref": "#/components/schemas/GetVmVncInfoParams" } } } } } }, - "/update-vm-io-policy": { + "/update-vm-vpc-nic": { "post": { - "operationId": "UpdateVmIoPolicy", + "operationId": "UpdateVmNicVpcInfo", "responses": { "200": { "description": "", @@ -126777,16 +126243,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmUpdateIoPolicyParams" + "$ref": "#/components/schemas/VmUpdateVpcNicParams" } } } } } }, - "/export-vm": { + "/clone-content-library-vm-template-from-vm": { "post": { - "operationId": "ExportVm", + "operationId": "CloneContentLibraryVmTemplateFromVm", "responses": { "200": { "description": "", @@ -126794,7 +126260,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_VmExportFile_" + "$ref": "#/components/schemas/WithTask_ContentLibraryVmTemplate_" }, "type": "array" } @@ -126808,9 +126274,6 @@ } } }, - "304": { - "description": "Not modified" - }, "400": { "description": "Bad request", "content": { @@ -126864,7 +126327,7 @@ } }, "tags": [ - "Vm" + "ContentLibraryVmTemplate" ], "security": [ { @@ -126886,16 +126349,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmExportParams" + "items": { + "$ref": "#/components/schemas/ContentLibraryVmTemplateCreationParams" + }, + "type": "array" } } } } } }, - "/import-vm": { + "/convert-content-library-vm-template-from-vm": { "post": { - "operationId": "ImportVm", + "operationId": "ConvertContentLibraryVmTemplateFromVm", "responses": { "200": { "description": "", @@ -126903,7 +126369,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Vm_" + "$ref": "#/components/schemas/WithTask_ContentLibraryVmTemplate_" }, "type": "array" } @@ -126970,7 +126436,7 @@ } }, "tags": [ - "Vm" + "ContentLibraryVmTemplate" ], "security": [ { @@ -126993,7 +126459,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/VmImportParams" + "$ref": "#/components/schemas/ContentLibraryVmTemplateCreationParams" }, "type": "array" } @@ -127002,9 +126468,9 @@ } } }, - "/get-vm-gpu-device-info": { + "/update-content-library-vm-template": { "post": { - "operationId": "GetVmGpuDeviceInfo", + "operationId": "UpdateContentLibraryVmTemplate", "responses": { "200": { "description": "", @@ -127012,7 +126478,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/VmGpuInfo" + "$ref": "#/components/schemas/WithTask_ContentLibraryVmTemplate_" }, "type": "array" } @@ -127079,7 +126545,7 @@ } }, "tags": [ - "Vm" + "ContentLibraryVmTemplate" ], "security": [ { @@ -127101,23 +126567,26 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetVmsRequestBody" + "$ref": "#/components/schemas/ContentLibraryVmTemplateUpdationParams" } } } } } }, - "/get-vm-vnc-info": { + "/distribute-content-library-vm-template-clusters": { "post": { - "operationId": "GetVmVncInfo", + "operationId": "DistributeContentLibraryVmtemplateClusters", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmVncInfo" + "items": { + "$ref": "#/components/schemas/WithTask_ContentLibraryVmTemplate_" + }, + "type": "array" } } }, @@ -127182,7 +126651,113 @@ } }, "tags": [ - "Vm" + "ContentLibraryVmTemplate" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "header", + "name": "content-language", + "required": false, + "schema": { + "$ref": "#/components/schemas/ContentLanguage" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContentLibraryVmTemplateUpdationClusterParams" + } + } + } + } + } + }, + "/remove-content-library-vm-template-clusters": { + "post": { + "operationId": "RemoveContentLibraryVmTemplateClusters", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/WithTask_ContentLibraryVmTemplate_" + }, + "type": "array" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBody" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBody" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBody" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + } + }, + "tags": [ + "ContentLibraryVmTemplate" ], "security": [ { @@ -127204,16 +126779,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetVmVncInfoParams" + "$ref": "#/components/schemas/ContentLibraryVmTemplateUpdationClusterParams" } } } } } }, - "/update-vm-vpc-nic": { + "/delete-content-library-vm-template": { "post": { - "operationId": "UpdateVmNicVpcInfo", + "operationId": "DeleteContentLibraryVmTemplate", "responses": { "200": { "description": "", @@ -127221,7 +126796,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Vm_" + "$ref": "#/components/schemas/WithTask_DeleteContentLibraryVmTemplate_" }, "type": "array" } @@ -127235,8 +126810,111 @@ } } }, - "304": { - "description": "Not modified" + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBody" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBody" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBody" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + } + }, + "tags": [ + "ContentLibraryVmTemplate" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "header", + "name": "content-language", + "required": false, + "schema": { + "$ref": "#/components/schemas/ContentLanguage" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContentLibraryVmTemplateDeletionParams" + } + } + } + } + } + }, + "/export-content-library-vm-template": { + "post": { + "operationId": "ExportContentLibraryVmTemplate", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/WithTask_VmExportFile_" + }, + "type": "array" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } }, "400": { "description": "Bad request", @@ -127291,7 +126969,7 @@ } }, "tags": [ - "Vm" + "ContentLibraryVmTemplate" ], "security": [ { @@ -127313,16 +126991,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmUpdateVpcNicParams" + "$ref": "#/components/schemas/ContentLibraryVmTemplateExportParams" } } } } } }, - "/clone-content-library-vm-template-from-vm": { + "/import-content-library-vm-template": { "post": { - "operationId": "CloneContentLibraryVmTemplateFromVm", + "operationId": "ImportContentLibraryVmTemplate", "responses": { "200": { "description": "", @@ -127420,7 +127098,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/ContentLibraryVmTemplateCreationParams" + "$ref": "#/components/schemas/ContentLibraryVmTemplateImportParams" }, "type": "array" } @@ -127429,9 +127107,9 @@ } } }, - "/convert-content-library-vm-template-from-vm": { + "/create-datacenter": { "post": { - "operationId": "ConvertContentLibraryVmTemplateFromVm", + "operationId": "CreateDatacenter", "responses": { "200": { "description": "", @@ -127439,7 +127117,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_ContentLibraryVmTemplate_" + "$ref": "#/components/schemas/WithTask_Datacenter_" }, "type": "array" } @@ -127506,7 +127184,7 @@ } }, "tags": [ - "ContentLibraryVmTemplate" + "Datacenter" ], "security": [ { @@ -127529,7 +127207,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/ContentLibraryVmTemplateCreationParams" + "$ref": "#/components/schemas/DatacenterCreationParams" }, "type": "array" } @@ -127538,9 +127216,9 @@ } } }, - "/update-content-library-vm-template": { + "/update-datacenter": { "post": { - "operationId": "UpdateContentLibraryVmTemplate", + "operationId": "UpdateDatacenter", "responses": { "200": { "description": "", @@ -127548,7 +127226,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_ContentLibraryVmTemplate_" + "$ref": "#/components/schemas/WithTask_Datacenter_" }, "type": "array" } @@ -127615,7 +127293,7 @@ } }, "tags": [ - "ContentLibraryVmTemplate" + "Datacenter" ], "security": [ { @@ -127637,16 +127315,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ContentLibraryVmTemplateUpdationParams" + "$ref": "#/components/schemas/DatacenterUpdationParams" } } } } } }, - "/distribute-content-library-vm-template-clusters": { + "/add-clusters-to-datacenter": { "post": { - "operationId": "DistributeContentLibraryVmtemplateClusters", + "operationId": "AddClustersToDatacenter", "responses": { "200": { "description": "", @@ -127654,7 +127332,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_ContentLibraryVmTemplate_" + "$ref": "#/components/schemas/WithTask_Datacenter_" }, "type": "array" } @@ -127721,7 +127399,7 @@ } }, "tags": [ - "ContentLibraryVmTemplate" + "Datacenter" ], "security": [ { @@ -127743,16 +127421,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ContentLibraryVmTemplateUpdationClusterParams" + "items": { + "$ref": "#/components/schemas/AddClustersToDatacenterParams" + }, + "type": "array" } } } } } }, - "/remove-content-library-vm-template-clusters": { + "/remove-clusters-from-datacenter": { "post": { - "operationId": "RemoveContentLibraryVmTemplateClusters", + "operationId": "RemoveClustersFromDatacenter", "responses": { "200": { "description": "", @@ -127760,7 +127441,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_ContentLibraryVmTemplate_" + "$ref": "#/components/schemas/WithTask_Datacenter_" }, "type": "array" } @@ -127827,7 +127508,7 @@ } }, "tags": [ - "ContentLibraryVmTemplate" + "Datacenter" ], "security": [ { @@ -127849,16 +127530,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ContentLibraryVmTemplateUpdationClusterParams" + "items": { + "$ref": "#/components/schemas/RemoveClustersFromDatacenterParams" + }, + "type": "array" } } } } } }, - "/delete-content-library-vm-template": { + "/delete-datacenter": { "post": { - "operationId": "DeleteContentLibraryVmTemplate", + "operationId": "DeleteDatacenter", "responses": { "200": { "description": "", @@ -127866,7 +127550,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteContentLibraryVmTemplate_" + "$ref": "#/components/schemas/WithTask_DeleteDatacenter_" }, "type": "array" } @@ -127933,7 +127617,7 @@ } }, "tags": [ - "ContentLibraryVmTemplate" + "Datacenter" ], "security": [ { @@ -127955,16 +127639,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ContentLibraryVmTemplateDeletionParams" + "$ref": "#/components/schemas/DatacenterDeletionParams" } } } } } }, - "/export-content-library-vm-template": { + "/mount-disk": { "post": { - "operationId": "ExportContentLibraryVmTemplate", + "operationId": "MountDisk", "responses": { "200": { "description": "", @@ -127972,7 +127656,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_VmExportFile_" + "$ref": "#/components/schemas/WithTask_Disk_" }, "type": "array" } @@ -128039,7 +127723,7 @@ } }, "tags": [ - "ContentLibraryVmTemplate" + "Disk" ], "security": [ { @@ -128061,16 +127745,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ContentLibraryVmTemplateExportParams" + "$ref": "#/components/schemas/DiskMountParams" } } } } } }, - "/import-content-library-vm-template": { + "/unmount-disk": { "post": { - "operationId": "ImportContentLibraryVmTemplate", + "operationId": "UnmountDisk", "responses": { "200": { "description": "", @@ -128078,7 +127762,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_ContentLibraryVmTemplate_" + "$ref": "#/components/schemas/WithTask_Disk_" }, "type": "array" } @@ -128145,7 +127829,7 @@ } }, "tags": [ - "ContentLibraryVmTemplate" + "Disk" ], "security": [ { @@ -128167,19 +127851,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/ContentLibraryVmTemplateImportParams" - }, - "type": "array" + "$ref": "#/components/schemas/DiskUnmountParams" } } } } } }, - "/create-datacenter": { + "/create-entity-filter": { "post": { - "operationId": "CreateDatacenter", + "operationId": "CreateEntityFilter", "responses": { "200": { "description": "", @@ -128187,7 +127868,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Datacenter_" + "$ref": "#/components/schemas/WithTask_EntityFilter_" }, "type": "array" } @@ -128254,7 +127935,7 @@ } }, "tags": [ - "Datacenter" + "EntityFilter" ], "security": [ { @@ -128277,7 +127958,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/DatacenterCreationParams" + "$ref": "#/components/schemas/EntityFilterCreationParams" }, "type": "array" } @@ -128286,9 +127967,9 @@ } } }, - "/update-datacenter": { + "/update-entity-filter": { "post": { - "operationId": "UpdateDatacenter", + "operationId": "UpdateEntityFilter", "responses": { "200": { "description": "", @@ -128296,7 +127977,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Datacenter_" + "$ref": "#/components/schemas/WithTask_EntityFilter_" }, "type": "array" } @@ -128363,7 +128044,7 @@ } }, "tags": [ - "Datacenter" + "EntityFilter" ], "security": [ { @@ -128385,16 +128066,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DatacenterUpdationParams" + "$ref": "#/components/schemas/EntityFilterUpdationParams" } } } } } }, - "/add-clusters-to-datacenter": { + "/delete-entity-filter": { "post": { - "operationId": "AddClustersToDatacenter", + "operationId": "DeleteEntityFilter", "responses": { "200": { "description": "", @@ -128402,7 +128083,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Datacenter_" + "$ref": "#/components/schemas/WithTask_DeleteEntityFilter_" }, "type": "array" } @@ -128469,7 +128150,7 @@ } }, "tags": [ - "Datacenter" + "EntityFilter" ], "security": [ { @@ -128491,19 +128172,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/AddClustersToDatacenterParams" - }, - "type": "array" + "$ref": "#/components/schemas/EntityFilterDeletionParams" } } } } } }, - "/remove-clusters-from-datacenter": { + "/update-gpu-device-usage": { "post": { - "operationId": "RemoveClustersFromDatacenter", + "operationId": "UpdateGpuDeviceUsage", "responses": { "200": { "description": "", @@ -128511,7 +128189,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Datacenter_" + "$ref": "#/components/schemas/WithTask_GpuDevice_" }, "type": "array" } @@ -128525,6 +128203,9 @@ } } }, + "304": { + "description": "Not modified" + }, "400": { "description": "Bad request", "content": { @@ -128578,7 +128259,7 @@ } }, "tags": [ - "Datacenter" + "GpuDevice" ], "security": [ { @@ -128600,19 +128281,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/RemoveClustersFromDatacenterParams" - }, - "type": "array" + "$ref": "#/components/schemas/GpuDeviceUsageUpdationParams" } } } } } }, - "/delete-datacenter": { + "/update-gpu-device-description": { "post": { - "operationId": "DeleteDatacenter", + "operationId": "UpdateGpuDeviceDescription", "responses": { "200": { "description": "", @@ -128620,7 +128298,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteDatacenter_" + "$ref": "#/components/schemas/WithTask_GpuDevice_" }, "type": "array" } @@ -128634,6 +128312,9 @@ } } }, + "304": { + "description": "Not modified" + }, "400": { "description": "Bad request", "content": { @@ -128687,7 +128368,7 @@ } }, "tags": [ - "Datacenter" + "GpuDevice" ], "security": [ { @@ -128709,16 +128390,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DatacenterDeletionParams" + "$ref": "#/components/schemas/GpuDeviceDescriptionUpdationParams" } } } } } }, - "/mount-disk": { + "/switch-gpu-device-sriov": { "post": { - "operationId": "MountDisk", + "operationId": "SwitchGpuDeviceSriov", "responses": { "200": { "description": "", @@ -128726,7 +128407,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Disk_" + "$ref": "#/components/schemas/WithTask_GpuDevice_" }, "type": "array" } @@ -128740,6 +128421,9 @@ } } }, + "304": { + "description": "Not modified" + }, "400": { "description": "Bad request", "content": { @@ -128793,7 +128477,7 @@ } }, "tags": [ - "Disk" + "GpuDevice" ], "security": [ { @@ -128815,16 +128499,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DiskMountParams" + "$ref": "#/components/schemas/GpuDeviceSriovSwitchParams" } } } } } }, - "/unmount-disk": { + "/get-detail-vm-info-by-gpu-devices": { "post": { - "operationId": "UnmountDisk", + "operationId": "GetDetailVmInfoByGpuDevices", "responses": { "200": { "description": "", @@ -128832,7 +128516,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Disk_" + "$ref": "#/components/schemas/GpuVmInfo" }, "type": "array" } @@ -128846,6 +128530,9 @@ } } }, + "304": { + "description": "Not modified" + }, "400": { "description": "Bad request", "content": { @@ -128899,7 +128586,7 @@ } }, "tags": [ - "Disk" + "GpuDevice" ], "security": [ { @@ -128921,16 +128608,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DiskUnmountParams" + "$ref": "#/components/schemas/GetGpuDevicesRequestBody" } } } } } }, - "/create-entity-filter": { + "/create-graph": { "post": { - "operationId": "CreateEntityFilter", + "operationId": "CreateGraph", "responses": { "200": { "description": "", @@ -128938,7 +128625,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_EntityFilter_" + "$ref": "#/components/schemas/WithTask_Graph_" }, "type": "array" } @@ -129005,7 +128692,7 @@ } }, "tags": [ - "EntityFilter" + "Graph" ], "security": [ { @@ -129028,7 +128715,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/EntityFilterCreationParams" + "$ref": "#/components/schemas/GraphCreationParams" }, "type": "array" } @@ -129037,9 +128724,9 @@ } } }, - "/update-entity-filter": { + "/update-graph": { "post": { - "operationId": "UpdateEntityFilter", + "operationId": "UpdateGraph", "responses": { "200": { "description": "", @@ -129047,7 +128734,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_EntityFilter_" + "$ref": "#/components/schemas/WithTask_Graph_" }, "type": "array" } @@ -129114,7 +128801,7 @@ } }, "tags": [ - "EntityFilter" + "Graph" ], "security": [ { @@ -129136,16 +128823,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityFilterUpdationParams" + "$ref": "#/components/schemas/GraphUpdationParams" } } } } } }, - "/delete-entity-filter": { + "/delete-graph": { "post": { - "operationId": "DeleteEntityFilter", + "operationId": "DeleteGraph", "responses": { "200": { "description": "", @@ -129153,7 +128840,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteEntityFilter_" + "$ref": "#/components/schemas/WithTask_DeleteGraph_" }, "type": "array" } @@ -129220,7 +128907,7 @@ } }, "tags": [ - "EntityFilter" + "Graph" ], "security": [ { @@ -129242,16 +128929,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityFilterDeletionParams" + "$ref": "#/components/schemas/GraphDeletionParams" } } } } } }, - "/update-gpu-device-usage": { + "/create-host": { "post": { - "operationId": "UpdateGpuDeviceUsage", + "operationId": "CreateHost", "responses": { "200": { "description": "", @@ -129259,7 +128946,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_GpuDevice_" + "$ref": "#/components/schemas/WithTask_BatchHosts_" }, "type": "array" } @@ -129273,9 +128960,6 @@ } } }, - "304": { - "description": "Not modified" - }, "400": { "description": "Bad request", "content": { @@ -129329,7 +129013,7 @@ } }, "tags": [ - "GpuDevice" + "Host" ], "security": [ { @@ -129351,16 +129035,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GpuDeviceUsageUpdationParams" + "items": { + "$ref": "#/components/schemas/HostCreationParams" + }, + "type": "array" } } } } } }, - "/update-gpu-device-description": { + "/trigger-disk-blink": { "post": { - "operationId": "UpdateGpuDeviceDescription", + "operationId": "TriggerDiskBlink", "responses": { "200": { "description": "", @@ -129368,7 +129055,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_GpuDevice_" + "$ref": "#/components/schemas/WithTask_Host_" }, "type": "array" } @@ -129382,9 +129069,6 @@ } } }, - "304": { - "description": "Not modified" - }, "400": { "description": "Bad request", "content": { @@ -129438,7 +129122,7 @@ } }, "tags": [ - "GpuDevice" + "Host" ], "security": [ { @@ -129460,16 +129144,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GpuDeviceDescriptionUpdationParams" + "items": { + "$ref": "#/components/schemas/TriggerDiskBlinkParams" + }, + "type": "array" } } } } } }, - "/switch-gpu-device-sriov": { + "/update-host": { "post": { - "operationId": "SwitchGpuDeviceSriov", + "operationId": "UpdateHost", "responses": { "200": { "description": "", @@ -129477,7 +129164,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_GpuDevice_" + "$ref": "#/components/schemas/WithTask_Host_" }, "type": "array" } @@ -129491,9 +129178,6 @@ } } }, - "304": { - "description": "Not modified" - }, "400": { "description": "Bad request", "content": { @@ -129547,7 +129231,7 @@ } }, "tags": [ - "GpuDevice" + "Host" ], "security": [ { @@ -129569,26 +129253,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GpuDeviceSriovSwitchParams" + "$ref": "#/components/schemas/HostUpdationParams" } } } } } }, - "/get-detail-vm-info-by-gpu-devices": { + "/operate-host-power": { "post": { - "operationId": "GetDetailVmInfoByGpuDevices", + "operationId": "PowerOffHost", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/GpuVmInfo" - }, - "type": "array" + "$ref": "#/components/schemas/WithTask_Host_" } } }, @@ -129600,8 +129281,108 @@ } } }, - "304": { - "description": "Not modified" + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBody" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBody" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBody" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + } + }, + "tags": [ + "Host" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "header", + "name": "content-language", + "required": false, + "schema": { + "$ref": "#/components/schemas/ContentLanguage" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OperateHostPowerParams" + } + } + } + } + } + }, + "/enter-maintenance-mode-precheck": { + "post": { + "operationId": "EnterMaintenanceModePreCheck", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnterMaintenanceModeCheckResult" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } }, "400": { "description": "Bad request", @@ -129656,7 +129437,7 @@ } }, "tags": [ - "GpuDevice" + "Host" ], "security": [ { @@ -129678,26 +129459,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetGpuDevicesRequestBody" + "$ref": "#/components/schemas/EnterMaintenanceModeCheckParams" } } } } } }, - "/create-graph": { + "/enter-maintance-mode-precheck-result": { "post": { - "operationId": "CreateGraph", + "operationId": "EnterMaintenanceModePrecheckResult", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/WithTask_Graph_" - }, - "type": "array" + "$ref": "#/components/schemas/EnterMaintenanceModeResult" } } }, @@ -129762,7 +129540,7 @@ } }, "tags": [ - "Graph" + "Host" ], "security": [ { @@ -129784,29 +129562,23 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/GraphCreationParams" - }, - "type": "array" + "$ref": "#/components/schemas/EnterMaintenanceModeResultParams" } } } } } }, - "/update-graph": { + "/enter-maintance-mode": { "post": { - "operationId": "UpdateGraph", + "operationId": "EnterMaintenanceMode", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/WithTask_Graph_" - }, - "type": "array" + "$ref": "#/components/schemas/WithTask_Host_" } } }, @@ -129871,7 +129643,7 @@ } }, "tags": [ - "Graph" + "Host" ], "security": [ { @@ -129893,26 +129665,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GraphUpdationParams" + "$ref": "#/components/schemas/EnterMaintenanceModeParams" } } } } } }, - "/delete-graph": { + "/exit-maintance-mode-precheck-result": { "post": { - "operationId": "DeleteGraph", + "operationId": "ExitMaintenanceModePrecheckResult", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/WithTask_DeleteGraph_" - }, - "type": "array" + "$ref": "#/components/schemas/ExitMaintenanceModeResult" } } }, @@ -129977,7 +129746,7 @@ } }, "tags": [ - "Graph" + "Host" ], "security": [ { @@ -129999,26 +129768,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GraphDeletionParams" + "$ref": "#/components/schemas/ExitMaintenanceModeResultParams" } } } } } }, - "/create-host": { + "/exit-maintance-mode": { "post": { - "operationId": "CreateHost", + "operationId": "ExitMaintenanceMode", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/WithTask_BatchHosts_" - }, - "type": "array" + "$ref": "#/components/schemas/WithTask_Host_" } } }, @@ -130105,19 +129871,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/HostCreationParams" - }, - "type": "array" + "$ref": "#/components/schemas/ExitMaintenanceModeParams" } } } } } }, - "/trigger-disk-blink": { + "/create-iscsi-lun-snapshot": { "post": { - "operationId": "TriggerDiskBlink", + "operationId": "CreateIscsiLunSnapshot", "responses": { "200": { "description": "", @@ -130125,7 +129888,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Host_" + "$ref": "#/components/schemas/WithTask_IscsiLunSnapshot_" }, "type": "array" } @@ -130192,7 +129955,7 @@ } }, "tags": [ - "Host" + "IscsiLunSnapshot" ], "security": [ { @@ -130215,7 +129978,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/TriggerDiskBlinkParams" + "$ref": "#/components/schemas/IscsiLunSnapshotCreationParams" }, "type": "array" } @@ -130224,9 +129987,9 @@ } } }, - "/update-host": { + "/delete-iscsi-lun-snapshot": { "post": { - "operationId": "UpdateHost", + "operationId": "DeleteIscsiLunSnapshot", "responses": { "200": { "description": "", @@ -130234,7 +129997,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Host_" + "$ref": "#/components/schemas/WithTask_DeleteIscsiLunSnapshot_" }, "type": "array" } @@ -130301,7 +130064,7 @@ } }, "tags": [ - "Host" + "IscsiLunSnapshot" ], "security": [ { @@ -130323,23 +130086,26 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/HostUpdationParams" + "$ref": "#/components/schemas/IscsiLunSnapshotDeletionParams" } } } } } }, - "/operate-host-power": { + "/create-iscsi-lun": { "post": { - "operationId": "PowerOffHost", + "operationId": "CreateIscsiLun", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WithTask_Host_" + "items": { + "$ref": "#/components/schemas/WithTask_IscsiLun_" + }, + "type": "array" } } }, @@ -130404,7 +130170,7 @@ } }, "tags": [ - "Host" + "IscsiLun" ], "security": [ { @@ -130426,23 +130192,29 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OperateHostPowerParams" + "items": { + "$ref": "#/components/schemas/IscsiLunCreationParams" + }, + "type": "array" } } } } } }, - "/enter-maintenance-mode-precheck": { + "/update-iscsi-lun": { "post": { - "operationId": "EnterMaintenanceModePreCheck", + "operationId": "UpdateIscsiLun", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnterMaintenanceModeCheckResult" + "items": { + "$ref": "#/components/schemas/WithTask_IscsiLun_" + }, + "type": "array" } } }, @@ -130507,7 +130279,7 @@ } }, "tags": [ - "Host" + "IscsiLun" ], "security": [ { @@ -130529,23 +130301,26 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnterMaintenanceModeCheckParams" + "$ref": "#/components/schemas/IscsiLunUpdationParams" } } } } } }, - "/enter-maintance-mode-precheck-result": { + "/delete-iscsi-lun": { "post": { - "operationId": "EnterMaintenanceModePrecheckResult", + "operationId": "DeleteIscsiLun", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnterMaintenanceModeResult" + "items": { + "$ref": "#/components/schemas/WithTask_DeleteIscsiLun_" + }, + "type": "array" } } }, @@ -130610,7 +130385,7 @@ } }, "tags": [ - "Host" + "IscsiLun" ], "security": [ { @@ -130632,23 +130407,26 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnterMaintenanceModeResultParams" + "$ref": "#/components/schemas/IscsiLunDeletionParams" } } } } } }, - "/enter-maintance-mode": { + "/clone-iscsi-lun-from-snapshot": { "post": { - "operationId": "EnterMaintenanceMode", + "operationId": "CloneIscsiLunFromSnapshot", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WithTask_Host_" + "items": { + "$ref": "#/components/schemas/WithTask_IscsiLun_" + }, + "type": "array" } } }, @@ -130713,7 +130491,7 @@ } }, "tags": [ - "Host" + "IscsiLun" ], "security": [ { @@ -130735,23 +130513,29 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnterMaintenanceModeParams" + "items": { + "$ref": "#/components/schemas/IscsiLunCloneParams" + }, + "type": "array" } } } } } }, - "/exit-maintance-mode-precheck-result": { + "/rollback-iscsi-lun-from-snapshot": { "post": { - "operationId": "ExitMaintenanceModePrecheckResult", + "operationId": "RollbackIscsiLunFromSnapshot", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ExitMaintenanceModeResult" + "items": { + "$ref": "#/components/schemas/WithTask_IscsiLun_" + }, + "type": "array" } } }, @@ -130816,7 +130600,7 @@ } }, "tags": [ - "Host" + "IscsiLun" ], "security": [ { @@ -130838,23 +130622,29 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ExitMaintenanceModeResultParams" + "items": { + "$ref": "#/components/schemas/IscsiLunRollbackParams" + }, + "type": "array" } } } } } }, - "/exit-maintance-mode": { + "/copy-iscsi-lun": { "post": { - "operationId": "ExitMaintenanceMode", + "operationId": "CopyIscsiLun", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WithTask_Host_" + "items": { + "$ref": "#/components/schemas/WithTask_IscsiLun_" + }, + "type": "array" } } }, @@ -130919,7 +130709,7 @@ } }, "tags": [ - "Host" + "IscsiLun" ], "security": [ { @@ -130941,16 +130731,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ExitMaintenanceModeParams" + "items": { + "$ref": "#/components/schemas/CopyIscsiLunParams" + }, + "type": "array" } } } } } }, - "/create-iscsi-lun-snapshot": { + "/create-iscsi-target": { "post": { - "operationId": "CreateIscsiLunSnapshot", + "operationId": "CreateIscsiTarget", "responses": { "200": { "description": "", @@ -130958,7 +130751,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_IscsiLunSnapshot_" + "$ref": "#/components/schemas/WithTask_IscsiTarget_" }, "type": "array" } @@ -131025,7 +130818,7 @@ } }, "tags": [ - "IscsiLunSnapshot" + "IscsiTarget" ], "security": [ { @@ -131048,7 +130841,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/IscsiLunSnapshotCreationParams" + "$ref": "#/components/schemas/IscsiTargetCreationParams" }, "type": "array" } @@ -131057,9 +130850,9 @@ } } }, - "/delete-iscsi-lun-snapshot": { + "/update-iscsi-target": { "post": { - "operationId": "DeleteIscsiLunSnapshot", + "operationId": "UpdateIscsiTarget", "responses": { "200": { "description": "", @@ -131067,7 +130860,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteIscsiLunSnapshot_" + "$ref": "#/components/schemas/WithTask_IscsiTarget_" }, "type": "array" } @@ -131134,7 +130927,7 @@ } }, "tags": [ - "IscsiLunSnapshot" + "IscsiTarget" ], "security": [ { @@ -131156,16 +130949,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IscsiLunSnapshotDeletionParams" + "$ref": "#/components/schemas/IscsiTargetUpdationParams" } } } } } }, - "/create-iscsi-lun": { + "/delete-iscsi-target": { "post": { - "operationId": "CreateIscsiLun", + "operationId": "DeleteIscsiTarget", "responses": { "200": { "description": "", @@ -131173,7 +130966,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_IscsiLun_" + "$ref": "#/components/schemas/WithTask_DeleteIscsiTarget_" }, "type": "array" } @@ -131240,7 +131033,7 @@ } }, "tags": [ - "IscsiLun" + "IscsiTarget" ], "security": [ { @@ -131262,19 +131055,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/IscsiLunCreationParams" - }, - "type": "array" + "$ref": "#/components/schemas/IscsiTargetDeletionParams" } } } } } }, - "/update-iscsi-lun": { + "/upload-elf-image": { "post": { - "operationId": "UpdateIscsiLun", + "operationId": "CreateElfImage", "responses": { "200": { "description": "", @@ -131282,7 +131072,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_IscsiLun_" + "$ref": "#/components/schemas/UploadTask" }, "type": "array" } @@ -131349,7 +131139,7 @@ } }, "tags": [ - "IscsiLun" + "ElfImage" ], "security": [ { @@ -131369,18 +131159,45 @@ "requestBody": { "required": true, "content": { - "application/json": { + "multipart/form-data": { "schema": { - "$ref": "#/components/schemas/IscsiLunUpdationParams" + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary" + }, + "cluster_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "size": { + "type": "string" + }, + "size_unit": { + "type": "string" + }, + "description": { + "type": "string" + }, + "upload_task_id": { + "type": "string" + } + }, + "required": [ + "file" + ] } } } } } }, - "/delete-iscsi-lun": { + "/update-elf-image": { "post": { - "operationId": "DeleteIscsiLun", + "operationId": "UpdateElfImage", "responses": { "200": { "description": "", @@ -131388,7 +131205,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteIscsiLun_" + "$ref": "#/components/schemas/WithTask_ElfImage_" }, "type": "array" } @@ -131455,7 +131272,7 @@ } }, "tags": [ - "IscsiLun" + "ElfImage" ], "security": [ { @@ -131477,16 +131294,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IscsiLunDeletionParams" + "$ref": "#/components/schemas/ElfImageUpdationParams" } } } } } }, - "/clone-iscsi-lun-from-snapshot": { + "/delete-elf-image": { "post": { - "operationId": "CloneIscsiLunFromSnapshot", + "operationId": "DeleteElfImage", "responses": { "200": { "description": "", @@ -131494,7 +131311,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_IscsiLun_" + "$ref": "#/components/schemas/WithTask_DeleteElfImage_" }, "type": "array" } @@ -131561,7 +131378,7 @@ } }, "tags": [ - "IscsiLun" + "ElfImage" ], "security": [ { @@ -131583,19 +131400,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/IscsiLunCloneParams" - }, - "type": "array" + "$ref": "#/components/schemas/ElfImageDeletionParams" } } } } } }, - "/rollback-iscsi-lun-from-snapshot": { + "/create-label": { "post": { - "operationId": "RollbackIscsiLunFromSnapshot", + "operationId": "CreateLabel", "responses": { "200": { "description": "", @@ -131603,7 +131417,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_IscsiLun_" + "$ref": "#/components/schemas/WithTask_Label_" }, "type": "array" } @@ -131670,7 +131484,7 @@ } }, "tags": [ - "IscsiLun" + "Label" ], "security": [ { @@ -131693,7 +131507,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/IscsiLunRollbackParams" + "$ref": "#/components/schemas/LabelCreationParams" }, "type": "array" } @@ -131702,9 +131516,9 @@ } } }, - "/copy-iscsi-lun": { + "/update-label": { "post": { - "operationId": "CopyIscsiLun", + "operationId": "UpdateLabel", "responses": { "200": { "description": "", @@ -131712,7 +131526,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_IscsiLun_" + "$ref": "#/components/schemas/WithTask_Label_" }, "type": "array" } @@ -131726,6 +131540,9 @@ } } }, + "304": { + "description": "Not modified" + }, "400": { "description": "Bad request", "content": { @@ -131779,7 +131596,7 @@ } }, "tags": [ - "IscsiLun" + "Label" ], "security": [ { @@ -131801,19 +131618,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/CopyIscsiLunParams" - }, - "type": "array" + "$ref": "#/components/schemas/LabelUpdationParams" } } } } } }, - "/create-iscsi-target": { + "/add-labels-to-resources": { "post": { - "operationId": "CreateIscsiTarget", + "operationId": "AddLabelsToResources", "responses": { "200": { "description": "", @@ -131821,7 +131635,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_IscsiTarget_" + "$ref": "#/components/schemas/WithTask_Label_" }, "type": "array" } @@ -131835,6 +131649,9 @@ } } }, + "304": { + "description": "Not modified" + }, "400": { "description": "Bad request", "content": { @@ -131888,7 +131705,7 @@ } }, "tags": [ - "IscsiTarget" + "Label" ], "security": [ { @@ -131910,19 +131727,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/IscsiTargetCreationParams" - }, - "type": "array" + "$ref": "#/components/schemas/AddLabelsToResourcesParams" } } } } } }, - "/update-iscsi-target": { + "/remove-labels-from-resources": { "post": { - "operationId": "UpdateIscsiTarget", + "operationId": "RemoveLabelsFromResources", "responses": { "200": { "description": "", @@ -131930,7 +131744,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_IscsiTarget_" + "$ref": "#/components/schemas/WithTask_Label_" }, "type": "array" } @@ -131944,6 +131758,9 @@ } } }, + "304": { + "description": "Not modified" + }, "400": { "description": "Bad request", "content": { @@ -131997,7 +131814,7 @@ } }, "tags": [ - "IscsiTarget" + "Label" ], "security": [ { @@ -132019,16 +131836,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IscsiTargetUpdationParams" + "$ref": "#/components/schemas/RemoveLabelsFromResourcesParams" } } } } } }, - "/delete-iscsi-target": { + "/delete-label": { "post": { - "operationId": "DeleteIscsiTarget", + "operationId": "DeleteLabel", "responses": { "200": { "description": "", @@ -132036,7 +131853,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteIscsiTarget_" + "$ref": "#/components/schemas/WithTask_DeleteLabel_" }, "type": "array" } @@ -132103,7 +131920,7 @@ } }, "tags": [ - "IscsiTarget" + "Label" ], "security": [ { @@ -132125,26 +131942,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IscsiTargetDeletionParams" + "$ref": "#/components/schemas/LabelDeletionParams" } } } } } }, - "/upload-elf-image": { + "/update-license": { "post": { - "operationId": "CreateElfImage", + "operationId": "UpdateDeploy", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/UploadTask" - }, - "type": "array" + "$ref": "#/components/schemas/WithTask_License_" } } }, @@ -132209,7 +132023,7 @@ } }, "tags": [ - "ElfImage" + "License" ], "security": [ { @@ -132229,45 +132043,18 @@ "requestBody": { "required": true, "content": { - "multipart/form-data": { + "application/json": { "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - }, - "cluster_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "size": { - "type": "string" - }, - "size_unit": { - "type": "string" - }, - "description": { - "type": "string" - }, - "upload_task_id": { - "type": "string" - } - }, - "required": [ - "file" - ] + "$ref": "#/components/schemas/LicenseUpdationParams" } } } } } }, - "/update-elf-image": { + "/create-log-collection": { "post": { - "operationId": "UpdateElfImage", + "operationId": "CreateLogCollection", "responses": { "200": { "description": "", @@ -132275,7 +132062,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_ElfImage_" + "$ref": "#/components/schemas/WithTask_LogCollection_" }, "type": "array" } @@ -132342,38 +132129,32 @@ } }, "tags": [ - "ElfImage" + "LogCollection" ], "security": [ { "Authorization": [] } ], - "parameters": [ - { - "in": "header", - "name": "content-language", - "required": false, - "schema": { - "$ref": "#/components/schemas/ContentLanguage" - } - } - ], + "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ElfImageUpdationParams" + "items": { + "$ref": "#/components/schemas/LogCollectionCreationParams" + }, + "type": "array" } } } } } }, - "/delete-elf-image": { + "/force-stop-log-collection": { "post": { - "operationId": "DeleteElfImage", + "operationId": "ForceStopLogCollection", "responses": { "200": { "description": "", @@ -132381,7 +132162,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteElfImage_" + "$ref": "#/components/schemas/WithTask_LogCollection_" }, "type": "array" } @@ -132448,38 +132229,29 @@ } }, "tags": [ - "ElfImage" + "LogCollection" ], "security": [ { "Authorization": [] } ], - "parameters": [ - { - "in": "header", - "name": "content-language", - "required": false, - "schema": { - "$ref": "#/components/schemas/ContentLanguage" - } - } - ], + "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ElfImageDeletionParams" + "$ref": "#/components/schemas/ForceStopLogCollectionParams" } } } } } }, - "/create-label": { + "/delete-log-collection": { "post": { - "operationId": "CreateLabel", + "operationId": "DeleteLogCollection", "responses": { "200": { "description": "", @@ -132487,7 +132259,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Label_" + "$ref": "#/components/schemas/WithTask_DeleteLogCollection_" }, "type": "array" } @@ -132554,41 +132326,29 @@ } }, "tags": [ - "Label" + "LogCollection" ], "security": [ { "Authorization": [] } ], - "parameters": [ - { - "in": "header", - "name": "content-language", - "required": false, - "schema": { - "$ref": "#/components/schemas/ContentLanguage" - } - } - ], + "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/LabelCreationParams" - }, - "type": "array" + "$ref": "#/components/schemas/LogCollectionDeletionParams" } } } } } }, - "/update-label": { + "/get-vm-metrics": { "post": { - "operationId": "UpdateLabel", + "operationId": "GetVmMetrics", "responses": { "200": { "description": "", @@ -132596,7 +132356,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Label_" + "$ref": "#/components/schemas/WithTask_Metric_" }, "type": "array" } @@ -132610,9 +132370,6 @@ } } }, - "304": { - "description": "Not modified" - }, "400": { "description": "Bad request", "content": { @@ -132666,38 +132423,29 @@ } }, "tags": [ - "Label" + "Metrics" ], "security": [ { "Authorization": [] } ], - "parameters": [ - { - "in": "header", - "name": "content-language", - "required": false, - "schema": { - "$ref": "#/components/schemas/ContentLanguage" - } - } - ], + "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LabelUpdationParams" + "$ref": "#/components/schemas/GetVmMetricInput" } } } } } }, - "/add-labels-to-resources": { + "/get-vm-network-metrics": { "post": { - "operationId": "AddLabelsToResources", + "operationId": "GetVmNetWorkMetrics", "responses": { "200": { "description": "", @@ -132705,7 +132453,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Label_" + "$ref": "#/components/schemas/WithTask_Metric_" }, "type": "array" } @@ -132719,9 +132467,6 @@ } } }, - "304": { - "description": "Not modified" - }, "400": { "description": "Bad request", "content": { @@ -132775,38 +132520,29 @@ } }, "tags": [ - "Label" + "Metrics" ], "security": [ { "Authorization": [] } ], - "parameters": [ - { - "in": "header", - "name": "content-language", - "required": false, - "schema": { - "$ref": "#/components/schemas/ContentLanguage" - } - } - ], + "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddLabelsToResourcesParams" + "$ref": "#/components/schemas/GetVmNetWorkMetricInput" } } } } } }, - "/remove-labels-from-resources": { + "/get-disk-metrics": { "post": { - "operationId": "RemoveLabelsFromResources", + "operationId": "GetDiskMetrics", "responses": { "200": { "description": "", @@ -132814,7 +132550,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Label_" + "$ref": "#/components/schemas/WithTask_Metric_" }, "type": "array" } @@ -132828,9 +132564,6 @@ } } }, - "304": { - "description": "Not modified" - }, "400": { "description": "Bad request", "content": { @@ -132884,38 +132617,29 @@ } }, "tags": [ - "Label" + "Metrics" ], "security": [ { "Authorization": [] } ], - "parameters": [ - { - "in": "header", - "name": "content-language", - "required": false, - "schema": { - "$ref": "#/components/schemas/ContentLanguage" - } - } - ], + "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RemoveLabelsFromResourcesParams" + "$ref": "#/components/schemas/GetDiskMetricInput" } } } } } }, - "/delete-label": { + "/get-vm-volume-metrics": { "post": { - "operationId": "DeleteLabel", + "operationId": "GetVmVolumeMetrics", "responses": { "200": { "description": "", @@ -132923,7 +132647,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteLabel_" + "$ref": "#/components/schemas/WithTask_Metric_" }, "type": "array" } @@ -132990,45 +132714,39 @@ } }, "tags": [ - "Label" + "Metrics" ], "security": [ { "Authorization": [] } ], - "parameters": [ - { - "in": "header", - "name": "content-language", - "required": false, - "schema": { - "$ref": "#/components/schemas/ContentLanguage" - } - } - ], + "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LabelDeletionParams" + "$ref": "#/components/schemas/GetVmVolumeMetricInput" } } } } } }, - "/update-license": { + "/get-lun-metrics": { "post": { - "operationId": "UpdateDeploy", + "operationId": "GetLunMetrics", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WithTask_License_" + "items": { + "$ref": "#/components/schemas/WithTask_Metric_" + }, + "type": "array" } } }, @@ -133093,38 +132811,29 @@ } }, "tags": [ - "License" + "Metrics" ], "security": [ { "Authorization": [] } ], - "parameters": [ - { - "in": "header", - "name": "content-language", - "required": false, - "schema": { - "$ref": "#/components/schemas/ContentLanguage" - } - } - ], + "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LicenseUpdationParams" + "$ref": "#/components/schemas/GetLunMetricInput" } } } } } }, - "/create-log-collection": { + "/get-nvmf-namespace-metrics": { "post": { - "operationId": "CreateLogCollection", + "operationId": "GetNvmfNamespaceMetrics", "responses": { "200": { "description": "", @@ -133132,7 +132841,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_LogCollection_" + "$ref": "#/components/schemas/WithTask_Metric_" }, "type": "array" } @@ -133199,7 +132908,7 @@ } }, "tags": [ - "LogCollection" + "Metrics" ], "security": [ { @@ -133212,19 +132921,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/LogCollectionCreationParams" - }, - "type": "array" + "$ref": "#/components/schemas/GetNvmfNamespaceMetricInput" } } } } } }, - "/force-stop-log-collection": { + "/get-cluster-metrics": { "post": { - "operationId": "ForceStopLogCollection", + "operationId": "GetClusterMetrics", "responses": { "200": { "description": "", @@ -133232,7 +132938,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_LogCollection_" + "$ref": "#/components/schemas/WithTask_Metric_" }, "type": "array" } @@ -133299,7 +133005,7 @@ } }, "tags": [ - "LogCollection" + "Metrics" ], "security": [ { @@ -133312,16 +133018,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ForceStopLogCollectionParams" + "$ref": "#/components/schemas/GetClusterMetricInput" } } } } } }, - "/delete-log-collection": { + "/get-host-metrics": { "post": { - "operationId": "DeleteLogCollection", + "operationId": "GetHostMetrics", "responses": { "200": { "description": "", @@ -133329,7 +133035,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteLogCollection_" + "$ref": "#/components/schemas/WithTask_Metric_" }, "type": "array" } @@ -133396,7 +133102,7 @@ } }, "tags": [ - "LogCollection" + "Metrics" ], "security": [ { @@ -133409,16 +133115,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LogCollectionDeletionParams" + "$ref": "#/components/schemas/GetHostMetricInput" } } } } } }, - "/get-vm-metrics": { + "/get-host-network-metrics": { "post": { - "operationId": "GetVmMetrics", + "operationId": "GetHostNetworkMetrics", "responses": { "200": { "description": "", @@ -133506,16 +133212,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetVmMetricInput" + "$ref": "#/components/schemas/GetHostNetworkMetricInput" } } } } } }, - "/get-vm-network-metrics": { + "/get-host-service-metrics": { "post": { - "operationId": "GetVmNetWorkMetrics", + "operationId": "GetHostServicekMetrics", "responses": { "200": { "description": "", @@ -133603,16 +133309,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetVmNetWorkMetricInput" + "$ref": "#/components/schemas/GetHostServiceMetricInput" } } } } } }, - "/get-disk-metrics": { + "/get-scvm-metrics": { "post": { - "operationId": "GetDiskMetrics", + "operationId": "GetSCVMMetrics", "responses": { "200": { "description": "", @@ -133700,16 +133406,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetDiskMetricInput" + "$ref": "#/components/schemas/GetScvmMetricInput" } } } } } }, - "/get-vm-volume-metrics": { + "/get-scvm-network-metrics": { "post": { - "operationId": "GetVmVolumeMetrics", + "operationId": "GetScvmNetworkMetrics", "responses": { "200": { "description": "", @@ -133797,16 +133503,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetVmVolumeMetricInput" + "$ref": "#/components/schemas/GetScvmNetworkInput" } } } } } }, - "/get-lun-metrics": { + "/get-scvm-service-metrics": { "post": { - "operationId": "GetLunMetrics", + "operationId": "GetSCVMServicekMetrics", "responses": { "200": { "description": "", @@ -133894,16 +133600,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetLunMetricInput" + "$ref": "#/components/schemas/GetScvmServiceMetricInput" } } } } } }, - "/get-nvmf-namespace-metrics": { + "/get-scvm-disk-metrics": { "post": { - "operationId": "GetNvmfNamespaceMetrics", + "operationId": "GetScvmDiskMetrics", "responses": { "200": { "description": "", @@ -133991,16 +133697,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetNvmfNamespaceMetricInput" + "$ref": "#/components/schemas/GetSCVMDiskMetricInput" } } } } } }, - "/get-cluster-metrics": { + "/get-zone-metrics": { "post": { - "operationId": "GetClusterMetrics", + "operationId": "GetZoneMetrics", "responses": { "200": { "description": "", @@ -134088,16 +133794,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetClusterMetricInput" + "$ref": "#/components/schemas/GetZoneMetricInput" } } } } } }, - "/get-host-metrics": { + "/get-witness-metrics": { "post": { - "operationId": "GetHostMetrics", + "operationId": "GetWitnessMetrics", "responses": { "200": { "description": "", @@ -134185,16 +133891,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetHostMetricInput" + "$ref": "#/components/schemas/GetWitnessMetricInput" } } } } } }, - "/get-host-network-metrics": { + "/get-top-n-metrics-in-clusters": { "post": { - "operationId": "GetHostNetworkMetrics", + "operationId": "GetTopNVmVolumeMetrics", "responses": { "200": { "description": "", @@ -134282,16 +133988,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetHostNetworkMetricInput" + "$ref": "#/components/schemas/GetTopNMetricInput" } } } } } }, - "/get-host-service-metrics": { + "/create-namespace-group": { "post": { - "operationId": "GetHostServicekMetrics", + "operationId": "CreateNamespaceGroup", "responses": { "200": { "description": "", @@ -134299,7 +134005,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Metric_" + "$ref": "#/components/schemas/WithTask_NamespaceGroup_" }, "type": "array" } @@ -134366,29 +134072,41 @@ } }, "tags": [ - "Metrics" + "NamespaceGroup" ], "security": [ { "Authorization": [] } ], - "parameters": [], + "parameters": [ + { + "in": "header", + "name": "content-language", + "required": false, + "schema": { + "$ref": "#/components/schemas/ContentLanguage" + } + } + ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetHostServiceMetricInput" + "items": { + "$ref": "#/components/schemas/NamespaceGroupCreationParams" + }, + "type": "array" } } } } } }, - "/get-scvm-metrics": { + "/update-namespace-group": { "post": { - "operationId": "GetSCVMMetrics", + "operationId": "UpdateNamespaceGroup", "responses": { "200": { "description": "", @@ -134396,7 +134114,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Metric_" + "$ref": "#/components/schemas/WithTask_NamespaceGroup_" }, "type": "array" } @@ -134463,29 +134181,38 @@ } }, "tags": [ - "Metrics" + "NamespaceGroup" ], "security": [ { "Authorization": [] } ], - "parameters": [], + "parameters": [ + { + "in": "header", + "name": "content-language", + "required": false, + "schema": { + "$ref": "#/components/schemas/ContentLanguage" + } + } + ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetScvmMetricInput" + "$ref": "#/components/schemas/NamespaceGroupUpdationParams" } } } } } }, - "/get-scvm-network-metrics": { + "/delete-namespace-group": { "post": { - "operationId": "GetScvmNetworkMetrics", + "operationId": "DeleteNamespaceGroup", "responses": { "200": { "description": "", @@ -134493,7 +134220,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Metric_" + "$ref": "#/components/schemas/WithTask_DeleteNamespaceGroup_" }, "type": "array" } @@ -134560,29 +134287,38 @@ } }, "tags": [ - "Metrics" + "NamespaceGroup" ], "security": [ { "Authorization": [] } ], - "parameters": [], + "parameters": [ + { + "in": "header", + "name": "content-language", + "required": false, + "schema": { + "$ref": "#/components/schemas/ContentLanguage" + } + } + ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetScvmNetworkInput" + "$ref": "#/components/schemas/NamespaceGroupDeletionParams" } } } } } }, - "/get-scvm-service-metrics": { + "/create-nfs-export": { "post": { - "operationId": "GetSCVMServicekMetrics", + "operationId": "CreateNfsExport", "responses": { "200": { "description": "", @@ -134590,7 +134326,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Metric_" + "$ref": "#/components/schemas/WithTask_NfsExport_" }, "type": "array" } @@ -134657,29 +134393,41 @@ } }, "tags": [ - "Metrics" + "NfsExport" ], "security": [ { "Authorization": [] } ], - "parameters": [], + "parameters": [ + { + "in": "header", + "name": "content-language", + "required": false, + "schema": { + "$ref": "#/components/schemas/ContentLanguage" + } + } + ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetScvmServiceMetricInput" + "items": { + "$ref": "#/components/schemas/NfsExportCreationParams" + }, + "type": "array" } } } } } }, - "/get-scvm-disk-metrics": { + "/update-nfs-export": { "post": { - "operationId": "GetScvmDiskMetrics", + "operationId": "UpdateNfsExport", "responses": { "200": { "description": "", @@ -134687,7 +134435,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Metric_" + "$ref": "#/components/schemas/WithTask_NfsExport_" }, "type": "array" } @@ -134754,29 +134502,38 @@ } }, "tags": [ - "Metrics" + "NfsExport" ], "security": [ { "Authorization": [] } ], - "parameters": [], + "parameters": [ + { + "in": "header", + "name": "content-language", + "required": false, + "schema": { + "$ref": "#/components/schemas/ContentLanguage" + } + } + ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetSCVMDiskMetricInput" + "$ref": "#/components/schemas/NfsExportUpdationParams" } } } } } }, - "/get-zone-metrics": { + "/delete-nfs-export": { "post": { - "operationId": "GetZoneMetrics", + "operationId": "DeleteNfsExport", "responses": { "200": { "description": "", @@ -134784,7 +134541,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Metric_" + "$ref": "#/components/schemas/WithTask_DeleteNfsExport_" }, "type": "array" } @@ -134851,29 +134608,38 @@ } }, "tags": [ - "Metrics" + "NfsExport" ], "security": [ { "Authorization": [] } ], - "parameters": [], + "parameters": [ + { + "in": "header", + "name": "content-language", + "required": false, + "schema": { + "$ref": "#/components/schemas/ContentLanguage" + } + } + ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetZoneMetricInput" + "$ref": "#/components/schemas/NfsExportDeletionParams" } } } } } }, - "/get-witness-metrics": { + "/update-nic": { "post": { - "operationId": "GetWitnessMetrics", + "operationId": "UpdateNic", "responses": { "200": { "description": "", @@ -134881,7 +134647,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Metric_" + "$ref": "#/components/schemas/WithTask_Nic_" }, "type": "array" } @@ -134948,29 +134714,38 @@ } }, "tags": [ - "Metrics" + "Nic" ], "security": [ { "Authorization": [] } ], - "parameters": [], + "parameters": [ + { + "in": "header", + "name": "content-language", + "required": false, + "schema": { + "$ref": "#/components/schemas/ContentLanguage" + } + } + ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetWitnessMetricInput" + "$ref": "#/components/schemas/NicUpdationParams" } } } } } }, - "/get-top-n-metrics-in-clusters": { + "/move-node-topo": { "post": { - "operationId": "GetTopNVmVolumeMetrics", + "operationId": "UpdateNodeTopo", "responses": { "200": { "description": "", @@ -134978,7 +134753,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Metric_" + "$ref": "#/components/schemas/WithTask_NodeTopo_" }, "type": "array" } @@ -135045,29 +134820,38 @@ } }, "tags": [ - "Metrics" + "NodeTopo" ], "security": [ { "Authorization": [] } ], - "parameters": [], + "parameters": [ + { + "in": "header", + "name": "content-language", + "required": false, + "schema": { + "$ref": "#/components/schemas/ContentLanguage" + } + } + ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetTopNMetricInput" + "$ref": "#/components/schemas/NodeTopoUpdationParams" } } } } } }, - "/create-namespace-group": { + "/create-nvmf-namespace-snapshot": { "post": { - "operationId": "CreateNamespaceGroup", + "operationId": "CreateNvmfNamespaceSnapshot", "responses": { "200": { "description": "", @@ -135075,7 +134859,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_NamespaceGroup_" + "$ref": "#/components/schemas/WithTask_NvmfNamespaceSnapshot_" }, "type": "array" } @@ -135142,7 +134926,7 @@ } }, "tags": [ - "NamespaceGroup" + "NvmfNamespaceSnapshot" ], "security": [ { @@ -135165,7 +134949,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/NamespaceGroupCreationParams" + "$ref": "#/components/schemas/NvmfNamespaceSnapshotCreationParams" }, "type": "array" } @@ -135174,9 +134958,9 @@ } } }, - "/update-namespace-group": { + "/delete-nvmf-namespace-snapshot": { "post": { - "operationId": "UpdateNamespaceGroup", + "operationId": "DeleteNvmfNamespaceSnapshot", "responses": { "200": { "description": "", @@ -135184,7 +134968,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_NamespaceGroup_" + "$ref": "#/components/schemas/WithTask_DeleteNvmfNamespaceSnapshot_" }, "type": "array" } @@ -135251,7 +135035,7 @@ } }, "tags": [ - "NamespaceGroup" + "NvmfNamespaceSnapshot" ], "security": [ { @@ -135273,16 +135057,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NamespaceGroupUpdationParams" + "$ref": "#/components/schemas/NvmfNamespaceSnapshotDeletionParams" } } } } } }, - "/delete-namespace-group": { + "/create-nvmf-namespace": { "post": { - "operationId": "DeleteNamespaceGroup", + "operationId": "CreateNvmfNamespace", "responses": { "200": { "description": "", @@ -135290,7 +135074,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteNamespaceGroup_" + "$ref": "#/components/schemas/WithTask_NvmfNamespace_" }, "type": "array" } @@ -135357,7 +135141,7 @@ } }, "tags": [ - "NamespaceGroup" + "NvmfNamespace" ], "security": [ { @@ -135379,16 +135163,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NamespaceGroupDeletionParams" + "items": { + "$ref": "#/components/schemas/NvmfNamespaceCreationParams" + }, + "type": "array" } } } } } }, - "/create-nfs-export": { + "/update-nvmf-namespace": { "post": { - "operationId": "CreateNfsExport", + "operationId": "UpdateNvmfNamespace", "responses": { "200": { "description": "", @@ -135396,7 +135183,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_NfsExport_" + "$ref": "#/components/schemas/WithTask_NvmfNamespace_" }, "type": "array" } @@ -135463,7 +135250,7 @@ } }, "tags": [ - "NfsExport" + "NvmfNamespace" ], "security": [ { @@ -135485,19 +135272,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/NfsExportCreationParams" - }, - "type": "array" + "$ref": "#/components/schemas/NvmfNamespaceUpdationParams" } } } } } }, - "/update-nfs-export": { + "/delete-nvmf-namespace": { "post": { - "operationId": "UpdateNfsExport", + "operationId": "DeleteNvmfNamespace", "responses": { "200": { "description": "", @@ -135505,7 +135289,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_NfsExport_" + "$ref": "#/components/schemas/WithTask_DeleteNvmfNamespace_" }, "type": "array" } @@ -135572,7 +135356,7 @@ } }, "tags": [ - "NfsExport" + "NvmfNamespace" ], "security": [ { @@ -135594,16 +135378,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NfsExportUpdationParams" + "$ref": "#/components/schemas/NvmfNamespaceDeletionParams" } } } } } }, - "/delete-nfs-export": { + "/clone-nvmf-namespace-from-snapshot": { "post": { - "operationId": "DeleteNfsExport", + "operationId": "CloneNvmfNamespaceFromSnapshot", "responses": { "200": { "description": "", @@ -135611,7 +135395,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteNfsExport_" + "$ref": "#/components/schemas/WithTask_NvmfNamespace_" }, "type": "array" } @@ -135678,7 +135462,7 @@ } }, "tags": [ - "NfsExport" + "NvmfNamespace" ], "security": [ { @@ -135700,16 +135484,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NfsExportDeletionParams" + "items": { + "$ref": "#/components/schemas/NvmfNamespaceCloneParams" + }, + "type": "array" } } } } } }, - "/update-nic": { + "/rollback-nvmf-namespace-from-snapshot": { "post": { - "operationId": "UpdateNic", + "operationId": "RollbackNvmfNamespaceFromSnapshot", "responses": { "200": { "description": "", @@ -135717,7 +135504,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Nic_" + "$ref": "#/components/schemas/WithTask_NvmfNamespace_" }, "type": "array" } @@ -135784,7 +135571,7 @@ } }, "tags": [ - "Nic" + "NvmfNamespace" ], "security": [ { @@ -135806,16 +135593,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NicUpdationParams" + "items": { + "$ref": "#/components/schemas/NvmfNamespaceRollbackParams" + }, + "type": "array" } } } } } }, - "/move-node-topo": { + "/create-nvmf-subsystem": { "post": { - "operationId": "UpdateNodeTopo", + "operationId": "CreateNvmfSubsystem", "responses": { "200": { "description": "", @@ -135823,7 +135613,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_NodeTopo_" + "$ref": "#/components/schemas/WithTask_NvmfSubsystem_" }, "type": "array" } @@ -135890,7 +135680,7 @@ } }, "tags": [ - "NodeTopo" + "NvmfSubsystem" ], "security": [ { @@ -135912,16 +135702,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NodeTopoUpdationParams" + "items": { + "$ref": "#/components/schemas/NvmfSubsystemCreationParams" + }, + "type": "array" } } } } } }, - "/create-nvmf-namespace-snapshot": { + "/update-nvmf-subsystem": { "post": { - "operationId": "CreateNvmfNamespaceSnapshot", + "operationId": "UpdateNvmfSubsystem", "responses": { "200": { "description": "", @@ -135929,7 +135722,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_NvmfNamespaceSnapshot_" + "$ref": "#/components/schemas/WithTask_NvmfSubsystem_" }, "type": "array" } @@ -135996,7 +135789,7 @@ } }, "tags": [ - "NvmfNamespaceSnapshot" + "NvmfSubsystem" ], "security": [ { @@ -136018,19 +135811,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/NvmfNamespaceSnapshotCreationParams" - }, - "type": "array" + "$ref": "#/components/schemas/NvmfSubsystemUpdationParams" } } } } } }, - "/delete-nvmf-namespace-snapshot": { + "/delete-nvmf-subsystem": { "post": { - "operationId": "DeleteNvmfNamespaceSnapshot", + "operationId": "DeleteNvmfSubsystem", "responses": { "200": { "description": "", @@ -136038,7 +135828,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteNvmfNamespaceSnapshot_" + "$ref": "#/components/schemas/WithTask_DeleteNvmfSubsystem_" }, "type": "array" } @@ -136105,7 +135895,7 @@ } }, "tags": [ - "NvmfNamespaceSnapshot" + "NvmfSubsystem" ], "security": [ { @@ -136127,16 +135917,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NvmfNamespaceSnapshotDeletionParams" + "$ref": "#/components/schemas/NvmfSubsystemDeletionParams" } } } } } }, - "/create-nvmf-namespace": { + "/create-organization": { "post": { - "operationId": "CreateNvmfNamespace", + "operationId": "CreateOrganization", "responses": { "200": { "description": "", @@ -136144,7 +135934,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_NvmfNamespace_" + "$ref": "#/components/schemas/WithTask_Organization_" }, "type": "array" } @@ -136211,7 +136001,7 @@ } }, "tags": [ - "NvmfNamespace" + "Organization" ], "security": [ { @@ -136234,7 +136024,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/NvmfNamespaceCreationParams" + "$ref": "#/components/schemas/OrganizationCreationParams" }, "type": "array" } @@ -136243,9 +136033,9 @@ } } }, - "/update-nvmf-namespace": { + "/update-organization": { "post": { - "operationId": "UpdateNvmfNamespace", + "operationId": "UpdateOrganization", "responses": { "200": { "description": "", @@ -136253,7 +136043,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_NvmfNamespace_" + "$ref": "#/components/schemas/WithTask_Organization_" }, "type": "array" } @@ -136320,7 +136110,7 @@ } }, "tags": [ - "NvmfNamespace" + "Organization" ], "security": [ { @@ -136342,16 +136132,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NvmfNamespaceUpdationParams" + "$ref": "#/components/schemas/OrganizationUpdationParams" } } } } } }, - "/delete-nvmf-namespace": { + "/delete-organization": { "post": { - "operationId": "DeleteNvmfNamespace", + "operationId": "DeleteOrganization", "responses": { "200": { "description": "", @@ -136359,7 +136149,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteNvmfNamespace_" + "$ref": "#/components/schemas/WithTask_DeleteOrganization_" }, "type": "array" } @@ -136426,7 +136216,7 @@ } }, "tags": [ - "NvmfNamespace" + "Organization" ], "security": [ { @@ -136448,16 +136238,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NvmfNamespaceDeletionParams" + "$ref": "#/components/schemas/OrganizationDeletionParams" } } } } } }, - "/clone-nvmf-namespace-from-snapshot": { + "/create-rack-topo": { "post": { - "operationId": "CloneNvmfNamespaceFromSnapshot", + "operationId": "CreateRackTopo", "responses": { "200": { "description": "", @@ -136465,7 +136255,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_NvmfNamespace_" + "$ref": "#/components/schemas/WithTask_RackTopo_" }, "type": "array" } @@ -136532,7 +136322,7 @@ } }, "tags": [ - "NvmfNamespace" + "RackTopo" ], "security": [ { @@ -136555,7 +136345,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/NvmfNamespaceCloneParams" + "$ref": "#/components/schemas/RackTopoCreationParams" }, "type": "array" } @@ -136564,9 +136354,9 @@ } } }, - "/rollback-nvmf-namespace-from-snapshot": { + "/update-rack-topo": { "post": { - "operationId": "RollbackNvmfNamespaceFromSnapshot", + "operationId": "UpdateRackTopo", "responses": { "200": { "description": "", @@ -136574,7 +136364,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_NvmfNamespace_" + "$ref": "#/components/schemas/WithTask_RackTopo_" }, "type": "array" } @@ -136641,7 +136431,7 @@ } }, "tags": [ - "NvmfNamespace" + "RackTopo" ], "security": [ { @@ -136663,19 +136453,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/NvmfNamespaceRollbackParams" - }, - "type": "array" + "$ref": "#/components/schemas/RackTopoUpdationParams" } } } } } }, - "/create-nvmf-subsystem": { + "/delete-rack-topo": { "post": { - "operationId": "CreateNvmfSubsystem", + "operationId": "DeleteRackTopo", "responses": { "200": { "description": "", @@ -136683,7 +136470,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_NvmfSubsystem_" + "$ref": "#/components/schemas/WithTask_DeleteRackTopo_" }, "type": "array" } @@ -136750,7 +136537,7 @@ } }, "tags": [ - "NvmfSubsystem" + "RackTopo" ], "security": [ { @@ -136772,29 +136559,23 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/NvmfSubsystemCreationParams" - }, - "type": "array" + "$ref": "#/components/schemas/RackTopoDeletionParams" } } } } } }, - "/update-nvmf-subsystem": { + "/update-global-recycle-bin-setting": { "post": { - "operationId": "UpdateNvmfSubsystem", + "operationId": "UpdateGlobalRecycleBinSetting", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/WithTask_NvmfSubsystem_" - }, - "type": "array" + "$ref": "#/components/schemas/WithTask_GlobalSettings_" } } }, @@ -136859,7 +136640,7 @@ } }, "tags": [ - "NvmfSubsystem" + "GlobalSettings" ], "security": [ { @@ -136881,16 +136662,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NvmfSubsystemUpdationParams" + "$ref": "#/components/schemas/GlobalRecycleBinUpdationParams" } } } } } }, - "/delete-nvmf-subsystem": { + "/create-cluster-recycle-bin-setting": { "post": { - "operationId": "DeleteNvmfSubsystem", + "operationId": "CreateClusterRecycleBinSetting", "responses": { "200": { "description": "", @@ -136898,7 +136679,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteNvmfSubsystem_" + "$ref": "#/components/schemas/WithTask_ClusterSettings_" }, "type": "array" } @@ -136965,7 +136746,7 @@ } }, "tags": [ - "NvmfSubsystem" + "GlobalSettings" ], "security": [ { @@ -136987,23 +136768,26 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NvmfSubsystemDeletionParams" + "$ref": "#/components/schemas/ClusterRecycleBinCreationParams" } } } } } }, - "/disassociate-system-service-from-obs-service": { + "/update-cluster-recycle-bin-setting": { "post": { - "operationId": "DisassociateSystemServiceFromObsService", + "operationId": "UpdateClusterRecycleBinSetting", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WithTask_DisassociateSystemServiceFromObsServiceResult_" + "items": { + "$ref": "#/components/schemas/WithTask_ClusterSettings_" + }, + "type": "array" } } }, @@ -137068,7 +136852,7 @@ } }, "tags": [ - "Observability" + "GlobalSettings" ], "security": [ { @@ -137090,16 +136874,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DisassociateSystemServiceFromObsServiceParams" + "$ref": "#/components/schemas/ClusterRecycleBinUpdationParams" } } } } } }, - "/create-organization": { + "/delete-cluster-recycle-bin-setting": { "post": { - "operationId": "CreateOrganization", + "operationId": "DeleteClusterRecycleBinSetting", "responses": { "200": { "description": "", @@ -137107,7 +136891,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Organization_" + "$ref": "#/components/schemas/WithTask_DeleteClusterRecycleBin_" }, "type": "array" } @@ -137174,7 +136958,7 @@ } }, "tags": [ - "Organization" + "GlobalSettings" ], "security": [ { @@ -137196,19 +136980,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/OrganizationCreationParams" - }, - "type": "array" + "$ref": "#/components/schemas/ClusterRecycleBinDeletionParams" } } } } } }, - "/update-organization": { + "/create-report-template": { "post": { - "operationId": "UpdateOrganization", + "operationId": "CreateReportTemplate", "responses": { "200": { "description": "", @@ -137216,7 +136997,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Organization_" + "$ref": "#/components/schemas/WithTask_ReportTemplate_" }, "type": "array" } @@ -137283,7 +137064,7 @@ } }, "tags": [ - "Organization" + "ReportTemplate" ], "security": [ { @@ -137305,16 +137086,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OrganizationUpdationParams" + "items": { + "$ref": "#/components/schemas/ReportTemplateCreationParams" + }, + "type": "array" } } } } } }, - "/delete-organization": { + "/update-report-template": { "post": { - "operationId": "DeleteOrganization", + "operationId": "UpdateReportTemplate", "responses": { "200": { "description": "", @@ -137322,7 +137106,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteOrganization_" + "$ref": "#/components/schemas/WithTask_ReportTemplate_" }, "type": "array" } @@ -137389,7 +137173,7 @@ } }, "tags": [ - "Organization" + "ReportTemplate" ], "security": [ { @@ -137411,16 +137195,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OrganizationDeletionParams" + "$ref": "#/components/schemas/ReportTemplateUpdationParams" } } } } } }, - "/create-rack-topo": { + "/generate-from-report-template": { "post": { - "operationId": "CreateRackTopo", + "operationId": "GenerateFromReportTemplate", "responses": { "200": { "description": "", @@ -137428,7 +137212,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_RackTopo_" + "$ref": "#/components/schemas/WithTask_ReportTask_" }, "type": "array" } @@ -137495,7 +137279,7 @@ } }, "tags": [ - "RackTopo" + "ReportTemplate" ], "security": [ { @@ -137517,19 +137301,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/RackTopoCreationParams" - }, - "type": "array" + "$ref": "#/components/schemas/ReporteTemplateGenerationParams" } } } } } }, - "/update-rack-topo": { + "/delete-report-template": { "post": { - "operationId": "UpdateRackTopo", + "operationId": "DeleteReportTemplate", "responses": { "200": { "description": "", @@ -137537,7 +137318,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_RackTopo_" + "$ref": "#/components/schemas/WithTask_DeleteReportTemplate_" }, "type": "array" } @@ -137604,7 +137385,7 @@ } }, "tags": [ - "RackTopo" + "ReportTemplate" ], "security": [ { @@ -137626,16 +137407,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RackTopoUpdationParams" + "$ref": "#/components/schemas/ReportTemplateDeletionParams" } } } } } }, - "/delete-rack-topo": { + "/create-role": { "post": { - "operationId": "DeleteRackTopo", + "operationId": "CreateRole", "responses": { "200": { "description": "", @@ -137643,7 +137424,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteRackTopo_" + "$ref": "#/components/schemas/WithTask_UserRoleNext_" }, "type": "array" } @@ -137710,7 +137491,7 @@ } }, "tags": [ - "RackTopo" + "UserRoleNext" ], "security": [ { @@ -137732,23 +137513,29 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RackTopoDeletionParams" + "items": { + "$ref": "#/components/schemas/RoleCreationParams" + }, + "type": "array" } } } } } }, - "/update-global-recycle-bin-setting": { + "/update-role": { "post": { - "operationId": "UpdateGlobalRecycleBinSetting", + "operationId": "UpdateRole", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WithTask_GlobalSettings_" + "items": { + "$ref": "#/components/schemas/WithTask_UserRoleNext_" + }, + "type": "array" } } }, @@ -137813,7 +137600,7 @@ } }, "tags": [ - "GlobalSettings" + "UserRoleNext" ], "security": [ { @@ -137835,16 +137622,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GlobalRecycleBinUpdationParams" + "$ref": "#/components/schemas/RoleUpdationParams" } } } } } }, - "/create-cluster-recycle-bin-setting": { + "/delete-role": { "post": { - "operationId": "CreateClusterRecycleBinSetting", + "operationId": "DeleteRole", "responses": { "200": { "description": "", @@ -137852,7 +137639,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_ClusterSettings_" + "$ref": "#/components/schemas/WithTask_DeleteRole_" }, "type": "array" } @@ -137919,7 +137706,7 @@ } }, "tags": [ - "GlobalSettings" + "UserRoleNext" ], "security": [ { @@ -137941,26 +137728,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ClusterRecycleBinCreationParams" + "$ref": "#/components/schemas/RoleDeletionParams" } } } } } }, - "/update-cluster-recycle-bin-setting": { + "/create-security-group": { "post": { - "operationId": "UpdateClusterRecycleBinSetting", + "operationId": "CreateSecurityGroup", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/WithTask_ClusterSettings_" - }, - "type": "array" + "$ref": "#/components/schemas/WithTask_SecurityGroup_" } } }, @@ -138025,7 +137809,7 @@ } }, "tags": [ - "GlobalSettings" + "SecurityGroup" ], "security": [ { @@ -138047,16 +137831,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ClusterRecycleBinUpdationParams" + "$ref": "#/components/schemas/SecurityGroupCreateParams" } } } } } }, - "/delete-cluster-recycle-bin-setting": { + "/delete-security-group": { "post": { - "operationId": "DeleteClusterRecycleBinSetting", + "operationId": "DeleteSecurityGroup", "responses": { "200": { "description": "", @@ -138064,7 +137848,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteClusterRecycleBin_" + "$ref": "#/components/schemas/WithTask_DeleteSecurityGroup_" }, "type": "array" } @@ -138131,7 +137915,7 @@ } }, "tags": [ - "GlobalSettings" + "SecurityGroup" ], "security": [ { @@ -138153,16 +137937,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ClusterRecycleBinDeletionParams" + "$ref": "#/components/schemas/SecurityGroupDeleteParams" } } } } } }, - "/create-report-template": { + "/update-security-group": { "post": { - "operationId": "CreateReportTemplate", + "operationId": "UpdateSecurityGroup", "responses": { "200": { "description": "", @@ -138170,7 +137954,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_ReportTemplate_" + "$ref": "#/components/schemas/WithTask_SecurityGroup_" }, "type": "array" } @@ -138237,7 +138021,7 @@ } }, "tags": [ - "ReportTemplate" + "SecurityGroup" ], "security": [ { @@ -138259,29 +138043,23 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/ReportTemplateCreationParams" - }, - "type": "array" + "$ref": "#/components/schemas/SecurityGroupUpdateBody" } } } } } }, - "/update-report-template": { + "/create-security-policy": { "post": { - "operationId": "UpdateReportTemplate", + "operationId": "CreateSecurityPolicy", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/WithTask_ReportTemplate_" - }, - "type": "array" + "$ref": "#/components/schemas/WithTask_SecurityPolicy_" } } }, @@ -138346,7 +138124,7 @@ } }, "tags": [ - "ReportTemplate" + "SecurityPolicy" ], "security": [ { @@ -138368,16 +138146,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ReportTemplateUpdationParams" + "$ref": "#/components/schemas/SecurityPolicyCreateParams" } } } } } }, - "/generate-from-report-template": { + "/delete-security-policy": { "post": { - "operationId": "GenerateFromReportTemplate", + "operationId": "DeleteSecurityPolicy", "responses": { "200": { "description": "", @@ -138385,7 +138163,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_ReportTask_" + "$ref": "#/components/schemas/WithTask_DeleteSecurityPolicy_" }, "type": "array" } @@ -138452,7 +138230,7 @@ } }, "tags": [ - "ReportTemplate" + "SecurityPolicy" ], "security": [ { @@ -138474,16 +138252,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ReporteTemplateGenerationParams" + "$ref": "#/components/schemas/SecurityPolicyDeleteParams" } } } } } }, - "/delete-report-template": { + "/update-security-policy": { "post": { - "operationId": "DeleteReportTemplate", + "operationId": "UpdateSecurityPolicy", "responses": { "200": { "description": "", @@ -138491,7 +138269,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteReportTemplate_" + "$ref": "#/components/schemas/WithTask_SecurityPolicy_" }, "type": "array" } @@ -138558,7 +138336,7 @@ } }, "tags": [ - "ReportTemplate" + "SecurityPolicy" ], "security": [ { @@ -138580,26 +138358,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ReportTemplateDeletionParams" + "$ref": "#/components/schemas/SecurityPolicyUpdateBody" } } } } } }, - "/create-role": { + "/update-password-security": { "post": { - "operationId": "CreateRole", + "operationId": "UpdatePasswordSecurity", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/WithTask_UserRoleNext_" - }, - "type": "array" + "$ref": "#/components/schemas/WithTask_GlobalSettings_" } } }, @@ -138664,7 +138439,7 @@ } }, "tags": [ - "UserRoleNext" + "GlobalSettings" ], "security": [ { @@ -138686,29 +138461,23 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/RoleCreationParams" - }, - "type": "array" + "$ref": "#/components/schemas/UpdatePassrodSecurityParams" } } } } } }, - "/update-role": { + "/update-access-restriction": { "post": { - "operationId": "UpdateRole", + "operationId": "UpdateAccessRestriction", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/WithTask_UserRoleNext_" - }, - "type": "array" + "$ref": "#/components/schemas/WithTask_GlobalSettings_" } } }, @@ -138773,7 +138542,7 @@ } }, "tags": [ - "UserRoleNext" + "GlobalSettings" ], "security": [ { @@ -138795,16 +138564,119 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RoleUpdationParams" + "$ref": "#/components/schemas/UpdateAccessRestrictionParams" } } } } } }, - "/delete-role": { + "/update-session-timeout": { "post": { - "operationId": "DeleteRole", + "operationId": "UpdateSessionTimeout", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WithTask_GlobalSettings_" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBody" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBody" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBody" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + } + }, + "tags": [ + "GlobalSettings" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "header", + "name": "content-language", + "required": false, + "schema": { + "$ref": "#/components/schemas/ContentLanguage" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSessionTimeoutParams" + } + } + } + } + } + }, + "/rollback-snapshot-group": { + "post": { + "operationId": "RollbackSnapshotGroup", "responses": { "200": { "description": "", @@ -138812,7 +138684,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteRole_" + "$ref": "#/components/schemas/WithTask_SnapshotGroup_" }, "type": "array" } @@ -138879,7 +138751,7 @@ } }, "tags": [ - "UserRoleNext" + "SnapshotGroup" ], "security": [ { @@ -138901,23 +138773,26 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RoleDeletionParams" + "$ref": "#/components/schemas/SnapshotGroupRollbackParams" } } } } } }, - "/create-security-group": { + "/clone-snapshot-group": { "post": { - "operationId": "CreateSecurityGroup", + "operationId": "CloneSnapshotGroup", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WithTask_SecurityGroup_" + "items": { + "$ref": "#/components/schemas/WithTask_SnapshotGroup_" + }, + "type": "array" } } }, @@ -138982,7 +138857,7 @@ } }, "tags": [ - "SecurityGroup" + "SnapshotGroup" ], "security": [ { @@ -139004,16 +138879,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SecurityGroupCreateParams" + "items": { + "$ref": "#/components/schemas/SnapshotGroupCloneParams" + }, + "type": "array" } } } } } }, - "/delete-security-group": { + "/keep-snapshot-group": { "post": { - "operationId": "DeleteSecurityGroup", + "operationId": "KeepSnapshotGroup", "responses": { "200": { "description": "", @@ -139021,7 +138899,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteSecurityGroup_" + "$ref": "#/components/schemas/WithTask_SnapshotGroup_" }, "type": "array" } @@ -139088,7 +138966,7 @@ } }, "tags": [ - "SecurityGroup" + "SnapshotGroup" ], "security": [ { @@ -139110,16 +138988,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SecurityGroupDeleteParams" + "$ref": "#/components/schemas/SnapshotGroupKeepParams" } } } } } }, - "/update-security-group": { + "/delete-snapshot-group": { "post": { - "operationId": "UpdateSecurityGroup", + "operationId": "DeleteSnapshotGroup", "responses": { "200": { "description": "", @@ -139127,7 +139005,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_SecurityGroup_" + "$ref": "#/components/schemas/WithTask_DeleteSnapshotGroup_" }, "type": "array" } @@ -139194,7 +139072,7 @@ } }, "tags": [ - "SecurityGroup" + "SnapshotGroup" ], "security": [ { @@ -139216,23 +139094,26 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SecurityGroupUpdateBody" + "$ref": "#/components/schemas/SnapshotGroupDeletionParams" } } } } } }, - "/create-security-policy": { + "/create-snapshot-plan": { "post": { - "operationId": "CreateSecurityPolicy", + "operationId": "CreateSnapshotPlan", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WithTask_SecurityPolicy_" + "items": { + "$ref": "#/components/schemas/WithTask_SnapshotPlan_" + }, + "type": "array" } } }, @@ -139297,7 +139178,7 @@ } }, "tags": [ - "SecurityPolicy" + "SnapshotPlan" ], "security": [ { @@ -139319,16 +139200,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SecurityPolicyCreateParams" + "items": { + "$ref": "#/components/schemas/SnapshotPlanCreationParams" + }, + "type": "array" } } } } } }, - "/delete-security-policy": { + "/update-snapshot-plan": { "post": { - "operationId": "DeleteSecurityPolicy", + "operationId": "UpdateSnapshotPlan", "responses": { "200": { "description": "", @@ -139336,7 +139220,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteSecurityPolicy_" + "$ref": "#/components/schemas/WithTask_SnapshotPlan_" }, "type": "array" } @@ -139403,7 +139287,7 @@ } }, "tags": [ - "SecurityPolicy" + "SnapshotPlan" ], "security": [ { @@ -139425,16 +139309,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SecurityPolicyDeleteParams" + "$ref": "#/components/schemas/SnapshotPlanUpdationParams" } } } } } }, - "/update-security-policy": { + "/delete-snapshot-plan": { "post": { - "operationId": "UpdateSecurityPolicy", + "operationId": "DeleteSnapshotPlan", "responses": { "200": { "description": "", @@ -139442,7 +139326,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_SecurityPolicy_" + "$ref": "#/components/schemas/WithTask_DeleteSnapshotPlan_" }, "type": "array" } @@ -139509,7 +139393,7 @@ } }, "tags": [ - "SecurityPolicy" + "SnapshotPlan" ], "security": [ { @@ -139531,23 +139415,26 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SecurityPolicyUpdateBody" + "$ref": "#/components/schemas/SnapshotPlanDeletionParams" } } } } } }, - "/update-password-security": { + "/execute-snapshot-plan": { "post": { - "operationId": "UpdatePasswordSecurity", + "operationId": "ExecuteSnapshotPlan", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WithTask_GlobalSettings_" + "items": { + "$ref": "#/components/schemas/WithTask_SnapshotPlan_" + }, + "type": "array" } } }, @@ -139612,7 +139499,7 @@ } }, "tags": [ - "GlobalSettings" + "SnapshotPlan" ], "security": [ { @@ -139634,23 +139521,26 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdatePassrodSecurityParams" + "$ref": "#/components/schemas/SnapshotPlanExecutionParams" } } } } } }, - "/update-access-restriction": { + "/suspend-snapshot-plan": { "post": { - "operationId": "UpdateAccessRestriction", + "operationId": "SuspendSnapshotPlan", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WithTask_GlobalSettings_" + "items": { + "$ref": "#/components/schemas/WithTask_SnapshotPlan_" + }, + "type": "array" } } }, @@ -139715,7 +139605,7 @@ } }, "tags": [ - "GlobalSettings" + "SnapshotPlan" ], "security": [ { @@ -139737,23 +139627,26 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateAccessRestrictionParams" + "$ref": "#/components/schemas/SnapshotPlanSuspendedParams" } } } } } }, - "/update-session-timeout": { + "/resume-snapshot-plan": { "post": { - "operationId": "UpdateSessionTimeout", + "operationId": "ResumeSnapshotPlan", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WithTask_GlobalSettings_" + "items": { + "$ref": "#/components/schemas/WithTask_SnapshotPlan_" + }, + "type": "array" } } }, @@ -139818,7 +139711,7 @@ } }, "tags": [ - "GlobalSettings" + "SnapshotPlan" ], "security": [ { @@ -139840,16 +139733,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateSessionTimeoutParams" + "$ref": "#/components/schemas/SnapshotPlanResumeParams" } } } } } }, - "/rollback-snapshot-group": { + "/create-snmp-transport": { "post": { - "operationId": "RollbackSnapshotGroup", + "operationId": "CreateSnmpTransport", "responses": { "200": { "description": "", @@ -139857,7 +139750,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_SnapshotGroup_" + "$ref": "#/components/schemas/WithTask_SnmpTransport_" }, "type": "array" } @@ -139924,7 +139817,7 @@ } }, "tags": [ - "SnapshotGroup" + "SnmpTransport" ], "security": [ { @@ -139946,16 +139839,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SnapshotGroupRollbackParams" + "items": { + "$ref": "#/components/schemas/SnmpTransportCreationParams" + }, + "type": "array" } } } } } }, - "/clone-snapshot-group": { + "/update-snmp-transport": { "post": { - "operationId": "CloneSnapshotGroup", + "operationId": "UpdateSnmpTransport", "responses": { "200": { "description": "", @@ -139963,7 +139859,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_SnapshotGroup_" + "$ref": "#/components/schemas/WithTask_SnmpTransport_" }, "type": "array" } @@ -140030,7 +139926,7 @@ } }, "tags": [ - "SnapshotGroup" + "SnmpTransport" ], "security": [ { @@ -140052,19 +139948,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/SnapshotGroupCloneParams" - }, - "type": "array" + "$ref": "#/components/schemas/SnmpTransportUpdationParams" } } } } } }, - "/keep-snapshot-group": { + "/delete-snmp-transport": { "post": { - "operationId": "KeepSnapshotGroup", + "operationId": "DeleteSnmpTransport", "responses": { "200": { "description": "", @@ -140072,7 +139965,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_SnapshotGroup_" + "$ref": "#/components/schemas/WithTask_DeleteSnmpTransport_" }, "type": "array" } @@ -140139,7 +140032,7 @@ } }, "tags": [ - "SnapshotGroup" + "SnmpTransport" ], "security": [ { @@ -140161,16 +140054,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SnapshotGroupKeepParams" + "$ref": "#/components/schemas/SnmpTransportDeletionParams" } } } } } }, - "/delete-snapshot-group": { + "/create-snmp-trap-receiver": { "post": { - "operationId": "DeleteSnapshotGroup", + "operationId": "CreateSnmpTrapReceiver", "responses": { "200": { "description": "", @@ -140178,7 +140071,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteSnapshotGroup_" + "$ref": "#/components/schemas/WithTask_SnmpTrapReceiver_" }, "type": "array" } @@ -140245,7 +140138,7 @@ } }, "tags": [ - "SnapshotGroup" + "SnmpTrapReceiver" ], "security": [ { @@ -140267,16 +140160,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SnapshotGroupDeletionParams" + "items": { + "$ref": "#/components/schemas/SnmpTrapReceiverCreationParams" + }, + "type": "array" } } } } } }, - "/create-snapshot-plan": { + "/update-snmp-trap-receiver": { "post": { - "operationId": "CreateSnapshotPlan", + "operationId": "UpdateSnmpTrapReceiver", "responses": { "200": { "description": "", @@ -140284,7 +140180,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_SnapshotPlan_" + "$ref": "#/components/schemas/WithTask_SnmpTrapReceiver_" }, "type": "array" } @@ -140351,7 +140247,7 @@ } }, "tags": [ - "SnapshotPlan" + "SnmpTrapReceiver" ], "security": [ { @@ -140373,19 +140269,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/SnapshotPlanCreationParams" - }, - "type": "array" + "$ref": "#/components/schemas/SnmpTrapReceiverUpdationParams" } } } } } }, - "/update-snapshot-plan": { + "/delete-snmp-trap-receiver": { "post": { - "operationId": "UpdateSnapshotPlan", + "operationId": "DeleteSnmpTrapReceiver", "responses": { "200": { "description": "", @@ -140393,7 +140286,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_SnapshotPlan_" + "$ref": "#/components/schemas/WithTask_DeleteSnmpTrapReceiver_" }, "type": "array" } @@ -140460,7 +140353,7 @@ } }, "tags": [ - "SnapshotPlan" + "SnmpTrapReceiver" ], "security": [ { @@ -140482,16 +140375,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SnapshotPlanUpdationParams" + "$ref": "#/components/schemas/SnmpTrapReceiverDeletionParams" } } } } } }, - "/delete-snapshot-plan": { + "/upload-svt-image": { "post": { - "operationId": "DeleteSnapshotPlan", + "operationId": "UploadSvtImage", "responses": { "200": { "description": "", @@ -140499,7 +140392,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteSnapshotPlan_" + "$ref": "#/components/schemas/UploadTask" }, "type": "array" } @@ -140566,7 +140459,7 @@ } }, "tags": [ - "SnapshotPlan" + "SvtImage" ], "security": [ { @@ -140586,28 +140479,53 @@ "requestBody": { "required": true, "content": { - "application/json": { + "multipart/form-data": { "schema": { - "$ref": "#/components/schemas/SnapshotPlanDeletionParams" + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary" + }, + "cluster_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "size": { + "type": "string" + }, + "size_unit": { + "type": "string" + }, + "version": { + "type": "string" + }, + "upload_task_id": { + "type": "string" + } + }, + "required": [ + "file" + ] } } } } } }, - "/execute-snapshot-plan": { + "/export-csv": { "post": { - "operationId": "ExecuteSnapshotPlan", + "operationId": "ExportCSV", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/WithTask_SnapshotPlan_" - }, - "type": "array" + "type": "string", + "format": "byte" } } }, @@ -140672,7 +140590,7 @@ } }, "tags": [ - "SnapshotPlan" + "TableReporter" ], "security": [ { @@ -140694,16 +140612,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SnapshotPlanExecutionParams" + "$ref": "#/components/schemas/TableReporterParams" } } } } } }, - "/suspend-snapshot-plan": { + "/cancel-upload-task": { "post": { - "operationId": "SuspendSnapshotPlan", + "operationId": "CancelUploadTask", "responses": { "200": { "description": "", @@ -140711,7 +140629,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_SnapshotPlan_" + "type": "string" }, "type": "array" } @@ -140725,6 +140643,9 @@ } } }, + "304": { + "description": "Not modified" + }, "400": { "description": "Bad request", "content": { @@ -140778,7 +140699,7 @@ } }, "tags": [ - "SnapshotPlan" + "UploadTask" ], "security": [ { @@ -140800,16 +140721,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SnapshotPlanSuspendedParams" + "$ref": "#/components/schemas/CancelUploadTaskParams" } } } } } }, - "/resume-snapshot-plan": { + "/mount-usb-device": { "post": { - "operationId": "ResumeSnapshotPlan", + "operationId": "MountUsbDevice", "responses": { "200": { "description": "", @@ -140817,7 +140738,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_SnapshotPlan_" + "$ref": "#/components/schemas/WithTask_UsbDevice_" }, "type": "array" } @@ -140884,7 +140805,7 @@ } }, "tags": [ - "SnapshotPlan" + "UsbDevice" ], "security": [ { @@ -140906,16 +140827,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SnapshotPlanResumeParams" + "$ref": "#/components/schemas/UsbDeviceMountParams" } } } } } }, - "/create-snmp-transport": { + "/unmount-usb-device": { "post": { - "operationId": "CreateSnmpTransport", + "operationId": "UnmountUsbDevice", "responses": { "200": { "description": "", @@ -140923,7 +140844,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_SnmpTransport_" + "$ref": "#/components/schemas/WithTask_UsbDevice_" }, "type": "array" } @@ -140990,7 +140911,7 @@ } }, "tags": [ - "SnmpTransport" + "UsbDevice" ], "security": [ { @@ -141012,19 +140933,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/SnmpTransportCreationParams" - }, - "type": "array" + "$ref": "#/components/schemas/UsbDeviceUnmountParams" } } } } } }, - "/update-snmp-transport": { + "/get-usb-devices": { "post": { - "operationId": "UpdateSnmpTransport", + "operationId": "GetUsbDevices", "responses": { "200": { "description": "", @@ -141032,7 +140950,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_SnmpTransport_" + "$ref": "#/components/schemas/UsbDevice" }, "type": "array" } @@ -141099,7 +141017,8 @@ } }, "tags": [ - "SnmpTransport" + "UsbDevice", + "UsbDevice" ], "security": [ { @@ -141121,16 +141040,115 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SnmpTransportUpdationParams" + "$ref": "#/components/schemas/GetUsbDevicesRequestBody" } } } } } }, - "/delete-snmp-transport": { + "/login": { "post": { - "operationId": "DeleteSnmpTransport", + "operationId": "Login", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WithTask_LoginResponse_" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBody" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBody" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBody" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + } + }, + "tags": [ + "User" + ], + "security": [], + "parameters": [ + { + "in": "header", + "name": "content-language", + "required": false, + "schema": { + "$ref": "#/components/schemas/ContentLanguage" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginInput" + } + } + } + } + } + }, + "/create-user": { + "post": { + "operationId": "CreateUser", "responses": { "200": { "description": "", @@ -141138,7 +141156,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteSnmpTransport_" + "$ref": "#/components/schemas/WithTask_User_" }, "type": "array" } @@ -141205,7 +141223,7 @@ } }, "tags": [ - "SnmpTransport" + "User" ], "security": [ { @@ -141227,16 +141245,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SnmpTransportDeletionParams" + "items": { + "$ref": "#/components/schemas/UserCreationParams" + }, + "type": "array" } } } } } }, - "/create-snmp-trap-receiver": { + "/update-user": { "post": { - "operationId": "CreateSnmpTrapReceiver", + "operationId": "UpdateUser", "responses": { "200": { "description": "", @@ -141244,7 +141265,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_SnmpTrapReceiver_" + "$ref": "#/components/schemas/WithTask_User_" }, "type": "array" } @@ -141311,7 +141332,7 @@ } }, "tags": [ - "SnmpTrapReceiver" + "User" ], "security": [ { @@ -141333,31 +141354,124 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/SnmpTrapReceiverCreationParams" - }, - "type": "array" + "$ref": "#/components/schemas/UserUpdationParams" } } } } } }, - "/update-snmp-trap-receiver": { + "/delete-user": { "post": { - "operationId": "UpdateSnmpTrapReceiver", + "operationId": "DeleteUser", "responses": { "200": { - "description": "", + "description": "Ok", "content": { "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_SnmpTrapReceiver_" + "$ref": "#/components/schemas/WithTask_DeleteUser_" }, "type": "array" } } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBody" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBody" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBody" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + } + }, + "tags": [ + "User" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "header", + "name": "content-language", + "required": false, + "schema": { + "$ref": "#/components/schemas/ContentLanguage" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserDeletionParams" + } + } + } + } + } + }, + "/create-root-user": { + "post": { + "operationId": "CreateRootUser", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WithTask_User_" + } + } }, "headers": { "CommonHeader": { @@ -141420,13 +141534,9 @@ } }, "tags": [ - "SnmpTrapReceiver" - ], - "security": [ - { - "Authorization": [] - } + "User" ], + "security": [], "parameters": [ { "in": "header", @@ -141442,26 +141552,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SnmpTrapReceiverUpdationParams" + "$ref": "#/components/schemas/RootUserCreationParams" } } } } } }, - "/delete-snmp-trap-receiver": { + "/get-my-info": { "post": { - "operationId": "DeleteSnmpTrapReceiver", + "operationId": "GetMyInfo", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/WithTask_DeleteSnmpTrapReceiver_" - }, - "type": "array" + "$ref": "#/components/schemas/User" } } }, @@ -141526,48 +141633,26 @@ } }, "tags": [ - "SnmpTrapReceiver" + "User" ], "security": [ { "Authorization": [] } ], - "parameters": [ - { - "in": "header", - "name": "content-language", - "required": false, - "schema": { - "$ref": "#/components/schemas/ContentLanguage" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SnmpTrapReceiverDeletionParams" - } - } - } - } + "parameters": [] } }, - "/upload-svt-image": { + "/create-vcenter-account": { "post": { - "operationId": "UploadSvtImage", + "operationId": "CreateVcenterAccount", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/UploadTask" - }, - "type": "array" + "$ref": "#/components/schemas/WithTask_VcenterAccount_" } } }, @@ -141632,7 +141717,7 @@ } }, "tags": [ - "SvtImage" + "VcenterAccount" ], "security": [ { @@ -141652,53 +141737,25 @@ "requestBody": { "required": true, "content": { - "multipart/form-data": { + "application/json": { "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - }, - "cluster_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "size": { - "type": "string" - }, - "size_unit": { - "type": "string" - }, - "version": { - "type": "string" - }, - "upload_task_id": { - "type": "string" - } - }, - "required": [ - "file" - ] + "$ref": "#/components/schemas/CreateVcenterAccountParams" } } } } } }, - "/export-csv": { + "/update-vcenter-account": { "post": { - "operationId": "ExportCSV", + "operationId": "UpdateVcenterAccount", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "string", - "format": "byte" + "$ref": "#/components/schemas/WithTask_VcenterAccount_" } } }, @@ -141763,7 +141820,7 @@ } }, "tags": [ - "TableReporter" + "VcenterAccount" ], "security": [ { @@ -141785,16 +141842,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TableReporterParams" + "$ref": "#/components/schemas/UpdateVcenterAccountParams" } } } } } }, - "/create-task": { + "/create-vds-with-migrate-vlan": { "post": { - "operationId": "CreateTask", + "operationId": "CreateVdsWithMigrateVlan", "responses": { "200": { "description": "", @@ -141802,7 +141859,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Task_" + "$ref": "#/components/schemas/WithTask_Vds_" }, "type": "array" } @@ -141869,7 +141926,7 @@ } }, "tags": [ - "Task" + "Vds" ], "security": [ { @@ -141892,7 +141949,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/TaskCreationParams" + "$ref": "#/components/schemas/VdsCreationWithMigrateVlanParams" }, "type": "array" } @@ -141901,9 +141958,9 @@ } } }, - "/update-task": { + "/create-vds-with-access-vlan": { "post": { - "operationId": "UpdateTask", + "operationId": "CreateVdsWithAccessVlan", "responses": { "200": { "description": "", @@ -141911,7 +141968,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Task_" + "$ref": "#/components/schemas/WithTask_Vds_" }, "type": "array" } @@ -141978,7 +142035,7 @@ } }, "tags": [ - "Task" + "Vds" ], "security": [ { @@ -142000,16 +142057,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TaskUpdateParams" + "items": { + "$ref": "#/components/schemas/VdsCreationWithMAccessVlanParams" + }, + "type": "array" } } } } } }, - "/cancel-upload-task": { + "/create-vds": { "post": { - "operationId": "CancelUploadTask", + "operationId": "CreateVds", "responses": { "200": { "description": "", @@ -142017,7 +142077,7 @@ "application/json": { "schema": { "items": { - "type": "string" + "$ref": "#/components/schemas/WithTask_Vds_" }, "type": "array" } @@ -142031,9 +142091,6 @@ } } }, - "304": { - "description": "Not modified" - }, "400": { "description": "Bad request", "content": { @@ -142087,7 +142144,7 @@ } }, "tags": [ - "UploadTask" + "Vds" ], "security": [ { @@ -142109,16 +142166,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CancelUploadTaskParams" + "items": { + "$ref": "#/components/schemas/VdsCreationParams" + }, + "type": "array" } } } } } }, - "/mount-usb-device": { + "/update-vds": { "post": { - "operationId": "MountUsbDevice", + "operationId": "UpdateVds", "responses": { "200": { "description": "", @@ -142126,7 +142186,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_UsbDevice_" + "$ref": "#/components/schemas/WithTask_Vds_" }, "type": "array" } @@ -142193,7 +142253,7 @@ } }, "tags": [ - "UsbDevice" + "Vds" ], "security": [ { @@ -142215,16 +142275,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UsbDeviceMountParams" + "$ref": "#/components/schemas/VdsUpdationParams" } } } } } }, - "/unmount-usb-device": { + "/delete-vds": { "post": { - "operationId": "UnmountUsbDevice", + "operationId": "DeleteVds", "responses": { "200": { "description": "", @@ -142232,7 +142292,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_UsbDevice_" + "$ref": "#/components/schemas/WithTask_DeleteVds_" }, "type": "array" } @@ -142299,7 +142359,7 @@ } }, "tags": [ - "UsbDevice" + "Vds" ], "security": [ { @@ -142321,16 +142381,45 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UsbDeviceUnmountParams" + "$ref": "#/components/schemas/VdsDeletionParams" } } } } } }, - "/get-usb-devices": { + "/get-version": { + "get": { + "operationId": "GetApiVersion", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + } + }, + "tags": [ + "ApiInfo" + ], + "security": [], + "parameters": [] + } + }, + "/create-view": { "post": { - "operationId": "GetUsbDevices", + "operationId": "CreateView", "responses": { "200": { "description": "", @@ -142338,7 +142427,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/UsbDevice" + "$ref": "#/components/schemas/WithTask_View_" }, "type": "array" } @@ -142405,8 +142494,7 @@ } }, "tags": [ - "UsbDevice", - "UsbDevice" + "View" ], "security": [ { @@ -142428,23 +142516,29 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetUsbDevicesRequestBody" + "items": { + "$ref": "#/components/schemas/ViewCreationParams" + }, + "type": "array" } } } } } }, - "/login": { + "/update-view": { "post": { - "operationId": "Login", + "operationId": "UpdateView", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WithTask_LoginResponse_" + "items": { + "$ref": "#/components/schemas/WithTask_View_" + }, + "type": "array" } } }, @@ -142509,9 +142603,13 @@ } }, "tags": [ - "User" + "View" + ], + "security": [ + { + "Authorization": [] + } ], - "security": [], "parameters": [ { "in": "header", @@ -142527,16 +142625,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LoginInput" + "$ref": "#/components/schemas/ViewUpdationParams" } } } } } }, - "/create-user": { + "/delete-view": { "post": { - "operationId": "CreateUser", + "operationId": "DeleteView", "responses": { "200": { "description": "", @@ -142544,7 +142642,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_User_" + "$ref": "#/components/schemas/WithTask_DeleteView_" }, "type": "array" } @@ -142611,7 +142709,7 @@ } }, "tags": [ - "User" + "View" ], "security": [ { @@ -142633,19 +142731,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/UserCreationParams" - }, - "type": "array" + "$ref": "#/components/schemas/ViewDeletionParams" } } } } } }, - "/update-user": { + "/create-vm-vlan": { "post": { - "operationId": "UpdateUser", + "operationId": "CreateVmVlan", "responses": { "200": { "description": "", @@ -142653,7 +142748,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_User_" + "$ref": "#/components/schemas/WithTask_Vlan_" }, "type": "array" } @@ -142720,7 +142815,7 @@ } }, "tags": [ - "User" + "Vlan" ], "security": [ { @@ -142742,28 +142837,38 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserUpdationParams" + "items": { + "$ref": "#/components/schemas/VmVlanCreationParams" + }, + "type": "array" } } } } } }, - "/delete-user": { + "/update-vm-vlan": { "post": { - "operationId": "DeleteUser", + "operationId": "UpdateVlan", "responses": { "200": { - "description": "Ok", + "description": "", "content": { "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteUser_" + "$ref": "#/components/schemas/WithTask_Vlan_" }, "type": "array" } } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } } }, "400": { @@ -142819,7 +142924,7 @@ } }, "tags": [ - "User" + "Vlan" ], "security": [ { @@ -142841,23 +142946,26 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserDeletionParams" + "$ref": "#/components/schemas/VmVlanUpdationParams" } } } } } }, - "/create-root-user": { + "/update-management-vlan": { "post": { - "operationId": "CreateRootUser", + "operationId": "UpdateManagementVlan", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WithTask_User_" + "items": { + "$ref": "#/components/schemas/WithTask_Vlan_" + }, + "type": "array" } } }, @@ -142922,9 +143030,13 @@ } }, "tags": [ - "User" + "Vlan" + ], + "security": [ + { + "Authorization": [] + } ], - "security": [], "parameters": [ { "in": "header", @@ -142940,107 +143052,26 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RootUserCreationParams" + "$ref": "#/components/schemas/ManagementVlanUpdationParams" } } } } } }, - "/get-my-info": { - "post": { - "operationId": "GetMyInfo", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorBody" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - }, - "404": { - "description": "Not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorBody" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - }, - "500": { - "description": "Server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorBody" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - } - }, - "tags": [ - "User" - ], - "security": [ - { - "Authorization": [] - } - ], - "parameters": [] - } - }, - "/create-vcenter-account": { + "/update-migration-vlan": { "post": { - "operationId": "CreateVcenterAccount", + "operationId": "UpdateMigrationVlan", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WithTask_VcenterAccount_" + "items": { + "$ref": "#/components/schemas/WithTask_Vlan_" + }, + "type": "array" } } }, @@ -143105,7 +143136,7 @@ } }, "tags": [ - "VcenterAccount" + "Vlan" ], "security": [ { @@ -143127,23 +143158,26 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateVcenterAccountParams" + "$ref": "#/components/schemas/MigrationVlanUpdationParams" } } } } } }, - "/update-vcenter-account": { + "/delete-vm-vlan": { "post": { - "operationId": "UpdateVcenterAccount", + "operationId": "DeleteVlan", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WithTask_VcenterAccount_" + "items": { + "$ref": "#/components/schemas/WithTask_DeleteVlan_" + }, + "type": "array" } } }, @@ -143208,7 +143242,7 @@ } }, "tags": [ - "VcenterAccount" + "Vlan" ], "security": [ { @@ -143230,16 +143264,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateVcenterAccountParams" + "$ref": "#/components/schemas/VlanDeletionParams" } } } } } }, - "/create-vds-with-migrate-vlan": { + "/create-vm-folder": { "post": { - "operationId": "CreateVdsWithMigrateVlan", + "operationId": "CreateVmFolder", "responses": { "200": { "description": "", @@ -143247,7 +143281,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Vds_" + "$ref": "#/components/schemas/WithTask_VmFolder_" }, "type": "array" } @@ -143314,7 +143348,7 @@ } }, "tags": [ - "Vds" + "VmFolder" ], "security": [ { @@ -143337,7 +143371,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/VdsCreationWithMigrateVlanParams" + "$ref": "#/components/schemas/VmFolderCreationParams" }, "type": "array" } @@ -143346,9 +143380,9 @@ } } }, - "/create-vds-with-access-vlan": { + "/update-vm-folder": { "post": { - "operationId": "CreateVdsWithAccessVlan", + "operationId": "UpdateVmFolder", "responses": { "200": { "description": "", @@ -143356,7 +143390,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Vds_" + "$ref": "#/components/schemas/WithTask_VmFolder_" }, "type": "array" } @@ -143423,7 +143457,7 @@ } }, "tags": [ - "Vds" + "VmFolder" ], "security": [ { @@ -143445,19 +143479,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/VdsCreationWithMAccessVlanParams" - }, - "type": "array" + "$ref": "#/components/schemas/VmFolderUpdationParams" } } } } } }, - "/create-vds": { + "/delete-vm-folder": { "post": { - "operationId": "CreateVds", + "operationId": "DeleteVmFolder", "responses": { "200": { "description": "", @@ -143465,7 +143496,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Vds_" + "$ref": "#/components/schemas/WithTask_DeleteVmFolder_" }, "type": "array" } @@ -143532,7 +143563,7 @@ } }, "tags": [ - "Vds" + "VmFolder" ], "security": [ { @@ -143554,19 +143585,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/VdsCreationParams" - }, - "type": "array" + "$ref": "#/components/schemas/VmFolderDeletionParams" } } } } } }, - "/update-vds": { + "/create-vm-placement-group": { "post": { - "operationId": "UpdateVds", + "operationId": "CreateVmPlacementGroup", "responses": { "200": { "description": "", @@ -143574,7 +143602,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Vds_" + "$ref": "#/components/schemas/WithTask_VmPlacementGroup_" }, "type": "array" } @@ -143641,7 +143669,7 @@ } }, "tags": [ - "Vds" + "VmPlacementGroup" ], "security": [ { @@ -143663,16 +143691,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VdsUpdationParams" + "items": { + "$ref": "#/components/schemas/VmPlacementGroupCreationParams" + }, + "type": "array" } } } } } }, - "/delete-vds": { + "/update-vm-placement-group": { "post": { - "operationId": "DeleteVds", + "operationId": "UpdateVmPlacementGroup", "responses": { "200": { "description": "", @@ -143680,7 +143711,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteVds_" + "$ref": "#/components/schemas/WithTask_VmPlacementGroup_" }, "type": "array" } @@ -143747,7 +143778,7 @@ } }, "tags": [ - "Vds" + "VmPlacementGroup" ], "security": [ { @@ -143769,45 +143800,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VdsDeletionParams" + "$ref": "#/components/schemas/VmPlacementGroupUpdationParams" } } } } } }, - "/get-version": { - "get": { - "operationId": "GetApiVersion", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - } - }, - "tags": [ - "ApiInfo" - ], - "security": [], - "parameters": [] - } - }, - "/create-view": { + "/delete-vm-placement-group": { "post": { - "operationId": "CreateView", + "operationId": "DeleteVmPlacementGroup", "responses": { "200": { "description": "", @@ -143815,7 +143817,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_View_" + "$ref": "#/components/schemas/WithTask_DeleteVmPlacementGroup_" }, "type": "array" } @@ -143882,7 +143884,7 @@ } }, "tags": [ - "View" + "VmPlacementGroup" ], "security": [ { @@ -143904,19 +143906,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/ViewCreationParams" - }, - "type": "array" + "$ref": "#/components/schemas/VmPlacementGroupDeletionParams" } } } } } }, - "/update-view": { + "/create-vm-snapshot": { "post": { - "operationId": "UpdateView", + "operationId": "CreateVmSnapshot", "responses": { "200": { "description": "", @@ -143924,7 +143923,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_View_" + "$ref": "#/components/schemas/WithTask_VmSnapshot_" }, "type": "array" } @@ -143991,7 +143990,7 @@ } }, "tags": [ - "View" + "VmSnapshot" ], "security": [ { @@ -144013,16 +144012,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ViewUpdationParams" + "$ref": "#/components/schemas/VmSnapshotCreationParams" } } } } } }, - "/delete-view": { + "/delete-vm-snapshot": { "post": { - "operationId": "DeleteView", + "operationId": "DeleteVmSnapshot", "responses": { "200": { "description": "", @@ -144030,7 +144029,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteView_" + "$ref": "#/components/schemas/WithTask_DeleteVmSnapshot_" }, "type": "array" } @@ -144097,7 +144096,7 @@ } }, "tags": [ - "View" + "VmSnapshot" ], "security": [ { @@ -144119,16 +144118,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ViewDeletionParams" + "$ref": "#/components/schemas/VmSnapshotDeletionParams" } } } } } }, - "/create-virtual-private-cloud-floating-ip": { + "/clone-vm-template-from-vm": { "post": { - "operationId": "CreateVirtualPrivateCloudFloatingIp", + "operationId": "CloneVmTemplateFromVm", "responses": { "200": { "description": "", @@ -144136,7 +144135,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_VirtualPrivateCloudFloatingIp_" + "$ref": "#/components/schemas/WithTask_VmTemplate_" }, "type": "array" } @@ -144203,7 +144202,7 @@ } }, "tags": [ - "VirtualPrivateCloudFloatingIp" + "VmTemplate" ], "security": [ { @@ -144226,7 +144225,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/VirtualPrivateCloudFloatingIpCreationParams" + "$ref": "#/components/schemas/VmTemplateCreationParams" }, "type": "array" } @@ -144235,115 +144234,9 @@ } } }, - "/delete-virtual-private-cloud-floating-ip": { - "post": { - "operationId": "DeleteVirtualPrivateCloudFloatingIp", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/WithTask_DeleteVirtualPrivateCloudFloatingIp_" - }, - "type": "array" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorBody" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - }, - "404": { - "description": "Not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorBody" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - }, - "500": { - "description": "Server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorBody" - } - } - }, - "headers": { - "CommonHeader": { - "schema": { - "$ref": "#/components/schemas/CommonHeader" - } - } - } - } - }, - "tags": [ - "VirtualPrivateCloudFloatingIp" - ], - "security": [ - { - "Authorization": [] - } - ], - "parameters": [ - { - "in": "header", - "name": "content-language", - "required": false, - "schema": { - "$ref": "#/components/schemas/ContentLanguage" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VirtualPrivateCloudFloatingIpDeletionParams" - } - } - } - } - } - }, - "/create-virtual-private-cloud-nat-gateway": { + "/convert-vm-template-from-vm": { "post": { - "operationId": "CreateVirtualPrivateCloudNatGateway", + "operationId": "ConvertVmTemplateFromVm", "responses": { "200": { "description": "", @@ -144351,7 +144244,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_VirtualPrivateCloudNatGateway_" + "$ref": "#/components/schemas/WithTask_VmTemplate_" }, "type": "array" } @@ -144418,7 +144311,7 @@ } }, "tags": [ - "VirtualPrivateCloudNatGateway" + "VmTemplate" ], "security": [ { @@ -144441,7 +144334,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/VirtualPrivateCloudNatGatewayCreationParams" + "$ref": "#/components/schemas/VmTemplateCreationParams" }, "type": "array" } @@ -144450,9 +144343,9 @@ } } }, - "/update-virtual-private-cloud-nat-gateway": { + "/update-vm-template": { "post": { - "operationId": "UpdateVirtualPrivateCloudNatGateway", + "operationId": "UpdateVmTemplate", "responses": { "200": { "description": "", @@ -144460,7 +144353,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_VirtualPrivateCloudNatGateway_" + "$ref": "#/components/schemas/WithTask_VmTemplate_" }, "type": "array" } @@ -144527,7 +144420,7 @@ } }, "tags": [ - "VirtualPrivateCloudNatGateway" + "VmTemplate" ], "security": [ { @@ -144549,16 +144442,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VirtualPrivateCloudNatGatewayUpdationParams" + "$ref": "#/components/schemas/VmTemplateUpdationParams" } } } } } }, - "/delete-virtual-private-cloud-nat-gateway": { + "/delete-vm-template": { "post": { - "operationId": "DeleteVirtualPrivateCloudNatGateway", + "operationId": "DeleteVmTemplate", "responses": { "200": { "description": "", @@ -144566,7 +144459,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteVirtualPrivateCloudNatGateway_" + "$ref": "#/components/schemas/WithTask_DeleteVmTemplate_" }, "type": "array" } @@ -144633,7 +144526,7 @@ } }, "tags": [ - "VirtualPrivateCloudNatGateway" + "VmTemplate" ], "security": [ { @@ -144655,16 +144548,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VirtualPrivateCloudNatGatewayDeletionParams" + "$ref": "#/components/schemas/VmTemplateDeletionParams" } } } } } }, - "/create-virtual-private-cloud-route-table": { + "/create-vm-volume-snapshot": { "post": { - "operationId": "CreateVirtualPrivateCloudRouteTable", + "operationId": "CreateVmVolumeSnapshot", "responses": { "200": { "description": "", @@ -144672,7 +144565,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_VirtualPrivateCloudRouteTable_" + "$ref": "#/components/schemas/WithTask_VmVolumeSnapshot_" }, "type": "array" } @@ -144739,7 +144632,7 @@ } }, "tags": [ - "VirtualPrivateCloudRouteTable" + "VmVolumeSnapshot" ], "security": [ { @@ -144762,7 +144655,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/VirtualPrivateCloudRouteTableCreationParams" + "$ref": "#/components/schemas/VmVolumeSnapshotCreationParams" }, "type": "array" } @@ -144771,9 +144664,9 @@ } } }, - "/update-virtual-private-cloud-route-table": { + "/delete-vm-volume-snapshot": { "post": { - "operationId": "UpdateVirtualPrivateCloudRouteTable", + "operationId": "DeleteVmVolumeSnapshot", "responses": { "200": { "description": "", @@ -144781,7 +144674,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_VirtualPrivateCloudRouteTable_" + "$ref": "#/components/schemas/WithTask_DeleteVmVolumeSnapshot_" }, "type": "array" } @@ -144848,7 +144741,7 @@ } }, "tags": [ - "VirtualPrivateCloudRouteTable" + "VmVolumeSnapshot" ], "security": [ { @@ -144870,16 +144763,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VirtualPrivateCloudRouteTableUpdationParams" + "$ref": "#/components/schemas/VmVolumeSnapshotDeletionParams" } } } } } }, - "/delete-virtual-private-cloud-route-table": { + "/create-vm-volume": { "post": { - "operationId": "DeleteVirtualPrivateCloudRouteTable", + "operationId": "CreateVmVolume", "responses": { "200": { "description": "", @@ -144887,7 +144780,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteVirtualPrivateCloudRouteTable_" + "$ref": "#/components/schemas/WithTask_VmVolume_" }, "type": "array" } @@ -144954,7 +144847,7 @@ } }, "tags": [ - "VirtualPrivateCloudRouteTable" + "VmVolume" ], "security": [ { @@ -144976,16 +144869,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VirtualPrivateCloudRouteTableDeletionParams" + "items": { + "$ref": "#/components/schemas/VmVolumeCreationParams" + }, + "type": "array" } } } } } }, - "/create-virtual-private-cloud-router-gateway": { + "/delete-vm-volume": { "post": { - "operationId": "CreateVirtualPrivateCloudRouterGateway", + "operationId": "DeleteVmVolumeFromVm", "responses": { "200": { "description": "", @@ -144993,7 +144889,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_VirtualPrivateCloudRouterGateway_" + "$ref": "#/components/schemas/WithTask_DeleteVmVolume_" }, "type": "array" } @@ -145060,7 +144956,7 @@ } }, "tags": [ - "VirtualPrivateCloudRouterGateway" + "VmVolume" ], "security": [ { @@ -145082,19 +144978,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/VirtualPrivateCloudRouterGatewayCreationParams" - }, - "type": "array" + "$ref": "#/components/schemas/VmVolumeDeletionParams" } } } } } }, - "/update-virtual-private-cloud-router-gateway": { + "/rebuild-vm-volume": { "post": { - "operationId": "UpdateVirtualPrivateCloudRouterGateway", + "operationId": "RebuildVmVolume", "responses": { "200": { "description": "", @@ -145102,7 +144995,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_VirtualPrivateCloudRouterGateway_" + "$ref": "#/components/schemas/WithTask_VmVolume_" }, "type": "array" } @@ -145116,6 +145009,9 @@ } } }, + "304": { + "description": "Not modified" + }, "400": { "description": "Bad request", "content": { @@ -145169,7 +145065,7 @@ } }, "tags": [ - "VirtualPrivateCloudRouterGateway" + "VmVolume" ], "security": [ { @@ -145191,16 +145087,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VirtualPrivateCloudRouterGatewayUpdationParams" + "items": { + "$ref": "#/components/schemas/VmVolumeRebuildParams" + }, + "type": "array" } } } } } }, - "/delete-virtual-private-cloud-router-gateway": { + "/rollback-vm-volume": { "post": { - "operationId": "DeleteVirtualPrivateCloudRouterGateway", + "operationId": "RollbackVmVolume", "responses": { "200": { "description": "", @@ -145208,7 +145107,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteVirtualPrivateCloudRouterGateway_" + "$ref": "#/components/schemas/WithTask_VmVolume_" }, "type": "array" } @@ -145222,6 +145121,9 @@ } } }, + "304": { + "description": "Not modified" + }, "400": { "description": "Bad request", "content": { @@ -145275,7 +145177,7 @@ } }, "tags": [ - "VirtualPrivateCloudRouterGateway" + "VmVolume" ], "security": [ { @@ -145297,16 +145199,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VirtualPrivateCloudRouterGatewayDeletionParams" + "items": { + "$ref": "#/components/schemas/VmVolumeRollbackParams" + }, + "type": "array" } } } } } }, - "/create-virtual-private-cloud-security-group": { + "/clone-vm-volume": { "post": { - "operationId": "CreateVirtualPrivateCloudSecurityGroup", + "operationId": "CloneVmVolume", "responses": { "200": { "description": "", @@ -145314,7 +145219,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_VirtualPrivateCloudSecurityGroup_" + "$ref": "#/components/schemas/WithTask_VmVolume_" }, "type": "array" } @@ -145381,7 +145286,7 @@ } }, "tags": [ - "VirtualPrivateCloudSecurityGroup" + "VmVolume" ], "security": [ { @@ -145404,7 +145309,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/VirtualPrivateCloudSecurityGroupCreationParams" + "$ref": "#/components/schemas/CloneVmVolumeParams" }, "type": "array" } @@ -145413,9 +145318,9 @@ } } }, - "/update-virtual-private-cloud-security-group": { + "/update-vm-volume": { "post": { - "operationId": "UpdateVirtualPrivateCloudSecurityGroup", + "operationId": "UpdateVmVolume", "responses": { "200": { "description": "", @@ -145423,7 +145328,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_VirtualPrivateCloudSecurityGroup_" + "$ref": "#/components/schemas/WithTask_VmVolume_" }, "type": "array" } @@ -145437,6 +145342,9 @@ } } }, + "304": { + "description": "Not modified" + }, "400": { "description": "Bad request", "content": { @@ -145490,7 +145398,7 @@ } }, "tags": [ - "VirtualPrivateCloudSecurityGroup" + "VmVolume" ], "security": [ { @@ -145512,16 +145420,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VirtualPrivateCloudSecurityGroupUpdationParams" + "$ref": "#/components/schemas/UpdateVmVolumeParams" } } } } } }, - "/delete-virtual-private-cloud-security-group": { + "/export-vm-volume": { "post": { - "operationId": "DeleteVirtualPrivateCloudSecurityGroup", + "operationId": "ExportVmVolume", "responses": { "200": { "description": "", @@ -145529,7 +145437,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteVirtualPrivateCloudSecurityGroup_" + "$ref": "#/components/schemas/WithTask_VmExportFile_" }, "type": "array" } @@ -145596,7 +145504,7 @@ } }, "tags": [ - "VirtualPrivateCloudSecurityGroup" + "VmVolume" ], "security": [ { @@ -145618,16 +145526,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VirtualPrivateCloudSecurityGroupDeletionParams" + "$ref": "#/components/schemas/ExportVmVolumeParams" } } } } } }, - "/create-virtual-private-cloud-security-policy": { + "/import-vm-volume": { "post": { - "operationId": "CreateVirtualPrivateCloudSecurityPolicy", + "operationId": "ImportVmVolume", "responses": { "200": { "description": "", @@ -145635,7 +145543,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_VirtualPrivateCloudSecurityPolicy_" + "$ref": "#/components/schemas/WithTask_VmVolume_" }, "type": "array" } @@ -145702,7 +145610,7 @@ } }, "tags": [ - "VirtualPrivateCloudSecurityPolicy" + "VmVolume" ], "security": [ { @@ -145725,7 +145633,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/VirtualPrivateCloudSecurityPolicyCreateParams" + "$ref": "#/components/schemas/ImportVmVolumeParams" }, "type": "array" } @@ -145734,9 +145642,9 @@ } } }, - "/delete-virtual-private-cloud-security-policy": { + "/update-vsphere-esxi-account": { "post": { - "operationId": "DeleteVirtualPrivateCloudSecurityPolicy", + "operationId": "UpdateVsphereEsxiAccount", "responses": { "200": { "description": "", @@ -145744,7 +145652,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteVirtualPrivateCloudSecurityPolicy_" + "$ref": "#/components/schemas/WithTask_VsphereEsxiAccount-Array_" }, "type": "array" } @@ -145758,6 +145666,9 @@ } } }, + "304": { + "description": "Not modified" + }, "400": { "description": "Bad request", "content": { @@ -145811,7 +145722,7 @@ } }, "tags": [ - "VirtualPrivateCloudSecurityPolicy" + "VsphereEsxiAccount" ], "security": [ { @@ -145833,16 +145744,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VirtualPrivateCloudSecurityPolicyDeleteParams" + "$ref": "#/components/schemas/UpdateVsphereEsxiAccountParams" } } } } } }, - "/update-virtual-private-cloud-security-policy": { + "/create-user-audit-log": { "post": { - "operationId": "UpdateVirtualPrivateCloudSecurityPolicy", + "operationId": "CreateUserAuditLog", "responses": { "200": { "description": "", @@ -145850,7 +145761,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_VirtualPrivateCloudSecurityPolicy_" + "$ref": "#/components/schemas/WithTask_UserAuditLog_" }, "type": "array" } @@ -145917,7 +145828,7 @@ } }, "tags": [ - "VirtualPrivateCloudSecurityPolicy" + "UserAuditLog" ], "security": [ { @@ -145939,16 +145850,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VirtualPrivateCloudSecurityPolicyUpdateBody" + "items": { + "$ref": "#/components/schemas/UserAuditLogCreationParams" + }, + "type": "array" } } } } } }, - "/create-virtual-private-cloud-subnet": { + "/create-backup-plan": { "post": { - "operationId": "CreateVirtualPrivateCloudSubnet", + "operationId": "CreateBackupPlan", "responses": { "200": { "description": "", @@ -145956,7 +145870,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_VirtualPrivateCloudSubnet_" + "$ref": "#/components/schemas/WithTask_BackupPlan_" }, "type": "array" } @@ -146023,7 +145937,7 @@ } }, "tags": [ - "VirtualPrivateCloudSubnet" + "BackupPlan" ], "security": [ { @@ -146046,7 +145960,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/VirtualPrivateCloudSubnetCreationParams" + "$ref": "#/components/schemas/BackupPlanCreationParams" }, "type": "array" } @@ -146055,9 +145969,9 @@ } } }, - "/update-virtual-private-cloud-subnet": { + "/update-backup-plan": { "post": { - "operationId": "UpdateVirtualPrivateCloudSubnet", + "operationId": "UpdateBackupPlan", "responses": { "200": { "description": "", @@ -146065,7 +145979,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_VirtualPrivateCloudSubnet_" + "$ref": "#/components/schemas/WithTask_BackupPlan_" }, "type": "array" } @@ -146132,7 +146046,7 @@ } }, "tags": [ - "VirtualPrivateCloudSubnet" + "BackupPlan" ], "security": [ { @@ -146154,16 +146068,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VirtualPrivateCloudSubnetUpdationParams" + "$ref": "#/components/schemas/BackupPlanUpdationParams" } } } } } }, - "/delete-virtual-private-cloud-subnet": { + "/delete-backup-plan": { "post": { - "operationId": "DeleteVirtualPrivateCloudSubnet", + "operationId": "DeleteBackupPlan", "responses": { "200": { "description": "", @@ -146171,7 +146085,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteVirtualPrivateCloudSubnet_" + "$ref": "#/components/schemas/WithTask_DeleteBackupPlan_" }, "type": "array" } @@ -146238,7 +146152,7 @@ } }, "tags": [ - "VirtualPrivateCloudSubnet" + "BackupPlan" ], "security": [ { @@ -146260,16 +146174,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VirtualPrivateCloudSubnetDeletionParams" + "$ref": "#/components/schemas/BackupPlanDeletionParams" } } } } } }, - "/create-virtual-private-cloud": { + "/suspend-backup-plan": { "post": { - "operationId": "CreateVirtualPrivateCloud", + "operationId": "SuspendBackupPlan", "responses": { "200": { "description": "", @@ -146277,7 +146191,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_VirtualPrivateCloud_" + "$ref": "#/components/schemas/WithTask_BackupPlan_" }, "type": "array" } @@ -146344,7 +146258,7 @@ } }, "tags": [ - "VirtualPrivateCloud" + "BackupPlan" ], "security": [ { @@ -146366,19 +146280,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/VirtualPrivateCloudCreationParams" - }, - "type": "array" + "$ref": "#/components/schemas/BackupPlanSuspendParams" } } } } } }, - "/update-virtual-private-cloud": { + "/resume-backup-plan": { "post": { - "operationId": "UpdateVirtualPrivateCloud", + "operationId": "ResumeBackupPlan", "responses": { "200": { "description": "", @@ -146386,7 +146297,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_VirtualPrivateCloud_" + "$ref": "#/components/schemas/WithTask_BackupPlan_" }, "type": "array" } @@ -146453,7 +146364,7 @@ } }, "tags": [ - "VirtualPrivateCloud" + "BackupPlan" ], "security": [ { @@ -146475,16 +146386,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VirtualPrivateCloudUpdationParams" + "$ref": "#/components/schemas/BackupPlanResumeParams" } } } } } }, - "/delete-virtual-private-cloud": { + "/execute-backup-plan": { "post": { - "operationId": "DeleteVirtualPrivateCloud", + "operationId": "ExecuteBackupPlan", "responses": { "200": { "description": "", @@ -146492,7 +146403,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteVirtualPrivateCloud_" + "$ref": "#/components/schemas/WithTask_BackupPlanExecution_" }, "type": "array" } @@ -146559,7 +146470,7 @@ } }, "tags": [ - "VirtualPrivateCloud" + "BackupPlan" ], "security": [ { @@ -146581,16 +146492,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VirtualPrivateCloudDeletionParams" + "$ref": "#/components/schemas/BackupPlanExecuteParams" } } } } } }, - "/create-vm-vlan": { + "/backup-rebuild-vm": { "post": { - "operationId": "CreateVmVlan", + "operationId": "BackupRebuildVm", "responses": { "200": { "description": "", @@ -146598,7 +146509,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Vlan_" + "$ref": "#/components/schemas/WithTask_BackupRestoreExecution_" }, "type": "array" } @@ -146665,7 +146576,7 @@ } }, "tags": [ - "Vlan" + "BackupPlan" ], "security": [ { @@ -146687,19 +146598,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/VmVlanCreationParams" - }, - "type": "array" + "$ref": "#/components/schemas/BackupRestorePointRebuildParams" } } } } } }, - "/update-vm-vlan": { + "/backup-restore-vm-in-place": { "post": { - "operationId": "UpdateVlan", + "operationId": "BackupRestoreVmInPlace", "responses": { "200": { "description": "", @@ -146707,7 +146615,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Vlan_" + "$ref": "#/components/schemas/WithTask_BackupRestoreExecution_" }, "type": "array" } @@ -146774,7 +146682,7 @@ } }, "tags": [ - "Vlan" + "BackupPlan" ], "security": [ { @@ -146796,16 +146704,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmVlanUpdationParams" + "$ref": "#/components/schemas/BackupRestorePointRestoreInPlaceParams" } } } } } }, - "/update-management-vlan": { + "/delete-backup-restore-point": { "post": { - "operationId": "UpdateManagementVlan", + "operationId": "DeleteBackupRestorePoint", "responses": { "200": { "description": "", @@ -146813,7 +146721,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_Vlan_" + "$ref": "#/components/schemas/WithTask_DeleteBackupRestorePoint-Array_" }, "type": "array" } @@ -146880,7 +146788,7 @@ } }, "tags": [ - "Vlan" + "BackupPlan" ], "security": [ { @@ -146902,26 +146810,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ManagementVlanUpdationParams" + "$ref": "#/components/schemas/BackupRestorePointDeletionParams" } } } } } }, - "/update-migration-vlan": { + "/disassociate-system-service-from-obs-service": { "post": { - "operationId": "UpdateMigrationVlan", + "operationId": "DisassociateSystemServiceFromObsService", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/WithTask_Vlan_" - }, - "type": "array" + "$ref": "#/components/schemas/WithTask_DisassociateSystemServiceFromObsServiceResult_" } } }, @@ -146986,7 +146891,7 @@ } }, "tags": [ - "Vlan" + "Observability" ], "security": [ { @@ -147008,16 +146913,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MigrationVlanUpdationParams" + "$ref": "#/components/schemas/DisassociateSystemServiceFromObsServiceParams" } } } } } }, - "/delete-vm-vlan": { + "/create-task": { "post": { - "operationId": "DeleteVlan", + "operationId": "CreateTask", "responses": { "200": { "description": "", @@ -147025,7 +146930,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteVlan_" + "$ref": "#/components/schemas/WithTask_Task_" }, "type": "array" } @@ -147092,7 +146997,7 @@ } }, "tags": [ - "Vlan" + "Task" ], "security": [ { @@ -147114,16 +147019,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VlanDeletionParams" + "items": { + "$ref": "#/components/schemas/TaskCreationParams" + }, + "type": "array" } } } } } }, - "/create-vm-folder": { + "/update-task": { "post": { - "operationId": "CreateVmFolder", + "operationId": "UpdateTask", "responses": { "200": { "description": "", @@ -147131,7 +147039,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_VmFolder_" + "$ref": "#/components/schemas/WithTask_Task_" }, "type": "array" } @@ -147198,7 +147106,7 @@ } }, "tags": [ - "VmFolder" + "Task" ], "security": [ { @@ -147220,19 +147128,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/VmFolderCreationParams" - }, - "type": "array" + "$ref": "#/components/schemas/TaskUpdateParams" } } } } } }, - "/update-vm-folder": { + "/create-virtual-private-cloud-floating-ip": { "post": { - "operationId": "UpdateVmFolder", + "operationId": "CreateVirtualPrivateCloudFloatingIp", "responses": { "200": { "description": "", @@ -147240,7 +147145,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_VmFolder_" + "$ref": "#/components/schemas/WithTask_VirtualPrivateCloudFloatingIp_" }, "type": "array" } @@ -147307,7 +147212,7 @@ } }, "tags": [ - "VmFolder" + "VirtualPrivateCloudFloatingIp" ], "security": [ { @@ -147329,16 +147234,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmFolderUpdationParams" + "items": { + "$ref": "#/components/schemas/VirtualPrivateCloudFloatingIpCreationParams" + }, + "type": "array" } } } } } }, - "/delete-vm-folder": { + "/delete-virtual-private-cloud-floating-ip": { "post": { - "operationId": "DeleteVmFolder", + "operationId": "DeleteVirtualPrivateCloudFloatingIp", "responses": { "200": { "description": "", @@ -147346,7 +147254,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteVmFolder_" + "$ref": "#/components/schemas/WithTask_DeleteVirtualPrivateCloudFloatingIp_" }, "type": "array" } @@ -147413,7 +147321,7 @@ } }, "tags": [ - "VmFolder" + "VirtualPrivateCloudFloatingIp" ], "security": [ { @@ -147435,16 +147343,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmFolderDeletionParams" + "$ref": "#/components/schemas/VirtualPrivateCloudFloatingIpDeletionParams" } } } } } }, - "/create-vm-placement-group": { + "/create-virtual-private-cloud-nat-gateway": { "post": { - "operationId": "CreateVmPlacementGroup", + "operationId": "CreateVirtualPrivateCloudNatGateway", "responses": { "200": { "description": "", @@ -147452,7 +147360,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_VmPlacementGroup_" + "$ref": "#/components/schemas/WithTask_VirtualPrivateCloudNatGateway_" }, "type": "array" } @@ -147519,7 +147427,7 @@ } }, "tags": [ - "VmPlacementGroup" + "VirtualPrivateCloudNatGateway" ], "security": [ { @@ -147542,7 +147450,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/VmPlacementGroupCreationParams" + "$ref": "#/components/schemas/VirtualPrivateCloudNatGatewayCreationParams" }, "type": "array" } @@ -147551,9 +147459,9 @@ } } }, - "/update-vm-placement-group": { + "/update-virtual-private-cloud-nat-gateway": { "post": { - "operationId": "UpdateVmPlacementGroup", + "operationId": "UpdateVirtualPrivateCloudNatGateway", "responses": { "200": { "description": "", @@ -147561,7 +147469,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_VmPlacementGroup_" + "$ref": "#/components/schemas/WithTask_VirtualPrivateCloudNatGateway_" }, "type": "array" } @@ -147628,7 +147536,7 @@ } }, "tags": [ - "VmPlacementGroup" + "VirtualPrivateCloudNatGateway" ], "security": [ { @@ -147650,16 +147558,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmPlacementGroupUpdationParams" + "$ref": "#/components/schemas/VirtualPrivateCloudNatGatewayUpdationParams" } } } } } }, - "/delete-vm-placement-group": { + "/delete-virtual-private-cloud-nat-gateway": { "post": { - "operationId": "DeleteVmPlacementGroup", + "operationId": "DeleteVirtualPrivateCloudNatGateway", "responses": { "200": { "description": "", @@ -147667,7 +147575,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteVmPlacementGroup_" + "$ref": "#/components/schemas/WithTask_DeleteVirtualPrivateCloudNatGateway_" }, "type": "array" } @@ -147734,7 +147642,7 @@ } }, "tags": [ - "VmPlacementGroup" + "VirtualPrivateCloudNatGateway" ], "security": [ { @@ -147756,16 +147664,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmPlacementGroupDeletionParams" + "$ref": "#/components/schemas/VirtualPrivateCloudNatGatewayDeletionParams" } } } } } }, - "/create-vm-snapshot": { + "/create-virtual-private-cloud-route-table": { "post": { - "operationId": "CreateVmSnapshot", + "operationId": "CreateVirtualPrivateCloudRouteTable", "responses": { "200": { "description": "", @@ -147773,7 +147681,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_VmSnapshot_" + "$ref": "#/components/schemas/WithTask_VirtualPrivateCloudRouteTable_" }, "type": "array" } @@ -147840,7 +147748,7 @@ } }, "tags": [ - "VmSnapshot" + "VirtualPrivateCloudRouteTable" ], "security": [ { @@ -147862,16 +147770,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmSnapshotCreationParams" + "items": { + "$ref": "#/components/schemas/VirtualPrivateCloudRouteTableCreationParams" + }, + "type": "array" } } } } } }, - "/delete-vm-snapshot": { + "/update-virtual-private-cloud-route-table": { "post": { - "operationId": "DeleteVmSnapshot", + "operationId": "UpdateVirtualPrivateCloudRouteTable", "responses": { "200": { "description": "", @@ -147879,7 +147790,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteVmSnapshot_" + "$ref": "#/components/schemas/WithTask_VirtualPrivateCloudRouteTable_" }, "type": "array" } @@ -147946,7 +147857,7 @@ } }, "tags": [ - "VmSnapshot" + "VirtualPrivateCloudRouteTable" ], "security": [ { @@ -147968,16 +147879,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmSnapshotDeletionParams" + "$ref": "#/components/schemas/VirtualPrivateCloudRouteTableUpdationParams" } } } } } }, - "/clone-vm-template-from-vm": { + "/delete-virtual-private-cloud-route-table": { "post": { - "operationId": "CloneVmTemplateFromVm", + "operationId": "DeleteVirtualPrivateCloudRouteTable", "responses": { "200": { "description": "", @@ -147985,7 +147896,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_VmTemplate_" + "$ref": "#/components/schemas/WithTask_DeleteVirtualPrivateCloudRouteTable_" }, "type": "array" } @@ -148052,7 +147963,7 @@ } }, "tags": [ - "VmTemplate" + "VirtualPrivateCloudRouteTable" ], "security": [ { @@ -148074,19 +147985,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/VmTemplateCreationParams" - }, - "type": "array" + "$ref": "#/components/schemas/VirtualPrivateCloudRouteTableDeletionParams" } } } } } }, - "/convert-vm-template-from-vm": { + "/create-virtual-private-cloud-router-gateway": { "post": { - "operationId": "ConvertVmTemplateFromVm", + "operationId": "CreateVirtualPrivateCloudRouterGateway", "responses": { "200": { "description": "", @@ -148094,7 +148002,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_VmTemplate_" + "$ref": "#/components/schemas/WithTask_VirtualPrivateCloudRouterGateway_" }, "type": "array" } @@ -148161,7 +148069,7 @@ } }, "tags": [ - "VmTemplate" + "VirtualPrivateCloudRouterGateway" ], "security": [ { @@ -148184,7 +148092,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/VmTemplateCreationParams" + "$ref": "#/components/schemas/VirtualPrivateCloudRouterGatewayCreationParams" }, "type": "array" } @@ -148193,9 +148101,9 @@ } } }, - "/update-vm-template": { + "/update-virtual-private-cloud-router-gateway": { "post": { - "operationId": "UpdateVmTemplate", + "operationId": "UpdateVirtualPrivateCloudRouterGateway", "responses": { "200": { "description": "", @@ -148203,7 +148111,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_VmTemplate_" + "$ref": "#/components/schemas/WithTask_VirtualPrivateCloudRouterGateway_" }, "type": "array" } @@ -148270,7 +148178,7 @@ } }, "tags": [ - "VmTemplate" + "VirtualPrivateCloudRouterGateway" ], "security": [ { @@ -148292,16 +148200,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmTemplateUpdationParams" + "$ref": "#/components/schemas/VirtualPrivateCloudRouterGatewayUpdationParams" } } } } } }, - "/delete-vm-template": { + "/delete-virtual-private-cloud-router-gateway": { "post": { - "operationId": "DeleteVmTemplate", + "operationId": "DeleteVirtualPrivateCloudRouterGateway", "responses": { "200": { "description": "", @@ -148309,7 +148217,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteVmTemplate_" + "$ref": "#/components/schemas/WithTask_DeleteVirtualPrivateCloudRouterGateway_" }, "type": "array" } @@ -148376,7 +148284,7 @@ } }, "tags": [ - "VmTemplate" + "VirtualPrivateCloudRouterGateway" ], "security": [ { @@ -148398,16 +148306,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmTemplateDeletionParams" + "$ref": "#/components/schemas/VirtualPrivateCloudRouterGatewayDeletionParams" } } } } } }, - "/create-vm-volume-snapshot": { + "/create-virtual-private-cloud-security-group": { "post": { - "operationId": "CreateVmVolumeSnapshot", + "operationId": "CreateVirtualPrivateCloudSecurityGroup", "responses": { "200": { "description": "", @@ -148415,7 +148323,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_VmVolumeSnapshot_" + "$ref": "#/components/schemas/WithTask_VirtualPrivateCloudSecurityGroup_" }, "type": "array" } @@ -148482,7 +148390,7 @@ } }, "tags": [ - "VmVolumeSnapshot" + "VirtualPrivateCloudSecurityGroup" ], "security": [ { @@ -148505,7 +148413,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/VmVolumeSnapshotCreationParams" + "$ref": "#/components/schemas/VirtualPrivateCloudSecurityGroupCreationParams" }, "type": "array" } @@ -148514,9 +148422,9 @@ } } }, - "/delete-vm-volume-snapshot": { + "/update-virtual-private-cloud-security-group": { "post": { - "operationId": "DeleteVmVolumeSnapshot", + "operationId": "UpdateVirtualPrivateCloudSecurityGroup", "responses": { "200": { "description": "", @@ -148524,7 +148432,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteVmVolumeSnapshot_" + "$ref": "#/components/schemas/WithTask_VirtualPrivateCloudSecurityGroup_" }, "type": "array" } @@ -148591,7 +148499,7 @@ } }, "tags": [ - "VmVolumeSnapshot" + "VirtualPrivateCloudSecurityGroup" ], "security": [ { @@ -148613,16 +148521,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmVolumeSnapshotDeletionParams" + "$ref": "#/components/schemas/VirtualPrivateCloudSecurityGroupUpdationParams" } } } } } }, - "/create-vm-volume": { + "/delete-virtual-private-cloud-security-group": { "post": { - "operationId": "CreateVmVolume", + "operationId": "DeleteVirtualPrivateCloudSecurityGroup", "responses": { "200": { "description": "", @@ -148630,7 +148538,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_VmVolume_" + "$ref": "#/components/schemas/WithTask_DeleteVirtualPrivateCloudSecurityGroup_" }, "type": "array" } @@ -148697,7 +148605,7 @@ } }, "tags": [ - "VmVolume" + "VirtualPrivateCloudSecurityGroup" ], "security": [ { @@ -148719,19 +148627,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/VmVolumeCreationParams" - }, - "type": "array" + "$ref": "#/components/schemas/VirtualPrivateCloudSecurityGroupDeletionParams" } } } } } }, - "/delete-vm-volume": { + "/create-virtual-private-cloud-security-policy": { "post": { - "operationId": "DeleteVmVolumeFromVm", + "operationId": "CreateVirtualPrivateCloudSecurityPolicy", "responses": { "200": { "description": "", @@ -148739,7 +148644,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_DeleteVmVolume_" + "$ref": "#/components/schemas/WithTask_VirtualPrivateCloudSecurityPolicy_" }, "type": "array" } @@ -148806,7 +148711,7 @@ } }, "tags": [ - "VmVolume" + "VirtualPrivateCloudSecurityPolicy" ], "security": [ { @@ -148828,16 +148733,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VmVolumeDeletionParams" + "items": { + "$ref": "#/components/schemas/VirtualPrivateCloudSecurityPolicyCreateParams" + }, + "type": "array" } } } } } }, - "/rebuild-vm-volume": { + "/delete-virtual-private-cloud-security-policy": { "post": { - "operationId": "RebuildVmVolume", + "operationId": "DeleteVirtualPrivateCloudSecurityPolicy", "responses": { "200": { "description": "", @@ -148845,7 +148753,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_VmVolume_" + "$ref": "#/components/schemas/WithTask_DeleteVirtualPrivateCloudSecurityPolicy_" }, "type": "array" } @@ -148859,9 +148767,6 @@ } } }, - "304": { - "description": "Not modified" - }, "400": { "description": "Bad request", "content": { @@ -148915,7 +148820,7 @@ } }, "tags": [ - "VmVolume" + "VirtualPrivateCloudSecurityPolicy" ], "security": [ { @@ -148937,19 +148842,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/VmVolumeRebuildParams" - }, - "type": "array" + "$ref": "#/components/schemas/VirtualPrivateCloudSecurityPolicyDeleteParams" } } } } } }, - "/rollback-vm-volume": { + "/update-virtual-private-cloud-security-policy": { "post": { - "operationId": "RollbackVmVolume", + "operationId": "UpdateVirtualPrivateCloudSecurityPolicy", "responses": { "200": { "description": "", @@ -148957,7 +148859,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_VmVolume_" + "$ref": "#/components/schemas/WithTask_VirtualPrivateCloudSecurityPolicy_" }, "type": "array" } @@ -148971,9 +148873,6 @@ } } }, - "304": { - "description": "Not modified" - }, "400": { "description": "Bad request", "content": { @@ -149027,7 +148926,7 @@ } }, "tags": [ - "VmVolume" + "VirtualPrivateCloudSecurityPolicy" ], "security": [ { @@ -149049,19 +148948,16 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/VmVolumeRollbackParams" - }, - "type": "array" + "$ref": "#/components/schemas/VirtualPrivateCloudSecurityPolicyUpdateBody" } } } } } }, - "/clone-vm-volume": { + "/create-virtual-private-cloud-subnet": { "post": { - "operationId": "CloneVmVolume", + "operationId": "CreateVirtualPrivateCloudSubnet", "responses": { "200": { "description": "", @@ -149069,7 +148965,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_VmVolume_" + "$ref": "#/components/schemas/WithTask_VirtualPrivateCloudSubnet_" }, "type": "array" } @@ -149136,7 +149032,7 @@ } }, "tags": [ - "VmVolume" + "VirtualPrivateCloudSubnet" ], "security": [ { @@ -149159,7 +149055,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/CloneVmVolumeParams" + "$ref": "#/components/schemas/VirtualPrivateCloudSubnetCreationParams" }, "type": "array" } @@ -149168,9 +149064,9 @@ } } }, - "/update-vm-volume": { + "/update-virtual-private-cloud-subnet": { "post": { - "operationId": "UpdateVmVolume", + "operationId": "UpdateVirtualPrivateCloudSubnet", "responses": { "200": { "description": "", @@ -149178,7 +149074,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_VmVolume_" + "$ref": "#/components/schemas/WithTask_VirtualPrivateCloudSubnet_" }, "type": "array" } @@ -149192,9 +149088,6 @@ } } }, - "304": { - "description": "Not modified" - }, "400": { "description": "Bad request", "content": { @@ -149248,7 +149141,7 @@ } }, "tags": [ - "VmVolume" + "VirtualPrivateCloudSubnet" ], "security": [ { @@ -149270,16 +149163,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateVmVolumeParams" + "$ref": "#/components/schemas/VirtualPrivateCloudSubnetUpdationParams" } } } } } }, - "/export-vm-volume": { + "/delete-virtual-private-cloud-subnet": { "post": { - "operationId": "ExportVmVolume", + "operationId": "DeleteVirtualPrivateCloudSubnet", "responses": { "200": { "description": "", @@ -149287,7 +149180,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_VmExportFile_" + "$ref": "#/components/schemas/WithTask_DeleteVirtualPrivateCloudSubnet_" }, "type": "array" } @@ -149354,7 +149247,7 @@ } }, "tags": [ - "VmVolume" + "VirtualPrivateCloudSubnet" ], "security": [ { @@ -149376,16 +149269,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ExportVmVolumeParams" + "$ref": "#/components/schemas/VirtualPrivateCloudSubnetDeletionParams" } } } } } }, - "/import-vm-volume": { + "/create-virtual-private-cloud": { "post": { - "operationId": "ImportVmVolume", + "operationId": "CreateVirtualPrivateCloud", "responses": { "200": { "description": "", @@ -149393,7 +149286,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_VmVolume_" + "$ref": "#/components/schemas/WithTask_VirtualPrivateCloud_" }, "type": "array" } @@ -149460,7 +149353,7 @@ } }, "tags": [ - "VmVolume" + "VirtualPrivateCloud" ], "security": [ { @@ -149483,7 +149376,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/ImportVmVolumeParams" + "$ref": "#/components/schemas/VirtualPrivateCloudCreationParams" }, "type": "array" } @@ -149492,9 +149385,9 @@ } } }, - "/update-vsphere-esxi-account": { + "/update-virtual-private-cloud": { "post": { - "operationId": "UpdateVsphereEsxiAccount", + "operationId": "UpdateVirtualPrivateCloud", "responses": { "200": { "description": "", @@ -149502,7 +149395,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/WithTask_VsphereEsxiAccount-Array_" + "$ref": "#/components/schemas/WithTask_VirtualPrivateCloud_" }, "type": "array" } @@ -149516,8 +149409,111 @@ } } }, - "304": { - "description": "Not modified" + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBody" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBody" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBody" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } + } + }, + "tags": [ + "VirtualPrivateCloud" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "header", + "name": "content-language", + "required": false, + "schema": { + "$ref": "#/components/schemas/ContentLanguage" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VirtualPrivateCloudUpdationParams" + } + } + } + } + } + }, + "/delete-virtual-private-cloud": { + "post": { + "operationId": "DeleteVirtualPrivateCloud", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/WithTask_DeleteVirtualPrivateCloud_" + }, + "type": "array" + } + } + }, + "headers": { + "CommonHeader": { + "schema": { + "$ref": "#/components/schemas/CommonHeader" + } + } + } }, "400": { "description": "Bad request", @@ -149572,7 +149568,7 @@ } }, "tags": [ - "VsphereEsxiAccount" + "VirtualPrivateCloud" ], "security": [ { @@ -149594,7 +149590,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateVsphereEsxiAccountParams" + "$ref": "#/components/schemas/VirtualPrivateCloudDeletionParams" } } } diff --git a/cloudtower-api-doc/swagger/examples/swagger-examples.json b/cloudtower-api-doc/swagger/examples/swagger-examples.json index 6d18995..6b75615 100644 --- a/cloudtower-api-doc/swagger/examples/swagger-examples.json +++ b/cloudtower-api-doc/swagger/examples/swagger-examples.json @@ -1,3594 +1,3594 @@ { - "/upload-elf-file": { + "/update-global-alert-rule": { "exampleValue": { - "file": "file-string" + "data": {}, + "where": { + "id": "GlobalAlertRule-id" + } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/upload-elf-file \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: multipart/form-data' \\\n\t-d '{\"file\":\"file-string\"}'", - "python": "from cloudtower import ApiClient, Configuration, OvfApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n ovf_api = OvfApi(client)\r\n with open(\"file-path\", \"rb\") as file:\r\n resp = ovf_api.upload_elf_file(\r\n file=file\r\n )\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"bytes\"\r\n \"fmt\"\r\n \"io\"\r\n\r\n \"github.com/go-openapi/runtime\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/ovf\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n ovf_api := client.Ovf\r\n params := ovf.NewUploadElfFileParams()\r\n params.File = runtime.NamedReader(\"file\",io.NopCloser(bytes.NewReader([]byte(\"file-string\"))))\r\n resp, err := ovf_api.UploadElfFile(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.OvfApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.nio.file.Files;\r\nimport java.nio.file.Path;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n OvfApi ovfApi = new OvfApi(client);\r\n UploadTask resp = ovfApi.uploadElfFile(\r\n Files.readAllBytes(Path.of(\"file-string\")),\r\n \"cluster_id\",\r\n \"name\",\r\n \"size\",\r\n \"size_unit\",\r\n \"upload_task_id\"\r\n );\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-global-alert-rule \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"GlobalAlertRule-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, GlobalAlertRuleApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n global_alert_rule_api = GlobalAlertRuleApi(client)\r\n resp = global_alert_rule_api.update_global_alert_rule({\"data\":{},\"where\":{\"id\":\"GlobalAlertRule-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/global_alert_rule\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n global_alert_rule_api := client.GlobalAlertRule\r\n params := global_alert_rule.NewUpdateGlobalAlertRuleParams()\r\n params.RequestBody = &models.GlobalAlertRuleUpdationParams{\nData: &models.GlobalAlertRuleUpdationParamsData{\n},\nWhere: &models.GlobalAlertRuleWhereInput{\nID: pointy.String(\"GlobalAlertRule-id\"),\n},\n}\r\n rawResp, err := global_alert_rule_api.UpdateGlobalAlertRule(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskGlobalAlertRule) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskGlobalAlertRule)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskGlobalAlertRule) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.GlobalAlertRuleApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n GlobalAlertRuleApi globalAlertRuleApi = new GlobalAlertRuleApi(client);\r\n GlobalAlertRuleUpdationParams params = new GlobalAlertRuleUpdationParams()\n.data(new GlobalAlertRuleUpdationParamsData())\n.where(new GlobalAlertRuleWhereInput()\n.id(\"GlobalAlertRule-id\"));\r\n List resp = globalAlertRuleApi.updateGlobalAlertRule(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/parse-ovf": { + "/update-customize-alert-rule": { "exampleValue": { - "file": "file-string", - "cluster_id": "ck74rk21wg5lz0786opdnzz5m" + "data": { + "clusters": { + "id": "Cluster-id" + } + }, + "where": { + "id": "GlobalAlertRule-id" + } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/parse-ovf \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: multipart/form-data' \\\n\t-d '{\"file\":\"file-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}'", - "python": "from cloudtower import ApiClient, Configuration, OvfApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n ovf_api = OvfApi(client)\r\n with open(\"file-path\", \"rb\") as file:\r\n resp = ovf_api.parse_ovf(\r\n file=file,\r\n cluster_id=\"ck74rk21wg5lz0786opdnzz5m\"\r\n )\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"bytes\"\r\n \"fmt\"\r\n \"io\"\r\n\r\n \"github.com/go-openapi/runtime\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/ovf\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n ovf_api := client.Ovf\r\n params := ovf.NewParseOvfParams()\r\n params.File = runtime.NamedReader(\"file\",io.NopCloser(bytes.NewReader([]byte(\"file-string\"))))\r\n params.ClusterID = \"ck74rk21wg5lz0786opdnzz5m\"\r\n resp, err := ovf_api.ParseOvf(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.OvfApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.nio.file.Files;\r\nimport java.nio.file.Path;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n OvfApi ovfApi = new OvfApi(client);\r\n ParsedOvf resp = ovfApi.parseOvf(\r\n Files.readAllBytes(Path.of(\"file-string\")),\r\n \"ck74rk21wg5lz0786opdnzz5m\"\r\n );\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-customize-alert-rule \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"clusters\":{\"id\":\"Cluster-id\"}},\"where\":{\"id\":\"GlobalAlertRule-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, GlobalAlertRuleApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n global_alert_rule_api = GlobalAlertRuleApi(client)\r\n resp = global_alert_rule_api.update_customize_alert_rule({\"data\":{\"clusters\":{\"id\":\"Cluster-id\"}},\"where\":{\"id\":\"GlobalAlertRule-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/global_alert_rule\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n global_alert_rule_api := client.GlobalAlertRule\r\n params := global_alert_rule.NewUpdateCustomizeAlertRuleParams()\r\n params.RequestBody = &models.CustomizeAlertRuleUpdationParams{\nData: &models.CustomizeAlertRuleUpdationParamsData{\nClusters: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\n},\nWhere: &models.GlobalAlertRuleWhereInput{\nID: pointy.String(\"GlobalAlertRule-id\"),\n},\n}\r\n rawResp, err := global_alert_rule_api.UpdateCustomizeAlertRule(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskGlobalAlertRule) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskGlobalAlertRule)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskGlobalAlertRule) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.GlobalAlertRuleApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n GlobalAlertRuleApi globalAlertRuleApi = new GlobalAlertRuleApi(client);\r\n CustomizeAlertRuleUpdationParams params = new CustomizeAlertRuleUpdationParams()\n.data(new CustomizeAlertRuleUpdationParamsData()\n.clusters(new ClusterWhereInput()\n.id(\"Cluster-id\")))\n.where(new GlobalAlertRuleWhereInput()\n.id(\"GlobalAlertRule-id\"));\r\n List resp = globalAlertRuleApi.updateCustomizeAlertRule(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/get-export-file-download-links": { + "/resolve-alert": { "exampleValue": { "where": { - "id": "VmExportFile-id" + "id": "Alert-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-export-file-download-links \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"VmExportFile-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, OvfApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n ovf_api = OvfApi(client)\r\n resp = ovf_api.get_export_file_download_links({\"where\":{\"id\":\"VmExportFile-id\"}})\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/ovf\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n ovf_api := client.Ovf\r\n params := ovf.NewGetExportFileDownloadLinksParams()\r\n params.RequestBody = &models.GetExportFileDownloadLinksParams{\nWhere: &models.VMExportFileWhereUniqueInput{\nID: pointy.String(\"VmExportFile-id\"),\n},\n}\r\n rawResp, err := ovf_api.GetExportFileDownloadLinks(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.OvfApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n OvfApi ovfApi = new OvfApi(client);\r\n GetExportFileDownloadLinksParams params = new GetExportFileDownloadLinksParams()\n.where(new VmExportFileWhereUniqueInput()\n.id(\"VmExportFile-id\"));\r\n List resp = ovfApi.getExportFileDownloadLinks(params);\r\n }\r\n}" - }, - "/create-vm": { - "exampleValue": [ - { - "status": "DELETED", - "firmware": "BIOS", - "ha": true, - "vm_nics": [ - {} - ], - "vm_disks": {}, - "memory": 1, - "cpu_cores": 1, - "cpu_sockets": 1, - "name": "name-string", - "cluster_id": "ck74rk21wg5lz0786opdnzz5m" - } - ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"status\":\"DELETED\",\"firmware\":\"BIOS\",\"ha\":true,\"vm_nics\":[{}],\"vm_disks\":{},\"memory\":1,\"cpu_cores\":1,\"cpu_sockets\":1,\"name\":\"name-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.create_vm([{\"status\":\"DELETED\",\"firmware\":\"BIOS\",\"ha\":True,\"vm_nics\":[{}],\"vm_disks\":{},\"memory\":1,\"cpu_cores\":1,\"cpu_sockets\":1,\"name\":\"name-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewCreateVMParams()\r\n params.RequestBody = []*models.VMCreationParams{\n{\nStatus: models.VMStatusDELETED.Pointer(),\nFirmware: models.VMFirmwareBIOS.Pointer(),\nHa: pointy.Bool(true),\nVMNics: []*models.VMNicParams{\n{\n},\n},\nVMDisks: &models.VMDiskParams{\n},\nMemory: pointy.Int64(1),\nCPUCores: pointy.Int32(1),\nCPUSockets: pointy.Int32(1),\nName: pointy.String(\"name-string\"),\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := vm_api.CreateVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new VmCreationParams()\n.status(VmStatus.fromValue(\"DELETED\"))\n.firmware(VmFirmware.fromValue(\"BIOS\"))\n.ha(true)\n.addVmNicsItem(new VmNicParams())\n.vmDisks(new VmDiskParams())\n.memory(1L)\n.cpuCores(1)\n.cpuSockets(1)\n.name(\"name-string\")\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = vmApi.createVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" - }, - "/create-vm-from-template": { - "exampleValue": [ - { - "is_full_copy": true, - "template_id": "ck74rk21wg5lz0786opdnzz5m", - "name": "name-string" - } - ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-vm-from-template \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"is_full_copy\":true,\"template_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.create_vm_from_template([{\"is_full_copy\":True,\"template_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewCreateVMFromTemplateParams()\r\n params.RequestBody = []*models.VMCreateVMFromTemplateParams{\n{\nIsFullCopy: pointy.Bool(true),\nTemplateID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := vm_api.CreateVMFromTemplate(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new VmCreateVmFromTemplateParams()\n.isFullCopy(true)\n.templateId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = vmApi.createVmFromTemplate(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/resolve-alert \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Alert-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, AlertApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n alert_api = AlertApi(client)\r\n resp = alert_api.resolve_alert({\"where\":{\"id\":\"Alert-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/alert\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n alert_api := client.Alert\r\n params := alert.NewResolveAlertParams()\r\n params.RequestBody = &models.ResolveAlertParams{\nWhere: &models.AlertWhereInput{\nID: pointy.String(\"Alert-id\"),\n},\n}\r\n rawResp, err := alert_api.ResolveAlert(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskAlert) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskAlert)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskAlert) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.AlertApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n AlertApi alertApi = new AlertApi(client);\r\n ResolveAlertParams params = new ResolveAlertParams()\n.where(new AlertWhereInput()\n.id(\"Alert-id\"));\r\n List resp = alertApi.resolveAlert(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/create-vm-from-content-library-template": { + "/create-brick-topo": { "exampleValue": [ { - "is_full_copy": true, - "template_id": "ck74rk21wg5lz0786opdnzz5m", + "cluster_id": "ck74rk21wg5lz0786opdnzz5m", + "height": 1, "name": "name-string", - "cluster_id": "ck74rk21wg5lz0786opdnzz5m" + "position": 1 } ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-vm-from-content-library-template \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"is_full_copy\":true,\"template_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.create_vm_from_content_library_template([{\"is_full_copy\":True,\"template_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewCreateVMFromContentLibraryTemplateParams()\r\n params.RequestBody = []*models.VMCreateVMFromContentLibraryTemplateParams{\n{\nIsFullCopy: pointy.Bool(true),\nTemplateID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := vm_api.CreateVMFromContentLibraryTemplate(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new VmCreateVmFromContentLibraryTemplateParams()\n.isFullCopy(true)\n.templateId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\")\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = vmApi.createVmFromContentLibraryTemplate(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-brick-topo \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"height\":1,\"name\":\"name-string\",\"position\":1}]'", + "python": "from cloudtower import ApiClient, Configuration, BrickTopoApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n brick_topo_api = BrickTopoApi(client)\r\n resp = brick_topo_api.create_brick_topo([{\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"height\":1,\"name\":\"name-string\",\"position\":1}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/brick_topo\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n brick_topo_api := client.BrickTopo\r\n params := brick_topo.NewCreateBrickTopoParams()\r\n params.RequestBody = []*models.BrickTopoCreationParams{\n{\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nHeight: pointy.Int32(1),\nName: pointy.String(\"name-string\"),\nPosition: pointy.Int32(1),\n},\n}\r\n rawResp, err := brick_topo_api.CreateBrickTopo(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskBrickTopo) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskBrickTopo)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskBrickTopo) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.BrickTopoApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n BrickTopoApi brickTopoApi = new BrickTopoApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new BrickTopoCreationParams()\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.height(1)\n.name(\"name-string\")\n.position(1));\r\n List resp = brickTopoApi.createBrickTopo(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/create-vm-from-content-library-template-batch": { + "/update-brick-topo": { "exampleValue": { - "vms": [ - { - "is_full_copy": true, - "name": "name-string", - "cluster_id": "ck74rk21wg5lz0786opdnzz5m" - } - ], - "template_id": "ck74rk21wg5lz0786opdnzz5m" - }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-vm-from-content-library-template-batch \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"vms\":[{\"is_full_copy\":true,\"name\":\"name-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}],\"template_id\":\"ck74rk21wg5lz0786opdnzz5m\"}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_task\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.create_vm_from_content_library_template_batch({\"vms\":[{\"is_full_copy\":True,\"name\":\"name-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}],\"template_id\":\"ck74rk21wg5lz0786opdnzz5m\"})\r\n wait_task(resp.task_id, client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewCreateVMFromContentLibraryTemplateBatchParams()\r\n params.RequestBody = &models.VMCreateVMFromContentLibraryTemplateBatchParams{\nVms: []*models.VMCreateVMFromContentLibraryTemplateBatchVMParams{\n{\nIsFullCopy: pointy.Bool(true),\nName: pointy.String(\"name-string\"),\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n},\nTemplateID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n}\r\n rawResp, err := vm_api.CreateVMFromContentLibraryTemplateBatch(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n err = utils.WaitTask(context.Background(), client, resp.TaskID, 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmCreateVmFromContentLibraryTemplateBatchParams params = new VmCreateVmFromContentLibraryTemplateBatchParams()\n.addVmsItem(new VmCreateVmFromContentLibraryTemplateBatchVmParams()\n.isFullCopy(true)\n.name(\"name-string\")\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\"))\n.templateId(\"ck74rk21wg5lz0786opdnzz5m\");\r\n WithTaskVmArray resp = vmApi.createVmFromContentLibraryTemplateBatch(params);\r\n TaskUtil.WaitTask(resp.getTaskId(), client);\r\n }\r\n}" - }, - "/convert-vm-template-to-vm": { - "exampleValue": [ - { - "name": "name-string", - "converted_from_template_id": "ck74rk21wg5lz0786opdnzz5m" - } - ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/convert-vm-template-to-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"name\":\"name-string\",\"converted_from_template_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.convert_vm_template_to_vm([{\"name\":\"name-string\",\"converted_from_template_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewConvertVMTemplateToVMParams()\r\n params.RequestBody = []*models.ConvertVMTemplateToVMParams{\n{\nName: pointy.String(\"name-string\"),\nConvertedFromTemplateID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := vm_api.ConvertVMTemplateToVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new ConvertVmTemplateToVmParams()\n.name(\"name-string\")\n.convertedFromTemplateId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = vmApi.convertVmTemplateToVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" - }, - "/clone-vm": { - "exampleValue": [ - { - "src_vm_id": "ck74rk21wg5lz0786opdnzz5m", - "name": "name-string" - } - ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/clone-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"src_vm_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.clone_vm([{\"src_vm_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewCloneVMParams()\r\n params.RequestBody = []*models.VMCloneParams{\n{\nSrcVMID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := vm_api.CloneVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new VmCloneParams()\n.srcVmId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = vmApi.cloneVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" - }, - "/rebuild-vm-from-snapshot": { - "exampleValue": [ - { - "rebuild_from_snapshot_id": "ck74rk21wg5lz0786opdnzz5m", - "name": "name-string" + "data": {}, + "where": { + "id": "BrickTopo-id" } - ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/rebuild-vm-from-snapshot \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"rebuild_from_snapshot_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.rebuild_vm([{\"rebuild_from_snapshot_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewRebuildVMParams()\r\n params.RequestBody = []*models.VMRebuildParams{\n{\nRebuildFromSnapshotID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := vm_api.RebuildVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new VmRebuildParams()\n.rebuildFromSnapshotId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = vmApi.rebuildVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-brick-topo \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"BrickTopo-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, BrickTopoApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n brick_topo_api = BrickTopoApi(client)\r\n resp = brick_topo_api.update_brick_topo({\"data\":{},\"where\":{\"id\":\"BrickTopo-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/brick_topo\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n brick_topo_api := client.BrickTopo\r\n params := brick_topo.NewUpdateBrickTopoParams()\r\n params.RequestBody = &models.BrickTopoUpdationParams{\nData: &models.BrickTopoUpdationParamsData{\n},\nWhere: &models.BrickTopoWhereInput{\nID: pointy.String(\"BrickTopo-id\"),\n},\n}\r\n rawResp, err := brick_topo_api.UpdateBrickTopo(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskBrickTopo) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskBrickTopo)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskBrickTopo) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.BrickTopoApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n BrickTopoApi brickTopoApi = new BrickTopoApi(client);\r\n BrickTopoUpdationParams params = new BrickTopoUpdationParams()\n.data(new BrickTopoUpdationParamsData())\n.where(new BrickTopoWhereInput()\n.id(\"BrickTopo-id\"));\r\n List resp = brickTopoApi.updateBrickTopo(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/rollback-vm": { + "/move-brick-topo": { "exampleValue": { "data": { - "snapshot_id": "ck74rk21wg5lz0786opdnzz5m" + "position": 1 }, "where": { - "id": "Vm-id" + "id": "BrickTopo-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/rollback-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"snapshot_id\":\"ck74rk21wg5lz0786opdnzz5m\"},\"where\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.rollback_vm({\"data\":{\"snapshot_id\":\"ck74rk21wg5lz0786opdnzz5m\"},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewRollbackVMParams()\r\n params.RequestBody = &models.VMRollbackParams{\nData: &models.VMRollbackParamsData{\nSnapshotID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.RollbackVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmRollbackParams params = new VmRollbackParams()\n.data(new VmRollbackParamsData()\n.snapshotId(\"ck74rk21wg5lz0786opdnzz5m\"))\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.rollbackVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/move-brick-topo \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"position\":1},\"where\":{\"id\":\"BrickTopo-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, BrickTopoApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n brick_topo_api = BrickTopoApi(client)\r\n resp = brick_topo_api.move_brick_topo({\"data\":{\"position\":1},\"where\":{\"id\":\"BrickTopo-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/brick_topo\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n brick_topo_api := client.BrickTopo\r\n params := brick_topo.NewMoveBrickTopoParams()\r\n params.RequestBody = &models.BrickTopoMoveParams{\nData: &models.BrickTopoMoveParamsData{\nPosition: pointy.Int32(1),\n},\nWhere: &models.BrickTopoWhereInput{\nID: pointy.String(\"BrickTopo-id\"),\n},\n}\r\n rawResp, err := brick_topo_api.MoveBrickTopo(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskBrickTopo) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskBrickTopo)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskBrickTopo) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.BrickTopoApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n BrickTopoApi brickTopoApi = new BrickTopoApi(client);\r\n BrickTopoMoveParams params = new BrickTopoMoveParams()\n.data(new BrickTopoMoveParamsData()\n.position(1))\n.where(new BrickTopoWhereInput()\n.id(\"BrickTopo-id\"));\r\n List resp = brickTopoApi.moveBrickTopo(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-vm-basic-info": { + "/delete-brick-topo": { "exampleValue": { - "data": {}, "where": { - "id": "Vm-id" + "id": "BrickTopo-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-vm-basic-info \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.update_vm({\"data\":{},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewUpdateVMParams()\r\n params.RequestBody = &models.VMUpdateParams{\nData: &models.VMUpdateParamsData{\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.UpdateVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmUpdateParams params = new VmUpdateParams()\n.data(new VmUpdateParamsData())\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.updateVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-brick-topo \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"BrickTopo-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, BrickTopoApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n brick_topo_api = BrickTopoApi(client)\r\n resp = brick_topo_api.delete_brick_topo({\"where\":{\"id\":\"BrickTopo-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/brick_topo\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n brick_topo_api := client.BrickTopo\r\n params := brick_topo.NewDeleteBrickTopoParams()\r\n params.RequestBody = &models.BrickTopoDeletionParams{\nWhere: &models.BrickTopoWhereInput{\nID: pointy.String(\"BrickTopo-id\"),\n},\n}\r\n rawResp, err := brick_topo_api.DeleteBrickTopo(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteBrickTopo) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteBrickTopo)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteBrickTopo) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.BrickTopoApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n BrickTopoApi brickTopoApi = new BrickTopoApi(client);\r\n BrickTopoDeletionParams params = new BrickTopoDeletionParams()\n.where(new BrickTopoWhereInput()\n.id(\"BrickTopo-id\"));\r\n List resp = brickTopoApi.deleteBrickTopo(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/move-vm-to-recycle": { + "/upload-cloudtower-application-package": { "exampleValue": { - "where": { - "id": "Vm-id" - } + "file": "file-string" }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/move-vm-to-recycle \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.move_vm_to_recycle_bin({\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewMoveVMToRecycleBinParams()\r\n params.RequestBody = &models.VMOperateParams{\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.MoveVMToRecycleBin(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmOperateParams params = new VmOperateParams()\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.moveVmToRecycleBin(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/upload-cloudtower-application-package \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: multipart/form-data' \\\n\t-d '{\"file\":\"file-string\"}'", + "python": "from cloudtower import ApiClient, Configuration, CloudTowerApplicationApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n cloud_tower_application_api = CloudTowerApplicationApi(client)\r\n with open(\"file-path\", \"rb\") as file:\r\n resp = cloud_tower_application_api.upload_cloud_tower_application_package(\r\n file=file\r\n )\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"bytes\"\r\n \"fmt\"\r\n \"io\"\r\n\r\n \"github.com/go-openapi/runtime\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/cloud_tower_application\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n cloud_tower_application_api := client.CloudTowerApplication\r\n params := cloud_tower_application.NewUploadCloudTowerApplicationPackageParams()\r\n params.File = runtime.NamedReader(\"file\",io.NopCloser(bytes.NewReader([]byte(\"file-string\"))))\r\n resp, err := cloud_tower_application_api.UploadCloudTowerApplicationPackage(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.CloudTowerApplicationApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.nio.file.Files;\r\nimport java.nio.file.Path;\r\nimport java.util.ArrayList;\r\nimport java.util.List;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n CloudTowerApplicationApi cloudTowerApplicationApi = new CloudTowerApplicationApi(client);\r\n List resp = cloudTowerApplicationApi.uploadCloudTowerApplicationPackage(\r\n Files.readAllBytes(Path.of(\"file-string\")),\r\n \"name\",\r\n \"size\",\r\n \"size_unit\",\r\n \"upload_task_id\"\r\n );\r\n }\r\n}" }, - "/recover-vm-from-recycle": { + "/delete-cloudtower-application-package": { "exampleValue": { "where": { - "id": "Vm-id" + "id": "CloudTowerApplicationPackage-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/recover-vm-from-recycle \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.recover_vm_from_recycle_bin({\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewRecoverVMFromRecycleBinParams()\r\n params.RequestBody = &models.VMOperateParams{\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.RecoverVMFromRecycleBin(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmOperateParams params = new VmOperateParams()\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.recoverVmFromRecycleBin(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-cloudtower-application-package \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"CloudTowerApplicationPackage-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, CloudTowerApplicationApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n cloud_tower_application_api = CloudTowerApplicationApi(client)\r\n resp = cloud_tower_application_api.delete_cloud_tower_application_package({\"where\":{\"id\":\"CloudTowerApplicationPackage-id\"}})\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/cloud_tower_application\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n cloud_tower_application_api := client.CloudTowerApplication\r\n params := cloud_tower_application.NewDeleteCloudTowerApplicationPackageParams()\r\n params.RequestBody = &models.DeleteCloudTowerApplicationPackageParams{\nWhere: &models.CloudTowerApplicationPackageWhereInput{\nID: pointy.String(\"CloudTowerApplicationPackage-id\"),\n},\n}\r\n rawResp, err := cloud_tower_application_api.DeleteCloudTowerApplicationPackage(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.CloudTowerApplicationApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n CloudTowerApplicationApi cloudTowerApplicationApi = new CloudTowerApplicationApi(client);\r\n DeleteCloudTowerApplicationPackageParams params = new DeleteCloudTowerApplicationPackageParams()\n.where(new CloudTowerApplicationPackageWhereInput()\n.id(\"CloudTowerApplicationPackage-id\"));\r\n List resp = cloudTowerApplicationApi.deleteCloudTowerApplicationPackage(params);\r\n }\r\n}" }, - "/delete-vm": { + "/deploy-cloudtower-application": { "exampleValue": { - "where": { - "id": "Vm-id" - } + "name": "name-string", + "targetPackage": "targetPackage-string", + "vmSpec": {} }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.delete_vm({\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewDeleteVMParams()\r\n params.RequestBody = &models.VMDeleteParams{\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.DeleteVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmDeleteParams params = new VmDeleteParams()\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.deleteVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/deploy-cloudtower-application \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"name\":\"name-string\",\"targetPackage\":\"targetPackage-string\",\"vmSpec\":{}}'", + "python": "from cloudtower import ApiClient, Configuration, CloudTowerApplicationApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n cloud_tower_application_api = CloudTowerApplicationApi(client)\r\n resp = cloud_tower_application_api.deploy_cloud_tower_application({\"name\":\"name-string\",\"targetPackage\":\"targetPackage-string\",\"vmSpec\":{}})\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/cloud_tower_application\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n cloud_tower_application_api := client.CloudTowerApplication\r\n params := cloud_tower_application.NewDeployCloudTowerApplicationParams()\r\n params.RequestBody = &models.DeployCloudTowerApplicationParams{\nName: pointy.String(\"name-string\"),\nTargetPackage: pointy.String(\"targetPackage-string\"),\nVMSpec: &models.ApplicationVMSpecDefinition{\n},\n}\r\n rawResp, err := cloud_tower_application_api.DeployCloudTowerApplication(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.CloudTowerApplicationApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n CloudTowerApplicationApi cloudTowerApplicationApi = new CloudTowerApplicationApi(client);\r\n DeployCloudTowerApplicationParams params = new DeployCloudTowerApplicationParams()\n.name(\"name-string\")\n.targetPackage(\"targetPackage-string\")\n.vmSpec(new ApplicationVmSpecDefinition());\r\n CloudTowerApplication resp = cloudTowerApplicationApi.deployCloudTowerApplication(params);\r\n }\r\n}" }, - "/start-vm": { + "/upgrade-cloudtower-application": { "exampleValue": { + "data": { + "targetPackage": "targetPackage-string" + }, "where": { - "id": "Vm-id" + "id": "CloudTowerApplication-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/start-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.start_vm({\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewStartVMParams()\r\n params.RequestBody = &models.VMStartParams{\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.StartVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmStartParams params = new VmStartParams()\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.startVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/upgrade-cloudtower-application \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"targetPackage\":\"targetPackage-string\"},\"where\":{\"id\":\"CloudTowerApplication-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, CloudTowerApplicationApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n cloud_tower_application_api = CloudTowerApplicationApi(client)\r\n resp = cloud_tower_application_api.upgrade_cloud_tower_application({\"data\":{\"targetPackage\":\"targetPackage-string\"},\"where\":{\"id\":\"CloudTowerApplication-id\"}})\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/cloud_tower_application\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n cloud_tower_application_api := client.CloudTowerApplication\r\n params := cloud_tower_application.NewUpgradeCloudTowerApplicationParams()\r\n params.RequestBody = &models.UpgradeCloudTowerApplicationParams{\nData: &models.UpgradeCloudTowerApplicationParamsData{\nTargetPackage: pointy.String(\"targetPackage-string\"),\n},\nWhere: &models.CloudTowerApplicationWhereUniqueInput{\nID: pointy.String(\"CloudTowerApplication-id\"),\n},\n}\r\n rawResp, err := cloud_tower_application_api.UpgradeCloudTowerApplication(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.CloudTowerApplicationApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n CloudTowerApplicationApi cloudTowerApplicationApi = new CloudTowerApplicationApi(client);\r\n UpgradeCloudTowerApplicationParams params = new UpgradeCloudTowerApplicationParams()\n.data(new UpgradeCloudTowerApplicationParamsData()\n.targetPackage(\"targetPackage-string\"))\n.where(new CloudTowerApplicationWhereUniqueInput()\n.id(\"CloudTowerApplication-id\"));\r\n CloudTowerApplication resp = cloudTowerApplicationApi.upgradeCloudTowerApplication(params);\r\n }\r\n}" }, - "/restart-vm": { + "/uninstall-cloudtower-application": { "exampleValue": { "where": { - "id": "Vm-id" + "id": "CloudTowerApplication-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/restart-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.restart_vm({\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewRestartVMParams()\r\n params.RequestBody = &models.VMOperateParams{\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.RestartVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmOperateParams params = new VmOperateParams()\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.restartVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/uninstall-cloudtower-application \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"CloudTowerApplication-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, CloudTowerApplicationApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n cloud_tower_application_api = CloudTowerApplicationApi(client)\r\n resp = cloud_tower_application_api.uninstall_cloud_tower_application({\"where\":{\"id\":\"CloudTowerApplication-id\"}})\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/cloud_tower_application\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n cloud_tower_application_api := client.CloudTowerApplication\r\n params := cloud_tower_application.NewUninstallCloudTowerApplicationParams()\r\n params.RequestBody = &models.UninstallCloudTowerApplicationParams{\nWhere: &models.CloudTowerApplicationWhereInput{\nID: pointy.String(\"CloudTowerApplication-id\"),\n},\n}\r\n rawResp, err := cloud_tower_application_api.UninstallCloudTowerApplication(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.CloudTowerApplicationApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n CloudTowerApplicationApi cloudTowerApplicationApi = new CloudTowerApplicationApi(client);\r\n UninstallCloudTowerApplicationParams params = new UninstallCloudTowerApplicationParams()\n.where(new CloudTowerApplicationWhereInput()\n.id(\"CloudTowerApplication-id\"));\r\n List resp = cloudTowerApplicationApi.uninstallCloudTowerApplication(params);\r\n }\r\n}" }, - "/force-restart-vm": { - "exampleValue": { - "where": { - "id": "Vm-id" + "/connect-cluster": { + "exampleValue": [ + { + "password": "password-string", + "username": "username-string", + "ip": "ip-string" } - }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/force-restart-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.force_restart_vm({\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewForceRestartVMParams()\r\n params.RequestBody = &models.VMOperateParams{\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.ForceRestartVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmOperateParams params = new VmOperateParams()\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.forceRestartVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + ], + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/connect-cluster \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"password\":\"password-string\",\"username\":\"username-string\",\"ip\":\"ip-string\"}]'", + "python": "from cloudtower import ApiClient, Configuration, ClusterApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n cluster_api = ClusterApi(client)\r\n resp = cluster_api.connect_cluster([{\"password\":\"password-string\",\"username\":\"username-string\",\"ip\":\"ip-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/cluster\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n cluster_api := client.Cluster\r\n params := cluster.NewConnectClusterParams()\r\n params.RequestBody = []*models.ClusterCreationParams{\n{\nPassword: pointy.String(\"password-string\"),\nUsername: pointy.String(\"username-string\"),\nIP: pointy.String(\"ip-string\"),\n},\n}\r\n rawResp, err := cluster_api.ConnectCluster(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskCluster) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskCluster)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskCluster) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ClusterApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ClusterApi clusterApi = new ClusterApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new ClusterCreationParams()\n.password(\"password-string\")\n.username(\"username-string\")\n.ip(\"ip-string\"));\r\n List resp = clusterApi.connectCluster(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/shutdown-vm": { + "/update-cluster": { "exampleValue": { + "data": {}, "where": { - "id": "Vm-id" + "id": "Cluster-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/shutdown-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.shut_down_vm({\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewShutDownVMParams()\r\n params.RequestBody = &models.VMOperateParams{\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.ShutDownVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmOperateParams params = new VmOperateParams()\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.shutDownVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-cluster \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Cluster-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, ClusterApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n cluster_api = ClusterApi(client)\r\n resp = cluster_api.update_cluster({\"data\":{},\"where\":{\"id\":\"Cluster-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/cluster\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n cluster_api := client.Cluster\r\n params := cluster.NewUpdateClusterParams()\r\n params.RequestBody = &models.ClusterUpdationParams{\nData: &models.ClusterUpdationParamsData{\n},\nWhere: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\n}\r\n rawResp, err := cluster_api.UpdateCluster(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskCluster) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskCluster)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskCluster) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ClusterApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ClusterApi clusterApi = new ClusterApi(client);\r\n ClusterUpdationParams params = new ClusterUpdationParams()\n.data(new ClusterUpdationParamsData())\n.where(new ClusterWhereInput()\n.id(\"Cluster-id\"));\r\n List resp = clusterApi.updateCluster(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/poweroff-vm": { + "/update-cluster-license": { "exampleValue": { + "data": { + "license": "license-string" + }, "where": { - "id": "Vm-id" + "id": "Cluster-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/poweroff-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.poweroff_vm({\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewPoweroffVMParams()\r\n params.RequestBody = &models.VMOperateParams{\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.PoweroffVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmOperateParams params = new VmOperateParams()\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.poweroffVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-cluster-license \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"license\":\"license-string\"},\"where\":{\"id\":\"Cluster-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, ClusterApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n cluster_api = ClusterApi(client)\r\n resp = cluster_api.update_cluster_license({\"data\":{\"license\":\"license-string\"},\"where\":{\"id\":\"Cluster-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/cluster\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n cluster_api := client.Cluster\r\n params := cluster.NewUpdateClusterLicenseParams()\r\n params.RequestBody = &models.ClusterLicenseUpdationParams{\nData: &models.ClusterLicenseUpdationParamsData{\nLicense: pointy.String(\"license-string\"),\n},\nWhere: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\n}\r\n rawResp, err := cluster_api.UpdateClusterLicense(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskCluster) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskCluster)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskCluster) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ClusterApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ClusterApi clusterApi = new ClusterApi(client);\r\n ClusterLicenseUpdationParams params = new ClusterLicenseUpdationParams()\n.data(new ClusterLicenseUpdationParamsData()\n.license(\"license-string\"))\n.where(new ClusterWhereInput()\n.id(\"Cluster-id\"));\r\n List resp = clusterApi.updateClusterLicense(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/suspend-vm": { + "/update-cluster-network-setting": { "exampleValue": { + "data": {}, "where": { - "id": "Vm-id" + "id": "Cluster-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/suspend-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.suspend_vm({\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewSuspendVMParams()\r\n params.RequestBody = &models.VMOperateParams{\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.SuspendVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmOperateParams params = new VmOperateParams()\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.suspendVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-cluster-network-setting \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Cluster-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, ClusterApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n cluster_api = ClusterApi(client)\r\n resp = cluster_api.update_cluster_network_setting({\"data\":{},\"where\":{\"id\":\"Cluster-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/cluster\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n cluster_api := client.Cluster\r\n params := cluster.NewUpdateClusterNetworkSettingParams()\r\n params.RequestBody = &models.ClusterNetworkSettingUpdationParams{\nData: &models.ClusterNetworkSettingUpdationParamsData{\n},\nWhere: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\n}\r\n rawResp, err := cluster_api.UpdateClusterNetworkSetting(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskCluster) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskCluster)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskCluster) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ClusterApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ClusterApi clusterApi = new ClusterApi(client);\r\n ClusterNetworkSettingUpdationParams params = new ClusterNetworkSettingUpdationParams()\n.data(new ClusterNetworkSettingUpdationParamsData())\n.where(new ClusterWhereInput()\n.id(\"Cluster-id\"));\r\n List resp = clusterApi.updateClusterNetworkSetting(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/resume-vm": { + "/update-cluster-virtualization-setting": { "exampleValue": { + "data": {}, "where": { - "id": "Vm-id" + "id": "Cluster-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/resume-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.resume_vm({\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewResumeVMParams()\r\n params.RequestBody = &models.VMOperateParams{\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.ResumeVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmOperateParams params = new VmOperateParams()\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.resumeVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-cluster-virtualization-setting \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Cluster-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, ClusterApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n cluster_api = ClusterApi(client)\r\n resp = cluster_api.update_cluster_virtualization_setting({\"data\":{},\"where\":{\"id\":\"Cluster-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/cluster\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n cluster_api := client.Cluster\r\n params := cluster.NewUpdateClusterVirtualizationSettingParams()\r\n params.RequestBody = &models.ClusterVirtualizationUpdationParams{\nData: &models.ClusterVirtualizationUpdationParamsData{\n},\nWhere: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\n}\r\n rawResp, err := cluster_api.UpdateClusterVirtualizationSetting(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskCluster) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskCluster)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskCluster) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ClusterApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ClusterApi clusterApi = new ClusterApi(client);\r\n ClusterVirtualizationUpdationParams params = new ClusterVirtualizationUpdationParams()\n.data(new ClusterVirtualizationUpdationParamsData())\n.where(new ClusterWhereInput()\n.id(\"Cluster-id\"));\r\n List resp = clusterApi.updateClusterVirtualizationSetting(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/add-vm-disk": { + "/update-cluster-ha-setting": { "exampleValue": { - "data": { - "vm_disks": {} - }, + "ha": true, "where": { - "id": "Vm-id" + "id": "Cluster-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/add-vm-disk \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"vm_disks\":{}},\"where\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.add_vm_disk({\"data\":{\"vm_disks\":{}},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewAddVMDiskParams()\r\n params.RequestBody = &models.VMAddDiskParams{\nData: &models.VMAddDiskParamsData{\nVMDisks: &models.VMAddDiskParamsDataVmdisks{\n},\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.AddVMDisk(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmAddDiskParams params = new VmAddDiskParams()\n.data(new VmAddDiskParamsData()\n.vmDisks(new VmAddDiskParamsDataVmdisks()))\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.addVmDisk(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-cluster-ha-setting \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"ha\":true,\"where\":{\"id\":\"Cluster-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, ClusterApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n cluster_api = ClusterApi(client)\r\n resp = cluster_api.update_cluster_ha_setting({\"ha\":True,\"where\":{\"id\":\"Cluster-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/cluster\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n cluster_api := client.Cluster\r\n params := cluster.NewUpdateClusterHaSettingParams()\r\n params.RequestBody = &models.ClusterHaUpdationParams{\nHa: pointy.Bool(true),\nWhere: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\n}\r\n rawResp, err := cluster_api.UpdateClusterHaSetting(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskClusterSettings) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskClusterSettings)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskClusterSettings) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ClusterApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ClusterApi clusterApi = new ClusterApi(client);\r\n ClusterHaUpdationParams params = new ClusterHaUpdationParams()\n.ha(true)\n.where(new ClusterWhereInput()\n.id(\"Cluster-id\"));\r\n List resp = clusterApi.updateClusterHaSetting(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-vm-disk": { + "/update-cluster-enable-iscsi-setting": { "exampleValue": { - "data": { - "vm_disk_id": "ck74rk21wg5lz0786opdnzz5m" - }, + "enable_iscsi": true, "where": { - "id": "Vm-id" + "id": "Cluster-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-vm-disk \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"vm_disk_id\":\"ck74rk21wg5lz0786opdnzz5m\"},\"where\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.update_vm_disk({\"data\":{\"vm_disk_id\":\"ck74rk21wg5lz0786opdnzz5m\"},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewUpdateVMDiskParams()\r\n params.RequestBody = &models.VMUpdateDiskParams{\nData: &models.VMUpdateDiskParamsData{\nVMDiskID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.UpdateVMDisk(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmUpdateDiskParams params = new VmUpdateDiskParams()\n.data(new VmUpdateDiskParamsData()\n.vmDiskId(\"ck74rk21wg5lz0786opdnzz5m\"))\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.updateVmDisk(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-cluster-enable-iscsi-setting \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"enable_iscsi\":true,\"where\":{\"id\":\"Cluster-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, ClusterApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n cluster_api = ClusterApi(client)\r\n resp = cluster_api.update_cluster_enable_iscsi_setting({\"enable_iscsi\":True,\"where\":{\"id\":\"Cluster-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/cluster\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n cluster_api := client.Cluster\r\n params := cluster.NewUpdateClusterEnableIscsiSettingParams()\r\n params.RequestBody = &models.ClusterEnableIscsiUpdationParams{\nEnableIscsi: pointy.Bool(true),\nWhere: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\n}\r\n rawResp, err := cluster_api.UpdateClusterEnableIscsiSetting(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskClusterSettings) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskClusterSettings)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskClusterSettings) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ClusterApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ClusterApi clusterApi = new ClusterApi(client);\r\n ClusterEnableIscsiUpdationParams params = new ClusterEnableIscsiUpdationParams()\n.enableIscsi(true)\n.where(new ClusterWhereInput()\n.id(\"Cluster-id\"));\r\n List resp = clusterApi.updateClusterEnableIscsiSetting(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/expand-vm-disk": { + "/delete-cluster": { "exampleValue": { - "size": 1, "where": { - "id": "VmDisk-id" + "id": "Cluster-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/expand-vm-disk \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"size\":1,\"where\":{\"id\":\"VmDisk-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.expand_vm_disk({\"size\":1,\"where\":{\"id\":\"VmDisk-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewExpandVMDiskParams()\r\n params.RequestBody = &models.VMExpandVMDiskParams{\nSize: pointy.Int64(1),\nWhere: &models.VMDiskWhereInput{\nID: pointy.String(\"VmDisk-id\"),\n},\n}\r\n rawResp, err := vm_api.ExpandVMDisk(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmExpandVmDiskParams params = new VmExpandVmDiskParams()\n.size(1L)\n.where(new VmDiskWhereInput()\n.id(\"VmDisk-id\"));\r\n List resp = vmApi.expandVmDisk(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-cluster \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Cluster-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, ClusterApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n cluster_api = ClusterApi(client)\r\n resp = cluster_api.delete_cluster({\"where\":{\"id\":\"Cluster-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/cluster\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n cluster_api := client.Cluster\r\n params := cluster.NewDeleteClusterParams()\r\n params.RequestBody = &models.ClusterDeletionParams{\nWhere: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\n}\r\n rawResp, err := cluster_api.DeleteCluster(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteCluster) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteCluster)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteCluster) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ClusterApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ClusterApi clusterApi = new ClusterApi(client);\r\n ClusterDeletionParams params = new ClusterDeletionParams()\n.where(new ClusterWhereInput()\n.id(\"Cluster-id\"));\r\n List resp = clusterApi.deleteCluster(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/remove-vm-disk": { + "/get-meta-leader": { "exampleValue": { - "data": { - "disk_ids": [ - "-string" - ] - }, "where": { - "id": "Vm-id" + "id": "Cluster-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/remove-vm-disk \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"disk_ids\":[\"-string\"]},\"where\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.remove_vm_disk({\"data\":{\"disk_ids\":[\"-string\"]},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewRemoveVMDiskParams()\r\n params.RequestBody = &models.VMRemoveDiskParams{\nData: &models.VMRemoveDiskParamsData{\nDiskIds: []string{\"-string\",\n},\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.RemoveVMDisk(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmRemoveDiskParams params = new VmRemoveDiskParams()\n.data(new VmRemoveDiskParamsData()\n.addDiskIdsItem(\"-string\"))\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.removeVmDisk(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-meta-leader \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Cluster-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, ClusterApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n cluster_api = ClusterApi(client)\r\n resp = cluster_api.get_meta_leader({\"where\":{\"id\":\"Cluster-id\"}})\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/cluster\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n cluster_api := client.Cluster\r\n params := cluster.NewGetMetaLeaderParams()\r\n params.RequestBody = &models.GetMetaLeaderRequestBody{\nWhere: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\n}\r\n rawResp, err := cluster_api.GetMetaLeader(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.ClusterApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ClusterApi clusterApi = new ClusterApi(client);\r\n GetMetaLeaderRequestBody params = new GetMetaLeaderRequestBody()\n.where(new ClusterWhereInput()\n.id(\"Cluster-id\"));\r\n List resp = clusterApi.getMetaLeader(params);\r\n }\r\n}" }, - "/add-vm-cd-rom": { + "/create-consistency-snapshot-group": { + "exampleValue": [ + { + "consistency_group_id": "ck74rk21wg5lz0786opdnzz5m", + "name": "name-string" + } + ], + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-consistency-snapshot-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"consistency_group_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", + "python": "from cloudtower import ApiClient, Configuration, ConsistencyGroupSnapshotApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n consistency_group_snapshot_api = ConsistencyGroupSnapshotApi(client)\r\n resp = consistency_group_snapshot_api.create_consistency_group_snapshot([{\"consistency_group_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/consistency_group_snapshot\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n consistency_group_snapshot_api := client.ConsistencyGroupSnapshot\r\n params := consistency_group_snapshot.NewCreateConsistencyGroupSnapshotParams()\r\n params.RequestBody = []*models.ConsistencyGroupSnapshotCreationParams{\n{\nConsistencyGroupID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := consistency_group_snapshot_api.CreateConsistencyGroupSnapshot(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskConsistencyGroupSnapshot) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskConsistencyGroupSnapshot)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskConsistencyGroupSnapshot) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ConsistencyGroupSnapshotApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ConsistencyGroupSnapshotApi consistencyGroupSnapshotApi = new ConsistencyGroupSnapshotApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new ConsistencyGroupSnapshotCreationParams()\n.consistencyGroupId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = consistencyGroupSnapshotApi.createConsistencyGroupSnapshot(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "/rollback-consistency-snapshot-group": { "exampleValue": { - "data": { - "vm_cd_roms": [ - { - "boot": 1 - } - ] - }, "where": { - "id": "Vm-id" + "id": "ConsistencyGroupSnapshot-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/add-vm-cd-rom \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"vm_cd_roms\":[{\"boot\":1}]},\"where\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.add_vm_cd_rom({\"data\":{\"vm_cd_roms\":[{\"boot\":1}]},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewAddVMCdRomParams()\r\n params.RequestBody = &models.VMAddCdRomParams{\nData: &models.VMAddCdRomParamsData{\nVMCdRoms: []*models.VMCdRomParams{\n{\nBoot: pointy.Int32(1),\n},\n},\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.AddVMCdRom(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmAddCdRomParams params = new VmAddCdRomParams()\n.data(new VmAddCdRomParamsData()\n.addVmCdRomsItem(new VmCdRomParams()\n.boot(1)))\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.addVmCdRom(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/rollback-consistency-snapshot-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"ConsistencyGroupSnapshot-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, ConsistencyGroupSnapshotApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n consistency_group_snapshot_api = ConsistencyGroupSnapshotApi(client)\r\n resp = consistency_group_snapshot_api.update_consistency_group_snapshot({\"where\":{\"id\":\"ConsistencyGroupSnapshot-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/consistency_group_snapshot\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n consistency_group_snapshot_api := client.ConsistencyGroupSnapshot\r\n params := consistency_group_snapshot.NewUpdateConsistencyGroupSnapshotParams()\r\n params.RequestBody = &models.ConsistencyGroupSnapshotUpdationParams{\nWhere: &models.ConsistencyGroupSnapshotWhereInput{\nID: pointy.String(\"ConsistencyGroupSnapshot-id\"),\n},\n}\r\n rawResp, err := consistency_group_snapshot_api.UpdateConsistencyGroupSnapshot(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskConsistencyGroupSnapshot) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskConsistencyGroupSnapshot)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskConsistencyGroupSnapshot) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ConsistencyGroupSnapshotApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ConsistencyGroupSnapshotApi consistencyGroupSnapshotApi = new ConsistencyGroupSnapshotApi(client);\r\n ConsistencyGroupSnapshotUpdationParams params = new ConsistencyGroupSnapshotUpdationParams()\n.where(new ConsistencyGroupSnapshotWhereInput()\n.id(\"ConsistencyGroupSnapshot-id\"));\r\n List resp = consistencyGroupSnapshotApi.updateConsistencyGroupSnapshot(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/remove-vm-cd-rom": { + "/delete-consistency-snapshot-group": { "exampleValue": { "data": { - "cd_rom_ids": [ - "-string" - ] + "remain_volume_snapshot": true }, "where": { - "id": "Vm-id" + "id": "ConsistencyGroupSnapshot-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/remove-vm-cd-rom \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"cd_rom_ids\":[\"-string\"]},\"where\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.remove_vm_cd_rom({\"data\":{\"cd_rom_ids\":[\"-string\"]},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewRemoveVMCdRomParams()\r\n params.RequestBody = &models.VMRemoveCdRomParams{\nData: &models.VMRemoveCdRomParamsData{\nCdRomIds: []string{\"-string\",\n},\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.RemoveVMCdRom(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmRemoveCdRomParams params = new VmRemoveCdRomParams()\n.data(new VmRemoveCdRomParamsData()\n.addCdRomIdsItem(\"-string\"))\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.removeVmCdRom(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-consistency-snapshot-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"remain_volume_snapshot\":true},\"where\":{\"id\":\"ConsistencyGroupSnapshot-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, ConsistencyGroupSnapshotApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n consistency_group_snapshot_api = ConsistencyGroupSnapshotApi(client)\r\n resp = consistency_group_snapshot_api.delete_consistency_group_snapshot({\"data\":{\"remain_volume_snapshot\":True},\"where\":{\"id\":\"ConsistencyGroupSnapshot-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/consistency_group_snapshot\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n consistency_group_snapshot_api := client.ConsistencyGroupSnapshot\r\n params := consistency_group_snapshot.NewDeleteConsistencyGroupSnapshotParams()\r\n params.RequestBody = &models.ConsistencyGroupSnapshotDeletionParams{\nData: &models.ConsistencyGroupSnapshotDeletionParamsData{\nRemainVolumeSnapshot: pointy.Bool(true),\n},\nWhere: &models.ConsistencyGroupSnapshotWhereInput{\nID: pointy.String(\"ConsistencyGroupSnapshot-id\"),\n},\n}\r\n rawResp, err := consistency_group_snapshot_api.DeleteConsistencyGroupSnapshot(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteConsistencyGroupSnapshot) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteConsistencyGroupSnapshot)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteConsistencyGroupSnapshot) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ConsistencyGroupSnapshotApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ConsistencyGroupSnapshotApi consistencyGroupSnapshotApi = new ConsistencyGroupSnapshotApi(client);\r\n ConsistencyGroupSnapshotDeletionParams params = new ConsistencyGroupSnapshotDeletionParams()\n.data(new ConsistencyGroupSnapshotDeletionParamsData()\n.remainVolumeSnapshot(true))\n.where(new ConsistencyGroupSnapshotWhereInput()\n.id(\"ConsistencyGroupSnapshot-id\"));\r\n List resp = consistencyGroupSnapshotApi.deleteConsistencyGroupSnapshot(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/eject-iso-from-vm-cd-rom": { - "exampleValue": { - "where": { - "id": "VmDisk-id" + "/create-consistency-group": { + "exampleValue": [ + { + "namespaces_ids": [ + "-string" + ], + "iscsi_luns_ids": [ + "-string" + ], + "cluster_id": "ck74rk21wg5lz0786opdnzz5m", + "name": "name-string" } - }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/eject-iso-from-vm-cd-rom \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"VmDisk-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.eject_iso_from_vm_cd_rom({\"where\":{\"id\":\"VmDisk-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewEjectIsoFromVMCdRomParams()\r\n params.RequestBody = &models.VMEjectCdRomParams{\nWhere: &models.VMDiskWhereInput{\nID: pointy.String(\"VmDisk-id\"),\n},\n}\r\n rawResp, err := vm_api.EjectIsoFromVMCdRom(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmEjectCdRomParams params = new VmEjectCdRomParams()\n.where(new VmDiskWhereInput()\n.id(\"VmDisk-id\"));\r\n List resp = vmApi.ejectIsoFromVmCdRom(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + ], + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-consistency-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"namespaces_ids\":[\"-string\"],\"iscsi_luns_ids\":[\"-string\"],\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", + "python": "from cloudtower import ApiClient, Configuration, ConsistencyGroupApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n consistency_group_api = ConsistencyGroupApi(client)\r\n resp = consistency_group_api.create_consistency_group([{\"namespaces_ids\":[\"-string\"],\"iscsi_luns_ids\":[\"-string\"],\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/consistency_group\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n consistency_group_api := client.ConsistencyGroup\r\n params := consistency_group.NewCreateConsistencyGroupParams()\r\n params.RequestBody = []*models.ConsistencyGroupCreationParams{\n{\nNamespacesIds: []string{\"-string\",\n},\nIscsiLunsIds: []string{\"-string\",\n},\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := consistency_group_api.CreateConsistencyGroup(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskConsistencyGroup) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskConsistencyGroup)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskConsistencyGroup) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ConsistencyGroupApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ConsistencyGroupApi consistencyGroupApi = new ConsistencyGroupApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new ConsistencyGroupCreationParams()\n.addNamespacesIdsItem(\"-string\")\n.addIscsiLunsIdsItem(\"-string\")\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = consistencyGroupApi.createConsistencyGroup(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/toggle-vm-cd-rom-disable": { + "/update-consistency-group": { "exampleValue": { - "disabled": true, + "data": {}, "where": { - "id": "VmDisk-id" + "id": "ConsistencyGroup-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/toggle-vm-cd-rom-disable \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"disabled\":true,\"where\":{\"id\":\"VmDisk-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.toggle_vm_cd_rom_disable({\"disabled\":True,\"where\":{\"id\":\"VmDisk-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewToggleVMCdRomDisableParams()\r\n params.RequestBody = &models.VMToggleCdRomDisableParams{\nDisabled: pointy.Bool(true),\nWhere: &models.VMDiskWhereInput{\nID: pointy.String(\"VmDisk-id\"),\n},\n}\r\n rawResp, err := vm_api.ToggleVMCdRomDisable(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmToggleCdRomDisableParams params = new VmToggleCdRomDisableParams()\n.disabled(true)\n.where(new VmDiskWhereInput()\n.id(\"VmDisk-id\"));\r\n List resp = vmApi.toggleVmCdRomDisable(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-consistency-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"ConsistencyGroup-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, ConsistencyGroupApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n consistency_group_api = ConsistencyGroupApi(client)\r\n resp = consistency_group_api.update_consistency_group({\"data\":{},\"where\":{\"id\":\"ConsistencyGroup-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/consistency_group\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n consistency_group_api := client.ConsistencyGroup\r\n params := consistency_group.NewUpdateConsistencyGroupParams()\r\n params.RequestBody = &models.ConsistencyGroupUpdationParams{\nData: &models.ConsistencyGroupUpdationParamsData{\n},\nWhere: &models.ConsistencyGroupWhereInput{\nID: pointy.String(\"ConsistencyGroup-id\"),\n},\n}\r\n rawResp, err := consistency_group_api.UpdateConsistencyGroup(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskConsistencyGroup) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskConsistencyGroup)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskConsistencyGroup) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ConsistencyGroupApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ConsistencyGroupApi consistencyGroupApi = new ConsistencyGroupApi(client);\r\n ConsistencyGroupUpdationParams params = new ConsistencyGroupUpdationParams()\n.data(new ConsistencyGroupUpdationParamsData())\n.where(new ConsistencyGroupWhereInput()\n.id(\"ConsistencyGroup-id\"));\r\n List resp = consistencyGroupApi.updateConsistencyGroup(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/add-vm-nic": { + "/delete-consistency-group": { "exampleValue": { - "data": { - "vm_nics": [ - {} - ] - }, + "data": {}, "where": { - "id": "Vm-id" + "id": "ConsistencyGroup-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/add-vm-nic \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"vm_nics\":[{}]},\"where\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.add_vm_nic({\"data\":{\"vm_nics\":[{}]},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewAddVMNicParams()\r\n params.RequestBody = &models.VMAddNicParams{\nData: &models.VMAddNicParamsData{\nVMNics: []*models.VMNicParams{\n{\n},\n},\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.AddVMNic(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmAddNicParams params = new VmAddNicParams()\n.data(new VmAddNicParamsData()\n.addVmNicsItem(new VmNicParams()))\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.addVmNic(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-consistency-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"ConsistencyGroup-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, ConsistencyGroupApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n consistency_group_api = ConsistencyGroupApi(client)\r\n resp = consistency_group_api.delete_consistency_group({\"data\":{},\"where\":{\"id\":\"ConsistencyGroup-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/consistency_group\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n consistency_group_api := client.ConsistencyGroup\r\n params := consistency_group.NewDeleteConsistencyGroupParams()\r\n params.RequestBody = &models.ConsistencyGroupDeletionParams{\nData: &models.ConsistencyGroupDeletionParamsData{\n},\nWhere: &models.ConsistencyGroupWhereInput{\nID: pointy.String(\"ConsistencyGroup-id\"),\n},\n}\r\n rawResp, err := consistency_group_api.DeleteConsistencyGroup(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteConsistencyGroup) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteConsistencyGroup)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteConsistencyGroup) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ConsistencyGroupApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ConsistencyGroupApi consistencyGroupApi = new ConsistencyGroupApi(client);\r\n ConsistencyGroupDeletionParams params = new ConsistencyGroupDeletionParams()\n.data(new ConsistencyGroupDeletionParamsData())\n.where(new ConsistencyGroupWhereInput()\n.id(\"ConsistencyGroup-id\"));\r\n List resp = consistencyGroupApi.deleteConsistencyGroup(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-vm-nic": { + "/upload-content-library-image": { "exampleValue": { - "data": { - "nic_index": 1 - }, - "where": { - "id": "Vm-id" - } + "file": "file-string", + "clusters": "clusters-string" }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-vm-nic \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"nic_index\":1},\"where\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.update_vm_nic({\"data\":{\"nic_index\":1},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewUpdateVMNicParams()\r\n params.RequestBody = &models.VMUpdateNicParams{\nData: &models.VMUpdateNicParamsData{\nNicIndex: pointy.Int32(1),\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.UpdateVMNic(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmUpdateNicParams params = new VmUpdateNicParams()\n.data(new VmUpdateNicParamsData()\n.nicIndex(1))\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.updateVmNic(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/upload-content-library-image \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: multipart/form-data' \\\n\t-d '{\"file\":\"file-string\",\"clusters\":\"clusters-string\"}'", + "python": "from cloudtower import ApiClient, Configuration, ContentLibraryImageApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n content_library_image_api = ContentLibraryImageApi(client)\r\n with open(\"file-path\", \"rb\") as file:\r\n resp = content_library_image_api.create_content_library_image(\r\n file=file,\r\n clusters=\"clusters-string\"\r\n )\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"bytes\"\r\n \"fmt\"\r\n \"io\"\r\n\r\n \"github.com/go-openapi/runtime\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/content_library_image\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n content_library_image_api := client.ContentLibraryImage\r\n params := content_library_image.NewCreateContentLibraryImageParams()\r\n params.File = runtime.NamedReader(\"file\",io.NopCloser(bytes.NewReader([]byte(\"file-string\"))))\r\n params.Clusters = \"clusters-string\"\r\n resp, err := content_library_image_api.CreateContentLibraryImage(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.ContentLibraryImageApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.nio.file.Files;\r\nimport java.nio.file.Path;\r\nimport java.util.ArrayList;\r\nimport java.util.List;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ContentLibraryImageApi contentLibraryImageApi = new ContentLibraryImageApi(client);\r\n List resp = contentLibraryImageApi.createContentLibraryImage(\r\n Files.readAllBytes(Path.of(\"file-string\")),\r\n \"clusters-string\",\r\n \"name\",\r\n \"size\",\r\n \"size_unit\",\r\n \"description\",\r\n \"upload_task_id\"\r\n );\r\n }\r\n}" }, - "/update-vm-nic-basic-info": { + "/update-content-library-image": { "exampleValue": { "data": {}, "where": { - "id": "VmNic-id" + "id": "ContentLibraryImage-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-vm-nic-basic-info \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"VmNic-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.update_vm_nic_basic_info({\"data\":{},\"where\":{\"id\":\"VmNic-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewUpdateVMNicBasicInfoParams()\r\n params.RequestBody = &models.VMUpdateNicBasicInfoParams{\nData: &models.VMUpdateNicBasicInfoParamsData{\n},\nWhere: &models.VMNicWhereInput{\nID: pointy.String(\"VmNic-id\"),\n},\n}\r\n rawResp, err := vm_api.UpdateVMNicBasicInfo(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmUpdateNicBasicInfoParams params = new VmUpdateNicBasicInfoParams()\n.data(new VmUpdateNicBasicInfoParamsData())\n.where(new VmNicWhereInput()\n.id(\"VmNic-id\"));\r\n List resp = vmApi.updateVmNicBasicInfo(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-content-library-image \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"ContentLibraryImage-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, ContentLibraryImageApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n content_library_image_api = ContentLibraryImageApi(client)\r\n resp = content_library_image_api.update_content_library_image({\"data\":{},\"where\":{\"id\":\"ContentLibraryImage-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/content_library_image\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n content_library_image_api := client.ContentLibraryImage\r\n params := content_library_image.NewUpdateContentLibraryImageParams()\r\n params.RequestBody = &models.ContentLibraryImageUpdationParams{\nData: &models.ContentLibraryImageUpdationParamsData{\n},\nWhere: &models.ContentLibraryImageWhereInput{\nID: pointy.String(\"ContentLibraryImage-id\"),\n},\n}\r\n rawResp, err := content_library_image_api.UpdateContentLibraryImage(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskContentLibraryImage) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskContentLibraryImage)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskContentLibraryImage) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ContentLibraryImageApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ContentLibraryImageApi contentLibraryImageApi = new ContentLibraryImageApi(client);\r\n ContentLibraryImageUpdationParams params = new ContentLibraryImageUpdationParams()\n.data(new ContentLibraryImageUpdationParamsData())\n.where(new ContentLibraryImageWhereInput()\n.id(\"ContentLibraryImage-id\"));\r\n List resp = contentLibraryImageApi.updateContentLibraryImage(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-vm-nic-advance-info": { + "/distribute-content-library-image-clusters": { "exampleValue": { - "data": {}, + "data": { + "clusters": { + "id": "Cluster-id" + } + }, "where": { - "id": "VmNic-id" + "id": "ContentLibraryImage-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-vm-nic-advance-info \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"VmNic-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.update_vm_nic_advance_info({\"data\":{},\"where\":{\"id\":\"VmNic-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewUpdateVMNicAdvanceInfoParams()\r\n params.RequestBody = &models.VMUpdateNicAdvanceInfoParams{\nData: &models.VMUpdateNicAdvanceInfoParamsData{\n},\nWhere: &models.VMNicWhereInput{\nID: pointy.String(\"VmNic-id\"),\n},\n}\r\n rawResp, err := vm_api.UpdateVMNicAdvanceInfo(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmUpdateNicAdvanceInfoParams params = new VmUpdateNicAdvanceInfoParams()\n.data(new VmUpdateNicAdvanceInfoParamsData())\n.where(new VmNicWhereInput()\n.id(\"VmNic-id\"));\r\n List resp = vmApi.updateVmNicAdvanceInfo(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/distribute-content-library-image-clusters \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"clusters\":{\"id\":\"Cluster-id\"}},\"where\":{\"id\":\"ContentLibraryImage-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, ContentLibraryImageApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n content_library_image_api = ContentLibraryImageApi(client)\r\n resp = content_library_image_api.distribute_content_library_image_clusters({\"data\":{\"clusters\":{\"id\":\"Cluster-id\"}},\"where\":{\"id\":\"ContentLibraryImage-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/content_library_image\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n content_library_image_api := client.ContentLibraryImage\r\n params := content_library_image.NewDistributeContentLibraryImageClustersParams()\r\n params.RequestBody = &models.ContentLibraryImageUpdationClusterParams{\nData: &models.ContentLibraryImageUpdationClusterParamsData{\nClusters: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\n},\nWhere: &models.ContentLibraryImageWhereInput{\nID: pointy.String(\"ContentLibraryImage-id\"),\n},\n}\r\n rawResp, err := content_library_image_api.DistributeContentLibraryImageClusters(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskContentLibraryImage) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskContentLibraryImage)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskContentLibraryImage) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ContentLibraryImageApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ContentLibraryImageApi contentLibraryImageApi = new ContentLibraryImageApi(client);\r\n ContentLibraryImageUpdationClusterParams params = new ContentLibraryImageUpdationClusterParams()\n.data(new ContentLibraryImageUpdationClusterParamsData()\n.clusters(new ClusterWhereInput()\n.id(\"Cluster-id\")))\n.where(new ContentLibraryImageWhereInput()\n.id(\"ContentLibraryImage-id\"));\r\n List resp = contentLibraryImageApi.distributeContentLibraryImageClusters(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-vm-nic-qos-option": { + "/remove-content-library-image-clusters": { "exampleValue": { - "data": {}, + "data": { + "clusters": { + "id": "Cluster-id" + } + }, "where": { - "id": "VmNic-id" + "id": "ContentLibraryImage-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-vm-nic-qos-option \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"VmNic-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.update_vm_nic_qos_option({\"data\":{},\"where\":{\"id\":\"VmNic-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewUpdateVMNicQosOptionParams()\r\n params.RequestBody = &models.VMUpdateNicQosOptionsParams{\nData: &models.VMUpdateNicQosOptionsParamsData{\n},\nWhere: &models.VMNicWhereInput{\nID: pointy.String(\"VmNic-id\"),\n},\n}\r\n rawResp, err := vm_api.UpdateVMNicQosOption(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmUpdateNicQosOptionsParams params = new VmUpdateNicQosOptionsParams()\n.data(new VmUpdateNicQosOptionsParamsData())\n.where(new VmNicWhereInput()\n.id(\"VmNic-id\"));\r\n List resp = vmApi.updateVmNicQosOption(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/remove-content-library-image-clusters \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"clusters\":{\"id\":\"Cluster-id\"}},\"where\":{\"id\":\"ContentLibraryImage-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, ContentLibraryImageApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n content_library_image_api = ContentLibraryImageApi(client)\r\n resp = content_library_image_api.remove_content_library_image_clusters({\"data\":{\"clusters\":{\"id\":\"Cluster-id\"}},\"where\":{\"id\":\"ContentLibraryImage-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/content_library_image\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n content_library_image_api := client.ContentLibraryImage\r\n params := content_library_image.NewRemoveContentLibraryImageClustersParams()\r\n params.RequestBody = &models.ContentLibraryImageUpdationClusterParams{\nData: &models.ContentLibraryImageUpdationClusterParamsData{\nClusters: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\n},\nWhere: &models.ContentLibraryImageWhereInput{\nID: pointy.String(\"ContentLibraryImage-id\"),\n},\n}\r\n rawResp, err := content_library_image_api.RemoveContentLibraryImageClusters(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskContentLibraryImage) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskContentLibraryImage)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskContentLibraryImage) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ContentLibraryImageApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ContentLibraryImageApi contentLibraryImageApi = new ContentLibraryImageApi(client);\r\n ContentLibraryImageUpdationClusterParams params = new ContentLibraryImageUpdationClusterParams()\n.data(new ContentLibraryImageUpdationClusterParamsData()\n.clusters(new ClusterWhereInput()\n.id(\"Cluster-id\")))\n.where(new ContentLibraryImageWhereInput()\n.id(\"ContentLibraryImage-id\"));\r\n List resp = contentLibraryImageApi.removeContentLibraryImageClusters(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/add-vm-pci-nic": { + "/delete-content-library-image": { "exampleValue": { - "data": {}, "where": { - "id": "Vm-id" + "id": "ContentLibraryImage-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/add-vm-pci-nic \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.add_vm_pci_nic({\"data\":{},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewAddVMPciNicParams()\r\n params.RequestBody = &models.VMOperatePciNicParams{\nData: &models.VMOperatePciNicParamsData{\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.AddVMPciNic(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmOperatePciNicParams params = new VmOperatePciNicParams()\n.data(new VmOperatePciNicParamsData())\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.addVmPciNic(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-content-library-image \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"ContentLibraryImage-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, ContentLibraryImageApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n content_library_image_api = ContentLibraryImageApi(client)\r\n resp = content_library_image_api.delete_content_library_image({\"where\":{\"id\":\"ContentLibraryImage-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/content_library_image\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n content_library_image_api := client.ContentLibraryImage\r\n params := content_library_image.NewDeleteContentLibraryImageParams()\r\n params.RequestBody = &models.ContentLibraryImageDeletionParams{\nWhere: &models.ContentLibraryImageWhereInput{\nID: pointy.String(\"ContentLibraryImage-id\"),\n},\n}\r\n rawResp, err := content_library_image_api.DeleteContentLibraryImage(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteContentLibraryImage) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteContentLibraryImage)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteContentLibraryImage) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ContentLibraryImageApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ContentLibraryImageApi contentLibraryImageApi = new ContentLibraryImageApi(client);\r\n ContentLibraryImageDeletionParams params = new ContentLibraryImageDeletionParams()\n.where(new ContentLibraryImageWhereInput()\n.id(\"ContentLibraryImage-id\"));\r\n List resp = contentLibraryImageApi.deleteContentLibraryImage(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/remove-vm-pci-nic": { + "/import-content-library-image": { "exampleValue": { - "data": {}, - "where": { - "id": "Vm-id" + "data": { + "url": "url-string", + "name": "name-string", + "cluster": { + "id": "Cluster-id" + } } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/remove-vm-pci-nic \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.remove_vm_pci_nic({\"data\":{},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewRemoveVMPciNicParams()\r\n params.RequestBody = &models.VMOperatePciNicParams{\nData: &models.VMOperatePciNicParamsData{\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.RemoveVMPciNic(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmOperatePciNicParams params = new VmOperatePciNicParams()\n.data(new VmOperatePciNicParamsData())\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.removeVmPciNic(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/import-content-library-image \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"url\":\"url-string\",\"name\":\"name-string\",\"cluster\":{\"id\":\"Cluster-id\"}}}'", + "python": "from cloudtower import ApiClient, Configuration, ContentLibraryImageApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n content_library_image_api = ContentLibraryImageApi(client)\r\n resp = content_library_image_api.import_content_library_image({\"data\":{\"url\":\"url-string\",\"name\":\"name-string\",\"cluster\":{\"id\":\"Cluster-id\"}}})\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/content_library_image\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n content_library_image_api := client.ContentLibraryImage\r\n params := content_library_image.NewImportContentLibraryImageParams()\r\n params.RequestBody = &models.ContentLibraryImageImportParams{\nData: &models.ContentLibraryImageImportData{\nURL: pointy.String(\"url-string\"),\nName: pointy.String(\"name-string\"),\nCluster: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\n},\n}\r\n rawResp, err := content_library_image_api.ImportContentLibraryImage(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.ContentLibraryImageApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ContentLibraryImageApi contentLibraryImageApi = new ContentLibraryImageApi(client);\r\n ContentLibraryImageImportParams params = new ContentLibraryImageImportParams()\n.data(new ContentLibraryImageImportData()\n.url(\"url-string\")\n.name(\"name-string\")\n.cluster(new ClusterWhereInput()\n.id(\"Cluster-id\")));\r\n UploadTask resp = contentLibraryImageApi.importContentLibraryImage(params);\r\n }\r\n}" }, - "/remove-vm-nic": { + "/upload-elf-file": { "exampleValue": { - "data": { - "nic_index": [ - 1 - ] - }, - "where": { - "id": "Vm-id" - } + "file": "file-string" }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/remove-vm-nic \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"nic_index\":[1]},\"where\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.remove_vm_nic({\"data\":{\"nic_index\":[1]},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewRemoveVMNicParams()\r\n params.RequestBody = &models.VMRemoveNicParams{\nData: &models.VMRemoveNicParamsData{\nNicIndex: []int{1\n},\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.RemoveVMNic(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmRemoveNicParams params = new VmRemoveNicParams()\n.data(new VmRemoveNicParamsData()\n.addNicIndexItem(1))\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.removeVmNic(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/upload-elf-file \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: multipart/form-data' \\\n\t-d '{\"file\":\"file-string\"}'", + "python": "from cloudtower import ApiClient, Configuration, OvfApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n ovf_api = OvfApi(client)\r\n with open(\"file-path\", \"rb\") as file:\r\n resp = ovf_api.upload_elf_file(\r\n file=file\r\n )\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"bytes\"\r\n \"fmt\"\r\n \"io\"\r\n\r\n \"github.com/go-openapi/runtime\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/ovf\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n ovf_api := client.Ovf\r\n params := ovf.NewUploadElfFileParams()\r\n params.File = runtime.NamedReader(\"file\",io.NopCloser(bytes.NewReader([]byte(\"file-string\"))))\r\n resp, err := ovf_api.UploadElfFile(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.OvfApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.nio.file.Files;\r\nimport java.nio.file.Path;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n OvfApi ovfApi = new OvfApi(client);\r\n UploadTask resp = ovfApi.uploadElfFile(\r\n Files.readAllBytes(Path.of(\"file-string\")),\r\n \"cluster_id\",\r\n \"name\",\r\n \"size\",\r\n \"size_unit\",\r\n \"upload_task_id\"\r\n );\r\n }\r\n}" }, - "/remove-vm-nic-by-where": { + "/parse-ovf": { "exampleValue": { - "effect": {}, - "where": { - "id": "VmNic-id" - } + "file": "file-string", + "cluster_id": "ck74rk21wg5lz0786opdnzz5m" }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/remove-vm-nic-by-where \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"effect\":{},\"where\":{\"id\":\"VmNic-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.remove_vm_nic_by_where({\"effect\":{},\"where\":{\"id\":\"VmNic-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewRemoveVMNicByWhereParams()\r\n params.RequestBody = &models.VMRemoveNicByWhereParams{\nEffect: &models.VMRemoveNicByWhereParamsEffect{\n},\nWhere: &models.VMNicWhereInput{\nID: pointy.String(\"VmNic-id\"),\n},\n}\r\n rawResp, err := vm_api.RemoveVMNicByWhere(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmRemoveNicByWhereParams params = new VmRemoveNicByWhereParams()\n.effect(new VmRemoveNicByWhereParamsEffect())\n.where(new VmNicWhereInput()\n.id(\"VmNic-id\"));\r\n List resp = vmApi.removeVmNicByWhere(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/parse-ovf \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: multipart/form-data' \\\n\t-d '{\"file\":\"file-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}'", + "python": "from cloudtower import ApiClient, Configuration, OvfApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n ovf_api = OvfApi(client)\r\n with open(\"file-path\", \"rb\") as file:\r\n resp = ovf_api.parse_ovf(\r\n file=file,\r\n cluster_id=\"ck74rk21wg5lz0786opdnzz5m\"\r\n )\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"bytes\"\r\n \"fmt\"\r\n \"io\"\r\n\r\n \"github.com/go-openapi/runtime\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/ovf\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n ovf_api := client.Ovf\r\n params := ovf.NewParseOvfParams()\r\n params.File = runtime.NamedReader(\"file\",io.NopCloser(bytes.NewReader([]byte(\"file-string\"))))\r\n params.ClusterID = \"ck74rk21wg5lz0786opdnzz5m\"\r\n resp, err := ovf_api.ParseOvf(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.OvfApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.nio.file.Files;\r\nimport java.nio.file.Path;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n OvfApi ovfApi = new OvfApi(client);\r\n ParsedOvf resp = ovfApi.parseOvf(\r\n Files.readAllBytes(Path.of(\"file-string\")),\r\n \"ck74rk21wg5lz0786opdnzz5m\"\r\n );\r\n }\r\n}" }, - "/add-vm-gpu-device": { + "/get-export-file-download-links": { "exampleValue": { - "data": [ - { - "gpu_id": "ck74rk21wg5lz0786opdnzz5m" - } - ], "where": { - "id": "Vm-id" + "id": "VmExportFile-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/add-vm-gpu-device \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":[{\"gpu_id\":\"ck74rk21wg5lz0786opdnzz5m\"}],\"where\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.add_vm_gpu_device({\"data\":[{\"gpu_id\":\"ck74rk21wg5lz0786opdnzz5m\"}],\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewAddVMGpuDeviceParams()\r\n params.RequestBody = &models.VMAddGpuDeviceParams{\nData: []*models.VMGpuOperationParams{\n{\nGpuID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.AddVMGpuDevice(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmAddGpuDeviceParams params = new VmAddGpuDeviceParams()\n.addDataItem(new VmGpuOperationParams()\n.gpuId(\"ck74rk21wg5lz0786opdnzz5m\"))\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.addVmGpuDevice(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-export-file-download-links \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"VmExportFile-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, OvfApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n ovf_api = OvfApi(client)\r\n resp = ovf_api.get_export_file_download_links({\"where\":{\"id\":\"VmExportFile-id\"}})\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/ovf\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n ovf_api := client.Ovf\r\n params := ovf.NewGetExportFileDownloadLinksParams()\r\n params.RequestBody = &models.GetExportFileDownloadLinksParams{\nWhere: &models.VMExportFileWhereUniqueInput{\nID: pointy.String(\"VmExportFile-id\"),\n},\n}\r\n rawResp, err := ovf_api.GetExportFileDownloadLinks(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.OvfApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n OvfApi ovfApi = new OvfApi(client);\r\n GetExportFileDownloadLinksParams params = new GetExportFileDownloadLinksParams()\n.where(new VmExportFileWhereUniqueInput()\n.id(\"VmExportFile-id\"));\r\n List resp = ovfApi.getExportFileDownloadLinks(params);\r\n }\r\n}" }, - "/remove-vm-gpu-device": { + "/create-vm": { + "exampleValue": [ + { + "status": "DELETED", + "firmware": "BIOS", + "ha": true, + "vm_nics": [ + {} + ], + "vm_disks": {}, + "memory": 1, + "cpu_cores": 1, + "cpu_sockets": 1, + "name": "name-string", + "cluster_id": "ck74rk21wg5lz0786opdnzz5m" + } + ], + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"status\":\"DELETED\",\"firmware\":\"BIOS\",\"ha\":true,\"vm_nics\":[{}],\"vm_disks\":{},\"memory\":1,\"cpu_cores\":1,\"cpu_sockets\":1,\"name\":\"name-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.create_vm([{\"status\":\"DELETED\",\"firmware\":\"BIOS\",\"ha\":True,\"vm_nics\":[{}],\"vm_disks\":{},\"memory\":1,\"cpu_cores\":1,\"cpu_sockets\":1,\"name\":\"name-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewCreateVMParams()\r\n params.RequestBody = []*models.VMCreationParams{\n{\nStatus: models.VMStatusDELETED.Pointer(),\nFirmware: models.VMFirmwareBIOS.Pointer(),\nHa: pointy.Bool(true),\nVMNics: []*models.VMNicParams{\n{\n},\n},\nVMDisks: &models.VMDiskParams{\n},\nMemory: pointy.Int64(1),\nCPUCores: pointy.Int32(1),\nCPUSockets: pointy.Int32(1),\nName: pointy.String(\"name-string\"),\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := vm_api.CreateVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new VmCreationParams()\n.status(VmStatus.fromValue(\"DELETED\"))\n.firmware(VmFirmware.fromValue(\"BIOS\"))\n.ha(true)\n.addVmNicsItem(new VmNicParams())\n.vmDisks(new VmDiskParams())\n.memory(1L)\n.cpuCores(1)\n.cpuSockets(1)\n.name(\"name-string\")\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = vmApi.createVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "/create-vm-from-template": { + "exampleValue": [ + { + "is_full_copy": true, + "template_id": "ck74rk21wg5lz0786opdnzz5m", + "name": "name-string" + } + ], + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-vm-from-template \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"is_full_copy\":true,\"template_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.create_vm_from_template([{\"is_full_copy\":True,\"template_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewCreateVMFromTemplateParams()\r\n params.RequestBody = []*models.VMCreateVMFromTemplateParams{\n{\nIsFullCopy: pointy.Bool(true),\nTemplateID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := vm_api.CreateVMFromTemplate(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new VmCreateVmFromTemplateParams()\n.isFullCopy(true)\n.templateId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = vmApi.createVmFromTemplate(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "/create-vm-from-content-library-template": { + "exampleValue": [ + { + "is_full_copy": true, + "template_id": "ck74rk21wg5lz0786opdnzz5m", + "name": "name-string", + "cluster_id": "ck74rk21wg5lz0786opdnzz5m" + } + ], + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-vm-from-content-library-template \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"is_full_copy\":true,\"template_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.create_vm_from_content_library_template([{\"is_full_copy\":True,\"template_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewCreateVMFromContentLibraryTemplateParams()\r\n params.RequestBody = []*models.VMCreateVMFromContentLibraryTemplateParams{\n{\nIsFullCopy: pointy.Bool(true),\nTemplateID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := vm_api.CreateVMFromContentLibraryTemplate(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new VmCreateVmFromContentLibraryTemplateParams()\n.isFullCopy(true)\n.templateId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\")\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = vmApi.createVmFromContentLibraryTemplate(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "/create-vm-from-content-library-template-batch": { "exampleValue": { - "data": [ + "vms": [ { - "gpu_id": "ck74rk21wg5lz0786opdnzz5m" + "is_full_copy": true, + "name": "name-string", + "cluster_id": "ck74rk21wg5lz0786opdnzz5m" } ], + "template_id": "ck74rk21wg5lz0786opdnzz5m" + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-vm-from-content-library-template-batch \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"vms\":[{\"is_full_copy\":true,\"name\":\"name-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}],\"template_id\":\"ck74rk21wg5lz0786opdnzz5m\"}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_task\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.create_vm_from_content_library_template_batch({\"vms\":[{\"is_full_copy\":True,\"name\":\"name-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}],\"template_id\":\"ck74rk21wg5lz0786opdnzz5m\"})\r\n wait_task(resp.task_id, client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewCreateVMFromContentLibraryTemplateBatchParams()\r\n params.RequestBody = &models.VMCreateVMFromContentLibraryTemplateBatchParams{\nVms: []*models.VMCreateVMFromContentLibraryTemplateBatchVMParams{\n{\nIsFullCopy: pointy.Bool(true),\nName: pointy.String(\"name-string\"),\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n},\nTemplateID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n}\r\n rawResp, err := vm_api.CreateVMFromContentLibraryTemplateBatch(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n err = utils.WaitTask(context.Background(), client, resp.TaskID, 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmCreateVmFromContentLibraryTemplateBatchParams params = new VmCreateVmFromContentLibraryTemplateBatchParams()\n.addVmsItem(new VmCreateVmFromContentLibraryTemplateBatchVmParams()\n.isFullCopy(true)\n.name(\"name-string\")\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\"))\n.templateId(\"ck74rk21wg5lz0786opdnzz5m\");\r\n WithTaskVmArray resp = vmApi.createVmFromContentLibraryTemplateBatch(params);\r\n TaskUtil.WaitTask(resp.getTaskId(), client);\r\n }\r\n}" + }, + "/convert-vm-template-to-vm": { + "exampleValue": [ + { + "name": "name-string", + "converted_from_template_id": "ck74rk21wg5lz0786opdnzz5m" + } + ], + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/convert-vm-template-to-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"name\":\"name-string\",\"converted_from_template_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.convert_vm_template_to_vm([{\"name\":\"name-string\",\"converted_from_template_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewConvertVMTemplateToVMParams()\r\n params.RequestBody = []*models.ConvertVMTemplateToVMParams{\n{\nName: pointy.String(\"name-string\"),\nConvertedFromTemplateID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := vm_api.ConvertVMTemplateToVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new ConvertVmTemplateToVmParams()\n.name(\"name-string\")\n.convertedFromTemplateId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = vmApi.convertVmTemplateToVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "/clone-vm": { + "exampleValue": [ + { + "src_vm_id": "ck74rk21wg5lz0786opdnzz5m", + "name": "name-string" + } + ], + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/clone-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"src_vm_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.clone_vm([{\"src_vm_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewCloneVMParams()\r\n params.RequestBody = []*models.VMCloneParams{\n{\nSrcVMID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := vm_api.CloneVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new VmCloneParams()\n.srcVmId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = vmApi.cloneVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "/rebuild-vm-from-snapshot": { + "exampleValue": [ + { + "rebuild_from_snapshot_id": "ck74rk21wg5lz0786opdnzz5m", + "name": "name-string" + } + ], + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/rebuild-vm-from-snapshot \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"rebuild_from_snapshot_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.rebuild_vm([{\"rebuild_from_snapshot_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewRebuildVMParams()\r\n params.RequestBody = []*models.VMRebuildParams{\n{\nRebuildFromSnapshotID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := vm_api.RebuildVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new VmRebuildParams()\n.rebuildFromSnapshotId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = vmApi.rebuildVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "/rollback-vm": { + "exampleValue": { + "data": { + "snapshot_id": "ck74rk21wg5lz0786opdnzz5m" + }, "where": { "id": "Vm-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/remove-vm-gpu-device \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":[{\"gpu_id\":\"ck74rk21wg5lz0786opdnzz5m\"}],\"where\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.remove_vm_gpu_device({\"data\":[{\"gpu_id\":\"ck74rk21wg5lz0786opdnzz5m\"}],\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewRemoveVMGpuDeviceParams()\r\n params.RequestBody = &models.VMRemoveGpuDeviceParams{\nData: []*models.VMGpuOperationParams{\n{\nGpuID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.RemoveVMGpuDevice(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmRemoveGpuDeviceParams params = new VmRemoveGpuDeviceParams()\n.addDataItem(new VmGpuOperationParams()\n.gpuId(\"ck74rk21wg5lz0786opdnzz5m\"))\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.removeVmGpuDevice(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/rollback-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"snapshot_id\":\"ck74rk21wg5lz0786opdnzz5m\"},\"where\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.rollback_vm({\"data\":{\"snapshot_id\":\"ck74rk21wg5lz0786opdnzz5m\"},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewRollbackVMParams()\r\n params.RequestBody = &models.VMRollbackParams{\nData: &models.VMRollbackParamsData{\nSnapshotID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.RollbackVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmRollbackParams params = new VmRollbackParams()\n.data(new VmRollbackParamsData()\n.snapshotId(\"ck74rk21wg5lz0786opdnzz5m\"))\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.rollbackVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/install-vmtools": { + "/update-vm-basic-info": { "exampleValue": { + "data": {}, "where": { "id": "Vm-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/install-vmtools \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.install_vmtools({\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewInstallVmtoolsParams()\r\n params.RequestBody = &models.InstallVmtoolsParams{\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.InstallVmtools(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n InstallVmtoolsParams params = new InstallVmtoolsParams()\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.installVmtools(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-vm-basic-info \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.update_vm({\"data\":{},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewUpdateVMParams()\r\n params.RequestBody = &models.VMUpdateParams{\nData: &models.VMUpdateParamsData{\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.UpdateVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmUpdateParams params = new VmUpdateParams()\n.data(new VmUpdateParamsData())\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.updateVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/migrate-vm": { + "/move-vm-to-recycle": { "exampleValue": { "where": { "id": "Vm-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/migrate-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.migrate_vm({\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewMigrateVMParams()\r\n params.RequestBody = &models.VMMigrateParams{\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.MigrateVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmMigrateParams params = new VmMigrateParams()\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.migrateVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/move-vm-to-recycle \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.move_vm_to_recycle_bin({\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewMoveVMToRecycleBinParams()\r\n params.RequestBody = &models.VMOperateParams{\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.MoveVMToRecycleBin(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmOperateParams params = new VmOperateParams()\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.moveVmToRecycleBin(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/migrate-vm-across-cluster": { + "/recover-vm-from-recycle": { "exampleValue": { - "data": { - "vm_config": { - "network_mapping": [ - { - "src_vlan_local_id": "ck74rk21wg5lz0786opdnzz5m", - "dest_vlan_local_id": "ck74rk21wg5lz0786opdnzz5m" - } - ], - "migrate_type": "COLD_MIGRATE", - "elf_storage_policy": "EC" - }, - "cluster_id": "ck74rk21wg5lz0786opdnzz5m" - }, "where": { "id": "Vm-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/migrate-vm-across-cluster \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"vm_config\":{\"network_mapping\":[{\"src_vlan_local_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"dest_vlan_local_id\":\"ck74rk21wg5lz0786opdnzz5m\"}],\"migrate_type\":\"COLD_MIGRATE\",\"elf_storage_policy\":\"EC\"},\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"},\"where\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.migrate_vm_across_cluster({\"data\":{\"vm_config\":{\"network_mapping\":[{\"src_vlan_local_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"dest_vlan_local_id\":\"ck74rk21wg5lz0786opdnzz5m\"}],\"migrate_type\":\"COLD_MIGRATE\",\"elf_storage_policy\":\"EC\"},\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewMigrateVMAcrossClusterParams()\r\n params.RequestBody = &models.VMMigrateAcrossClusterParams{\nData: &models.VMMigrateAcrossClusterParamsData{\nVMConfig: &models.MigrateVMConfig{\nNetworkMapping: []*models.VlanMapping{\n{\nSrcVlanLocalID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nDestVlanLocalID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n},\nMigrateType: models.MigrateTypeCOLD_MIGRATE.Pointer(),\nElfStoragePolicy: models.VMVolumeElfStoragePolicyTypeEC.Pointer(),\n},\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.MigrateVMAcrossCluster(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmMigrateAcrossClusterParams params = new VmMigrateAcrossClusterParams()\n.data(new VmMigrateAcrossClusterParamsData()\n.vmConfig(new MigrateVmConfig()\n.addNetworkMappingItem(new VlanMapping()\n.srcVlanLocalId(\"ck74rk21wg5lz0786opdnzz5m\")\n.destVlanLocalId(\"ck74rk21wg5lz0786opdnzz5m\"))\n.migrateType(MigrateType.fromValue(\"COLD_MIGRATE\"))\n.elfStoragePolicy(VmVolumeElfStoragePolicyType.fromValue(\"EC\")))\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\"))\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.migrateVmAcrossCluster(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/recover-vm-from-recycle \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.recover_vm_from_recycle_bin({\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewRecoverVMFromRecycleBinParams()\r\n params.RequestBody = &models.VMOperateParams{\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.RecoverVMFromRecycleBin(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmOperateParams params = new VmOperateParams()\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.recoverVmFromRecycleBin(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/stop-vm-in-cutover-migration": { + "/delete-vm": { "exampleValue": { - "tasks": { - "id": "Task-id" + "where": { + "id": "Vm-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/stop-vm-in-cutover-migration \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"tasks\":{\"id\":\"Task-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.stop_vm_in_cutover_migration({\"tasks\":{\"id\":\"Task-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewStopVMInCutoverMigrationParams()\r\n params.RequestBody = &models.StopVMInCutoverMigrationParams{\nTasks: &models.TaskWhereInput{\nID: pointy.String(\"Task-id\"),\n},\n}\r\n rawResp, err := vm_api.StopVMInCutoverMigration(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n StopVmInCutoverMigrationParams params = new StopVmInCutoverMigrationParams()\n.tasks(new TaskWhereInput()\n.id(\"Task-id\"));\r\n List resp = vmApi.stopVmInCutoverMigration(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.delete_vm({\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewDeleteVMParams()\r\n params.RequestBody = &models.VMDeleteParams{\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.DeleteVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmDeleteParams params = new VmDeleteParams()\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.deleteVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/abort-migrate-vm-across-cluster": { + "/start-vm": { "exampleValue": { - "tasks": { - "id": "Task-id" + "where": { + "id": "Vm-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/abort-migrate-vm-across-cluster \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"tasks\":{\"id\":\"Task-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.abort_migrate_vm_across_cluster({\"tasks\":{\"id\":\"Task-id\"}})\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewAbortMigrateVMAcrossClusterParams()\r\n params.RequestBody = &models.AbortMigrateVMAcrossClusterParams{\nTasks: &models.TaskWhereInput{\nID: pointy.String(\"Task-id\"),\n},\n}\r\n rawResp, err := vm_api.AbortMigrateVMAcrossCluster(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n AbortMigrateVmAcrossClusterParams params = new AbortMigrateVmAcrossClusterParams()\n.tasks(new TaskWhereInput()\n.id(\"Task-id\"));\r\n List resp = vmApi.abortMigrateVmAcrossCluster(params);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/start-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.start_vm({\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewStartVMParams()\r\n params.RequestBody = &models.VMStartParams{\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.StartVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmStartParams params = new VmStartParams()\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.startVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/add-vm-to-folder": { + "/restart-vm": { "exampleValue": { - "data": { - "folder_id": "ck74rk21wg5lz0786opdnzz5m" - }, "where": { "id": "Vm-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/add-vm-to-folder \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"folder_id\":\"ck74rk21wg5lz0786opdnzz5m\"},\"where\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.add_vm_to_folder({\"data\":{\"folder_id\":\"ck74rk21wg5lz0786opdnzz5m\"},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewAddVMToFolderParams()\r\n params.RequestBody = &models.VMAddFolderParams{\nData: &models.VMAddFolderParamsData{\nFolderID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.AddVMToFolder(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmAddFolderParams params = new VmAddFolderParams()\n.data(new VmAddFolderParamsData()\n.folderId(\"ck74rk21wg5lz0786opdnzz5m\"))\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.addVmToFolder(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/restart-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.restart_vm({\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewRestartVMParams()\r\n params.RequestBody = &models.VMOperateParams{\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.RestartVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmOperateParams params = new VmOperateParams()\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.restartVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/remove-vm-from-folder": { + "/force-restart-vm": { "exampleValue": { "where": { "id": "Vm-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/remove-vm-from-folder \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.remove_vm_to_folder({\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewRemoveVMToFolderParams()\r\n params.RequestBody = &models.VMOperateParams{\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.RemoveVMToFolder(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmOperateParams params = new VmOperateParams()\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.removeVmToFolder(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/force-restart-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.force_restart_vm({\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewForceRestartVMParams()\r\n params.RequestBody = &models.VMOperateParams{\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.ForceRestartVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmOperateParams params = new VmOperateParams()\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.forceRestartVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-vm-advanced-options": { + "/shutdown-vm": { "exampleValue": { - "data": {}, "where": { "id": "Vm-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-vm-advanced-options \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.update_vm_advanced_options({\"data\":{},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewUpdateVMAdvancedOptionsParams()\r\n params.RequestBody = &models.VMUpdateAdvancedOptionsParams{\nData: &models.VMUpdateAdvancedOptionsParamsData{\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.UpdateVMAdvancedOptions(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmUpdateAdvancedOptionsParams params = new VmUpdateAdvancedOptionsParams()\n.data(new VmUpdateAdvancedOptionsParamsData())\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.updateVmAdvancedOptions(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/shutdown-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.shut_down_vm({\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewShutDownVMParams()\r\n params.RequestBody = &models.VMOperateParams{\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.ShutDownVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmOperateParams params = new VmOperateParams()\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.shutDownVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-vm-host-options": { + "/poweroff-vm": { "exampleValue": { - "data": {}, "where": { "id": "Vm-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-vm-host-options \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.update_vm_host_options({\"data\":{},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewUpdateVMHostOptionsParams()\r\n params.RequestBody = &models.VMUpdateHostOptionsParams{\nData: &models.VMUpdateHostOptionsParamsData{\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.UpdateVMHostOptions(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmUpdateHostOptionsParams params = new VmUpdateHostOptionsParams()\n.data(new VmUpdateHostOptionsParamsData())\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.updateVmHostOptions(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/poweroff-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.poweroff_vm({\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewPoweroffVMParams()\r\n params.RequestBody = &models.VMOperateParams{\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.PoweroffVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmOperateParams params = new VmOperateParams()\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.poweroffVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/reset-vm-guest-os-password": { + "/suspend-vm": { "exampleValue": { - "data": { - "password": "password-string", - "username": "username-string" - }, "where": { "id": "Vm-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/reset-vm-guest-os-password \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"password\":\"password-string\",\"username\":\"username-string\"},\"where\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.reset_vm_guest_os_password({\"data\":{\"password\":\"password-string\",\"username\":\"username-string\"},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewResetVMGuestOsPasswordParams()\r\n params.RequestBody = &models.VMResetGuestOsPasswordParams{\nData: &models.VMResetGuestOsPasswordParamsData{\nPassword: pointy.String(\"password-string\"),\nUsername: pointy.String(\"username-string\"),\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.ResetVMGuestOsPassword(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmResetGuestOsPasswordParams params = new VmResetGuestOsPasswordParams()\n.data(new VmResetGuestOsPasswordParamsData()\n.password(\"password-string\")\n.username(\"username-string\"))\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.resetVmGuestOsPassword(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/suspend-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.suspend_vm({\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewSuspendVMParams()\r\n params.RequestBody = &models.VMOperateParams{\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.SuspendVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmOperateParams params = new VmOperateParams()\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.suspendVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-vm-owner": { + "/resume-vm": { "exampleValue": { - "data": { - "search_for": "username", - "value": "value-string" - }, "where": { "id": "Vm-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-vm-owner \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"search_for\":\"username\",\"value\":\"value-string\"},\"where\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.update_vm_owner({\"data\":{\"search_for\":\"username\",\"value\":\"value-string\"},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewUpdateVMOwnerParams()\r\n params.RequestBody = &models.VMUpdateOwnerParams{\nData: &models.VMUpdateOwnerParamsData{\nSearchFor: pointy.String(\"username\"),\nValue: pointy.String(\"value-string\"),\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.UpdateVMOwner(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmUpdateOwnerParams params = new VmUpdateOwnerParams()\n.data(new VmUpdateOwnerParamsData()\n.searchFor(\"username\")\n.value(\"value-string\"))\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.updateVmOwner(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/resume-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.resume_vm({\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewResumeVMParams()\r\n params.RequestBody = &models.VMOperateParams{\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.ResumeVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmOperateParams params = new VmOperateParams()\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.resumeVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-vm-io-policy": { + "/add-vm-disk": { "exampleValue": { - "data": {}, + "data": { + "vm_disks": {} + }, "where": { "id": "Vm-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-vm-io-policy \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.update_vm_io_policy({\"data\":{},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewUpdateVMIoPolicyParams()\r\n params.RequestBody = &models.VMUpdateIoPolicyParams{\nData: &models.VMUpdateIoPolicyParamsData{\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.UpdateVMIoPolicy(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmUpdateIoPolicyParams params = new VmUpdateIoPolicyParams()\n.data(new VmUpdateIoPolicyParamsData())\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.updateVmIoPolicy(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/add-vm-disk \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"vm_disks\":{}},\"where\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.add_vm_disk({\"data\":{\"vm_disks\":{}},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewAddVMDiskParams()\r\n params.RequestBody = &models.VMAddDiskParams{\nData: &models.VMAddDiskParamsData{\nVMDisks: &models.VMAddDiskParamsDataVmdisks{\n},\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.AddVMDisk(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmAddDiskParams params = new VmAddDiskParams()\n.data(new VmAddDiskParamsData()\n.vmDisks(new VmAddDiskParamsDataVmdisks()))\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.addVmDisk(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/export-vm": { + "/update-vm-disk": { "exampleValue": { "data": { - "type": "OVF" + "vm_disk_id": "ck74rk21wg5lz0786opdnzz5m" }, "where": { "id": "Vm-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/export-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"type\":\"OVF\"},\"where\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.export_vm({\"data\":{\"type\":\"OVF\"},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewExportVMParams()\r\n params.RequestBody = &models.VMExportParams{\nData: &models.VMExportParamsData{\nType: models.VMExportFileTypeOVF.Pointer(),\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.ExportVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVMExportFile) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVMExportFile)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVMExportFile) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmExportParams params = new VmExportParams()\n.data(new VmExportParamsData()\n.type(VmExportFileType.fromValue(\"OVF\")))\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.exportVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-vm-disk \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"vm_disk_id\":\"ck74rk21wg5lz0786opdnzz5m\"},\"where\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.update_vm_disk({\"data\":{\"vm_disk_id\":\"ck74rk21wg5lz0786opdnzz5m\"},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewUpdateVMDiskParams()\r\n params.RequestBody = &models.VMUpdateDiskParams{\nData: &models.VMUpdateDiskParamsData{\nVMDiskID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.UpdateVMDisk(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmUpdateDiskParams params = new VmUpdateDiskParams()\n.data(new VmUpdateDiskParamsData()\n.vmDiskId(\"ck74rk21wg5lz0786opdnzz5m\"))\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.updateVmDisk(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/import-vm": { - "exampleValue": [ - { - "name": "name-string", - "cluster_id": "ck74rk21wg5lz0786opdnzz5m", - "upload_tasks": [ - "-string" - ], - "parsed_ovf": { - "firmware": "BIOS", - "disks": [ - { - "size": 1, - "type": "CD_ROM", - "bus": "IDE", - "name": "name-string" - } - ], - "nics": [ - { - "mac": "mac-string" - } - ], - "memory": 1, - "cpu": { - "sockets": 1, - "cores": 1 - }, - "vcpu": 1, - "name": "name-string" - } + "/expand-vm-disk": { + "exampleValue": { + "size": 1, + "where": { + "id": "VmDisk-id" } - ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/import-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"name\":\"name-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"upload_tasks\":[\"-string\"],\"parsed_ovf\":{\"firmware\":\"BIOS\",\"disks\":[{\"size\":1,\"type\":\"CD_ROM\",\"bus\":\"IDE\",\"name\":\"name-string\"}],\"nics\":[{\"mac\":\"mac-string\"}],\"memory\":1,\"cpu\":{\"sockets\":1,\"cores\":1},\"vcpu\":1,\"name\":\"name-string\"}}]'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.import_vm([{\"name\":\"name-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"upload_tasks\":[\"-string\"],\"parsed_ovf\":{\"firmware\":\"BIOS\",\"disks\":[{\"size\":1,\"type\":\"CD_ROM\",\"bus\":\"IDE\",\"name\":\"name-string\"}],\"nics\":[{\"mac\":\"mac-string\"}],\"memory\":1,\"cpu\":{\"sockets\":1,\"cores\":1},\"vcpu\":1,\"name\":\"name-string\"}}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewImportVMParams()\r\n params.RequestBody = []*models.VMImportParams{\n{\nName: pointy.String(\"name-string\"),\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nUploadTasks: []string{\"-string\",\n},\nParsedOvf: &models.ParsedOvf{\nFirmware: models.VMFirmwareBIOS.Pointer(),\nDisks: []*models.OvfDisk{\n{\nSize: pointy.Int64(1),\nType: models.VMDiskTypeCD_ROM.Pointer(),\nBus: models.BusIDE.Pointer(),\nName: pointy.String(\"name-string\"),\n},\n},\nNics: []*models.OvfNic{\n{\nMac: pointy.String(\"mac-string\"),\n},\n},\nMemory: pointy.Int64(1),\nCPU: &models.OvfCPU{\nSockets: pointy.Int32(1),\nCores: pointy.Int32(1),\n},\nVcpu: pointy.Int32(1),\nName: pointy.String(\"name-string\"),\n},\n},\n}\r\n rawResp, err := vm_api.ImportVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new VmImportParams()\n.name(\"name-string\")\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.addUploadTasksItem(\"-string\")\n.parsedOvf(new ParsedOvf()\n.firmware(VmFirmware.fromValue(\"BIOS\"))\n.addDisksItem(new OvfDisk()\n.size(1L)\n.type(VmDiskType.fromValue(\"CD_ROM\"))\n.bus(Bus.fromValue(\"IDE\"))\n.name(\"name-string\"))\n.addNicsItem(new OvfNic()\n.mac(\"mac-string\"))\n.memory(1L)\n.cpu(new OvfCpu()\n.sockets(1)\n.cores(1))\n.vcpu(1)\n.name(\"name-string\")));\r\n List resp = vmApi.importVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/expand-vm-disk \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"size\":1,\"where\":{\"id\":\"VmDisk-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.expand_vm_disk({\"size\":1,\"where\":{\"id\":\"VmDisk-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewExpandVMDiskParams()\r\n params.RequestBody = &models.VMExpandVMDiskParams{\nSize: pointy.Int64(1),\nWhere: &models.VMDiskWhereInput{\nID: pointy.String(\"VmDisk-id\"),\n},\n}\r\n rawResp, err := vm_api.ExpandVMDisk(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmExpandVmDiskParams params = new VmExpandVmDiskParams()\n.size(1L)\n.where(new VmDiskWhereInput()\n.id(\"VmDisk-id\"));\r\n List resp = vmApi.expandVmDisk(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/get-vm-gpu-device-info": { + "/remove-vm-disk": { "exampleValue": { + "data": { + "disk_ids": [ + "-string" + ] + }, "where": { "id": "Vm-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-vm-gpu-device-info \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.get_vm_gpu_device_info({\"where\":{\"id\":\"Vm-id\"}})\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewGetVMGpuDeviceInfoParams()\r\n params.RequestBody = &models.GetVmsRequestBody{\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.GetVMGpuDeviceInfo(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n GetVmsRequestBody params = new GetVmsRequestBody()\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.getVmGpuDeviceInfo(params);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/remove-vm-disk \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"disk_ids\":[\"-string\"]},\"where\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.remove_vm_disk({\"data\":{\"disk_ids\":[\"-string\"]},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewRemoveVMDiskParams()\r\n params.RequestBody = &models.VMRemoveDiskParams{\nData: &models.VMRemoveDiskParamsData{\nDiskIds: []string{\"-string\",\n},\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.RemoveVMDisk(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmRemoveDiskParams params = new VmRemoveDiskParams()\n.data(new VmRemoveDiskParamsData()\n.addDiskIdsItem(\"-string\"))\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.removeVmDisk(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/get-vm-vnc-info": { + "/add-vm-cd-rom": { "exampleValue": { - "vm": { + "data": { + "vm_cd_roms": [ + { + "boot": 1 + } + ] + }, + "where": { "id": "Vm-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-vm-vnc-info \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"vm\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.get_vm_vnc_info({\"vm\":{\"id\":\"Vm-id\"}})\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewGetVMVncInfoParams()\r\n params.RequestBody = &models.GetVMVncInfoParams{\nVM: &models.VMWhereUniqueInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.GetVMVncInfo(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n GetVmVncInfoParams params = new GetVmVncInfoParams()\n.vm(new VmWhereUniqueInput()\n.id(\"Vm-id\"));\r\n VmVncInfo resp = vmApi.getVmVncInfo(params);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/add-vm-cd-rom \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"vm_cd_roms\":[{\"boot\":1}]},\"where\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.add_vm_cd_rom({\"data\":{\"vm_cd_roms\":[{\"boot\":1}]},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewAddVMCdRomParams()\r\n params.RequestBody = &models.VMAddCdRomParams{\nData: &models.VMAddCdRomParamsData{\nVMCdRoms: []*models.VMCdRomParams{\n{\nBoot: pointy.Int32(1),\n},\n},\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.AddVMCdRom(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmAddCdRomParams params = new VmAddCdRomParams()\n.data(new VmAddCdRomParamsData()\n.addVmCdRomsItem(new VmCdRomParams()\n.boot(1)))\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.addVmCdRom(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-vm-vpc-nic": { + "/remove-vm-cd-rom": { "exampleValue": { "data": { - "vpc_nic": {} + "cd_rom_ids": [ + "-string" + ] }, "where": { - "id": "VmNic-id" + "id": "Vm-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-vm-vpc-nic \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"vpc_nic\":{}},\"where\":{\"id\":\"VmNic-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.update_vm_nic_vpc_info({\"data\":{\"vpc_nic\":{}},\"where\":{\"id\":\"VmNic-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewUpdateVMNicVpcInfoParams()\r\n params.RequestBody = &models.VMUpdateVpcNicParams{\nData: &models.VMUpdateVpcNicParamsData{\nVpcNic: &models.UpdateVpcNicPayloads{\n},\n},\nWhere: &models.VMNicWhereInput{\nID: pointy.String(\"VmNic-id\"),\n},\n}\r\n rawResp, err := vm_api.UpdateVMNicVpcInfo(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmUpdateVpcNicParams params = new VmUpdateVpcNicParams()\n.data(new VmUpdateVpcNicParamsData()\n.vpcNic(new UpdateVpcNicPayloads()))\n.where(new VmNicWhereInput()\n.id(\"VmNic-id\"));\r\n List resp = vmApi.updateVmNicVpcInfo(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/remove-vm-cd-rom \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"cd_rom_ids\":[\"-string\"]},\"where\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.remove_vm_cd_rom({\"data\":{\"cd_rom_ids\":[\"-string\"]},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewRemoveVMCdRomParams()\r\n params.RequestBody = &models.VMRemoveCdRomParams{\nData: &models.VMRemoveCdRomParamsData{\nCdRomIds: []string{\"-string\",\n},\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.RemoveVMCdRom(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmRemoveCdRomParams params = new VmRemoveCdRomParams()\n.data(new VmRemoveCdRomParamsData()\n.addCdRomIdsItem(\"-string\"))\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.removeVmCdRom(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/clone-content-library-vm-template-from-vm": { - "exampleValue": [ - { - "clusters": { - "id": "Cluster-id" - }, - "vm": { - "id": "Vm-id" - }, - "name": "name-string" - } - ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/clone-content-library-vm-template-from-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"clusters\":{\"id\":\"Cluster-id\"},\"vm\":{\"id\":\"Vm-id\"},\"name\":\"name-string\"}]'", - "python": "from cloudtower import ApiClient, Configuration, ContentLibraryVmTemplateApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n content_library_vm_template_api = ContentLibraryVmTemplateApi(client)\r\n resp = content_library_vm_template_api.clone_content_library_vm_template_from_vm([{\"clusters\":{\"id\":\"Cluster-id\"},\"vm\":{\"id\":\"Vm-id\"},\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/content_library_vm_template\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n content_library_vm_template_api := client.ContentLibraryVMTemplate\r\n params := content_library_vm_template.NewCloneContentLibraryVMTemplateFromVMParams()\r\n params.RequestBody = []*models.ContentLibraryVMTemplateCreationParams{\n{\nClusters: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\nVM: &models.VMWhereUniqueInput{\nID: pointy.String(\"Vm-id\"),\n},\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := content_library_vm_template_api.CloneContentLibraryVMTemplateFromVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskContentLibraryVMTemplate) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskContentLibraryVMTemplate)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskContentLibraryVMTemplate) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ContentLibraryVmTemplateApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ContentLibraryVmTemplateApi contentLibraryVmTemplateApi = new ContentLibraryVmTemplateApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new ContentLibraryVmTemplateCreationParams()\n.clusters(new ClusterWhereInput()\n.id(\"Cluster-id\"))\n.vm(new VmWhereUniqueInput()\n.id(\"Vm-id\"))\n.name(\"name-string\"));\r\n List resp = contentLibraryVmTemplateApi.cloneContentLibraryVmTemplateFromVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" - }, - "/convert-content-library-vm-template-from-vm": { - "exampleValue": [ - { - "clusters": { - "id": "Cluster-id" - }, - "vm": { - "id": "Vm-id" - }, - "name": "name-string" - } - ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/convert-content-library-vm-template-from-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"clusters\":{\"id\":\"Cluster-id\"},\"vm\":{\"id\":\"Vm-id\"},\"name\":\"name-string\"}]'", - "python": "from cloudtower import ApiClient, Configuration, ContentLibraryVmTemplateApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n content_library_vm_template_api = ContentLibraryVmTemplateApi(client)\r\n resp = content_library_vm_template_api.convert_content_library_vm_template_from_vm([{\"clusters\":{\"id\":\"Cluster-id\"},\"vm\":{\"id\":\"Vm-id\"},\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/content_library_vm_template\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n content_library_vm_template_api := client.ContentLibraryVMTemplate\r\n params := content_library_vm_template.NewConvertContentLibraryVMTemplateFromVMParams()\r\n params.RequestBody = []*models.ContentLibraryVMTemplateCreationParams{\n{\nClusters: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\nVM: &models.VMWhereUniqueInput{\nID: pointy.String(\"Vm-id\"),\n},\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := content_library_vm_template_api.ConvertContentLibraryVMTemplateFromVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskContentLibraryVMTemplate) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskContentLibraryVMTemplate)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskContentLibraryVMTemplate) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ContentLibraryVmTemplateApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ContentLibraryVmTemplateApi contentLibraryVmTemplateApi = new ContentLibraryVmTemplateApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new ContentLibraryVmTemplateCreationParams()\n.clusters(new ClusterWhereInput()\n.id(\"Cluster-id\"))\n.vm(new VmWhereUniqueInput()\n.id(\"Vm-id\"))\n.name(\"name-string\"));\r\n List resp = contentLibraryVmTemplateApi.convertContentLibraryVmTemplateFromVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" - }, - "/update-content-library-vm-template": { + "/eject-iso-from-vm-cd-rom": { "exampleValue": { - "data": {}, "where": { - "id": "ContentLibraryVmTemplate-id" + "id": "VmDisk-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-content-library-vm-template \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"ContentLibraryVmTemplate-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, ContentLibraryVmTemplateApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n content_library_vm_template_api = ContentLibraryVmTemplateApi(client)\r\n resp = content_library_vm_template_api.update_content_library_vm_template({\"data\":{},\"where\":{\"id\":\"ContentLibraryVmTemplate-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/content_library_vm_template\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n content_library_vm_template_api := client.ContentLibraryVMTemplate\r\n params := content_library_vm_template.NewUpdateContentLibraryVMTemplateParams()\r\n params.RequestBody = &models.ContentLibraryVMTemplateUpdationParams{\nData: &models.ContentLibraryVMTemplateUpdationParamsData{\n},\nWhere: &models.ContentLibraryVMTemplateWhereInput{\nID: pointy.String(\"ContentLibraryVmTemplate-id\"),\n},\n}\r\n rawResp, err := content_library_vm_template_api.UpdateContentLibraryVMTemplate(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskContentLibraryVMTemplate) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskContentLibraryVMTemplate)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskContentLibraryVMTemplate) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ContentLibraryVmTemplateApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ContentLibraryVmTemplateApi contentLibraryVmTemplateApi = new ContentLibraryVmTemplateApi(client);\r\n ContentLibraryVmTemplateUpdationParams params = new ContentLibraryVmTemplateUpdationParams()\n.data(new ContentLibraryVmTemplateUpdationParamsData())\n.where(new ContentLibraryVmTemplateWhereInput()\n.id(\"ContentLibraryVmTemplate-id\"));\r\n List resp = contentLibraryVmTemplateApi.updateContentLibraryVmTemplate(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/eject-iso-from-vm-cd-rom \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"VmDisk-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.eject_iso_from_vm_cd_rom({\"where\":{\"id\":\"VmDisk-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewEjectIsoFromVMCdRomParams()\r\n params.RequestBody = &models.VMEjectCdRomParams{\nWhere: &models.VMDiskWhereInput{\nID: pointy.String(\"VmDisk-id\"),\n},\n}\r\n rawResp, err := vm_api.EjectIsoFromVMCdRom(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmEjectCdRomParams params = new VmEjectCdRomParams()\n.where(new VmDiskWhereInput()\n.id(\"VmDisk-id\"));\r\n List resp = vmApi.ejectIsoFromVmCdRom(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/distribute-content-library-vm-template-clusters": { + "/toggle-vm-cd-rom-disable": { "exampleValue": { - "data": { - "clusters": { - "id": "Cluster-id" - } - }, + "disabled": true, "where": { - "id": "ContentLibraryVmTemplate-id" + "id": "VmDisk-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/distribute-content-library-vm-template-clusters \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"clusters\":{\"id\":\"Cluster-id\"}},\"where\":{\"id\":\"ContentLibraryVmTemplate-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, ContentLibraryVmTemplateApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n content_library_vm_template_api = ContentLibraryVmTemplateApi(client)\r\n resp = content_library_vm_template_api.distribute_content_library_vmtemplate_clusters({\"data\":{\"clusters\":{\"id\":\"Cluster-id\"}},\"where\":{\"id\":\"ContentLibraryVmTemplate-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/content_library_vm_template\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n content_library_vm_template_api := client.ContentLibraryVMTemplate\r\n params := content_library_vm_template.NewDistributeContentLibraryVmtemplateClustersParams()\r\n params.RequestBody = &models.ContentLibraryVMTemplateUpdationClusterParams{\nData: &models.ContentLibraryVMTemplateUpdationClusterParamsData{\nClusters: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\n},\nWhere: &models.ContentLibraryVMTemplateWhereInput{\nID: pointy.String(\"ContentLibraryVmTemplate-id\"),\n},\n}\r\n rawResp, err := content_library_vm_template_api.DistributeContentLibraryVmtemplateClusters(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskContentLibraryVMTemplate) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskContentLibraryVMTemplate)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskContentLibraryVMTemplate) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ContentLibraryVmTemplateApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ContentLibraryVmTemplateApi contentLibraryVmTemplateApi = new ContentLibraryVmTemplateApi(client);\r\n ContentLibraryVmTemplateUpdationClusterParams params = new ContentLibraryVmTemplateUpdationClusterParams()\n.data(new ContentLibraryVmTemplateUpdationClusterParamsData()\n.clusters(new ClusterWhereInput()\n.id(\"Cluster-id\")))\n.where(new ContentLibraryVmTemplateWhereInput()\n.id(\"ContentLibraryVmTemplate-id\"));\r\n List resp = contentLibraryVmTemplateApi.distributeContentLibraryVmtemplateClusters(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/toggle-vm-cd-rom-disable \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"disabled\":true,\"where\":{\"id\":\"VmDisk-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.toggle_vm_cd_rom_disable({\"disabled\":True,\"where\":{\"id\":\"VmDisk-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewToggleVMCdRomDisableParams()\r\n params.RequestBody = &models.VMToggleCdRomDisableParams{\nDisabled: pointy.Bool(true),\nWhere: &models.VMDiskWhereInput{\nID: pointy.String(\"VmDisk-id\"),\n},\n}\r\n rawResp, err := vm_api.ToggleVMCdRomDisable(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmToggleCdRomDisableParams params = new VmToggleCdRomDisableParams()\n.disabled(true)\n.where(new VmDiskWhereInput()\n.id(\"VmDisk-id\"));\r\n List resp = vmApi.toggleVmCdRomDisable(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/remove-content-library-vm-template-clusters": { + "/add-vm-nic": { "exampleValue": { "data": { - "clusters": { - "id": "Cluster-id" - } + "vm_nics": [ + {} + ] }, "where": { - "id": "ContentLibraryVmTemplate-id" + "id": "Vm-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/remove-content-library-vm-template-clusters \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"clusters\":{\"id\":\"Cluster-id\"}},\"where\":{\"id\":\"ContentLibraryVmTemplate-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, ContentLibraryVmTemplateApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n content_library_vm_template_api = ContentLibraryVmTemplateApi(client)\r\n resp = content_library_vm_template_api.remove_content_library_vm_template_clusters({\"data\":{\"clusters\":{\"id\":\"Cluster-id\"}},\"where\":{\"id\":\"ContentLibraryVmTemplate-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/content_library_vm_template\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n content_library_vm_template_api := client.ContentLibraryVMTemplate\r\n params := content_library_vm_template.NewRemoveContentLibraryVMTemplateClustersParams()\r\n params.RequestBody = &models.ContentLibraryVMTemplateUpdationClusterParams{\nData: &models.ContentLibraryVMTemplateUpdationClusterParamsData{\nClusters: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\n},\nWhere: &models.ContentLibraryVMTemplateWhereInput{\nID: pointy.String(\"ContentLibraryVmTemplate-id\"),\n},\n}\r\n rawResp, err := content_library_vm_template_api.RemoveContentLibraryVMTemplateClusters(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskContentLibraryVMTemplate) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskContentLibraryVMTemplate)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskContentLibraryVMTemplate) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ContentLibraryVmTemplateApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ContentLibraryVmTemplateApi contentLibraryVmTemplateApi = new ContentLibraryVmTemplateApi(client);\r\n ContentLibraryVmTemplateUpdationClusterParams params = new ContentLibraryVmTemplateUpdationClusterParams()\n.data(new ContentLibraryVmTemplateUpdationClusterParamsData()\n.clusters(new ClusterWhereInput()\n.id(\"Cluster-id\")))\n.where(new ContentLibraryVmTemplateWhereInput()\n.id(\"ContentLibraryVmTemplate-id\"));\r\n List resp = contentLibraryVmTemplateApi.removeContentLibraryVmTemplateClusters(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/add-vm-nic \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"vm_nics\":[{}]},\"where\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.add_vm_nic({\"data\":{\"vm_nics\":[{}]},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewAddVMNicParams()\r\n params.RequestBody = &models.VMAddNicParams{\nData: &models.VMAddNicParamsData{\nVMNics: []*models.VMNicParams{\n{\n},\n},\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.AddVMNic(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmAddNicParams params = new VmAddNicParams()\n.data(new VmAddNicParamsData()\n.addVmNicsItem(new VmNicParams()))\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.addVmNic(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/delete-content-library-vm-template": { + "/update-vm-nic": { "exampleValue": { + "data": { + "nic_index": 1 + }, "where": { - "id": "ContentLibraryVmTemplate-id" + "id": "Vm-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-content-library-vm-template \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"ContentLibraryVmTemplate-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, ContentLibraryVmTemplateApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n content_library_vm_template_api = ContentLibraryVmTemplateApi(client)\r\n resp = content_library_vm_template_api.delete_content_library_vm_template({\"where\":{\"id\":\"ContentLibraryVmTemplate-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/content_library_vm_template\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n content_library_vm_template_api := client.ContentLibraryVMTemplate\r\n params := content_library_vm_template.NewDeleteContentLibraryVMTemplateParams()\r\n params.RequestBody = &models.ContentLibraryVMTemplateDeletionParams{\nWhere: &models.ContentLibraryVMTemplateWhereInput{\nID: pointy.String(\"ContentLibraryVmTemplate-id\"),\n},\n}\r\n rawResp, err := content_library_vm_template_api.DeleteContentLibraryVMTemplate(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteContentLibraryVMTemplate) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteContentLibraryVMTemplate)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteContentLibraryVMTemplate) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ContentLibraryVmTemplateApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ContentLibraryVmTemplateApi contentLibraryVmTemplateApi = new ContentLibraryVmTemplateApi(client);\r\n ContentLibraryVmTemplateDeletionParams params = new ContentLibraryVmTemplateDeletionParams()\n.where(new ContentLibraryVmTemplateWhereInput()\n.id(\"ContentLibraryVmTemplate-id\"));\r\n List resp = contentLibraryVmTemplateApi.deleteContentLibraryVmTemplate(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-vm-nic \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"nic_index\":1},\"where\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.update_vm_nic({\"data\":{\"nic_index\":1},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewUpdateVMNicParams()\r\n params.RequestBody = &models.VMUpdateNicParams{\nData: &models.VMUpdateNicParamsData{\nNicIndex: pointy.Int32(1),\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.UpdateVMNic(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmUpdateNicParams params = new VmUpdateNicParams()\n.data(new VmUpdateNicParamsData()\n.nicIndex(1))\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.updateVmNic(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/export-content-library-vm-template": { + "/update-vm-nic-basic-info": { "exampleValue": { + "data": {}, "where": { - "id": "ContentLibraryVmTemplate-id" - } - }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/export-content-library-vm-template \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"ContentLibraryVmTemplate-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, ContentLibraryVmTemplateApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n content_library_vm_template_api = ContentLibraryVmTemplateApi(client)\r\n resp = content_library_vm_template_api.export_content_library_vm_template({\"where\":{\"id\":\"ContentLibraryVmTemplate-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/content_library_vm_template\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n content_library_vm_template_api := client.ContentLibraryVMTemplate\r\n params := content_library_vm_template.NewExportContentLibraryVMTemplateParams()\r\n params.RequestBody = &models.ContentLibraryVMTemplateExportParams{\nWhere: &models.ContentLibraryVMTemplateWhereInput{\nID: pointy.String(\"ContentLibraryVmTemplate-id\"),\n},\n}\r\n rawResp, err := content_library_vm_template_api.ExportContentLibraryVMTemplate(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVMExportFile) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVMExportFile)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVMExportFile) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ContentLibraryVmTemplateApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ContentLibraryVmTemplateApi contentLibraryVmTemplateApi = new ContentLibraryVmTemplateApi(client);\r\n ContentLibraryVmTemplateExportParams params = new ContentLibraryVmTemplateExportParams()\n.where(new ContentLibraryVmTemplateWhereInput()\n.id(\"ContentLibraryVmTemplate-id\"));\r\n List resp = contentLibraryVmTemplateApi.exportContentLibraryVmTemplate(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" - }, - "/import-content-library-vm-template": { - "exampleValue": [ - { - "name": "name-string", - "upload_tasks": [ - "-string" - ], - "parsed_ovf": { - "firmware": "BIOS", - "disks": [ - { - "size": 1, - "type": "CD_ROM", - "bus": "IDE", - "name": "name-string" - } - ], - "nics": [ - { - "mac": "mac-string" - } - ], - "memory": 1, - "cpu": { - "sockets": 1, - "cores": 1 - }, - "vcpu": 1, - "name": "name-string" - }, - "cluster_id": "ck74rk21wg5lz0786opdnzz5m" + "id": "VmNic-id" } - ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/import-content-library-vm-template \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"name\":\"name-string\",\"upload_tasks\":[\"-string\"],\"parsed_ovf\":{\"firmware\":\"BIOS\",\"disks\":[{\"size\":1,\"type\":\"CD_ROM\",\"bus\":\"IDE\",\"name\":\"name-string\"}],\"nics\":[{\"mac\":\"mac-string\"}],\"memory\":1,\"cpu\":{\"sockets\":1,\"cores\":1},\"vcpu\":1,\"name\":\"name-string\"},\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", - "python": "from cloudtower import ApiClient, Configuration, ContentLibraryVmTemplateApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n content_library_vm_template_api = ContentLibraryVmTemplateApi(client)\r\n resp = content_library_vm_template_api.import_content_library_vm_template([{\"name\":\"name-string\",\"upload_tasks\":[\"-string\"],\"parsed_ovf\":{\"firmware\":\"BIOS\",\"disks\":[{\"size\":1,\"type\":\"CD_ROM\",\"bus\":\"IDE\",\"name\":\"name-string\"}],\"nics\":[{\"mac\":\"mac-string\"}],\"memory\":1,\"cpu\":{\"sockets\":1,\"cores\":1},\"vcpu\":1,\"name\":\"name-string\"},\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/content_library_vm_template\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n content_library_vm_template_api := client.ContentLibraryVMTemplate\r\n params := content_library_vm_template.NewImportContentLibraryVMTemplateParams()\r\n params.RequestBody = []*models.ContentLibraryVMTemplateImportParams{\n{\nName: pointy.String(\"name-string\"),\nUploadTasks: []string{\"-string\",\n},\nParsedOvf: &models.ParsedOvf{\nFirmware: models.VMFirmwareBIOS.Pointer(),\nDisks: []*models.OvfDisk{\n{\nSize: pointy.Int64(1),\nType: models.VMDiskTypeCD_ROM.Pointer(),\nBus: models.BusIDE.Pointer(),\nName: pointy.String(\"name-string\"),\n},\n},\nNics: []*models.OvfNic{\n{\nMac: pointy.String(\"mac-string\"),\n},\n},\nMemory: pointy.Int64(1),\nCPU: &models.OvfCPU{\nSockets: pointy.Int32(1),\nCores: pointy.Int32(1),\n},\nVcpu: pointy.Int32(1),\nName: pointy.String(\"name-string\"),\n},\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := content_library_vm_template_api.ImportContentLibraryVMTemplate(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskContentLibraryVMTemplate) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskContentLibraryVMTemplate)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskContentLibraryVMTemplate) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ContentLibraryVmTemplateApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ContentLibraryVmTemplateApi contentLibraryVmTemplateApi = new ContentLibraryVmTemplateApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new ContentLibraryVmTemplateImportParams()\n.name(\"name-string\")\n.addUploadTasksItem(\"-string\")\n.parsedOvf(new ParsedOvf()\n.firmware(VmFirmware.fromValue(\"BIOS\"))\n.addDisksItem(new OvfDisk()\n.size(1L)\n.type(VmDiskType.fromValue(\"CD_ROM\"))\n.bus(Bus.fromValue(\"IDE\"))\n.name(\"name-string\"))\n.addNicsItem(new OvfNic()\n.mac(\"mac-string\"))\n.memory(1L)\n.cpu(new OvfCpu()\n.sockets(1)\n.cores(1))\n.vcpu(1)\n.name(\"name-string\"))\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = contentLibraryVmTemplateApi.importContentLibraryVmTemplate(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" - }, - "/upload-elf-image": { - "exampleValue": { - "file": "file-string" }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/upload-elf-image \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: multipart/form-data' \\\n\t-d '{\"file\":\"file-string\"}'", - "python": "from cloudtower import ApiClient, Configuration, ElfImageApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n elf_image_api = ElfImageApi(client)\r\n with open(\"file-path\", \"rb\") as file:\r\n resp = elf_image_api.create_elf_image(\r\n file=file\r\n )\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"bytes\"\r\n \"fmt\"\r\n \"io\"\r\n\r\n \"github.com/go-openapi/runtime\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/elf_image\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n elf_image_api := client.ElfImage\r\n params := elf_image.NewCreateElfImageParams()\r\n params.File = runtime.NamedReader(\"file\",io.NopCloser(bytes.NewReader([]byte(\"file-string\"))))\r\n resp, err := elf_image_api.CreateElfImage(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.ElfImageApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.nio.file.Files;\r\nimport java.nio.file.Path;\r\nimport java.util.ArrayList;\r\nimport java.util.List;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ElfImageApi elfImageApi = new ElfImageApi(client);\r\n List resp = elfImageApi.createElfImage(\r\n Files.readAllBytes(Path.of(\"file-string\")),\r\n \"cluster_id\",\r\n \"name\",\r\n \"size\",\r\n \"size_unit\",\r\n \"description\",\r\n \"upload_task_id\"\r\n );\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-vm-nic-basic-info \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"VmNic-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.update_vm_nic_basic_info({\"data\":{},\"where\":{\"id\":\"VmNic-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewUpdateVMNicBasicInfoParams()\r\n params.RequestBody = &models.VMUpdateNicBasicInfoParams{\nData: &models.VMUpdateNicBasicInfoParamsData{\n},\nWhere: &models.VMNicWhereInput{\nID: pointy.String(\"VmNic-id\"),\n},\n}\r\n rawResp, err := vm_api.UpdateVMNicBasicInfo(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmUpdateNicBasicInfoParams params = new VmUpdateNicBasicInfoParams()\n.data(new VmUpdateNicBasicInfoParamsData())\n.where(new VmNicWhereInput()\n.id(\"VmNic-id\"));\r\n List resp = vmApi.updateVmNicBasicInfo(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-elf-image": { + "/update-vm-nic-advance-info": { "exampleValue": { "data": {}, "where": { - "id": "ElfImage-id" + "id": "VmNic-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-elf-image \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"ElfImage-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, ElfImageApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n elf_image_api = ElfImageApi(client)\r\n resp = elf_image_api.update_elf_image({\"data\":{},\"where\":{\"id\":\"ElfImage-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/elf_image\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n elf_image_api := client.ElfImage\r\n params := elf_image.NewUpdateElfImageParams()\r\n params.RequestBody = &models.ElfImageUpdationParams{\nData: &models.ElfImageUpdationParamsData{\n},\nWhere: &models.ElfImageWhereInput{\nID: pointy.String(\"ElfImage-id\"),\n},\n}\r\n rawResp, err := elf_image_api.UpdateElfImage(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskElfImage) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskElfImage)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskElfImage) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ElfImageApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ElfImageApi elfImageApi = new ElfImageApi(client);\r\n ElfImageUpdationParams params = new ElfImageUpdationParams()\n.data(new ElfImageUpdationParamsData())\n.where(new ElfImageWhereInput()\n.id(\"ElfImage-id\"));\r\n List resp = elfImageApi.updateElfImage(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-vm-nic-advance-info \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"VmNic-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.update_vm_nic_advance_info({\"data\":{},\"where\":{\"id\":\"VmNic-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewUpdateVMNicAdvanceInfoParams()\r\n params.RequestBody = &models.VMUpdateNicAdvanceInfoParams{\nData: &models.VMUpdateNicAdvanceInfoParamsData{\n},\nWhere: &models.VMNicWhereInput{\nID: pointy.String(\"VmNic-id\"),\n},\n}\r\n rawResp, err := vm_api.UpdateVMNicAdvanceInfo(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmUpdateNicAdvanceInfoParams params = new VmUpdateNicAdvanceInfoParams()\n.data(new VmUpdateNicAdvanceInfoParamsData())\n.where(new VmNicWhereInput()\n.id(\"VmNic-id\"));\r\n List resp = vmApi.updateVmNicAdvanceInfo(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/delete-elf-image": { + "/update-vm-nic-qos-option": { "exampleValue": { + "data": {}, "where": { - "id": "ElfImage-id" + "id": "VmNic-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-elf-image \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"ElfImage-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, ElfImageApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n elf_image_api = ElfImageApi(client)\r\n resp = elf_image_api.delete_elf_image({\"where\":{\"id\":\"ElfImage-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/elf_image\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n elf_image_api := client.ElfImage\r\n params := elf_image.NewDeleteElfImageParams()\r\n params.RequestBody = &models.ElfImageDeletionParams{\nWhere: &models.ElfImageWhereInput{\nID: pointy.String(\"ElfImage-id\"),\n},\n}\r\n rawResp, err := elf_image_api.DeleteElfImage(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteElfImage) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteElfImage)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteElfImage) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ElfImageApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ElfImageApi elfImageApi = new ElfImageApi(client);\r\n ElfImageDeletionParams params = new ElfImageDeletionParams()\n.where(new ElfImageWhereInput()\n.id(\"ElfImage-id\"));\r\n List resp = elfImageApi.deleteElfImage(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" - }, - "/create-label": { - "exampleValue": [ - { - "key": "key-string" - } - ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-label \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"key\":\"key-string\"}]'", - "python": "from cloudtower import ApiClient, Configuration, LabelApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n label_api = LabelApi(client)\r\n resp = label_api.create_label([{\"key\":\"key-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/label\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n label_api := client.Label\r\n params := label.NewCreateLabelParams()\r\n params.RequestBody = []*models.LabelCreationParams{\n{\nKey: pointy.String(\"key-string\"),\n},\n}\r\n rawResp, err := label_api.CreateLabel(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskLabel) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskLabel)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskLabel) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.LabelApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n LabelApi labelApi = new LabelApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new LabelCreationParams()\n.key(\"key-string\"));\r\n List resp = labelApi.createLabel(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-vm-nic-qos-option \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"VmNic-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.update_vm_nic_qos_option({\"data\":{},\"where\":{\"id\":\"VmNic-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewUpdateVMNicQosOptionParams()\r\n params.RequestBody = &models.VMUpdateNicQosOptionsParams{\nData: &models.VMUpdateNicQosOptionsParamsData{\n},\nWhere: &models.VMNicWhereInput{\nID: pointy.String(\"VmNic-id\"),\n},\n}\r\n rawResp, err := vm_api.UpdateVMNicQosOption(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmUpdateNicQosOptionsParams params = new VmUpdateNicQosOptionsParams()\n.data(new VmUpdateNicQosOptionsParamsData())\n.where(new VmNicWhereInput()\n.id(\"VmNic-id\"));\r\n List resp = vmApi.updateVmNicQosOption(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-label": { + "/add-vm-pci-nic": { "exampleValue": { "data": {}, "where": { - "id": "Label-id" + "id": "Vm-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-label \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Label-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, LabelApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n label_api = LabelApi(client)\r\n resp = label_api.update_label({\"data\":{},\"where\":{\"id\":\"Label-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/label\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n label_api := client.Label\r\n params := label.NewUpdateLabelParams()\r\n params.RequestBody = &models.LabelUpdationParams{\nData: &models.LabelUpdationParamsData{\n},\nWhere: &models.LabelWhereInput{\nID: pointy.String(\"Label-id\"),\n},\n}\r\n rawResp, err := label_api.UpdateLabel(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskLabel) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskLabel)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskLabel) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.LabelApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n LabelApi labelApi = new LabelApi(client);\r\n LabelUpdationParams params = new LabelUpdationParams()\n.data(new LabelUpdationParamsData())\n.where(new LabelWhereInput()\n.id(\"Label-id\"));\r\n List resp = labelApi.updateLabel(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/add-vm-pci-nic \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.add_vm_pci_nic({\"data\":{},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewAddVMPciNicParams()\r\n params.RequestBody = &models.VMOperatePciNicParams{\nData: &models.VMOperatePciNicParamsData{\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.AddVMPciNic(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmOperatePciNicParams params = new VmOperatePciNicParams()\n.data(new VmOperatePciNicParamsData())\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.addVmPciNic(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/add-labels-to-resources": { + "/remove-vm-pci-nic": { "exampleValue": { "data": {}, "where": { - "id": "Label-id" + "id": "Vm-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/add-labels-to-resources \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Label-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, LabelApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n label_api = LabelApi(client)\r\n resp = label_api.add_labels_to_resources({\"data\":{},\"where\":{\"id\":\"Label-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/label\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n label_api := client.Label\r\n params := label.NewAddLabelsToResourcesParams()\r\n params.RequestBody = &models.AddLabelsToResourcesParams{\nData: &models.AddLabelsToResourcesParamsData{\n},\nWhere: &models.LabelWhereInput{\nID: pointy.String(\"Label-id\"),\n},\n}\r\n rawResp, err := label_api.AddLabelsToResources(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskLabel) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskLabel)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskLabel) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.LabelApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n LabelApi labelApi = new LabelApi(client);\r\n AddLabelsToResourcesParams params = new AddLabelsToResourcesParams()\n.data(new AddLabelsToResourcesParamsData())\n.where(new LabelWhereInput()\n.id(\"Label-id\"));\r\n List resp = labelApi.addLabelsToResources(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/remove-vm-pci-nic \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.remove_vm_pci_nic({\"data\":{},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewRemoveVMPciNicParams()\r\n params.RequestBody = &models.VMOperatePciNicParams{\nData: &models.VMOperatePciNicParamsData{\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.RemoveVMPciNic(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmOperatePciNicParams params = new VmOperatePciNicParams()\n.data(new VmOperatePciNicParamsData())\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.removeVmPciNic(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/remove-labels-from-resources": { + "/remove-vm-nic": { "exampleValue": { - "data": {}, + "data": { + "nic_index": [ + 1 + ] + }, "where": { - "id": "Label-id" + "id": "Vm-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/remove-labels-from-resources \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Label-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, LabelApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n label_api = LabelApi(client)\r\n resp = label_api.remove_labels_from_resources({\"data\":{},\"where\":{\"id\":\"Label-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/label\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n label_api := client.Label\r\n params := label.NewRemoveLabelsFromResourcesParams()\r\n params.RequestBody = &models.RemoveLabelsFromResourcesParams{\nData: &models.RemoveLabelsFromResourcesParamsData{\n},\nWhere: &models.LabelWhereInput{\nID: pointy.String(\"Label-id\"),\n},\n}\r\n rawResp, err := label_api.RemoveLabelsFromResources(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskLabel) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskLabel)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskLabel) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.LabelApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n LabelApi labelApi = new LabelApi(client);\r\n RemoveLabelsFromResourcesParams params = new RemoveLabelsFromResourcesParams()\n.data(new RemoveLabelsFromResourcesParamsData())\n.where(new LabelWhereInput()\n.id(\"Label-id\"));\r\n List resp = labelApi.removeLabelsFromResources(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/remove-vm-nic \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"nic_index\":[1]},\"where\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.remove_vm_nic({\"data\":{\"nic_index\":[1]},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewRemoveVMNicParams()\r\n params.RequestBody = &models.VMRemoveNicParams{\nData: &models.VMRemoveNicParamsData{\nNicIndex: []int{1\n},\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.RemoveVMNic(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmRemoveNicParams params = new VmRemoveNicParams()\n.data(new VmRemoveNicParamsData()\n.addNicIndexItem(1))\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.removeVmNic(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/delete-label": { + "/remove-vm-nic-by-where": { "exampleValue": { + "effect": {}, "where": { - "id": "Label-id" + "id": "VmNic-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-label \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Label-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, LabelApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n label_api = LabelApi(client)\r\n resp = label_api.delete_label({\"where\":{\"id\":\"Label-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/label\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n label_api := client.Label\r\n params := label.NewDeleteLabelParams()\r\n params.RequestBody = &models.LabelDeletionParams{\nWhere: &models.LabelWhereInput{\nID: pointy.String(\"Label-id\"),\n},\n}\r\n rawResp, err := label_api.DeleteLabel(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteLabel) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteLabel)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteLabel) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.LabelApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n LabelApi labelApi = new LabelApi(client);\r\n LabelDeletionParams params = new LabelDeletionParams()\n.where(new LabelWhereInput()\n.id(\"Label-id\"));\r\n List resp = labelApi.deleteLabel(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/remove-vm-nic-by-where \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"effect\":{},\"where\":{\"id\":\"VmNic-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.remove_vm_nic_by_where({\"effect\":{},\"where\":{\"id\":\"VmNic-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewRemoveVMNicByWhereParams()\r\n params.RequestBody = &models.VMRemoveNicByWhereParams{\nEffect: &models.VMRemoveNicByWhereParamsEffect{\n},\nWhere: &models.VMNicWhereInput{\nID: pointy.String(\"VmNic-id\"),\n},\n}\r\n rawResp, err := vm_api.RemoveVMNicByWhere(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmRemoveNicByWhereParams params = new VmRemoveNicByWhereParams()\n.effect(new VmRemoveNicByWhereParamsEffect())\n.where(new VmNicWhereInput()\n.id(\"VmNic-id\"));\r\n List resp = vmApi.removeVmNicByWhere(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/get-vm-metrics": { + "/add-vm-gpu-device": { "exampleValue": { - "range": "range-string", - "metrics": [ - "-string" + "data": [ + { + "gpu_id": "ck74rk21wg5lz0786opdnzz5m" + } ], - "vms": { + "where": { "id": "Vm-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-vm-metrics \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"range\":\"range-string\",\"metrics\":[\"-string\"],\"vms\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, MetricsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n metrics_api = MetricsApi(client)\r\n resp = metrics_api.get_vm_metrics({\"range\":\"range-string\",\"metrics\":[\"-string\"],\"vms\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/metrics\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n metrics_api := client.Metrics\r\n params := metrics.NewGetVMMetricsParams()\r\n params.RequestBody = &models.GetVMMetricInput{\nRange: pointy.String(\"range-string\"),\nMetrics: []string{\"-string\",\n},\nVms: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := metrics_api.GetVMMetrics(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskMetric) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskMetric)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskMetric) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.MetricsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n MetricsApi metricsApi = new MetricsApi(client);\r\n GetVmMetricInput params = new GetVmMetricInput()\n.range(\"range-string\")\n.addMetricsItem(\"-string\")\n.vms(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = metricsApi.getVmMetrics(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/add-vm-gpu-device \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":[{\"gpu_id\":\"ck74rk21wg5lz0786opdnzz5m\"}],\"where\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.add_vm_gpu_device({\"data\":[{\"gpu_id\":\"ck74rk21wg5lz0786opdnzz5m\"}],\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewAddVMGpuDeviceParams()\r\n params.RequestBody = &models.VMAddGpuDeviceParams{\nData: []*models.VMGpuOperationParams{\n{\nGpuID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.AddVMGpuDevice(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmAddGpuDeviceParams params = new VmAddGpuDeviceParams()\n.addDataItem(new VmGpuOperationParams()\n.gpuId(\"ck74rk21wg5lz0786opdnzz5m\"))\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.addVmGpuDevice(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/get-vm-network-metrics": { + "/remove-vm-gpu-device": { "exampleValue": { - "range": "range-string", - "metrics": [ - "-string" + "data": [ + { + "gpu_id": "ck74rk21wg5lz0786opdnzz5m" + } ], - "vms": { + "where": { "id": "Vm-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-vm-network-metrics \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"range\":\"range-string\",\"metrics\":[\"-string\"],\"vms\":{\"id\":\"Vm-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, MetricsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n metrics_api = MetricsApi(client)\r\n resp = metrics_api.get_vm_net_work_metrics({\"range\":\"range-string\",\"metrics\":[\"-string\"],\"vms\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/metrics\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n metrics_api := client.Metrics\r\n params := metrics.NewGetVMNetWorkMetricsParams()\r\n params.RequestBody = &models.GetVMNetWorkMetricInput{\nRange: pointy.String(\"range-string\"),\nMetrics: []string{\"-string\",\n},\nVms: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := metrics_api.GetVMNetWorkMetrics(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskMetric) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskMetric)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskMetric) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.MetricsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n MetricsApi metricsApi = new MetricsApi(client);\r\n GetVmNetWorkMetricInput params = new GetVmNetWorkMetricInput()\n.range(\"range-string\")\n.addMetricsItem(\"-string\")\n.vms(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = metricsApi.getVmNetWorkMetrics(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/remove-vm-gpu-device \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":[{\"gpu_id\":\"ck74rk21wg5lz0786opdnzz5m\"}],\"where\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.remove_vm_gpu_device({\"data\":[{\"gpu_id\":\"ck74rk21wg5lz0786opdnzz5m\"}],\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewRemoveVMGpuDeviceParams()\r\n params.RequestBody = &models.VMRemoveGpuDeviceParams{\nData: []*models.VMGpuOperationParams{\n{\nGpuID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.RemoveVMGpuDevice(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmRemoveGpuDeviceParams params = new VmRemoveGpuDeviceParams()\n.addDataItem(new VmGpuOperationParams()\n.gpuId(\"ck74rk21wg5lz0786opdnzz5m\"))\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.removeVmGpuDevice(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/get-disk-metrics": { + "/install-vmtools": { "exampleValue": { - "range": "range-string", - "disks": { - "id": "Disk-id" - }, - "metrics": [ - "-string" - ] + "where": { + "id": "Vm-id" + } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-disk-metrics \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"range\":\"range-string\",\"disks\":{\"id\":\"Disk-id\"},\"metrics\":[\"-string\"]}'", - "python": "from cloudtower import ApiClient, Configuration, MetricsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n metrics_api = MetricsApi(client)\r\n resp = metrics_api.get_disk_metrics({\"range\":\"range-string\",\"disks\":{\"id\":\"Disk-id\"},\"metrics\":[\"-string\"]})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/metrics\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n metrics_api := client.Metrics\r\n params := metrics.NewGetDiskMetricsParams()\r\n params.RequestBody = &models.GetDiskMetricInput{\nRange: pointy.String(\"range-string\"),\nDisks: &models.DiskWhereInput{\nID: pointy.String(\"Disk-id\"),\n},\nMetrics: []string{\"-string\",\n},\n}\r\n rawResp, err := metrics_api.GetDiskMetrics(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskMetric) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskMetric)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskMetric) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.MetricsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n MetricsApi metricsApi = new MetricsApi(client);\r\n GetDiskMetricInput params = new GetDiskMetricInput()\n.range(\"range-string\")\n.disks(new DiskWhereInput()\n.id(\"Disk-id\"))\n.addMetricsItem(\"-string\");\r\n List resp = metricsApi.getDiskMetrics(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/install-vmtools \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.install_vmtools({\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewInstallVmtoolsParams()\r\n params.RequestBody = &models.InstallVmtoolsParams{\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.InstallVmtools(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n InstallVmtoolsParams params = new InstallVmtoolsParams()\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.installVmtools(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/get-vm-volume-metrics": { + "/migrate-vm": { "exampleValue": { - "range": "range-string", - "metrics": [ - "-string" - ], - "vmVolumes": { - "id": "VmVolume-id" + "where": { + "id": "Vm-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-vm-volume-metrics \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"range\":\"range-string\",\"metrics\":[\"-string\"],\"vmVolumes\":{\"id\":\"VmVolume-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, MetricsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n metrics_api = MetricsApi(client)\r\n resp = metrics_api.get_vm_volume_metrics({\"range\":\"range-string\",\"metrics\":[\"-string\"],\"vmVolumes\":{\"id\":\"VmVolume-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/metrics\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n metrics_api := client.Metrics\r\n params := metrics.NewGetVMVolumeMetricsParams()\r\n params.RequestBody = &models.GetVMVolumeMetricInput{\nRange: pointy.String(\"range-string\"),\nMetrics: []string{\"-string\",\n},\nVMVolumes: &models.VMVolumeWhereInput{\nID: pointy.String(\"VmVolume-id\"),\n},\n}\r\n rawResp, err := metrics_api.GetVMVolumeMetrics(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskMetric) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskMetric)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskMetric) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.MetricsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n MetricsApi metricsApi = new MetricsApi(client);\r\n GetVmVolumeMetricInput params = new GetVmVolumeMetricInput()\n.range(\"range-string\")\n.addMetricsItem(\"-string\")\n.vmVolumes(new VmVolumeWhereInput()\n.id(\"VmVolume-id\"));\r\n List resp = metricsApi.getVmVolumeMetrics(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/migrate-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.migrate_vm({\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewMigrateVMParams()\r\n params.RequestBody = &models.VMMigrateParams{\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.MigrateVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmMigrateParams params = new VmMigrateParams()\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.migrateVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/get-lun-metrics": { + "/migrate-vm-across-cluster": { "exampleValue": { - "range": "range-string", - "luns": { - "id": "IscsiLun-id" + "data": { + "vm_config": { + "network_mapping": [ + { + "src_vlan_local_id": "ck74rk21wg5lz0786opdnzz5m", + "dest_vlan_local_id": "ck74rk21wg5lz0786opdnzz5m" + } + ], + "migrate_type": "COLD_MIGRATE", + "elf_storage_policy": "EC" + }, + "cluster_id": "ck74rk21wg5lz0786opdnzz5m" }, - "metrics": [ - "-string" - ] + "where": { + "id": "Vm-id" + } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-lun-metrics \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"range\":\"range-string\",\"luns\":{\"id\":\"IscsiLun-id\"},\"metrics\":[\"-string\"]}'", - "python": "from cloudtower import ApiClient, Configuration, MetricsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n metrics_api = MetricsApi(client)\r\n resp = metrics_api.get_lun_metrics({\"range\":\"range-string\",\"luns\":{\"id\":\"IscsiLun-id\"},\"metrics\":[\"-string\"]})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/metrics\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n metrics_api := client.Metrics\r\n params := metrics.NewGetLunMetricsParams()\r\n params.RequestBody = &models.GetLunMetricInput{\nRange: pointy.String(\"range-string\"),\nLuns: &models.IscsiLunWhereInput{\nID: pointy.String(\"IscsiLun-id\"),\n},\nMetrics: []string{\"-string\",\n},\n}\r\n rawResp, err := metrics_api.GetLunMetrics(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskMetric) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskMetric)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskMetric) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.MetricsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n MetricsApi metricsApi = new MetricsApi(client);\r\n GetLunMetricInput params = new GetLunMetricInput()\n.range(\"range-string\")\n.luns(new IscsiLunWhereInput()\n.id(\"IscsiLun-id\"))\n.addMetricsItem(\"-string\");\r\n List resp = metricsApi.getLunMetrics(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/migrate-vm-across-cluster \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"vm_config\":{\"network_mapping\":[{\"src_vlan_local_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"dest_vlan_local_id\":\"ck74rk21wg5lz0786opdnzz5m\"}],\"migrate_type\":\"COLD_MIGRATE\",\"elf_storage_policy\":\"EC\"},\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"},\"where\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.migrate_vm_across_cluster({\"data\":{\"vm_config\":{\"network_mapping\":[{\"src_vlan_local_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"dest_vlan_local_id\":\"ck74rk21wg5lz0786opdnzz5m\"}],\"migrate_type\":\"COLD_MIGRATE\",\"elf_storage_policy\":\"EC\"},\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewMigrateVMAcrossClusterParams()\r\n params.RequestBody = &models.VMMigrateAcrossClusterParams{\nData: &models.VMMigrateAcrossClusterParamsData{\nVMConfig: &models.MigrateVMConfig{\nNetworkMapping: []*models.VlanMapping{\n{\nSrcVlanLocalID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nDestVlanLocalID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n},\nMigrateType: models.MigrateTypeCOLD_MIGRATE.Pointer(),\nElfStoragePolicy: models.VMVolumeElfStoragePolicyTypeEC.Pointer(),\n},\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.MigrateVMAcrossCluster(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmMigrateAcrossClusterParams params = new VmMigrateAcrossClusterParams()\n.data(new VmMigrateAcrossClusterParamsData()\n.vmConfig(new MigrateVmConfig()\n.addNetworkMappingItem(new VlanMapping()\n.srcVlanLocalId(\"ck74rk21wg5lz0786opdnzz5m\")\n.destVlanLocalId(\"ck74rk21wg5lz0786opdnzz5m\"))\n.migrateType(MigrateType.fromValue(\"COLD_MIGRATE\"))\n.elfStoragePolicy(VmVolumeElfStoragePolicyType.fromValue(\"EC\")))\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\"))\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.migrateVmAcrossCluster(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/get-nvmf-namespace-metrics": { + "/stop-vm-in-cutover-migration": { "exampleValue": { - "nvmfNamespaces": { - "id": "NvmfNamespace-id" - }, - "metrics": [ - "-string" - ], - "range": "range-string" + "tasks": { + "id": "Task-id" + } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-nvmf-namespace-metrics \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"nvmfNamespaces\":{\"id\":\"NvmfNamespace-id\"},\"metrics\":[\"-string\"],\"range\":\"range-string\"}'", - "python": "from cloudtower import ApiClient, Configuration, MetricsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n metrics_api = MetricsApi(client)\r\n resp = metrics_api.get_nvmf_namespace_metrics({\"nvmfNamespaces\":{\"id\":\"NvmfNamespace-id\"},\"metrics\":[\"-string\"],\"range\":\"range-string\"})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/metrics\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n metrics_api := client.Metrics\r\n params := metrics.NewGetNvmfNamespaceMetricsParams()\r\n params.RequestBody = &models.GetNvmfNamespaceMetricInput{\nNvmfNamespaces: &models.NvmfNamespaceWhereInput{\nID: pointy.String(\"NvmfNamespace-id\"),\n},\nMetrics: []string{\"-string\",\n},\nRange: pointy.String(\"range-string\"),\n}\r\n rawResp, err := metrics_api.GetNvmfNamespaceMetrics(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskMetric) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskMetric)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskMetric) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.MetricsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n MetricsApi metricsApi = new MetricsApi(client);\r\n GetNvmfNamespaceMetricInput params = new GetNvmfNamespaceMetricInput()\n.nvmfNamespaces(new NvmfNamespaceWhereInput()\n.id(\"NvmfNamespace-id\"))\n.addMetricsItem(\"-string\")\n.range(\"range-string\");\r\n List resp = metricsApi.getNvmfNamespaceMetrics(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/stop-vm-in-cutover-migration \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"tasks\":{\"id\":\"Task-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.stop_vm_in_cutover_migration({\"tasks\":{\"id\":\"Task-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewStopVMInCutoverMigrationParams()\r\n params.RequestBody = &models.StopVMInCutoverMigrationParams{\nTasks: &models.TaskWhereInput{\nID: pointy.String(\"Task-id\"),\n},\n}\r\n rawResp, err := vm_api.StopVMInCutoverMigration(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n StopVmInCutoverMigrationParams params = new StopVmInCutoverMigrationParams()\n.tasks(new TaskWhereInput()\n.id(\"Task-id\"));\r\n List resp = vmApi.stopVmInCutoverMigration(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/get-cluster-metrics": { + "/abort-migrate-vm-across-cluster": { "exampleValue": { - "range": "range-string", - "clusters": { - "id": "Cluster-id" - }, - "metrics": [ - "-string" - ] + "tasks": { + "id": "Task-id" + } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-cluster-metrics \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"range\":\"range-string\",\"clusters\":{\"id\":\"Cluster-id\"},\"metrics\":[\"-string\"]}'", - "python": "from cloudtower import ApiClient, Configuration, MetricsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n metrics_api = MetricsApi(client)\r\n resp = metrics_api.get_cluster_metrics({\"range\":\"range-string\",\"clusters\":{\"id\":\"Cluster-id\"},\"metrics\":[\"-string\"]})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/metrics\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n metrics_api := client.Metrics\r\n params := metrics.NewGetClusterMetricsParams()\r\n params.RequestBody = &models.GetClusterMetricInput{\nRange: pointy.String(\"range-string\"),\nClusters: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\nMetrics: []string{\"-string\",\n},\n}\r\n rawResp, err := metrics_api.GetClusterMetrics(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskMetric) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskMetric)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskMetric) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.MetricsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n MetricsApi metricsApi = new MetricsApi(client);\r\n GetClusterMetricInput params = new GetClusterMetricInput()\n.range(\"range-string\")\n.clusters(new ClusterWhereInput()\n.id(\"Cluster-id\"))\n.addMetricsItem(\"-string\");\r\n List resp = metricsApi.getClusterMetrics(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/abort-migrate-vm-across-cluster \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"tasks\":{\"id\":\"Task-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.abort_migrate_vm_across_cluster({\"tasks\":{\"id\":\"Task-id\"}})\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewAbortMigrateVMAcrossClusterParams()\r\n params.RequestBody = &models.AbortMigrateVMAcrossClusterParams{\nTasks: &models.TaskWhereInput{\nID: pointy.String(\"Task-id\"),\n},\n}\r\n rawResp, err := vm_api.AbortMigrateVMAcrossCluster(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n AbortMigrateVmAcrossClusterParams params = new AbortMigrateVmAcrossClusterParams()\n.tasks(new TaskWhereInput()\n.id(\"Task-id\"));\r\n List resp = vmApi.abortMigrateVmAcrossCluster(params);\r\n }\r\n}" }, - "/get-host-metrics": { + "/add-vm-to-folder": { "exampleValue": { - "range": "range-string", - "hosts": { - "id": "Host-id" + "data": { + "folder_id": "ck74rk21wg5lz0786opdnzz5m" }, - "metrics": [ - "-string" - ] + "where": { + "id": "Vm-id" + } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-host-metrics \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"range\":\"range-string\",\"hosts\":{\"id\":\"Host-id\"},\"metrics\":[\"-string\"]}'", - "python": "from cloudtower import ApiClient, Configuration, MetricsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n metrics_api = MetricsApi(client)\r\n resp = metrics_api.get_host_metrics({\"range\":\"range-string\",\"hosts\":{\"id\":\"Host-id\"},\"metrics\":[\"-string\"]})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/metrics\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n metrics_api := client.Metrics\r\n params := metrics.NewGetHostMetricsParams()\r\n params.RequestBody = &models.GetHostMetricInput{\nRange: pointy.String(\"range-string\"),\nHosts: &models.HostWhereInput{\nID: pointy.String(\"Host-id\"),\n},\nMetrics: []string{\"-string\",\n},\n}\r\n rawResp, err := metrics_api.GetHostMetrics(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskMetric) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskMetric)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskMetric) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.MetricsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n MetricsApi metricsApi = new MetricsApi(client);\r\n GetHostMetricInput params = new GetHostMetricInput()\n.range(\"range-string\")\n.hosts(new HostWhereInput()\n.id(\"Host-id\"))\n.addMetricsItem(\"-string\");\r\n List resp = metricsApi.getHostMetrics(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/add-vm-to-folder \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"folder_id\":\"ck74rk21wg5lz0786opdnzz5m\"},\"where\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.add_vm_to_folder({\"data\":{\"folder_id\":\"ck74rk21wg5lz0786opdnzz5m\"},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewAddVMToFolderParams()\r\n params.RequestBody = &models.VMAddFolderParams{\nData: &models.VMAddFolderParamsData{\nFolderID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.AddVMToFolder(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmAddFolderParams params = new VmAddFolderParams()\n.data(new VmAddFolderParamsData()\n.folderId(\"ck74rk21wg5lz0786opdnzz5m\"))\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.addVmToFolder(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/get-host-network-metrics": { + "/remove-vm-from-folder": { "exampleValue": { - "hosts": { - "id": "Host-id" - }, - "range": "range-string", - "metrics": [ - "-string" - ] + "where": { + "id": "Vm-id" + } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-host-network-metrics \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"hosts\":{\"id\":\"Host-id\"},\"range\":\"range-string\",\"metrics\":[\"-string\"]}'", - "python": "from cloudtower import ApiClient, Configuration, MetricsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n metrics_api = MetricsApi(client)\r\n resp = metrics_api.get_host_network_metrics({\"hosts\":{\"id\":\"Host-id\"},\"range\":\"range-string\",\"metrics\":[\"-string\"]})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/metrics\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n metrics_api := client.Metrics\r\n params := metrics.NewGetHostNetworkMetricsParams()\r\n params.RequestBody = &models.GetHostNetworkMetricInput{\nHosts: &models.HostWhereInput{\nID: pointy.String(\"Host-id\"),\n},\nRange: pointy.String(\"range-string\"),\nMetrics: []string{\"-string\",\n},\n}\r\n rawResp, err := metrics_api.GetHostNetworkMetrics(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskMetric) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskMetric)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskMetric) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.MetricsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n MetricsApi metricsApi = new MetricsApi(client);\r\n GetHostNetworkMetricInput params = new GetHostNetworkMetricInput()\n.hosts(new HostWhereInput()\n.id(\"Host-id\"))\n.range(\"range-string\")\n.addMetricsItem(\"-string\");\r\n List resp = metricsApi.getHostNetworkMetrics(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/remove-vm-from-folder \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.remove_vm_to_folder({\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewRemoveVMToFolderParams()\r\n params.RequestBody = &models.VMOperateParams{\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.RemoveVMToFolder(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmOperateParams params = new VmOperateParams()\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.removeVmToFolder(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/get-host-service-metrics": { + "/update-vm-advanced-options": { "exampleValue": { - "range": "range-string", - "hosts": { - "id": "Host-id" - }, - "services": [ - "-string" - ], - "metrics": [ - "-string" - ] + "data": {}, + "where": { + "id": "Vm-id" + } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-host-service-metrics \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"range\":\"range-string\",\"hosts\":{\"id\":\"Host-id\"},\"services\":[\"-string\"],\"metrics\":[\"-string\"]}'", - "python": "from cloudtower import ApiClient, Configuration, MetricsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n metrics_api = MetricsApi(client)\r\n resp = metrics_api.get_host_servicek_metrics({\"range\":\"range-string\",\"hosts\":{\"id\":\"Host-id\"},\"services\":[\"-string\"],\"metrics\":[\"-string\"]})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/metrics\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n metrics_api := client.Metrics\r\n params := metrics.NewGetHostServicekMetricsParams()\r\n params.RequestBody = &models.GetHostServiceMetricInput{\nRange: pointy.String(\"range-string\"),\nHosts: &models.HostWhereInput{\nID: pointy.String(\"Host-id\"),\n},\nServices: []string{\"-string\",\n},\nMetrics: []string{\"-string\",\n},\n}\r\n rawResp, err := metrics_api.GetHostServicekMetrics(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskMetric) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskMetric)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskMetric) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.MetricsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n MetricsApi metricsApi = new MetricsApi(client);\r\n GetHostServiceMetricInput params = new GetHostServiceMetricInput()\n.range(\"range-string\")\n.hosts(new HostWhereInput()\n.id(\"Host-id\"))\n.addServicesItem(\"-string\")\n.addMetricsItem(\"-string\");\r\n List resp = metricsApi.getHostServicekMetrics(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-vm-advanced-options \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.update_vm_advanced_options({\"data\":{},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewUpdateVMAdvancedOptionsParams()\r\n params.RequestBody = &models.VMUpdateAdvancedOptionsParams{\nData: &models.VMUpdateAdvancedOptionsParamsData{\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.UpdateVMAdvancedOptions(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmUpdateAdvancedOptionsParams params = new VmUpdateAdvancedOptionsParams()\n.data(new VmUpdateAdvancedOptionsParamsData())\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.updateVmAdvancedOptions(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/get-scvm-metrics": { + "/update-vm-host-options": { "exampleValue": { - "range": "range-string", - "hosts": { - "id": "Host-id" - }, - "metrics": [ - "-string" - ] + "data": {}, + "where": { + "id": "Vm-id" + } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-scvm-metrics \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"range\":\"range-string\",\"hosts\":{\"id\":\"Host-id\"},\"metrics\":[\"-string\"]}'", - "python": "from cloudtower import ApiClient, Configuration, MetricsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n metrics_api = MetricsApi(client)\r\n resp = metrics_api.get_scvm_metrics({\"range\":\"range-string\",\"hosts\":{\"id\":\"Host-id\"},\"metrics\":[\"-string\"]})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/metrics\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n metrics_api := client.Metrics\r\n params := metrics.NewGetScvmMetricsParams()\r\n params.RequestBody = &models.GetScvmMetricInput{\nRange: pointy.String(\"range-string\"),\nHosts: &models.HostWhereInput{\nID: pointy.String(\"Host-id\"),\n},\nMetrics: []string{\"-string\",\n},\n}\r\n rawResp, err := metrics_api.GetScvmMetrics(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskMetric) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskMetric)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskMetric) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.MetricsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n MetricsApi metricsApi = new MetricsApi(client);\r\n GetScvmMetricInput params = new GetScvmMetricInput()\n.range(\"range-string\")\n.hosts(new HostWhereInput()\n.id(\"Host-id\"))\n.addMetricsItem(\"-string\");\r\n List resp = metricsApi.getScvmMetrics(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-vm-host-options \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.update_vm_host_options({\"data\":{},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewUpdateVMHostOptionsParams()\r\n params.RequestBody = &models.VMUpdateHostOptionsParams{\nData: &models.VMUpdateHostOptionsParamsData{\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.UpdateVMHostOptions(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmUpdateHostOptionsParams params = new VmUpdateHostOptionsParams()\n.data(new VmUpdateHostOptionsParamsData())\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.updateVmHostOptions(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/get-scvm-network-metrics": { + "/reset-vm-guest-os-password": { "exampleValue": { - "range": "range-string", - "hosts": { - "id": "Host-id" + "data": { + "password": "password-string", + "username": "username-string" }, - "metrics": [ - "-string" - ] + "where": { + "id": "Vm-id" + } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-scvm-network-metrics \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"range\":\"range-string\",\"hosts\":{\"id\":\"Host-id\"},\"metrics\":[\"-string\"]}'", - "python": "from cloudtower import ApiClient, Configuration, MetricsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n metrics_api = MetricsApi(client)\r\n resp = metrics_api.get_scvm_network_metrics({\"range\":\"range-string\",\"hosts\":{\"id\":\"Host-id\"},\"metrics\":[\"-string\"]})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/metrics\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n metrics_api := client.Metrics\r\n params := metrics.NewGetScvmNetworkMetricsParams()\r\n params.RequestBody = &models.GetScvmNetworkInput{\nRange: pointy.String(\"range-string\"),\nHosts: &models.HostWhereInput{\nID: pointy.String(\"Host-id\"),\n},\nMetrics: []string{\"-string\",\n},\n}\r\n rawResp, err := metrics_api.GetScvmNetworkMetrics(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskMetric) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskMetric)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskMetric) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.MetricsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n MetricsApi metricsApi = new MetricsApi(client);\r\n GetScvmNetworkInput params = new GetScvmNetworkInput()\n.range(\"range-string\")\n.hosts(new HostWhereInput()\n.id(\"Host-id\"))\n.addMetricsItem(\"-string\");\r\n List resp = metricsApi.getScvmNetworkMetrics(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/reset-vm-guest-os-password \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"password\":\"password-string\",\"username\":\"username-string\"},\"where\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.reset_vm_guest_os_password({\"data\":{\"password\":\"password-string\",\"username\":\"username-string\"},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewResetVMGuestOsPasswordParams()\r\n params.RequestBody = &models.VMResetGuestOsPasswordParams{\nData: &models.VMResetGuestOsPasswordParamsData{\nPassword: pointy.String(\"password-string\"),\nUsername: pointy.String(\"username-string\"),\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.ResetVMGuestOsPassword(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmResetGuestOsPasswordParams params = new VmResetGuestOsPasswordParams()\n.data(new VmResetGuestOsPasswordParamsData()\n.password(\"password-string\")\n.username(\"username-string\"))\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.resetVmGuestOsPassword(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/get-scvm-service-metrics": { + "/update-vm-owner": { "exampleValue": { - "range": "range-string", - "hosts": { - "id": "Host-id" + "data": { + "search_for": "username", + "value": "value-string" }, - "services": [ - "-string" - ], - "metrics": [ - "-string" - ] - }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-scvm-service-metrics \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"range\":\"range-string\",\"hosts\":{\"id\":\"Host-id\"},\"services\":[\"-string\"],\"metrics\":[\"-string\"]}'", - "python": "from cloudtower import ApiClient, Configuration, MetricsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n metrics_api = MetricsApi(client)\r\n resp = metrics_api.get_scvm_servicek_metrics({\"range\":\"range-string\",\"hosts\":{\"id\":\"Host-id\"},\"services\":[\"-string\"],\"metrics\":[\"-string\"]})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/metrics\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n metrics_api := client.Metrics\r\n params := metrics.NewGetScvmServicekMetricsParams()\r\n params.RequestBody = &models.GetScvmServiceMetricInput{\nRange: pointy.String(\"range-string\"),\nHosts: &models.HostWhereInput{\nID: pointy.String(\"Host-id\"),\n},\nServices: []string{\"-string\",\n},\nMetrics: []string{\"-string\",\n},\n}\r\n rawResp, err := metrics_api.GetScvmServicekMetrics(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskMetric) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskMetric)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskMetric) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.MetricsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n MetricsApi metricsApi = new MetricsApi(client);\r\n GetScvmServiceMetricInput params = new GetScvmServiceMetricInput()\n.range(\"range-string\")\n.hosts(new HostWhereInput()\n.id(\"Host-id\"))\n.addServicesItem(\"-string\")\n.addMetricsItem(\"-string\");\r\n List resp = metricsApi.getScvmServicekMetrics(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" - }, - "/get-scvm-disk-metrics": { - "exampleValue": { - "range": "range-string", - "disks": { - "id": "Disk-id" - }, - "metrics": [ - "-string" - ] - }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-scvm-disk-metrics \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"range\":\"range-string\",\"disks\":{\"id\":\"Disk-id\"},\"metrics\":[\"-string\"]}'", - "python": "from cloudtower import ApiClient, Configuration, MetricsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n metrics_api = MetricsApi(client)\r\n resp = metrics_api.get_scvm_disk_metrics({\"range\":\"range-string\",\"disks\":{\"id\":\"Disk-id\"},\"metrics\":[\"-string\"]})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/metrics\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n metrics_api := client.Metrics\r\n params := metrics.NewGetScvmDiskMetricsParams()\r\n params.RequestBody = &models.GetScvmDiskMetricInput{\nRange: pointy.String(\"range-string\"),\nDisks: &models.DiskWhereInput{\nID: pointy.String(\"Disk-id\"),\n},\nMetrics: []string{\"-string\",\n},\n}\r\n rawResp, err := metrics_api.GetScvmDiskMetrics(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskMetric) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskMetric)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskMetric) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.MetricsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n MetricsApi metricsApi = new MetricsApi(client);\r\n GetScvmDiskMetricInput params = new GetScvmDiskMetricInput()\n.range(\"range-string\")\n.disks(new DiskWhereInput()\n.id(\"Disk-id\"))\n.addMetricsItem(\"-string\");\r\n List resp = metricsApi.getScvmDiskMetrics(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" - }, - "/get-zone-metrics": { - "exampleValue": { - "range": "range-string", - "type": "primary-to-secondary", - "clusters": { - "id": "Cluster-id" - }, - "metrics": [ - "-string" - ] - }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-zone-metrics \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"range\":\"range-string\",\"type\":\"primary-to-secondary\",\"clusters\":{\"id\":\"Cluster-id\"},\"metrics\":[\"-string\"]}'", - "python": "from cloudtower import ApiClient, Configuration, MetricsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n metrics_api = MetricsApi(client)\r\n resp = metrics_api.get_zone_metrics({\"range\":\"range-string\",\"type\":\"primary-to-secondary\",\"clusters\":{\"id\":\"Cluster-id\"},\"metrics\":[\"-string\"]})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/metrics\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n metrics_api := client.Metrics\r\n params := metrics.NewGetZoneMetricsParams()\r\n params.RequestBody = &models.GetZoneMetricInput{\nRange: pointy.String(\"range-string\"),\nType: pointy.String(\"primary-to-secondary\"),\nClusters: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\nMetrics: []string{\"-string\",\n},\n}\r\n rawResp, err := metrics_api.GetZoneMetrics(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskMetric) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskMetric)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskMetric) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.MetricsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n MetricsApi metricsApi = new MetricsApi(client);\r\n GetZoneMetricInput params = new GetZoneMetricInput()\n.range(\"range-string\")\n.type(\"primary-to-secondary\")\n.clusters(new ClusterWhereInput()\n.id(\"Cluster-id\"))\n.addMetricsItem(\"-string\");\r\n List resp = metricsApi.getZoneMetrics(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" - }, - "/get-witness-metrics": { - "exampleValue": { - "range": "range-string", - "clusters": { - "id": "Cluster-id" - }, - "metrics": [ - "-string" - ] - }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-witness-metrics \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"range\":\"range-string\",\"clusters\":{\"id\":\"Cluster-id\"},\"metrics\":[\"-string\"]}'", - "python": "from cloudtower import ApiClient, Configuration, MetricsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n metrics_api = MetricsApi(client)\r\n resp = metrics_api.get_witness_metrics({\"range\":\"range-string\",\"clusters\":{\"id\":\"Cluster-id\"},\"metrics\":[\"-string\"]})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/metrics\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n metrics_api := client.Metrics\r\n params := metrics.NewGetWitnessMetricsParams()\r\n params.RequestBody = &models.GetWitnessMetricInput{\nRange: pointy.String(\"range-string\"),\nClusters: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\nMetrics: []string{\"-string\",\n},\n}\r\n rawResp, err := metrics_api.GetWitnessMetrics(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskMetric) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskMetric)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskMetric) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.MetricsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n MetricsApi metricsApi = new MetricsApi(client);\r\n GetWitnessMetricInput params = new GetWitnessMetricInput()\n.range(\"range-string\")\n.clusters(new ClusterWhereInput()\n.id(\"Cluster-id\"))\n.addMetricsItem(\"-string\");\r\n List resp = metricsApi.getWitnessMetrics(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" - }, - "/get-top-n-metrics-in-clusters": { - "exampleValue": { - "metrics": [ - "-string" - ], - "clusters": { - "id": "Cluster-id" - }, - "type": "top", - "n": 1, - "range": "range-string" - }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-top-n-metrics-in-clusters \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"metrics\":[\"-string\"],\"clusters\":{\"id\":\"Cluster-id\"},\"type\":\"top\",\"n\":1,\"range\":\"range-string\"}'", - "python": "from cloudtower import ApiClient, Configuration, MetricsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n metrics_api = MetricsApi(client)\r\n resp = metrics_api.get_top_n_vm_volume_metrics({\"metrics\":[\"-string\"],\"clusters\":{\"id\":\"Cluster-id\"},\"type\":\"top\",\"n\":1,\"range\":\"range-string\"})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/metrics\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n metrics_api := client.Metrics\r\n params := metrics.NewGetTopNVMVolumeMetricsParams()\r\n params.RequestBody = &models.GetTopNMetricInput{\nMetrics: []string{\"-string\",\n},\nClusters: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\nType: pointy.String(\"top\"),\nN: pointy.Int32(1),\nRange: pointy.String(\"range-string\"),\n}\r\n rawResp, err := metrics_api.GetTopNVMVolumeMetrics(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskMetric) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskMetric)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskMetric) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.MetricsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n MetricsApi metricsApi = new MetricsApi(client);\r\n GetTopNMetricInput params = new GetTopNMetricInput()\n.addMetricsItem(\"-string\")\n.clusters(new ClusterWhereInput()\n.id(\"Cluster-id\"))\n.type(\"top\")\n.n(1)\n.range(\"range-string\");\r\n List resp = metricsApi.getTopNVmVolumeMetrics(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" - }, - "/upload-svt-image": { - "exampleValue": { - "file": "file-string" - }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/upload-svt-image \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: multipart/form-data' \\\n\t-d '{\"file\":\"file-string\"}'", - "python": "from cloudtower import ApiClient, Configuration, SvtImageApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n svt_image_api = SvtImageApi(client)\r\n with open(\"file-path\", \"rb\") as file:\r\n resp = svt_image_api.upload_svt_image(\r\n file=file\r\n )\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"bytes\"\r\n \"fmt\"\r\n \"io\"\r\n\r\n \"github.com/go-openapi/runtime\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/svt_image\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n svt_image_api := client.SvtImage\r\n params := svt_image.NewUploadSvtImageParams()\r\n params.File = runtime.NamedReader(\"file\",io.NopCloser(bytes.NewReader([]byte(\"file-string\"))))\r\n resp, err := svt_image_api.UploadSvtImage(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.SvtImageApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.nio.file.Files;\r\nimport java.nio.file.Path;\r\nimport java.util.ArrayList;\r\nimport java.util.List;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SvtImageApi svtImageApi = new SvtImageApi(client);\r\n List resp = svtImageApi.uploadSvtImage(\r\n Files.readAllBytes(Path.of(\"file-string\")),\r\n \"cluster_id\",\r\n \"name\",\r\n \"size\",\r\n \"size_unit\",\r\n \"version\",\r\n \"upload_task_id\"\r\n );\r\n }\r\n}" - }, - "/mount-usb-device": { - "exampleValue": { - "data": {}, "where": { - "id": "UsbDevice-id" + "id": "Vm-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/mount-usb-device \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"UsbDevice-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, UsbDeviceApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n usb_device_api = UsbDeviceApi(client)\r\n resp = usb_device_api.mount_usb_device({\"data\":{},\"where\":{\"id\":\"UsbDevice-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/usb_device\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n usb_device_api := client.UsbDevice\r\n params := usb_device.NewMountUsbDeviceParams()\r\n params.RequestBody = &models.UsbDeviceMountParams{\nData: &models.UsbDeviceMountParamsData{\n},\nWhere: &models.UsbDeviceWhereInput{\nID: pointy.String(\"UsbDevice-id\"),\n},\n}\r\n rawResp, err := usb_device_api.MountUsbDevice(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskUsbDevice) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskUsbDevice)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskUsbDevice) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.UsbDeviceApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n UsbDeviceApi usbDeviceApi = new UsbDeviceApi(client);\r\n UsbDeviceMountParams params = new UsbDeviceMountParams()\n.data(new UsbDeviceMountParamsData())\n.where(new UsbDeviceWhereInput()\n.id(\"UsbDevice-id\"));\r\n List resp = usbDeviceApi.mountUsbDevice(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-vm-owner \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"search_for\":\"username\",\"value\":\"value-string\"},\"where\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.update_vm_owner({\"data\":{\"search_for\":\"username\",\"value\":\"value-string\"},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewUpdateVMOwnerParams()\r\n params.RequestBody = &models.VMUpdateOwnerParams{\nData: &models.VMUpdateOwnerParamsData{\nSearchFor: pointy.String(\"username\"),\nValue: pointy.String(\"value-string\"),\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.UpdateVMOwner(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmUpdateOwnerParams params = new VmUpdateOwnerParams()\n.data(new VmUpdateOwnerParamsData()\n.searchFor(\"username\")\n.value(\"value-string\"))\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.updateVmOwner(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/unmount-usb-device": { + "/update-vm-io-policy": { "exampleValue": { + "data": {}, "where": { - "id": "UsbDevice-id" + "id": "Vm-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/unmount-usb-device \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"UsbDevice-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, UsbDeviceApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n usb_device_api = UsbDeviceApi(client)\r\n resp = usb_device_api.unmount_usb_device({\"where\":{\"id\":\"UsbDevice-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/usb_device\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n usb_device_api := client.UsbDevice\r\n params := usb_device.NewUnmountUsbDeviceParams()\r\n params.RequestBody = &models.UsbDeviceUnmountParams{\nWhere: &models.UsbDeviceWhereInput{\nID: pointy.String(\"UsbDevice-id\"),\n},\n}\r\n rawResp, err := usb_device_api.UnmountUsbDevice(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskUsbDevice) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskUsbDevice)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskUsbDevice) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.UsbDeviceApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n UsbDeviceApi usbDeviceApi = new UsbDeviceApi(client);\r\n UsbDeviceUnmountParams params = new UsbDeviceUnmountParams()\n.where(new UsbDeviceWhereInput()\n.id(\"UsbDevice-id\"));\r\n List resp = usbDeviceApi.unmountUsbDevice(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-vm-io-policy \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.update_vm_io_policy({\"data\":{},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewUpdateVMIoPolicyParams()\r\n params.RequestBody = &models.VMUpdateIoPolicyParams{\nData: &models.VMUpdateIoPolicyParamsData{\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.UpdateVMIoPolicy(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmUpdateIoPolicyParams params = new VmUpdateIoPolicyParams()\n.data(new VmUpdateIoPolicyParamsData())\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.updateVmIoPolicy(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/get-usb-devices": { + "/export-vm": { "exampleValue": { + "data": { + "type": "OVF" + }, "where": { - "id": "UsbDevice-id" + "id": "Vm-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-usb-devices \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"UsbDevice-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, UsbDeviceApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n usb_device_api = UsbDeviceApi(client)\r\n resp = usb_device_api.get_usb_devices({\"where\":{\"id\":\"UsbDevice-id\"}})\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/usb_device\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n usb_device_api := client.UsbDevice\r\n params := usb_device.NewGetUsbDevicesParams()\r\n params.RequestBody = &models.GetUsbDevicesRequestBody{\nWhere: &models.UsbDeviceWhereInput{\nID: pointy.String(\"UsbDevice-id\"),\n},\n}\r\n rawResp, err := usb_device_api.GetUsbDevices(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.UsbDeviceApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n UsbDeviceApi usbDeviceApi = new UsbDeviceApi(client);\r\n GetUsbDevicesRequestBody params = new GetUsbDevicesRequestBody()\n.where(new UsbDeviceWhereInput()\n.id(\"UsbDevice-id\"));\r\n List resp = usbDeviceApi.getUsbDevices(params);\r\n }\r\n}" - }, - "/login": { - "exampleValue": { - "username": "username-string", - "password": "password-string" - }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/login \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"username\":\"username-string\",\"password\":\"password-string\"}'", - "python": "from cloudtower import ApiClient, Configuration, UserApi\r\nfrom cloudtower.utils import login, wait_task\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n user_api = UserApi(client)\r\n resp = user_api.login({\"username\":\"username-string\",\"password\":\"password-string\"})\r\n wait_task(resp.task_id, client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/user\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n user_api := client.User\r\n params := user.NewLoginParams()\r\n params.RequestBody = &models.LoginInput{\nUsername: pointy.String(\"username-string\"),\nPassword: pointy.String(\"password-string\"),\n}\r\n rawResp, err := user_api.Login(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n err = utils.WaitTask(context.Background(), client, resp.TaskID, 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.UserApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n UserApi userApi = new UserApi(client);\r\n LoginInput params = new LoginInput()\n.username(\"username-string\")\n.password(\"password-string\");\r\n WithTaskLoginResponse resp = userApi.login(params);\r\n TaskUtil.WaitTask(resp.getTaskId(), client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/export-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"type\":\"OVF\"},\"where\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.export_vm({\"data\":{\"type\":\"OVF\"},\"where\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewExportVMParams()\r\n params.RequestBody = &models.VMExportParams{\nData: &models.VMExportParamsData{\nType: models.VMExportFileTypeOVF.Pointer(),\n},\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.ExportVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVMExportFile) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVMExportFile)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVMExportFile) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmExportParams params = new VmExportParams()\n.data(new VmExportParamsData()\n.type(VmExportFileType.fromValue(\"OVF\")))\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.exportVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/create-user": { + "/import-vm": { "exampleValue": [ { - "role_id": "ck74rk21wg5lz0786opdnzz5m", "name": "name-string", - "username": "username-string" + "cluster_id": "ck74rk21wg5lz0786opdnzz5m", + "upload_tasks": [ + "-string" + ], + "parsed_ovf": { + "firmware": "BIOS", + "disks": [ + { + "size": 1, + "type": "CD_ROM", + "bus": "IDE", + "name": "name-string" + } + ], + "nics": [ + { + "mac": "mac-string" + } + ], + "memory": 1, + "cpu": { + "sockets": 1, + "cores": 1 + }, + "vcpu": 1, + "name": "name-string" + } } ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-user \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"role_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\",\"username\":\"username-string\"}]'", - "python": "from cloudtower import ApiClient, Configuration, UserApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n user_api = UserApi(client)\r\n resp = user_api.create_user([{\"role_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\",\"username\":\"username-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/user\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n user_api := client.User\r\n params := user.NewCreateUserParams()\r\n params.RequestBody = []*models.UserCreationParams{\n{\nRoleID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\nUsername: pointy.String(\"username-string\"),\n},\n}\r\n rawResp, err := user_api.CreateUser(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskUser) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskUser)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskUser) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.UserApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n UserApi userApi = new UserApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new UserCreationParams()\n.roleId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\")\n.username(\"username-string\"));\r\n List resp = userApi.createUser(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/import-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"name\":\"name-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"upload_tasks\":[\"-string\"],\"parsed_ovf\":{\"firmware\":\"BIOS\",\"disks\":[{\"size\":1,\"type\":\"CD_ROM\",\"bus\":\"IDE\",\"name\":\"name-string\"}],\"nics\":[{\"mac\":\"mac-string\"}],\"memory\":1,\"cpu\":{\"sockets\":1,\"cores\":1},\"vcpu\":1,\"name\":\"name-string\"}}]'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.import_vm([{\"name\":\"name-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"upload_tasks\":[\"-string\"],\"parsed_ovf\":{\"firmware\":\"BIOS\",\"disks\":[{\"size\":1,\"type\":\"CD_ROM\",\"bus\":\"IDE\",\"name\":\"name-string\"}],\"nics\":[{\"mac\":\"mac-string\"}],\"memory\":1,\"cpu\":{\"sockets\":1,\"cores\":1},\"vcpu\":1,\"name\":\"name-string\"}}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewImportVMParams()\r\n params.RequestBody = []*models.VMImportParams{\n{\nName: pointy.String(\"name-string\"),\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nUploadTasks: []string{\"-string\",\n},\nParsedOvf: &models.ParsedOvf{\nFirmware: models.VMFirmwareBIOS.Pointer(),\nDisks: []*models.OvfDisk{\n{\nSize: pointy.Int64(1),\nType: models.VMDiskTypeCD_ROM.Pointer(),\nBus: models.BusIDE.Pointer(),\nName: pointy.String(\"name-string\"),\n},\n},\nNics: []*models.OvfNic{\n{\nMac: pointy.String(\"mac-string\"),\n},\n},\nMemory: pointy.Int64(1),\nCPU: &models.OvfCPU{\nSockets: pointy.Int32(1),\nCores: pointy.Int32(1),\n},\nVcpu: pointy.Int32(1),\nName: pointy.String(\"name-string\"),\n},\n},\n}\r\n rawResp, err := vm_api.ImportVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new VmImportParams()\n.name(\"name-string\")\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.addUploadTasksItem(\"-string\")\n.parsedOvf(new ParsedOvf()\n.firmware(VmFirmware.fromValue(\"BIOS\"))\n.addDisksItem(new OvfDisk()\n.size(1L)\n.type(VmDiskType.fromValue(\"CD_ROM\"))\n.bus(Bus.fromValue(\"IDE\"))\n.name(\"name-string\"))\n.addNicsItem(new OvfNic()\n.mac(\"mac-string\"))\n.memory(1L)\n.cpu(new OvfCpu()\n.sockets(1)\n.cores(1))\n.vcpu(1)\n.name(\"name-string\")));\r\n List resp = vmApi.importVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-user": { + "/get-vm-gpu-device-info": { "exampleValue": { - "data": {}, "where": { - "id": "User-id" + "id": "Vm-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-user \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"User-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, UserApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n user_api = UserApi(client)\r\n resp = user_api.update_user({\"data\":{},\"where\":{\"id\":\"User-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/user\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n user_api := client.User\r\n params := user.NewUpdateUserParams()\r\n params.RequestBody = &models.UserUpdationParams{\nData: &models.UserUpdationParamsData{\n},\nWhere: &models.UserWhereInput{\nID: pointy.String(\"User-id\"),\n},\n}\r\n rawResp, err := user_api.UpdateUser(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskUser) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskUser)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskUser) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.UserApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n UserApi userApi = new UserApi(client);\r\n UserUpdationParams params = new UserUpdationParams()\n.data(new UserUpdationParamsData())\n.where(new UserWhereInput()\n.id(\"User-id\"));\r\n List resp = userApi.updateUser(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-vm-gpu-device-info \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.get_vm_gpu_device_info({\"where\":{\"id\":\"Vm-id\"}})\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewGetVMGpuDeviceInfoParams()\r\n params.RequestBody = &models.GetVmsRequestBody{\nWhere: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.GetVMGpuDeviceInfo(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n GetVmsRequestBody params = new GetVmsRequestBody()\n.where(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = vmApi.getVmGpuDeviceInfo(params);\r\n }\r\n}" }, - "/delete-user": { + "/get-vm-vnc-info": { "exampleValue": { - "where": { - "id": "User-id" + "vm": { + "id": "Vm-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-user \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"User-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, UserApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n user_api = UserApi(client)\r\n resp = user_api.delete_user({\"where\":{\"id\":\"User-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/user\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n user_api := client.User\r\n params := user.NewDeleteUserParams()\r\n params.RequestBody = &models.UserDeletionParams{\nWhere: &models.UserWhereInput{\nID: pointy.String(\"User-id\"),\n},\n}\r\n rawResp, err := user_api.DeleteUser(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteUser) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteUser)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteUser) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.UserApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n UserApi userApi = new UserApi(client);\r\n UserDeletionParams params = new UserDeletionParams()\n.where(new UserWhereInput()\n.id(\"User-id\"));\r\n List resp = userApi.deleteUser(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-vm-vnc-info \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"vm\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.get_vm_vnc_info({\"vm\":{\"id\":\"Vm-id\"}})\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewGetVMVncInfoParams()\r\n params.RequestBody = &models.GetVMVncInfoParams{\nVM: &models.VMWhereUniqueInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := vm_api.GetVMVncInfo(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n GetVmVncInfoParams params = new GetVmVncInfoParams()\n.vm(new VmWhereUniqueInput()\n.id(\"Vm-id\"));\r\n VmVncInfo resp = vmApi.getVmVncInfo(params);\r\n }\r\n}" }, - "/create-root-user": { + "/update-vm-vpc-nic": { "exampleValue": { - "password": "password-string" + "data": { + "vpc_nic": {} + }, + "where": { + "id": "VmNic-id" + } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-root-user \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"password\":\"password-string\"}'", - "python": "from cloudtower import ApiClient, Configuration, UserApi\r\nfrom cloudtower.utils import login, wait_task\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n user_api = UserApi(client)\r\n resp = user_api.create_root_user({\"password\":\"password-string\"})\r\n wait_task(resp.task_id, client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/user\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n user_api := client.User\r\n params := user.NewCreateRootUserParams()\r\n params.RequestBody = &models.RootUserCreationParams{\nPassword: pointy.String(\"password-string\"),\n}\r\n rawResp, err := user_api.CreateRootUser(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n err = utils.WaitTask(context.Background(), client, resp.TaskID, 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.UserApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n UserApi userApi = new UserApi(client);\r\n RootUserCreationParams params = new RootUserCreationParams()\n.password(\"password-string\");\r\n WithTaskUser resp = userApi.createRootUser(params);\r\n TaskUtil.WaitTask(resp.getTaskId(), client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-vm-vpc-nic \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"vpc_nic\":{}},\"where\":{\"id\":\"VmNic-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_api = VmApi(client)\r\n resp = vm_api.update_vm_nic_vpc_info({\"data\":{\"vpc_nic\":{}},\"where\":{\"id\":\"VmNic-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_api := client.VM\r\n params := vm.NewUpdateVMNicVpcInfoParams()\r\n params.RequestBody = &models.VMUpdateVpcNicParams{\nData: &models.VMUpdateVpcNicParamsData{\nVpcNic: &models.UpdateVpcNicPayloads{\n},\n},\nWhere: &models.VMNicWhereInput{\nID: pointy.String(\"VmNic-id\"),\n},\n}\r\n rawResp, err := vm_api.UpdateVMNicVpcInfo(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVM) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVM)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVM) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmApi vmApi = new VmApi(client);\r\n VmUpdateVpcNicParams params = new VmUpdateVpcNicParams()\n.data(new VmUpdateVpcNicParamsData()\n.vpcNic(new UpdateVpcNicPayloads()))\n.where(new VmNicWhereInput()\n.id(\"VmNic-id\"));\r\n List resp = vmApi.updateVmNicVpcInfo(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/create-vm-vlan": { + "/clone-content-library-vm-template-from-vm": { "exampleValue": [ { - "vds_id": "ck74rk21wg5lz0786opdnzz5m", + "clusters": { + "id": "Cluster-id" + }, + "vm": { + "id": "Vm-id" + }, "name": "name-string" } ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-vm-vlan \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"vds_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", - "python": "from cloudtower import ApiClient, Configuration, VlanApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vlan_api = VlanApi(client)\r\n resp = vlan_api.create_vm_vlan([{\"vds_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vlan\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vlan_api := client.Vlan\r\n params := vlan.NewCreateVMVlanParams()\r\n params.RequestBody = []*models.VMVlanCreationParams{\n{\nVdsID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := vlan_api.CreateVMVlan(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVlan) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVlan)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVlan) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VlanApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VlanApi vlanApi = new VlanApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new VmVlanCreationParams()\n.vdsId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = vlanApi.createVmVlan(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/clone-content-library-vm-template-from-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"clusters\":{\"id\":\"Cluster-id\"},\"vm\":{\"id\":\"Vm-id\"},\"name\":\"name-string\"}]'", + "python": "from cloudtower import ApiClient, Configuration, ContentLibraryVmTemplateApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n content_library_vm_template_api = ContentLibraryVmTemplateApi(client)\r\n resp = content_library_vm_template_api.clone_content_library_vm_template_from_vm([{\"clusters\":{\"id\":\"Cluster-id\"},\"vm\":{\"id\":\"Vm-id\"},\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/content_library_vm_template\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n content_library_vm_template_api := client.ContentLibraryVMTemplate\r\n params := content_library_vm_template.NewCloneContentLibraryVMTemplateFromVMParams()\r\n params.RequestBody = []*models.ContentLibraryVMTemplateCreationParams{\n{\nClusters: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\nVM: &models.VMWhereUniqueInput{\nID: pointy.String(\"Vm-id\"),\n},\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := content_library_vm_template_api.CloneContentLibraryVMTemplateFromVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskContentLibraryVMTemplate) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskContentLibraryVMTemplate)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskContentLibraryVMTemplate) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ContentLibraryVmTemplateApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ContentLibraryVmTemplateApi contentLibraryVmTemplateApi = new ContentLibraryVmTemplateApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new ContentLibraryVmTemplateCreationParams()\n.clusters(new ClusterWhereInput()\n.id(\"Cluster-id\"))\n.vm(new VmWhereUniqueInput()\n.id(\"Vm-id\"))\n.name(\"name-string\"));\r\n List resp = contentLibraryVmTemplateApi.cloneContentLibraryVmTemplateFromVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-vm-vlan": { + "/convert-content-library-vm-template-from-vm": { + "exampleValue": [ + { + "clusters": { + "id": "Cluster-id" + }, + "vm": { + "id": "Vm-id" + }, + "name": "name-string" + } + ], + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/convert-content-library-vm-template-from-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"clusters\":{\"id\":\"Cluster-id\"},\"vm\":{\"id\":\"Vm-id\"},\"name\":\"name-string\"}]'", + "python": "from cloudtower import ApiClient, Configuration, ContentLibraryVmTemplateApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n content_library_vm_template_api = ContentLibraryVmTemplateApi(client)\r\n resp = content_library_vm_template_api.convert_content_library_vm_template_from_vm([{\"clusters\":{\"id\":\"Cluster-id\"},\"vm\":{\"id\":\"Vm-id\"},\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/content_library_vm_template\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n content_library_vm_template_api := client.ContentLibraryVMTemplate\r\n params := content_library_vm_template.NewConvertContentLibraryVMTemplateFromVMParams()\r\n params.RequestBody = []*models.ContentLibraryVMTemplateCreationParams{\n{\nClusters: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\nVM: &models.VMWhereUniqueInput{\nID: pointy.String(\"Vm-id\"),\n},\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := content_library_vm_template_api.ConvertContentLibraryVMTemplateFromVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskContentLibraryVMTemplate) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskContentLibraryVMTemplate)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskContentLibraryVMTemplate) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ContentLibraryVmTemplateApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ContentLibraryVmTemplateApi contentLibraryVmTemplateApi = new ContentLibraryVmTemplateApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new ContentLibraryVmTemplateCreationParams()\n.clusters(new ClusterWhereInput()\n.id(\"Cluster-id\"))\n.vm(new VmWhereUniqueInput()\n.id(\"Vm-id\"))\n.name(\"name-string\"));\r\n List resp = contentLibraryVmTemplateApi.convertContentLibraryVmTemplateFromVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "/update-content-library-vm-template": { "exampleValue": { "data": {}, "where": { - "id": "Vlan-id" + "id": "ContentLibraryVmTemplate-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-vm-vlan \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Vlan-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VlanApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vlan_api = VlanApi(client)\r\n resp = vlan_api.update_vlan({\"data\":{},\"where\":{\"id\":\"Vlan-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vlan\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vlan_api := client.Vlan\r\n params := vlan.NewUpdateVlanParams()\r\n params.RequestBody = &models.VMVlanUpdationParams{\nData: &models.VMVlanUpdationParamsData{\n},\nWhere: &models.VlanWhereInput{\nID: pointy.String(\"Vlan-id\"),\n},\n}\r\n rawResp, err := vlan_api.UpdateVlan(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVlan) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVlan)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVlan) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VlanApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VlanApi vlanApi = new VlanApi(client);\r\n VmVlanUpdationParams params = new VmVlanUpdationParams()\n.data(new VmVlanUpdationParamsData())\n.where(new VlanWhereInput()\n.id(\"Vlan-id\"));\r\n List resp = vlanApi.updateVlan(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-content-library-vm-template \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"ContentLibraryVmTemplate-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, ContentLibraryVmTemplateApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n content_library_vm_template_api = ContentLibraryVmTemplateApi(client)\r\n resp = content_library_vm_template_api.update_content_library_vm_template({\"data\":{},\"where\":{\"id\":\"ContentLibraryVmTemplate-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/content_library_vm_template\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n content_library_vm_template_api := client.ContentLibraryVMTemplate\r\n params := content_library_vm_template.NewUpdateContentLibraryVMTemplateParams()\r\n params.RequestBody = &models.ContentLibraryVMTemplateUpdationParams{\nData: &models.ContentLibraryVMTemplateUpdationParamsData{\n},\nWhere: &models.ContentLibraryVMTemplateWhereInput{\nID: pointy.String(\"ContentLibraryVmTemplate-id\"),\n},\n}\r\n rawResp, err := content_library_vm_template_api.UpdateContentLibraryVMTemplate(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskContentLibraryVMTemplate) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskContentLibraryVMTemplate)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskContentLibraryVMTemplate) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ContentLibraryVmTemplateApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ContentLibraryVmTemplateApi contentLibraryVmTemplateApi = new ContentLibraryVmTemplateApi(client);\r\n ContentLibraryVmTemplateUpdationParams params = new ContentLibraryVmTemplateUpdationParams()\n.data(new ContentLibraryVmTemplateUpdationParamsData())\n.where(new ContentLibraryVmTemplateWhereInput()\n.id(\"ContentLibraryVmTemplate-id\"));\r\n List resp = contentLibraryVmTemplateApi.updateContentLibraryVmTemplate(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-management-vlan": { + "/distribute-content-library-vm-template-clusters": { "exampleValue": { - "data": {}, + "data": { + "clusters": { + "id": "Cluster-id" + } + }, "where": { - "id": "Vlan-id" + "id": "ContentLibraryVmTemplate-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-management-vlan \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Vlan-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VlanApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vlan_api = VlanApi(client)\r\n resp = vlan_api.update_management_vlan({\"data\":{},\"where\":{\"id\":\"Vlan-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vlan\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vlan_api := client.Vlan\r\n params := vlan.NewUpdateManagementVlanParams()\r\n params.RequestBody = &models.ManagementVlanUpdationParams{\nData: &models.ManagementVlanUpdationParamsData{\n},\nWhere: &models.VlanWhereInput{\nID: pointy.String(\"Vlan-id\"),\n},\n}\r\n rawResp, err := vlan_api.UpdateManagementVlan(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVlan) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVlan)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVlan) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VlanApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VlanApi vlanApi = new VlanApi(client);\r\n ManagementVlanUpdationParams params = new ManagementVlanUpdationParams()\n.data(new ManagementVlanUpdationParamsData())\n.where(new VlanWhereInput()\n.id(\"Vlan-id\"));\r\n List resp = vlanApi.updateManagementVlan(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/distribute-content-library-vm-template-clusters \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"clusters\":{\"id\":\"Cluster-id\"}},\"where\":{\"id\":\"ContentLibraryVmTemplate-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, ContentLibraryVmTemplateApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n content_library_vm_template_api = ContentLibraryVmTemplateApi(client)\r\n resp = content_library_vm_template_api.distribute_content_library_vmtemplate_clusters({\"data\":{\"clusters\":{\"id\":\"Cluster-id\"}},\"where\":{\"id\":\"ContentLibraryVmTemplate-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/content_library_vm_template\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n content_library_vm_template_api := client.ContentLibraryVMTemplate\r\n params := content_library_vm_template.NewDistributeContentLibraryVmtemplateClustersParams()\r\n params.RequestBody = &models.ContentLibraryVMTemplateUpdationClusterParams{\nData: &models.ContentLibraryVMTemplateUpdationClusterParamsData{\nClusters: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\n},\nWhere: &models.ContentLibraryVMTemplateWhereInput{\nID: pointy.String(\"ContentLibraryVmTemplate-id\"),\n},\n}\r\n rawResp, err := content_library_vm_template_api.DistributeContentLibraryVmtemplateClusters(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskContentLibraryVMTemplate) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskContentLibraryVMTemplate)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskContentLibraryVMTemplate) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ContentLibraryVmTemplateApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ContentLibraryVmTemplateApi contentLibraryVmTemplateApi = new ContentLibraryVmTemplateApi(client);\r\n ContentLibraryVmTemplateUpdationClusterParams params = new ContentLibraryVmTemplateUpdationClusterParams()\n.data(new ContentLibraryVmTemplateUpdationClusterParamsData()\n.clusters(new ClusterWhereInput()\n.id(\"Cluster-id\")))\n.where(new ContentLibraryVmTemplateWhereInput()\n.id(\"ContentLibraryVmTemplate-id\"));\r\n List resp = contentLibraryVmTemplateApi.distributeContentLibraryVmtemplateClusters(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-migration-vlan": { + "/remove-content-library-vm-template-clusters": { "exampleValue": { + "data": { + "clusters": { + "id": "Cluster-id" + } + }, "where": { - "id": "Vlan-id" + "id": "ContentLibraryVmTemplate-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-migration-vlan \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Vlan-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VlanApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vlan_api = VlanApi(client)\r\n resp = vlan_api.update_migration_vlan({\"where\":{\"id\":\"Vlan-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vlan\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vlan_api := client.Vlan\r\n params := vlan.NewUpdateMigrationVlanParams()\r\n params.RequestBody = &models.MigrationVlanUpdationParams{\nWhere: &models.VlanWhereInput{\nID: pointy.String(\"Vlan-id\"),\n},\n}\r\n rawResp, err := vlan_api.UpdateMigrationVlan(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVlan) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVlan)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVlan) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VlanApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VlanApi vlanApi = new VlanApi(client);\r\n MigrationVlanUpdationParams params = new MigrationVlanUpdationParams()\n.where(new VlanWhereInput()\n.id(\"Vlan-id\"));\r\n List resp = vlanApi.updateMigrationVlan(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/remove-content-library-vm-template-clusters \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"clusters\":{\"id\":\"Cluster-id\"}},\"where\":{\"id\":\"ContentLibraryVmTemplate-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, ContentLibraryVmTemplateApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n content_library_vm_template_api = ContentLibraryVmTemplateApi(client)\r\n resp = content_library_vm_template_api.remove_content_library_vm_template_clusters({\"data\":{\"clusters\":{\"id\":\"Cluster-id\"}},\"where\":{\"id\":\"ContentLibraryVmTemplate-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/content_library_vm_template\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n content_library_vm_template_api := client.ContentLibraryVMTemplate\r\n params := content_library_vm_template.NewRemoveContentLibraryVMTemplateClustersParams()\r\n params.RequestBody = &models.ContentLibraryVMTemplateUpdationClusterParams{\nData: &models.ContentLibraryVMTemplateUpdationClusterParamsData{\nClusters: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\n},\nWhere: &models.ContentLibraryVMTemplateWhereInput{\nID: pointy.String(\"ContentLibraryVmTemplate-id\"),\n},\n}\r\n rawResp, err := content_library_vm_template_api.RemoveContentLibraryVMTemplateClusters(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskContentLibraryVMTemplate) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskContentLibraryVMTemplate)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskContentLibraryVMTemplate) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ContentLibraryVmTemplateApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ContentLibraryVmTemplateApi contentLibraryVmTemplateApi = new ContentLibraryVmTemplateApi(client);\r\n ContentLibraryVmTemplateUpdationClusterParams params = new ContentLibraryVmTemplateUpdationClusterParams()\n.data(new ContentLibraryVmTemplateUpdationClusterParamsData()\n.clusters(new ClusterWhereInput()\n.id(\"Cluster-id\")))\n.where(new ContentLibraryVmTemplateWhereInput()\n.id(\"ContentLibraryVmTemplate-id\"));\r\n List resp = contentLibraryVmTemplateApi.removeContentLibraryVmTemplateClusters(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/delete-vm-vlan": { + "/delete-content-library-vm-template": { "exampleValue": { "where": { - "id": "Vlan-id" + "id": "ContentLibraryVmTemplate-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-vm-vlan \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Vlan-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VlanApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vlan_api = VlanApi(client)\r\n resp = vlan_api.delete_vlan({\"where\":{\"id\":\"Vlan-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vlan\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vlan_api := client.Vlan\r\n params := vlan.NewDeleteVlanParams()\r\n params.RequestBody = &models.VlanDeletionParams{\nWhere: &models.VlanWhereInput{\nID: pointy.String(\"Vlan-id\"),\n},\n}\r\n rawResp, err := vlan_api.DeleteVlan(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteVlan) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteVlan)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteVlan) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VlanApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VlanApi vlanApi = new VlanApi(client);\r\n VlanDeletionParams params = new VlanDeletionParams()\n.where(new VlanWhereInput()\n.id(\"Vlan-id\"));\r\n List resp = vlanApi.deleteVlan(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-content-library-vm-template \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"ContentLibraryVmTemplate-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, ContentLibraryVmTemplateApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n content_library_vm_template_api = ContentLibraryVmTemplateApi(client)\r\n resp = content_library_vm_template_api.delete_content_library_vm_template({\"where\":{\"id\":\"ContentLibraryVmTemplate-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/content_library_vm_template\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n content_library_vm_template_api := client.ContentLibraryVMTemplate\r\n params := content_library_vm_template.NewDeleteContentLibraryVMTemplateParams()\r\n params.RequestBody = &models.ContentLibraryVMTemplateDeletionParams{\nWhere: &models.ContentLibraryVMTemplateWhereInput{\nID: pointy.String(\"ContentLibraryVmTemplate-id\"),\n},\n}\r\n rawResp, err := content_library_vm_template_api.DeleteContentLibraryVMTemplate(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteContentLibraryVMTemplate) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteContentLibraryVMTemplate)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteContentLibraryVMTemplate) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ContentLibraryVmTemplateApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ContentLibraryVmTemplateApi contentLibraryVmTemplateApi = new ContentLibraryVmTemplateApi(client);\r\n ContentLibraryVmTemplateDeletionParams params = new ContentLibraryVmTemplateDeletionParams()\n.where(new ContentLibraryVmTemplateWhereInput()\n.id(\"ContentLibraryVmTemplate-id\"));\r\n List resp = contentLibraryVmTemplateApi.deleteContentLibraryVmTemplate(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/create-vm-folder": { + "/export-content-library-vm-template": { + "exampleValue": { + "where": { + "id": "ContentLibraryVmTemplate-id" + } + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/export-content-library-vm-template \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"ContentLibraryVmTemplate-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, ContentLibraryVmTemplateApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n content_library_vm_template_api = ContentLibraryVmTemplateApi(client)\r\n resp = content_library_vm_template_api.export_content_library_vm_template({\"where\":{\"id\":\"ContentLibraryVmTemplate-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/content_library_vm_template\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n content_library_vm_template_api := client.ContentLibraryVMTemplate\r\n params := content_library_vm_template.NewExportContentLibraryVMTemplateParams()\r\n params.RequestBody = &models.ContentLibraryVMTemplateExportParams{\nWhere: &models.ContentLibraryVMTemplateWhereInput{\nID: pointy.String(\"ContentLibraryVmTemplate-id\"),\n},\n}\r\n rawResp, err := content_library_vm_template_api.ExportContentLibraryVMTemplate(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVMExportFile) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVMExportFile)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVMExportFile) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ContentLibraryVmTemplateApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ContentLibraryVmTemplateApi contentLibraryVmTemplateApi = new ContentLibraryVmTemplateApi(client);\r\n ContentLibraryVmTemplateExportParams params = new ContentLibraryVmTemplateExportParams()\n.where(new ContentLibraryVmTemplateWhereInput()\n.id(\"ContentLibraryVmTemplate-id\"));\r\n List resp = contentLibraryVmTemplateApi.exportContentLibraryVmTemplate(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "/import-content-library-vm-template": { "exampleValue": [ { - "cluster_id": "ck74rk21wg5lz0786opdnzz5m", - "name": "name-string" + "name": "name-string", + "upload_tasks": [ + "-string" + ], + "parsed_ovf": { + "firmware": "BIOS", + "disks": [ + { + "size": 1, + "type": "CD_ROM", + "bus": "IDE", + "name": "name-string" + } + ], + "nics": [ + { + "mac": "mac-string" + } + ], + "memory": 1, + "cpu": { + "sockets": 1, + "cores": 1 + }, + "vcpu": 1, + "name": "name-string" + }, + "cluster_id": "ck74rk21wg5lz0786opdnzz5m" } ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-vm-folder \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", - "python": "from cloudtower import ApiClient, Configuration, VmFolderApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_folder_api = VmFolderApi(client)\r\n resp = vm_folder_api.create_vm_folder([{\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_folder\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_folder_api := client.VMFolder\r\n params := vm_folder.NewCreateVMFolderParams()\r\n params.RequestBody = []*models.VMFolderCreationParams{\n{\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := vm_folder_api.CreateVMFolder(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVMFolder) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVMFolder)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVMFolder) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmFolderApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmFolderApi vmFolderApi = new VmFolderApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new VmFolderCreationParams()\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = vmFolderApi.createVmFolder(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/import-content-library-vm-template \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"name\":\"name-string\",\"upload_tasks\":[\"-string\"],\"parsed_ovf\":{\"firmware\":\"BIOS\",\"disks\":[{\"size\":1,\"type\":\"CD_ROM\",\"bus\":\"IDE\",\"name\":\"name-string\"}],\"nics\":[{\"mac\":\"mac-string\"}],\"memory\":1,\"cpu\":{\"sockets\":1,\"cores\":1},\"vcpu\":1,\"name\":\"name-string\"},\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", + "python": "from cloudtower import ApiClient, Configuration, ContentLibraryVmTemplateApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n content_library_vm_template_api = ContentLibraryVmTemplateApi(client)\r\n resp = content_library_vm_template_api.import_content_library_vm_template([{\"name\":\"name-string\",\"upload_tasks\":[\"-string\"],\"parsed_ovf\":{\"firmware\":\"BIOS\",\"disks\":[{\"size\":1,\"type\":\"CD_ROM\",\"bus\":\"IDE\",\"name\":\"name-string\"}],\"nics\":[{\"mac\":\"mac-string\"}],\"memory\":1,\"cpu\":{\"sockets\":1,\"cores\":1},\"vcpu\":1,\"name\":\"name-string\"},\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/content_library_vm_template\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n content_library_vm_template_api := client.ContentLibraryVMTemplate\r\n params := content_library_vm_template.NewImportContentLibraryVMTemplateParams()\r\n params.RequestBody = []*models.ContentLibraryVMTemplateImportParams{\n{\nName: pointy.String(\"name-string\"),\nUploadTasks: []string{\"-string\",\n},\nParsedOvf: &models.ParsedOvf{\nFirmware: models.VMFirmwareBIOS.Pointer(),\nDisks: []*models.OvfDisk{\n{\nSize: pointy.Int64(1),\nType: models.VMDiskTypeCD_ROM.Pointer(),\nBus: models.BusIDE.Pointer(),\nName: pointy.String(\"name-string\"),\n},\n},\nNics: []*models.OvfNic{\n{\nMac: pointy.String(\"mac-string\"),\n},\n},\nMemory: pointy.Int64(1),\nCPU: &models.OvfCPU{\nSockets: pointy.Int32(1),\nCores: pointy.Int32(1),\n},\nVcpu: pointy.Int32(1),\nName: pointy.String(\"name-string\"),\n},\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := content_library_vm_template_api.ImportContentLibraryVMTemplate(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskContentLibraryVMTemplate) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskContentLibraryVMTemplate)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskContentLibraryVMTemplate) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ContentLibraryVmTemplateApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ContentLibraryVmTemplateApi contentLibraryVmTemplateApi = new ContentLibraryVmTemplateApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new ContentLibraryVmTemplateImportParams()\n.name(\"name-string\")\n.addUploadTasksItem(\"-string\")\n.parsedOvf(new ParsedOvf()\n.firmware(VmFirmware.fromValue(\"BIOS\"))\n.addDisksItem(new OvfDisk()\n.size(1L)\n.type(VmDiskType.fromValue(\"CD_ROM\"))\n.bus(Bus.fromValue(\"IDE\"))\n.name(\"name-string\"))\n.addNicsItem(new OvfNic()\n.mac(\"mac-string\"))\n.memory(1L)\n.cpu(new OvfCpu()\n.sockets(1)\n.cores(1))\n.vcpu(1)\n.name(\"name-string\"))\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = contentLibraryVmTemplateApi.importContentLibraryVmTemplate(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-vm-folder": { - "exampleValue": { - "data": { + "/create-datacenter": { + "exampleValue": [ + { + "organization_id": "ck74rk21wg5lz0786opdnzz5m", "name": "name-string" - }, - "where": { - "id": "VmFolder-id" } - }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-vm-folder \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"name\":\"name-string\"},\"where\":{\"id\":\"VmFolder-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmFolderApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_folder_api = VmFolderApi(client)\r\n resp = vm_folder_api.update_vm_folder({\"data\":{\"name\":\"name-string\"},\"where\":{\"id\":\"VmFolder-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_folder\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_folder_api := client.VMFolder\r\n params := vm_folder.NewUpdateVMFolderParams()\r\n params.RequestBody = &models.VMFolderUpdationParams{\nData: &models.VMFolderUpdationParamsData{\nName: pointy.String(\"name-string\"),\n},\nWhere: &models.VMFolderWhereInput{\nID: pointy.String(\"VmFolder-id\"),\n},\n}\r\n rawResp, err := vm_folder_api.UpdateVMFolder(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVMFolder) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVMFolder)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVMFolder) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmFolderApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmFolderApi vmFolderApi = new VmFolderApi(client);\r\n VmFolderUpdationParams params = new VmFolderUpdationParams()\n.data(new VmFolderUpdationParamsData()\n.name(\"name-string\"))\n.where(new VmFolderWhereInput()\n.id(\"VmFolder-id\"));\r\n List resp = vmFolderApi.updateVmFolder(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + ], + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-datacenter \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"organization_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", + "python": "from cloudtower import ApiClient, Configuration, DatacenterApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n datacenter_api = DatacenterApi(client)\r\n resp = datacenter_api.create_datacenter([{\"organization_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/datacenter\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n datacenter_api := client.Datacenter\r\n params := datacenter.NewCreateDatacenterParams()\r\n params.RequestBody = []*models.DatacenterCreationParams{\n{\nOrganizationID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := datacenter_api.CreateDatacenter(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDatacenter) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDatacenter)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDatacenter) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.DatacenterApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n DatacenterApi datacenterApi = new DatacenterApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new DatacenterCreationParams()\n.organizationId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = datacenterApi.createDatacenter(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/delete-vm-folder": { + "/update-datacenter": { "exampleValue": { + "data": {}, "where": { - "id": "VmFolder-id" + "id": "Datacenter-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-vm-folder \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"VmFolder-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmFolderApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_folder_api = VmFolderApi(client)\r\n resp = vm_folder_api.delete_vm_folder({\"where\":{\"id\":\"VmFolder-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_folder\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_folder_api := client.VMFolder\r\n params := vm_folder.NewDeleteVMFolderParams()\r\n params.RequestBody = &models.VMFolderDeletionParams{\nWhere: &models.VMFolderWhereInput{\nID: pointy.String(\"VmFolder-id\"),\n},\n}\r\n rawResp, err := vm_folder_api.DeleteVMFolder(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteVMFolder) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteVMFolder)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteVMFolder) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmFolderApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmFolderApi vmFolderApi = new VmFolderApi(client);\r\n VmFolderDeletionParams params = new VmFolderDeletionParams()\n.where(new VmFolderWhereInput()\n.id(\"VmFolder-id\"));\r\n List resp = vmFolderApi.deleteVmFolder(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-datacenter \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Datacenter-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, DatacenterApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n datacenter_api = DatacenterApi(client)\r\n resp = datacenter_api.update_datacenter({\"data\":{},\"where\":{\"id\":\"Datacenter-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/datacenter\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n datacenter_api := client.Datacenter\r\n params := datacenter.NewUpdateDatacenterParams()\r\n params.RequestBody = &models.DatacenterUpdationParams{\nData: &models.DatacenterUpdationParamsData{\n},\nWhere: &models.DatacenterWhereInput{\nID: pointy.String(\"Datacenter-id\"),\n},\n}\r\n rawResp, err := datacenter_api.UpdateDatacenter(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDatacenter) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDatacenter)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDatacenter) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.DatacenterApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n DatacenterApi datacenterApi = new DatacenterApi(client);\r\n DatacenterUpdationParams params = new DatacenterUpdationParams()\n.data(new DatacenterUpdationParamsData())\n.where(new DatacenterWhereInput()\n.id(\"Datacenter-id\"));\r\n List resp = datacenterApi.updateDatacenter(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/create-vm-placement-group": { + "/add-clusters-to-datacenter": { "exampleValue": [ { - "name": "name-string", - "enabled": true, - "cluster_id": "ck74rk21wg5lz0786opdnzz5m" + "data": {}, + "where": { + "id": "Datacenter-id" + } } ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-vm-placement-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"name\":\"name-string\",\"enabled\":true,\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", - "python": "from cloudtower import ApiClient, Configuration, VmPlacementGroupApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_placement_group_api = VmPlacementGroupApi(client)\r\n resp = vm_placement_group_api.create_vm_placement_group([{\"name\":\"name-string\",\"enabled\":True,\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_placement_group\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_placement_group_api := client.VMPlacementGroup\r\n params := vm_placement_group.NewCreateVMPlacementGroupParams()\r\n params.RequestBody = []*models.VMPlacementGroupCreationParams{\n{\nName: pointy.String(\"name-string\"),\nEnabled: pointy.Bool(true),\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := vm_placement_group_api.CreateVMPlacementGroup(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVMPlacementGroup) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVMPlacementGroup)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVMPlacementGroup) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmPlacementGroupApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmPlacementGroupApi vmPlacementGroupApi = new VmPlacementGroupApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new VmPlacementGroupCreationParams()\n.name(\"name-string\")\n.enabled(true)\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = vmPlacementGroupApi.createVmPlacementGroup(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/add-clusters-to-datacenter \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"data\":{},\"where\":{\"id\":\"Datacenter-id\"}}]'", + "python": "from cloudtower import ApiClient, Configuration, DatacenterApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n datacenter_api = DatacenterApi(client)\r\n resp = datacenter_api.add_clusters_to_datacenter([{\"data\":{},\"where\":{\"id\":\"Datacenter-id\"}}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/datacenter\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n datacenter_api := client.Datacenter\r\n params := datacenter.NewAddClustersToDatacenterParams()\r\n params.RequestBody = []*models.AddClustersToDatacenterParams{\n{\nData: &models.AddClustersToDatacenterParamsData{\n},\nWhere: &models.DatacenterWhereUniqueInput{\nID: pointy.String(\"Datacenter-id\"),\n},\n},\n}\r\n rawResp, err := datacenter_api.AddClustersToDatacenter(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDatacenter) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDatacenter)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDatacenter) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.DatacenterApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n DatacenterApi datacenterApi = new DatacenterApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new AddClustersToDatacenterParams()\n.data(new AddClustersToDatacenterParamsData())\n.where(new DatacenterWhereUniqueInput()\n.id(\"Datacenter-id\")));\r\n List resp = datacenterApi.addClustersToDatacenter(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-vm-placement-group": { - "exampleValue": { - "data": {}, - "where": { - "id": "VmPlacementGroup-id" + "/remove-clusters-from-datacenter": { + "exampleValue": [ + { + "data": {}, + "where": { + "id": "Datacenter-id" + } } - }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-vm-placement-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"VmPlacementGroup-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmPlacementGroupApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_placement_group_api = VmPlacementGroupApi(client)\r\n resp = vm_placement_group_api.update_vm_placement_group({\"data\":{},\"where\":{\"id\":\"VmPlacementGroup-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_placement_group\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_placement_group_api := client.VMPlacementGroup\r\n params := vm_placement_group.NewUpdateVMPlacementGroupParams()\r\n params.RequestBody = &models.VMPlacementGroupUpdationParams{\nData: &models.VMPlacementGroupUpdationParamsData{\n},\nWhere: &models.VMPlacementGroupWhereInput{\nID: pointy.String(\"VmPlacementGroup-id\"),\n},\n}\r\n rawResp, err := vm_placement_group_api.UpdateVMPlacementGroup(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVMPlacementGroup) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVMPlacementGroup)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVMPlacementGroup) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmPlacementGroupApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmPlacementGroupApi vmPlacementGroupApi = new VmPlacementGroupApi(client);\r\n VmPlacementGroupUpdationParams params = new VmPlacementGroupUpdationParams()\n.data(new VmPlacementGroupUpdationParamsData())\n.where(new VmPlacementGroupWhereInput()\n.id(\"VmPlacementGroup-id\"));\r\n List resp = vmPlacementGroupApi.updateVmPlacementGroup(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + ], + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/remove-clusters-from-datacenter \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"data\":{},\"where\":{\"id\":\"Datacenter-id\"}}]'", + "python": "from cloudtower import ApiClient, Configuration, DatacenterApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n datacenter_api = DatacenterApi(client)\r\n resp = datacenter_api.remove_clusters_from_datacenter([{\"data\":{},\"where\":{\"id\":\"Datacenter-id\"}}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/datacenter\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n datacenter_api := client.Datacenter\r\n params := datacenter.NewRemoveClustersFromDatacenterParams()\r\n params.RequestBody = []*models.RemoveClustersFromDatacenterParams{\n{\nData: &models.RemoveClustersFromDatacenterParamsData{\n},\nWhere: &models.DatacenterWhereUniqueInput{\nID: pointy.String(\"Datacenter-id\"),\n},\n},\n}\r\n rawResp, err := datacenter_api.RemoveClustersFromDatacenter(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDatacenter) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDatacenter)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDatacenter) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.DatacenterApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n DatacenterApi datacenterApi = new DatacenterApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new RemoveClustersFromDatacenterParams()\n.data(new RemoveClustersFromDatacenterParamsData())\n.where(new DatacenterWhereUniqueInput()\n.id(\"Datacenter-id\")));\r\n List resp = datacenterApi.removeClustersFromDatacenter(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/delete-vm-placement-group": { + "/delete-datacenter": { "exampleValue": { "where": { - "id": "VmPlacementGroup-id" + "id": "Datacenter-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-vm-placement-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"VmPlacementGroup-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmPlacementGroupApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_placement_group_api = VmPlacementGroupApi(client)\r\n resp = vm_placement_group_api.delete_vm_placement_group({\"where\":{\"id\":\"VmPlacementGroup-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_placement_group\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_placement_group_api := client.VMPlacementGroup\r\n params := vm_placement_group.NewDeleteVMPlacementGroupParams()\r\n params.RequestBody = &models.VMPlacementGroupDeletionParams{\nWhere: &models.VMPlacementGroupWhereInput{\nID: pointy.String(\"VmPlacementGroup-id\"),\n},\n}\r\n rawResp, err := vm_placement_group_api.DeleteVMPlacementGroup(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteVMPlacementGroup) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteVMPlacementGroup)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteVMPlacementGroup) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmPlacementGroupApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmPlacementGroupApi vmPlacementGroupApi = new VmPlacementGroupApi(client);\r\n VmPlacementGroupDeletionParams params = new VmPlacementGroupDeletionParams()\n.where(new VmPlacementGroupWhereInput()\n.id(\"VmPlacementGroup-id\"));\r\n List resp = vmPlacementGroupApi.deleteVmPlacementGroup(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-datacenter \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Datacenter-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, DatacenterApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n datacenter_api = DatacenterApi(client)\r\n resp = datacenter_api.delete_datacenter({\"where\":{\"id\":\"Datacenter-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/datacenter\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n datacenter_api := client.Datacenter\r\n params := datacenter.NewDeleteDatacenterParams()\r\n params.RequestBody = &models.DatacenterDeletionParams{\nWhere: &models.DatacenterWhereInput{\nID: pointy.String(\"Datacenter-id\"),\n},\n}\r\n rawResp, err := datacenter_api.DeleteDatacenter(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteDatacenter) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteDatacenter)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteDatacenter) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.DatacenterApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n DatacenterApi datacenterApi = new DatacenterApi(client);\r\n DatacenterDeletionParams params = new DatacenterDeletionParams()\n.where(new DatacenterWhereInput()\n.id(\"Datacenter-id\"));\r\n List resp = datacenterApi.deleteDatacenter(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/create-vm-snapshot": { + "/mount-disk": { "exampleValue": { - "data": [ - { - "name": "name-string", - "vm_id": "ck74rk21wg5lz0786opdnzz5m" - } - ] + "data": { + "function": "BOOT" + }, + "where": { + "id": "Disk-id" + } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-vm-snapshot \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":[{\"name\":\"name-string\",\"vm_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]}'", - "python": "from cloudtower import ApiClient, Configuration, VmSnapshotApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_snapshot_api = VmSnapshotApi(client)\r\n resp = vm_snapshot_api.create_vm_snapshot({\"data\":[{\"name\":\"name-string\",\"vm_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_snapshot\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_snapshot_api := client.VMSnapshot\r\n params := vm_snapshot.NewCreateVMSnapshotParams()\r\n params.RequestBody = &models.VMSnapshotCreationParams{\nData: []*models.VMSnapshotCreationParamsData{\n{\nName: pointy.String(\"name-string\"),\nVMID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n},\n}\r\n rawResp, err := vm_snapshot_api.CreateVMSnapshot(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVMSnapshot) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVMSnapshot)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVMSnapshot) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmSnapshotApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmSnapshotApi vmSnapshotApi = new VmSnapshotApi(client);\r\n VmSnapshotCreationParams params = new VmSnapshotCreationParams()\n.addDataItem(new VmSnapshotCreationParamsData()\n.name(\"name-string\")\n.vmId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = vmSnapshotApi.createVmSnapshot(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/mount-disk \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"function\":\"BOOT\"},\"where\":{\"id\":\"Disk-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, DiskApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n disk_api = DiskApi(client)\r\n resp = disk_api.mount_disk({\"data\":{\"function\":\"BOOT\"},\"where\":{\"id\":\"Disk-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/disk\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n disk_api := client.Disk\r\n params := disk.NewMountDiskParams()\r\n params.RequestBody = &models.DiskMountParams{\nData: &models.DiskMountParamsData{\nFunction: models.DiskFunctionBOOT.Pointer(),\n},\nWhere: &models.DiskWhereInput{\nID: pointy.String(\"Disk-id\"),\n},\n}\r\n rawResp, err := disk_api.MountDisk(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDisk) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDisk)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDisk) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.DiskApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n DiskApi diskApi = new DiskApi(client);\r\n DiskMountParams params = new DiskMountParams()\n.data(new DiskMountParamsData()\n.function(DiskFunction.fromValue(\"BOOT\")))\n.where(new DiskWhereInput()\n.id(\"Disk-id\"));\r\n List resp = diskApi.mountDisk(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/delete-vm-snapshot": { + "/unmount-disk": { "exampleValue": { "where": { - "id": "VmSnapshot-id" + "id": "Disk-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-vm-snapshot \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"VmSnapshot-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmSnapshotApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_snapshot_api = VmSnapshotApi(client)\r\n resp = vm_snapshot_api.delete_vm_snapshot({\"where\":{\"id\":\"VmSnapshot-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_snapshot\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_snapshot_api := client.VMSnapshot\r\n params := vm_snapshot.NewDeleteVMSnapshotParams()\r\n params.RequestBody = &models.VMSnapshotDeletionParams{\nWhere: &models.VMSnapshotWhereInput{\nID: pointy.String(\"VmSnapshot-id\"),\n},\n}\r\n rawResp, err := vm_snapshot_api.DeleteVMSnapshot(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteVMSnapshot) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteVMSnapshot)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteVMSnapshot) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmSnapshotApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmSnapshotApi vmSnapshotApi = new VmSnapshotApi(client);\r\n VmSnapshotDeletionParams params = new VmSnapshotDeletionParams()\n.where(new VmSnapshotWhereInput()\n.id(\"VmSnapshot-id\"));\r\n List resp = vmSnapshotApi.deleteVmSnapshot(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/unmount-disk \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Disk-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, DiskApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n disk_api = DiskApi(client)\r\n resp = disk_api.unmount_disk({\"where\":{\"id\":\"Disk-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/disk\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n disk_api := client.Disk\r\n params := disk.NewUnmountDiskParams()\r\n params.RequestBody = &models.DiskUnmountParams{\nWhere: &models.DiskWhereInput{\nID: pointy.String(\"Disk-id\"),\n},\n}\r\n rawResp, err := disk_api.UnmountDisk(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDisk) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDisk)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDisk) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.DiskApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n DiskApi diskApi = new DiskApi(client);\r\n DiskUnmountParams params = new DiskUnmountParams()\n.where(new DiskWhereInput()\n.id(\"Disk-id\"));\r\n List resp = diskApi.unmountDisk(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/clone-vm-template-from-vm": { + "/create-entity-filter": { "exampleValue": [ { - "cloud_init_supported": true, - "vm_id": "ck74rk21wg5lz0786opdnzz5m", + "rules": [ + { + "threshold": 1, + "quantile": 1, + "op": "GT", + "metric": "VM_CPU_USAGE", + "duration": 1, + "aggregation": "AVG" + } + ], "name": "name-string" } ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/clone-vm-template-from-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"cloud_init_supported\":true,\"vm_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", - "python": "from cloudtower import ApiClient, Configuration, VmTemplateApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_template_api = VmTemplateApi(client)\r\n resp = vm_template_api.clone_vm_template_from_vm([{\"cloud_init_supported\":True,\"vm_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_template\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_template_api := client.VMTemplate\r\n params := vm_template.NewCloneVMTemplateFromVMParams()\r\n params.RequestBody = []*models.VMTemplateCreationParams{\n{\nCloudInitSupported: pointy.Bool(true),\nVMID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := vm_template_api.CloneVMTemplateFromVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVMTemplate) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVMTemplate)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVMTemplate) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmTemplateApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmTemplateApi vmTemplateApi = new VmTemplateApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new VmTemplateCreationParams()\n.cloudInitSupported(true)\n.vmId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = vmTemplateApi.cloneVmTemplateFromVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-entity-filter \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"rules\":[{\"threshold\":1,\"quantile\":1,\"op\":\"GT\",\"metric\":\"VM_CPU_USAGE\",\"duration\":1,\"aggregation\":\"AVG\"}],\"name\":\"name-string\"}]'", + "python": "from cloudtower import ApiClient, Configuration, EntityFilterApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n entity_filter_api = EntityFilterApi(client)\r\n resp = entity_filter_api.create_entity_filter([{\"rules\":[{\"threshold\":1,\"quantile\":1,\"op\":\"GT\",\"metric\":\"VM_CPU_USAGE\",\"duration\":1,\"aggregation\":\"AVG\"}],\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/entity_filter\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n entity_filter_api := client.EntityFilter\r\n params := entity_filter.NewCreateEntityFilterParams()\r\n params.RequestBody = []*models.EntityFilterCreationParams{\n{\nRules: []*models.FilterRuleInput{\n{\nThreshold: pointy.Float64(1),\nQuantile: pointy.Int32(1),\nOp: models.FilterRuleOpEnumGT.Pointer(),\nMetric: models.FilterRuleMetricEnumVM_CPU_USAGE.Pointer(),\nDuration: pointy.Int32(1),\nAggregation: models.FilterRuleAggregationEnumAVG.Pointer(),\n},\n},\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := entity_filter_api.CreateEntityFilter(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskEntityFilter) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskEntityFilter)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskEntityFilter) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.EntityFilterApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n EntityFilterApi entityFilterApi = new EntityFilterApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new EntityFilterCreationParams()\n.addRulesItem(new FilterRuleInput()\n.threshold(1D)\n.quantile(1)\n.op(FilterRuleOpEnum.fromValue(\"GT\"))\n.metric(FilterRuleMetricEnum.fromValue(\"VM_CPU_USAGE\"))\n.duration(1)\n.aggregation(FilterRuleAggregationEnum.fromValue(\"AVG\")))\n.name(\"name-string\"));\r\n List resp = entityFilterApi.createEntityFilter(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/convert-vm-template-from-vm": { - "exampleValue": [ - { - "cloud_init_supported": true, - "vm_id": "ck74rk21wg5lz0786opdnzz5m", - "name": "name-string" + "/update-entity-filter": { + "exampleValue": { + "data": {}, + "where": { + "id": "EntityFilter-id" } - ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/convert-vm-template-from-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"cloud_init_supported\":true,\"vm_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", - "python": "from cloudtower import ApiClient, Configuration, VmTemplateApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_template_api = VmTemplateApi(client)\r\n resp = vm_template_api.convert_vm_template_from_vm([{\"cloud_init_supported\":True,\"vm_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_template\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_template_api := client.VMTemplate\r\n params := vm_template.NewConvertVMTemplateFromVMParams()\r\n params.RequestBody = []*models.VMTemplateCreationParams{\n{\nCloudInitSupported: pointy.Bool(true),\nVMID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := vm_template_api.ConvertVMTemplateFromVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVMTemplate) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVMTemplate)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVMTemplate) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmTemplateApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmTemplateApi vmTemplateApi = new VmTemplateApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new VmTemplateCreationParams()\n.cloudInitSupported(true)\n.vmId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = vmTemplateApi.convertVmTemplateFromVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-entity-filter \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"EntityFilter-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, EntityFilterApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n entity_filter_api = EntityFilterApi(client)\r\n resp = entity_filter_api.update_entity_filter({\"data\":{},\"where\":{\"id\":\"EntityFilter-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/entity_filter\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n entity_filter_api := client.EntityFilter\r\n params := entity_filter.NewUpdateEntityFilterParams()\r\n params.RequestBody = &models.EntityFilterUpdationParams{\nData: &models.EntityFilterUpdationParamsData{\n},\nWhere: &models.EntityFilterWhereInput{\nID: pointy.String(\"EntityFilter-id\"),\n},\n}\r\n rawResp, err := entity_filter_api.UpdateEntityFilter(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskEntityFilter) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskEntityFilter)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskEntityFilter) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.EntityFilterApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n EntityFilterApi entityFilterApi = new EntityFilterApi(client);\r\n EntityFilterUpdationParams params = new EntityFilterUpdationParams()\n.data(new EntityFilterUpdationParamsData())\n.where(new EntityFilterWhereInput()\n.id(\"EntityFilter-id\"));\r\n List resp = entityFilterApi.updateEntityFilter(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-vm-template": { + "/delete-entity-filter": { "exampleValue": { "where": { - "id": "VmTemplate-id" + "id": "EntityFilter-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-vm-template \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"VmTemplate-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmTemplateApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_template_api = VmTemplateApi(client)\r\n resp = vm_template_api.update_vm_template({\"where\":{\"id\":\"VmTemplate-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_template\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_template_api := client.VMTemplate\r\n params := vm_template.NewUpdateVMTemplateParams()\r\n params.RequestBody = &models.VMTemplateUpdationParams{\nWhere: &models.VMTemplateWhereInput{\nID: pointy.String(\"VmTemplate-id\"),\n},\n}\r\n rawResp, err := vm_template_api.UpdateVMTemplate(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVMTemplate) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVMTemplate)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVMTemplate) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmTemplateApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmTemplateApi vmTemplateApi = new VmTemplateApi(client);\r\n VmTemplateUpdationParams params = new VmTemplateUpdationParams()\n.where(new VmTemplateWhereInput()\n.id(\"VmTemplate-id\"));\r\n List resp = vmTemplateApi.updateVmTemplate(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-entity-filter \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"EntityFilter-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, EntityFilterApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n entity_filter_api = EntityFilterApi(client)\r\n resp = entity_filter_api.delete_entity_filter({\"where\":{\"id\":\"EntityFilter-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/entity_filter\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n entity_filter_api := client.EntityFilter\r\n params := entity_filter.NewDeleteEntityFilterParams()\r\n params.RequestBody = &models.EntityFilterDeletionParams{\nWhere: &models.EntityFilterWhereInput{\nID: pointy.String(\"EntityFilter-id\"),\n},\n}\r\n rawResp, err := entity_filter_api.DeleteEntityFilter(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteEntityFilter) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteEntityFilter)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteEntityFilter) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.EntityFilterApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n EntityFilterApi entityFilterApi = new EntityFilterApi(client);\r\n EntityFilterDeletionParams params = new EntityFilterDeletionParams()\n.where(new EntityFilterWhereInput()\n.id(\"EntityFilter-id\"));\r\n List resp = entityFilterApi.deleteEntityFilter(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/delete-vm-template": { + "/update-gpu-device-usage": { "exampleValue": { + "data": {}, "where": { - "id": "VmTemplate-id" + "id": "GpuDevice-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-vm-template \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"VmTemplate-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmTemplateApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_template_api = VmTemplateApi(client)\r\n resp = vm_template_api.delete_vm_template({\"where\":{\"id\":\"VmTemplate-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_template\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_template_api := client.VMTemplate\r\n params := vm_template.NewDeleteVMTemplateParams()\r\n params.RequestBody = &models.VMTemplateDeletionParams{\nWhere: &models.VMTemplateWhereInput{\nID: pointy.String(\"VmTemplate-id\"),\n},\n}\r\n rawResp, err := vm_template_api.DeleteVMTemplate(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteVMTemplate) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteVMTemplate)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteVMTemplate) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmTemplateApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmTemplateApi vmTemplateApi = new VmTemplateApi(client);\r\n VmTemplateDeletionParams params = new VmTemplateDeletionParams()\n.where(new VmTemplateWhereInput()\n.id(\"VmTemplate-id\"));\r\n List resp = vmTemplateApi.deleteVmTemplate(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-gpu-device-usage \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"GpuDevice-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, GpuDeviceApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n gpu_device_api = GpuDeviceApi(client)\r\n resp = gpu_device_api.update_gpu_device_usage({\"data\":{},\"where\":{\"id\":\"GpuDevice-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/gpu_device\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n gpu_device_api := client.GpuDevice\r\n params := gpu_device.NewUpdateGpuDeviceUsageParams()\r\n params.RequestBody = &models.GpuDeviceUsageUpdationParams{\nData: &models.GpuDeviceUsageUpdationParamsData{\n},\nWhere: &models.GpuDeviceWhereInput{\nID: pointy.String(\"GpuDevice-id\"),\n},\n}\r\n rawResp, err := gpu_device_api.UpdateGpuDeviceUsage(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskGpuDevice) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskGpuDevice)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskGpuDevice) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.GpuDeviceApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n GpuDeviceApi gpuDeviceApi = new GpuDeviceApi(client);\r\n GpuDeviceUsageUpdationParams params = new GpuDeviceUsageUpdationParams()\n.data(new GpuDeviceUsageUpdationParamsData())\n.where(new GpuDeviceWhereInput()\n.id(\"GpuDevice-id\"));\r\n List resp = gpuDeviceApi.updateGpuDeviceUsage(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/create-vm-volume-snapshot": { - "exampleValue": [ - { - "volume_id": "ck74rk21wg5lz0786opdnzz5m", - "description": "description-string", - "name": "name-string" + "/update-gpu-device-description": { + "exampleValue": { + "data": { + "description": "description-string" + }, + "where": { + "id": "GpuDevice-id" } - ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-vm-volume-snapshot \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"volume_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"description\":\"description-string\",\"name\":\"name-string\"}]'", - "python": "from cloudtower import ApiClient, Configuration, VmVolumeSnapshotApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_volume_snapshot_api = VmVolumeSnapshotApi(client)\r\n resp = vm_volume_snapshot_api.create_vm_volume_snapshot([{\"volume_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"description\":\"description-string\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_volume_snapshot\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_volume_snapshot_api := client.VMVolumeSnapshot\r\n params := vm_volume_snapshot.NewCreateVMVolumeSnapshotParams()\r\n params.RequestBody = []*models.VMVolumeSnapshotCreationParams{\n{\nVolumeID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nDescription: pointy.String(\"description-string\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := vm_volume_snapshot_api.CreateVMVolumeSnapshot(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVMVolumeSnapshot) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVMVolumeSnapshot)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVMVolumeSnapshot) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmVolumeSnapshotApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmVolumeSnapshotApi vmVolumeSnapshotApi = new VmVolumeSnapshotApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new VmVolumeSnapshotCreationParams()\n.volumeId(\"ck74rk21wg5lz0786opdnzz5m\")\n.description(\"description-string\")\n.name(\"name-string\"));\r\n List resp = vmVolumeSnapshotApi.createVmVolumeSnapshot(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-gpu-device-description \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"description\":\"description-string\"},\"where\":{\"id\":\"GpuDevice-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, GpuDeviceApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n gpu_device_api = GpuDeviceApi(client)\r\n resp = gpu_device_api.update_gpu_device_description({\"data\":{\"description\":\"description-string\"},\"where\":{\"id\":\"GpuDevice-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/gpu_device\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n gpu_device_api := client.GpuDevice\r\n params := gpu_device.NewUpdateGpuDeviceDescriptionParams()\r\n params.RequestBody = &models.GpuDeviceDescriptionUpdationParams{\nData: &models.GpuDeviceDescriptionUpdationParamsData{\nDescription: pointy.String(\"description-string\"),\n},\nWhere: &models.GpuDeviceWhereInput{\nID: pointy.String(\"GpuDevice-id\"),\n},\n}\r\n rawResp, err := gpu_device_api.UpdateGpuDeviceDescription(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskGpuDevice) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskGpuDevice)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskGpuDevice) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.GpuDeviceApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n GpuDeviceApi gpuDeviceApi = new GpuDeviceApi(client);\r\n GpuDeviceDescriptionUpdationParams params = new GpuDeviceDescriptionUpdationParams()\n.data(new GpuDeviceDescriptionUpdationParamsData()\n.description(\"description-string\"))\n.where(new GpuDeviceWhereInput()\n.id(\"GpuDevice-id\"));\r\n List resp = gpuDeviceApi.updateGpuDeviceDescription(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/delete-vm-volume-snapshot": { + "/switch-gpu-device-sriov": { "exampleValue": { + "data": { + "enable": true + }, "where": { - "id": "VmVolumeSnapshot-id" + "id": "GpuDevice-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-vm-volume-snapshot \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"VmVolumeSnapshot-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmVolumeSnapshotApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_volume_snapshot_api = VmVolumeSnapshotApi(client)\r\n resp = vm_volume_snapshot_api.delete_vm_volume_snapshot({\"where\":{\"id\":\"VmVolumeSnapshot-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_volume_snapshot\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_volume_snapshot_api := client.VMVolumeSnapshot\r\n params := vm_volume_snapshot.NewDeleteVMVolumeSnapshotParams()\r\n params.RequestBody = &models.VMVolumeSnapshotDeletionParams{\nWhere: &models.VMVolumeSnapshotWhereInput{\nID: pointy.String(\"VmVolumeSnapshot-id\"),\n},\n}\r\n rawResp, err := vm_volume_snapshot_api.DeleteVMVolumeSnapshot(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteVMVolumeSnapshot) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteVMVolumeSnapshot)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteVMVolumeSnapshot) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmVolumeSnapshotApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmVolumeSnapshotApi vmVolumeSnapshotApi = new VmVolumeSnapshotApi(client);\r\n VmVolumeSnapshotDeletionParams params = new VmVolumeSnapshotDeletionParams()\n.where(new VmVolumeSnapshotWhereInput()\n.id(\"VmVolumeSnapshot-id\"));\r\n List resp = vmVolumeSnapshotApi.deleteVmVolumeSnapshot(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/switch-gpu-device-sriov \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"enable\":true},\"where\":{\"id\":\"GpuDevice-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, GpuDeviceApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n gpu_device_api = GpuDeviceApi(client)\r\n resp = gpu_device_api.switch_gpu_device_sriov({\"data\":{\"enable\":True},\"where\":{\"id\":\"GpuDevice-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/gpu_device\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n gpu_device_api := client.GpuDevice\r\n params := gpu_device.NewSwitchGpuDeviceSriovParams()\r\n params.RequestBody = &models.GpuDeviceSriovSwitchParams{\nData: &models.GpuDeviceSriovSwitchParamsData{\nEnable: pointy.Bool(true),\n},\nWhere: &models.GpuDeviceWhereInput{\nID: pointy.String(\"GpuDevice-id\"),\n},\n}\r\n rawResp, err := gpu_device_api.SwitchGpuDeviceSriov(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskGpuDevice) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskGpuDevice)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskGpuDevice) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.GpuDeviceApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n GpuDeviceApi gpuDeviceApi = new GpuDeviceApi(client);\r\n GpuDeviceSriovSwitchParams params = new GpuDeviceSriovSwitchParams()\n.data(new GpuDeviceSriovSwitchParamsData()\n.enable(true))\n.where(new GpuDeviceWhereInput()\n.id(\"GpuDevice-id\"));\r\n List resp = gpuDeviceApi.switchGpuDeviceSriov(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/create-vm-volume": { + "/get-detail-vm-info-by-gpu-devices": { + "exampleValue": { + "where": { + "id": "GpuDevice-id" + } + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-detail-vm-info-by-gpu-devices \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"GpuDevice-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, GpuDeviceApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n gpu_device_api = GpuDeviceApi(client)\r\n resp = gpu_device_api.get_detail_vm_info_by_gpu_devices({\"where\":{\"id\":\"GpuDevice-id\"}})\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/gpu_device\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n gpu_device_api := client.GpuDevice\r\n params := gpu_device.NewGetDetailVMInfoByGpuDevicesParams()\r\n params.RequestBody = &models.GetGpuDevicesRequestBody{\nWhere: &models.GpuDeviceWhereInput{\nID: pointy.String(\"GpuDevice-id\"),\n},\n}\r\n rawResp, err := gpu_device_api.GetDetailVMInfoByGpuDevices(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.GpuDeviceApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n GpuDeviceApi gpuDeviceApi = new GpuDeviceApi(client);\r\n GetGpuDevicesRequestBody params = new GetGpuDevicesRequestBody()\n.where(new GpuDeviceWhereInput()\n.id(\"GpuDevice-id\"));\r\n List resp = gpuDeviceApi.getDetailVmInfoByGpuDevices(params);\r\n }\r\n}" + }, + "/create-graph": { "exampleValue": [ { - "elf_storage_policy": "EC", - "size": 1, - "sharing": true, + "type": "AREA", + "resource_type": "resource_type-string", + "view_id": "ck74rk21wg5lz0786opdnzz5m", + "title": "title-string", "cluster_id": "ck74rk21wg5lz0786opdnzz5m", - "name": "name-string" + "connect_id": [ + "-string" + ], + "metric_name": "metric_name-string" } ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-vm-volume \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"elf_storage_policy\":\"EC\",\"size\":1,\"sharing\":true,\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", - "python": "from cloudtower import ApiClient, Configuration, VmVolumeApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_volume_api = VmVolumeApi(client)\r\n resp = vm_volume_api.create_vm_volume([{\"elf_storage_policy\":\"EC\",\"size\":1,\"sharing\":True,\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_volume\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_volume_api := client.VMVolume\r\n params := vm_volume.NewCreateVMVolumeParams()\r\n params.RequestBody = []*models.VMVolumeCreationParams{\n{\nElfStoragePolicy: models.VMVolumeElfStoragePolicyTypeEC.Pointer(),\nSize: pointy.Int64(1),\nSharing: pointy.Bool(true),\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := vm_volume_api.CreateVMVolume(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVMVolume) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVMVolume)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVMVolume) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmVolumeApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmVolumeApi vmVolumeApi = new VmVolumeApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new VmVolumeCreationParams()\n.elfStoragePolicy(VmVolumeElfStoragePolicyType.fromValue(\"EC\"))\n.size(1L)\n.sharing(true)\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = vmVolumeApi.createVmVolume(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-graph \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"type\":\"AREA\",\"resource_type\":\"resource_type-string\",\"view_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"title\":\"title-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"connect_id\":[\"-string\"],\"metric_name\":\"metric_name-string\"}]'", + "python": "from cloudtower import ApiClient, Configuration, GraphApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n graph_api = GraphApi(client)\r\n resp = graph_api.create_graph([{\"type\":\"AREA\",\"resource_type\":\"resource_type-string\",\"view_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"title\":\"title-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"connect_id\":[\"-string\"],\"metric_name\":\"metric_name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/graph\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n graph_api := client.Graph\r\n params := graph.NewCreateGraphParams()\r\n params.RequestBody = []*models.GraphCreationParams{\n{\nType: models.GraphTypeAREA.Pointer(),\nResourceType: pointy.String(\"resource_type-string\"),\nViewID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nTitle: pointy.String(\"title-string\"),\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nConnectID: []string{\"-string\",\n},\nMetricName: pointy.String(\"metric_name-string\"),\n},\n}\r\n rawResp, err := graph_api.CreateGraph(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskGraph) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskGraph)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskGraph) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.GraphApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n GraphApi graphApi = new GraphApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new GraphCreationParams()\n.type(GraphType.fromValue(\"AREA\"))\n.resourceType(\"resource_type-string\")\n.viewId(\"ck74rk21wg5lz0786opdnzz5m\")\n.title(\"title-string\")\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.addConnectIdItem(\"-string\")\n.metricName(\"metric_name-string\"));\r\n List resp = graphApi.createGraph(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/delete-vm-volume": { + "/update-graph": { "exampleValue": { "where": { - "id": "VmVolume-id" + "id": "Graph-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-vm-volume \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"VmVolume-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmVolumeApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_volume_api = VmVolumeApi(client)\r\n resp = vm_volume_api.delete_vm_volume_from_vm({\"where\":{\"id\":\"VmVolume-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_volume\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_volume_api := client.VMVolume\r\n params := vm_volume.NewDeleteVMVolumeFromVMParams()\r\n params.RequestBody = &models.VMVolumeDeletionParams{\nWhere: &models.VMVolumeWhereInput{\nID: pointy.String(\"VmVolume-id\"),\n},\n}\r\n rawResp, err := vm_volume_api.DeleteVMVolumeFromVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteVMVolume) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteVMVolume)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteVMVolume) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmVolumeApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmVolumeApi vmVolumeApi = new VmVolumeApi(client);\r\n VmVolumeDeletionParams params = new VmVolumeDeletionParams()\n.where(new VmVolumeWhereInput()\n.id(\"VmVolume-id\"));\r\n List resp = vmVolumeApi.deleteVmVolumeFromVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-graph \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Graph-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, GraphApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n graph_api = GraphApi(client)\r\n resp = graph_api.update_graph({\"where\":{\"id\":\"Graph-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/graph\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n graph_api := client.Graph\r\n params := graph.NewUpdateGraphParams()\r\n params.RequestBody = &models.GraphUpdationParams{\nWhere: &models.GraphWhereInput{\nID: pointy.String(\"Graph-id\"),\n},\n}\r\n rawResp, err := graph_api.UpdateGraph(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskGraph) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskGraph)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskGraph) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.GraphApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n GraphApi graphApi = new GraphApi(client);\r\n GraphUpdationParams params = new GraphUpdationParams()\n.where(new GraphWhereInput()\n.id(\"Graph-id\"));\r\n List resp = graphApi.updateGraph(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/rebuild-vm-volume": { - "exampleValue": [ - { - "name": "name-string", - "description": "description-string", - "volume_snapshot_id": "ck74rk21wg5lz0786opdnzz5m" + "/delete-graph": { + "exampleValue": { + "where": { + "id": "Graph-id" } - ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/rebuild-vm-volume \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"name\":\"name-string\",\"description\":\"description-string\",\"volume_snapshot_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", - "python": "from cloudtower import ApiClient, Configuration, VmVolumeApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_volume_api = VmVolumeApi(client)\r\n resp = vm_volume_api.rebuild_vm_volume([{\"name\":\"name-string\",\"description\":\"description-string\",\"volume_snapshot_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_volume\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_volume_api := client.VMVolume\r\n params := vm_volume.NewRebuildVMVolumeParams()\r\n params.RequestBody = []*models.VMVolumeRebuildParams{\n{\nName: pointy.String(\"name-string\"),\nDescription: pointy.String(\"description-string\"),\nVolumeSnapshotID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := vm_volume_api.RebuildVMVolume(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVMVolume) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVMVolume)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVMVolume) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmVolumeApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmVolumeApi vmVolumeApi = new VmVolumeApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new VmVolumeRebuildParams()\n.name(\"name-string\")\n.description(\"description-string\")\n.volumeSnapshotId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = vmVolumeApi.rebuildVmVolume(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-graph \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Graph-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, GraphApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n graph_api = GraphApi(client)\r\n resp = graph_api.delete_graph({\"where\":{\"id\":\"Graph-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/graph\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n graph_api := client.Graph\r\n params := graph.NewDeleteGraphParams()\r\n params.RequestBody = &models.GraphDeletionParams{\nWhere: &models.GraphWhereInput{\nID: pointy.String(\"Graph-id\"),\n},\n}\r\n rawResp, err := graph_api.DeleteGraph(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteGraph) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteGraph)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteGraph) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.GraphApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n GraphApi graphApi = new GraphApi(client);\r\n GraphDeletionParams params = new GraphDeletionParams()\n.where(new GraphWhereInput()\n.id(\"Graph-id\"));\r\n List resp = graphApi.deleteGraph(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/rollback-vm-volume": { + "/create-host": { "exampleValue": [ { - "volume_snapshot_id": "ck74rk21wg5lz0786opdnzz5m" + "data": [ + { + "ifaces": [ + { + "netmask": "netmask-string", + "name": [ + "-string" + ], + "ip": "ip-string", + "gateway_ip": "gateway_ip-string", + "function": "ACCESS" + } + ], + "disks": [ + { + "drive": "drive-string" + } + ], + "hostname": "hostname-string", + "host_uuid": "ck74rk21wg5lz0786opdnzz5m", + "host_ip": "host_ip-string" + } + ], + "cluster_id": "ck74rk21wg5lz0786opdnzz5m" } ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/rollback-vm-volume \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"volume_snapshot_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", - "python": "from cloudtower import ApiClient, Configuration, VmVolumeApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_volume_api = VmVolumeApi(client)\r\n resp = vm_volume_api.rollback_vm_volume([{\"volume_snapshot_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_volume\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_volume_api := client.VMVolume\r\n params := vm_volume.NewRollbackVMVolumeParams()\r\n params.RequestBody = []*models.VMVolumeRollbackParams{\n{\nVolumeSnapshotID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := vm_volume_api.RollbackVMVolume(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVMVolume) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVMVolume)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVMVolume) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmVolumeApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmVolumeApi vmVolumeApi = new VmVolumeApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new VmVolumeRollbackParams()\n.volumeSnapshotId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = vmVolumeApi.rollbackVmVolume(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-host \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"data\":[{\"ifaces\":[{\"netmask\":\"netmask-string\",\"name\":[\"-string\"],\"ip\":\"ip-string\",\"gateway_ip\":\"gateway_ip-string\",\"function\":\"ACCESS\"}],\"disks\":[{\"drive\":\"drive-string\"}],\"hostname\":\"hostname-string\",\"host_uuid\":\"ck74rk21wg5lz0786opdnzz5m\",\"host_ip\":\"host_ip-string\"}],\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", + "python": "from cloudtower import ApiClient, Configuration, HostApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n host_api = HostApi(client)\r\n resp = host_api.create_host([{\"data\":[{\"ifaces\":[{\"netmask\":\"netmask-string\",\"name\":[\"-string\"],\"ip\":\"ip-string\",\"gateway_ip\":\"gateway_ip-string\",\"function\":\"ACCESS\"}],\"disks\":[{\"drive\":\"drive-string\"}],\"hostname\":\"hostname-string\",\"host_uuid\":\"ck74rk21wg5lz0786opdnzz5m\",\"host_ip\":\"host_ip-string\"}],\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/host\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n host_api := client.Host\r\n params := host.NewCreateHostParams()\r\n params.RequestBody = []*models.HostCreationParams{\n{\nData: []*models.HostCreationParamsData{\n{\nIfaces: []*models.HostBatchCreateIfaceInput{\n{\nNetmask: pointy.String(\"netmask-string\"),\nName: []string{\"-string\",\n},\nIP: pointy.String(\"ip-string\"),\nGatewayIP: pointy.String(\"gateway_ip-string\"),\nFunction: models.HostBatchCreateIfaceFunctionACCESS.Pointer(),\n},\n},\nDisks: []*models.HostBatchCreateDiskInput{\n{\nDrive: pointy.String(\"drive-string\"),\n},\n},\nHostname: pointy.String(\"hostname-string\"),\nHostUUID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nHostIP: pointy.String(\"host_ip-string\"),\n},\n},\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := host_api.CreateHost(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskBatchHosts) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskBatchHosts)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskBatchHosts) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.HostApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n HostApi hostApi = new HostApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new HostCreationParams()\n.addDataItem(new HostCreationParamsData()\n.addIfacesItem(new HostBatchCreateIfaceInput()\n.netmask(\"netmask-string\")\n.addNameItem(\"-string\")\n.ip(\"ip-string\")\n.gatewayIp(\"gateway_ip-string\")\n.function(HostBatchCreateIfaceFunction.fromValue(\"ACCESS\")))\n.addDisksItem(new HostBatchCreateDiskInput()\n.drive(\"drive-string\"))\n.hostname(\"hostname-string\")\n.hostUuid(\"ck74rk21wg5lz0786opdnzz5m\")\n.hostIp(\"host_ip-string\"))\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = hostApi.createHost(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/clone-vm-volume": { + "/trigger-disk-blink": { "exampleValue": [ { - "where": { - "id": "VmVolume-id" - }, - "data": { - "name": "name-string" - } + "disk_name": "disk_name-string", + "host_id": "ck74rk21wg5lz0786opdnzz5m" } ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/clone-vm-volume \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"where\":{\"id\":\"VmVolume-id\"},\"data\":{\"name\":\"name-string\"}}]'", - "python": "from cloudtower import ApiClient, Configuration, VmVolumeApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_volume_api = VmVolumeApi(client)\r\n resp = vm_volume_api.clone_vm_volume([{\"where\":{\"id\":\"VmVolume-id\"},\"data\":{\"name\":\"name-string\"}}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_volume\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_volume_api := client.VMVolume\r\n params := vm_volume.NewCloneVMVolumeParams()\r\n params.RequestBody = []*models.CloneVMVolumeParams{\n{\nWhere: &models.VMVolumeWhereUniqueInput{\nID: pointy.String(\"VmVolume-id\"),\n},\nData: &models.CloneVMVolumeParamsData{\nName: pointy.String(\"name-string\"),\n},\n},\n}\r\n rawResp, err := vm_volume_api.CloneVMVolume(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVMVolume) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVMVolume)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVMVolume) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmVolumeApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmVolumeApi vmVolumeApi = new VmVolumeApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new CloneVmVolumeParams()\n.where(new VmVolumeWhereUniqueInput()\n.id(\"VmVolume-id\"))\n.data(new CloneVmVolumeParamsData()\n.name(\"name-string\")));\r\n List resp = vmVolumeApi.cloneVmVolume(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/trigger-disk-blink \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"disk_name\":\"disk_name-string\",\"host_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", + "python": "from cloudtower import ApiClient, Configuration, HostApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n host_api = HostApi(client)\r\n resp = host_api.trigger_disk_blink([{\"disk_name\":\"disk_name-string\",\"host_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/host\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n host_api := client.Host\r\n params := host.NewTriggerDiskBlinkParams()\r\n params.RequestBody = []*models.TriggerDiskBlinkParams{\n{\nDiskName: pointy.String(\"disk_name-string\"),\nHostID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := host_api.TriggerDiskBlink(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskHost) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskHost)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskHost) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.HostApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n HostApi hostApi = new HostApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new TriggerDiskBlinkParams()\n.diskName(\"disk_name-string\")\n.hostId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = hostApi.triggerDiskBlink(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-vm-volume": { + "/update-host": { "exampleValue": { + "data": {}, "where": { - "id": "VmVolume-id" - }, - "data": {} + "id": "Host-id" + } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-vm-volume \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"VmVolume-id\"},\"data\":{}}'", - "python": "from cloudtower import ApiClient, Configuration, VmVolumeApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_volume_api = VmVolumeApi(client)\r\n resp = vm_volume_api.update_vm_volume({\"where\":{\"id\":\"VmVolume-id\"},\"data\":{}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_volume\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_volume_api := client.VMVolume\r\n params := vm_volume.NewUpdateVMVolumeParams()\r\n params.RequestBody = &models.UpdateVMVolumeParams{\nWhere: &models.VMVolumeWhereInput{\nID: pointy.String(\"VmVolume-id\"),\n},\nData: &models.UpdateVMVolumeParamsData{\n},\n}\r\n rawResp, err := vm_volume_api.UpdateVMVolume(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVMVolume) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVMVolume)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVMVolume) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmVolumeApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmVolumeApi vmVolumeApi = new VmVolumeApi(client);\r\n UpdateVmVolumeParams params = new UpdateVmVolumeParams()\n.where(new VmVolumeWhereInput()\n.id(\"VmVolume-id\"))\n.data(new UpdateVmVolumeParamsData());\r\n List resp = vmVolumeApi.updateVmVolume(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-host \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Host-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, HostApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n host_api = HostApi(client)\r\n resp = host_api.update_host({\"data\":{},\"where\":{\"id\":\"Host-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/host\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n host_api := client.Host\r\n params := host.NewUpdateHostParams()\r\n params.RequestBody = &models.HostUpdationParams{\nData: &models.HostUpdationParamsData{\n},\nWhere: &models.HostWhereInput{\nID: pointy.String(\"Host-id\"),\n},\n}\r\n rawResp, err := host_api.UpdateHost(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskHost) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskHost)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskHost) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.HostApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n HostApi hostApi = new HostApi(client);\r\n HostUpdationParams params = new HostUpdationParams()\n.data(new HostUpdationParamsData())\n.where(new HostWhereInput()\n.id(\"Host-id\"));\r\n List resp = hostApi.updateHost(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/export-vm-volume": { + "/operate-host-power": { "exampleValue": { "data": { - "type": "QCOW2" + "force": true, + "action": "poweroff" }, "where": { - "id": "VmVolume-id" + "host_id": "ck74rk21wg5lz0786opdnzz5m" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/export-vm-volume \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"type\":\"QCOW2\"},\"where\":{\"id\":\"VmVolume-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VmVolumeApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_volume_api = VmVolumeApi(client)\r\n resp = vm_volume_api.export_vm_volume({\"data\":{\"type\":\"QCOW2\"},\"where\":{\"id\":\"VmVolume-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_volume\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_volume_api := client.VMVolume\r\n params := vm_volume.NewExportVMVolumeParams()\r\n params.RequestBody = &models.ExportVMVolumeParams{\nData: &models.ExportVMVolumeParamsData{\nType: models.VMVolumeExportFileTypeQCOW2.Pointer(),\n},\nWhere: &models.VMVolumeWhereInput{\nID: pointy.String(\"VmVolume-id\"),\n},\n}\r\n rawResp, err := vm_volume_api.ExportVMVolume(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVMExportFile) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVMExportFile)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVMExportFile) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmVolumeApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmVolumeApi vmVolumeApi = new VmVolumeApi(client);\r\n ExportVmVolumeParams params = new ExportVmVolumeParams()\n.data(new ExportVmVolumeParamsData()\n.type(VmVolumeExportFileType.fromValue(\"QCOW2\")))\n.where(new VmVolumeWhereInput()\n.id(\"VmVolume-id\"));\r\n List resp = vmVolumeApi.exportVmVolume(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" - }, - "/import-vm-volume": { - "exampleValue": [ - { - "upload_task_id": "ck74rk21wg5lz0786opdnzz5m", - "name": "name-string", - "storage_policy": "EC", - "cluster_id": "ck74rk21wg5lz0786opdnzz5m" - } - ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/import-vm-volume \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"upload_task_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\",\"storage_policy\":\"EC\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", - "python": "from cloudtower import ApiClient, Configuration, VmVolumeApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_volume_api = VmVolumeApi(client)\r\n resp = vm_volume_api.import_vm_volume([{\"upload_task_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\",\"storage_policy\":\"EC\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_volume\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_volume_api := client.VMVolume\r\n params := vm_volume.NewImportVMVolumeParams()\r\n params.RequestBody = []*models.ImportVMVolumeParams{\n{\nUploadTaskID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\nStoragePolicy: models.VMVolumeElfStoragePolicyTypeEC.Pointer(),\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := vm_volume_api.ImportVMVolume(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVMVolume) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVMVolume)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVMVolume) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmVolumeApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmVolumeApi vmVolumeApi = new VmVolumeApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new ImportVmVolumeParams()\n.uploadTaskId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\")\n.storagePolicy(VmVolumeElfStoragePolicyType.fromValue(\"EC\"))\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = vmVolumeApi.importVmVolume(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/operate-host-power \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"force\":true,\"action\":\"poweroff\"},\"where\":{\"host_id\":\"ck74rk21wg5lz0786opdnzz5m\"}}'", + "python": "from cloudtower import ApiClient, Configuration, HostApi\r\nfrom cloudtower.utils import login, wait_task\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n host_api = HostApi(client)\r\n resp = host_api.power_off_host({\"data\":{\"force\":True,\"action\":\"poweroff\"},\"where\":{\"host_id\":\"ck74rk21wg5lz0786opdnzz5m\"}})\r\n wait_task(resp.task_id, client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/host\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n host_api := client.Host\r\n params := host.NewPowerOffHostParams()\r\n params.RequestBody = &models.OperateHostPowerParams{\nData: &models.OperateHostPowerData{\nForce: pointy.Bool(true),\nAction: models.OperateActionEnumpoweroff.Pointer(),\n},\nWhere: &models.OperateHostPowerParamsWhere{\nHostID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := host_api.PowerOffHost(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n err = utils.WaitTask(context.Background(), client, resp.TaskID, 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.HostApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n HostApi hostApi = new HostApi(client);\r\n OperateHostPowerParams params = new OperateHostPowerParams()\n.data(new OperateHostPowerData()\n.force(true)\n.action(OperateActionEnum.fromValue(\"poweroff\")))\n.where(new OperateHostPowerParamsWhere()\n.hostId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n WithTaskHost resp = hostApi.powerOffHost(params);\r\n TaskUtil.WaitTask(resp.getTaskId(), client);\r\n }\r\n}" }, - "/upload-content-library-image": { + "/enter-maintenance-mode-precheck": { "exampleValue": { - "file": "file-string", - "clusters": "clusters-string" + "where": { + "id": "Host-id" + } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/upload-content-library-image \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: multipart/form-data' \\\n\t-d '{\"file\":\"file-string\",\"clusters\":\"clusters-string\"}'", - "python": "from cloudtower import ApiClient, Configuration, ContentLibraryImageApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n content_library_image_api = ContentLibraryImageApi(client)\r\n with open(\"file-path\", \"rb\") as file:\r\n resp = content_library_image_api.create_content_library_image(\r\n file=file,\r\n clusters=\"clusters-string\"\r\n )\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"bytes\"\r\n \"fmt\"\r\n \"io\"\r\n\r\n \"github.com/go-openapi/runtime\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/content_library_image\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n content_library_image_api := client.ContentLibraryImage\r\n params := content_library_image.NewCreateContentLibraryImageParams()\r\n params.File = runtime.NamedReader(\"file\",io.NopCloser(bytes.NewReader([]byte(\"file-string\"))))\r\n params.Clusters = \"clusters-string\"\r\n resp, err := content_library_image_api.CreateContentLibraryImage(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.ContentLibraryImageApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.nio.file.Files;\r\nimport java.nio.file.Path;\r\nimport java.util.ArrayList;\r\nimport java.util.List;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ContentLibraryImageApi contentLibraryImageApi = new ContentLibraryImageApi(client);\r\n List resp = contentLibraryImageApi.createContentLibraryImage(\r\n Files.readAllBytes(Path.of(\"file-string\")),\r\n \"clusters-string\",\r\n \"name\",\r\n \"size\",\r\n \"size_unit\",\r\n \"description\",\r\n \"upload_task_id\"\r\n );\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/enter-maintenance-mode-precheck \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Host-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, HostApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n host_api = HostApi(client)\r\n resp = host_api.enter_maintenance_mode_pre_check({\"where\":{\"id\":\"Host-id\"}})\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/host\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n host_api := client.Host\r\n params := host.NewEnterMaintenanceModePreCheckParams()\r\n params.RequestBody = &models.EnterMaintenanceModeCheckParams{\nWhere: &models.HostWhereInput{\nID: pointy.String(\"Host-id\"),\n},\n}\r\n rawResp, err := host_api.EnterMaintenanceModePreCheck(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.HostApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n HostApi hostApi = new HostApi(client);\r\n EnterMaintenanceModeCheckParams params = new EnterMaintenanceModeCheckParams()\n.where(new HostWhereInput()\n.id(\"Host-id\"));\r\n EnterMaintenanceModeCheckResult resp = hostApi.enterMaintenanceModePreCheck(params);\r\n }\r\n}" }, - "/update-content-library-image": { + "/enter-maintance-mode-precheck-result": { "exampleValue": { - "data": {}, "where": { - "id": "ContentLibraryImage-id" + "task_id": "ck74rk21wg5lz0786opdnzz5m" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-content-library-image \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"ContentLibraryImage-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, ContentLibraryImageApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n content_library_image_api = ContentLibraryImageApi(client)\r\n resp = content_library_image_api.update_content_library_image({\"data\":{},\"where\":{\"id\":\"ContentLibraryImage-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/content_library_image\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n content_library_image_api := client.ContentLibraryImage\r\n params := content_library_image.NewUpdateContentLibraryImageParams()\r\n params.RequestBody = &models.ContentLibraryImageUpdationParams{\nData: &models.ContentLibraryImageUpdationParamsData{\n},\nWhere: &models.ContentLibraryImageWhereInput{\nID: pointy.String(\"ContentLibraryImage-id\"),\n},\n}\r\n rawResp, err := content_library_image_api.UpdateContentLibraryImage(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskContentLibraryImage) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskContentLibraryImage)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskContentLibraryImage) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ContentLibraryImageApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ContentLibraryImageApi contentLibraryImageApi = new ContentLibraryImageApi(client);\r\n ContentLibraryImageUpdationParams params = new ContentLibraryImageUpdationParams()\n.data(new ContentLibraryImageUpdationParamsData())\n.where(new ContentLibraryImageWhereInput()\n.id(\"ContentLibraryImage-id\"));\r\n List resp = contentLibraryImageApi.updateContentLibraryImage(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/enter-maintance-mode-precheck-result \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"task_id\":\"ck74rk21wg5lz0786opdnzz5m\"}}'", + "python": "from cloudtower import ApiClient, Configuration, HostApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n host_api = HostApi(client)\r\n resp = host_api.enter_maintenance_mode_precheck_result({\"where\":{\"task_id\":\"ck74rk21wg5lz0786opdnzz5m\"}})\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/host\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n host_api := client.Host\r\n params := host.NewEnterMaintenanceModePrecheckResultParams()\r\n params.RequestBody = &models.EnterMaintenanceModeResultParams{\nWhere: &models.EnterMaintenanceModeResultParamsWhere{\nTaskID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := host_api.EnterMaintenanceModePrecheckResult(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.HostApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n HostApi hostApi = new HostApi(client);\r\n EnterMaintenanceModeResultParams params = new EnterMaintenanceModeResultParams()\n.where(new EnterMaintenanceModeResultParamsWhere()\n.taskId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n EnterMaintenanceModeResult resp = hostApi.enterMaintenanceModePrecheckResult(params);\r\n }\r\n}" }, - "/distribute-content-library-image-clusters": { + "/enter-maintance-mode": { "exampleValue": { - "data": { - "clusters": { - "id": "Cluster-id" - } - }, + "data": {}, "where": { - "id": "ContentLibraryImage-id" + "host_id": "ck74rk21wg5lz0786opdnzz5m" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/distribute-content-library-image-clusters \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"clusters\":{\"id\":\"Cluster-id\"}},\"where\":{\"id\":\"ContentLibraryImage-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, ContentLibraryImageApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n content_library_image_api = ContentLibraryImageApi(client)\r\n resp = content_library_image_api.distribute_content_library_image_clusters({\"data\":{\"clusters\":{\"id\":\"Cluster-id\"}},\"where\":{\"id\":\"ContentLibraryImage-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/content_library_image\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n content_library_image_api := client.ContentLibraryImage\r\n params := content_library_image.NewDistributeContentLibraryImageClustersParams()\r\n params.RequestBody = &models.ContentLibraryImageUpdationClusterParams{\nData: &models.ContentLibraryImageUpdationClusterParamsData{\nClusters: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\n},\nWhere: &models.ContentLibraryImageWhereInput{\nID: pointy.String(\"ContentLibraryImage-id\"),\n},\n}\r\n rawResp, err := content_library_image_api.DistributeContentLibraryImageClusters(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskContentLibraryImage) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskContentLibraryImage)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskContentLibraryImage) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ContentLibraryImageApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ContentLibraryImageApi contentLibraryImageApi = new ContentLibraryImageApi(client);\r\n ContentLibraryImageUpdationClusterParams params = new ContentLibraryImageUpdationClusterParams()\n.data(new ContentLibraryImageUpdationClusterParamsData()\n.clusters(new ClusterWhereInput()\n.id(\"Cluster-id\")))\n.where(new ContentLibraryImageWhereInput()\n.id(\"ContentLibraryImage-id\"));\r\n List resp = contentLibraryImageApi.distributeContentLibraryImageClusters(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/enter-maintance-mode \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"host_id\":\"ck74rk21wg5lz0786opdnzz5m\"}}'", + "python": "from cloudtower import ApiClient, Configuration, HostApi\r\nfrom cloudtower.utils import login, wait_task\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n host_api = HostApi(client)\r\n resp = host_api.enter_maintenance_mode({\"data\":{},\"where\":{\"host_id\":\"ck74rk21wg5lz0786opdnzz5m\"}})\r\n wait_task(resp.task_id, client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/host\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n host_api := client.Host\r\n params := host.NewEnterMaintenanceModeParams()\r\n params.RequestBody = &models.EnterMaintenanceModeParams{\nData: &models.EnterMaintenanceModeInput{\n},\nWhere: &models.EnterMaintenanceModeParamsWhere{\nHostID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := host_api.EnterMaintenanceMode(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n err = utils.WaitTask(context.Background(), client, resp.TaskID, 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.HostApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n HostApi hostApi = new HostApi(client);\r\n EnterMaintenanceModeParams params = new EnterMaintenanceModeParams()\n.data(new EnterMaintenanceModeInput())\n.where(new EnterMaintenanceModeParamsWhere()\n.hostId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n WithTaskHost resp = hostApi.enterMaintenanceMode(params);\r\n TaskUtil.WaitTask(resp.getTaskId(), client);\r\n }\r\n}" }, - "/remove-content-library-image-clusters": { + "/exit-maintance-mode-precheck-result": { "exampleValue": { - "data": { - "clusters": { - "id": "Cluster-id" - } - }, "where": { - "id": "ContentLibraryImage-id" + "id": "Host-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/remove-content-library-image-clusters \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"clusters\":{\"id\":\"Cluster-id\"}},\"where\":{\"id\":\"ContentLibraryImage-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, ContentLibraryImageApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n content_library_image_api = ContentLibraryImageApi(client)\r\n resp = content_library_image_api.remove_content_library_image_clusters({\"data\":{\"clusters\":{\"id\":\"Cluster-id\"}},\"where\":{\"id\":\"ContentLibraryImage-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/content_library_image\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n content_library_image_api := client.ContentLibraryImage\r\n params := content_library_image.NewRemoveContentLibraryImageClustersParams()\r\n params.RequestBody = &models.ContentLibraryImageUpdationClusterParams{\nData: &models.ContentLibraryImageUpdationClusterParamsData{\nClusters: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\n},\nWhere: &models.ContentLibraryImageWhereInput{\nID: pointy.String(\"ContentLibraryImage-id\"),\n},\n}\r\n rawResp, err := content_library_image_api.RemoveContentLibraryImageClusters(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskContentLibraryImage) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskContentLibraryImage)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskContentLibraryImage) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ContentLibraryImageApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ContentLibraryImageApi contentLibraryImageApi = new ContentLibraryImageApi(client);\r\n ContentLibraryImageUpdationClusterParams params = new ContentLibraryImageUpdationClusterParams()\n.data(new ContentLibraryImageUpdationClusterParamsData()\n.clusters(new ClusterWhereInput()\n.id(\"Cluster-id\")))\n.where(new ContentLibraryImageWhereInput()\n.id(\"ContentLibraryImage-id\"));\r\n List resp = contentLibraryImageApi.removeContentLibraryImageClusters(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/exit-maintance-mode-precheck-result \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Host-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, HostApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n host_api = HostApi(client)\r\n resp = host_api.exit_maintenance_mode_precheck_result({\"where\":{\"id\":\"Host-id\"}})\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/host\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n host_api := client.Host\r\n params := host.NewExitMaintenanceModePrecheckResultParams()\r\n params.RequestBody = &models.ExitMaintenanceModeResultParams{\nWhere: &models.HostWhereInput{\nID: pointy.String(\"Host-id\"),\n},\n}\r\n rawResp, err := host_api.ExitMaintenanceModePrecheckResult(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.HostApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n HostApi hostApi = new HostApi(client);\r\n ExitMaintenanceModeResultParams params = new ExitMaintenanceModeResultParams()\n.where(new HostWhereInput()\n.id(\"Host-id\"));\r\n ExitMaintenanceModeResult resp = hostApi.exitMaintenanceModePrecheckResult(params);\r\n }\r\n}" }, - "/delete-content-library-image": { + "/exit-maintance-mode": { "exampleValue": { + "data": {}, "where": { - "id": "ContentLibraryImage-id" + "host_id": "ck74rk21wg5lz0786opdnzz5m" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-content-library-image \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"ContentLibraryImage-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, ContentLibraryImageApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n content_library_image_api = ContentLibraryImageApi(client)\r\n resp = content_library_image_api.delete_content_library_image({\"where\":{\"id\":\"ContentLibraryImage-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/content_library_image\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n content_library_image_api := client.ContentLibraryImage\r\n params := content_library_image.NewDeleteContentLibraryImageParams()\r\n params.RequestBody = &models.ContentLibraryImageDeletionParams{\nWhere: &models.ContentLibraryImageWhereInput{\nID: pointy.String(\"ContentLibraryImage-id\"),\n},\n}\r\n rawResp, err := content_library_image_api.DeleteContentLibraryImage(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteContentLibraryImage) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteContentLibraryImage)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteContentLibraryImage) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ContentLibraryImageApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ContentLibraryImageApi contentLibraryImageApi = new ContentLibraryImageApi(client);\r\n ContentLibraryImageDeletionParams params = new ContentLibraryImageDeletionParams()\n.where(new ContentLibraryImageWhereInput()\n.id(\"ContentLibraryImage-id\"));\r\n List resp = contentLibraryImageApi.deleteContentLibraryImage(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/exit-maintance-mode \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"host_id\":\"ck74rk21wg5lz0786opdnzz5m\"}}'", + "python": "from cloudtower import ApiClient, Configuration, HostApi\r\nfrom cloudtower.utils import login, wait_task\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n host_api = HostApi(client)\r\n resp = host_api.exit_maintenance_mode({\"data\":{},\"where\":{\"host_id\":\"ck74rk21wg5lz0786opdnzz5m\"}})\r\n wait_task(resp.task_id, client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/host\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n host_api := client.Host\r\n params := host.NewExitMaintenanceModeParams()\r\n params.RequestBody = &models.ExitMaintenanceModeParams{\nData: &models.ExitMaintenanceModeInput{\n},\nWhere: &models.ExitMaintenanceModeParamsWhere{\nHostID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := host_api.ExitMaintenanceMode(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n err = utils.WaitTask(context.Background(), client, resp.TaskID, 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.HostApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n HostApi hostApi = new HostApi(client);\r\n ExitMaintenanceModeParams params = new ExitMaintenanceModeParams()\n.data(new ExitMaintenanceModeInput())\n.where(new ExitMaintenanceModeParamsWhere()\n.hostId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n WithTaskHost resp = hostApi.exitMaintenanceMode(params);\r\n TaskUtil.WaitTask(resp.getTaskId(), client);\r\n }\r\n}" }, - "/import-content-library-image": { - "exampleValue": { - "data": { - "url": "url-string", + "/create-iscsi-lun-snapshot": { + "exampleValue": [ + { + "iscsi_target_id": "ck74rk21wg5lz0786opdnzz5m", "name": "name-string", - "cluster": { - "id": "Cluster-id" - } + "iscsi_lun_id": "ck74rk21wg5lz0786opdnzz5m" + } + ], + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-iscsi-lun-snapshot \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"iscsi_target_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\",\"iscsi_lun_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", + "python": "from cloudtower import ApiClient, Configuration, IscsiLunSnapshotApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n iscsi_lun_snapshot_api = IscsiLunSnapshotApi(client)\r\n resp = iscsi_lun_snapshot_api.create_iscsi_lun_snapshot([{\"iscsi_target_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\",\"iscsi_lun_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/iscsi_lun_snapshot\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n iscsi_lun_snapshot_api := client.IscsiLunSnapshot\r\n params := iscsi_lun_snapshot.NewCreateIscsiLunSnapshotParams()\r\n params.RequestBody = []*models.IscsiLunSnapshotCreationParams{\n{\nIscsiTargetID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\nIscsiLunID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := iscsi_lun_snapshot_api.CreateIscsiLunSnapshot(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskIscsiLunSnapshot) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskIscsiLunSnapshot)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskIscsiLunSnapshot) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.IscsiLunSnapshotApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n IscsiLunSnapshotApi iscsiLunSnapshotApi = new IscsiLunSnapshotApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new IscsiLunSnapshotCreationParams()\n.iscsiTargetId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\")\n.iscsiLunId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = iscsiLunSnapshotApi.createIscsiLunSnapshot(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "/delete-iscsi-lun-snapshot": { + "exampleValue": { + "where": { + "id": "IscsiLunSnapshot-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/import-content-library-image \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"url\":\"url-string\",\"name\":\"name-string\",\"cluster\":{\"id\":\"Cluster-id\"}}}'", - "python": "from cloudtower import ApiClient, Configuration, ContentLibraryImageApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n content_library_image_api = ContentLibraryImageApi(client)\r\n resp = content_library_image_api.import_content_library_image({\"data\":{\"url\":\"url-string\",\"name\":\"name-string\",\"cluster\":{\"id\":\"Cluster-id\"}}})\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/content_library_image\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n content_library_image_api := client.ContentLibraryImage\r\n params := content_library_image.NewImportContentLibraryImageParams()\r\n params.RequestBody = &models.ContentLibraryImageImportParams{\nData: &models.ContentLibraryImageImportData{\nURL: pointy.String(\"url-string\"),\nName: pointy.String(\"name-string\"),\nCluster: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\n},\n}\r\n rawResp, err := content_library_image_api.ImportContentLibraryImage(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.ContentLibraryImageApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ContentLibraryImageApi contentLibraryImageApi = new ContentLibraryImageApi(client);\r\n ContentLibraryImageImportParams params = new ContentLibraryImageImportParams()\n.data(new ContentLibraryImageImportData()\n.url(\"url-string\")\n.name(\"name-string\")\n.cluster(new ClusterWhereInput()\n.id(\"Cluster-id\")));\r\n UploadTask resp = contentLibraryImageApi.importContentLibraryImage(params);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-iscsi-lun-snapshot \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"IscsiLunSnapshot-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, IscsiLunSnapshotApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n iscsi_lun_snapshot_api = IscsiLunSnapshotApi(client)\r\n resp = iscsi_lun_snapshot_api.delete_iscsi_lun_snapshot({\"where\":{\"id\":\"IscsiLunSnapshot-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/iscsi_lun_snapshot\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n iscsi_lun_snapshot_api := client.IscsiLunSnapshot\r\n params := iscsi_lun_snapshot.NewDeleteIscsiLunSnapshotParams()\r\n params.RequestBody = &models.IscsiLunSnapshotDeletionParams{\nWhere: &models.IscsiLunSnapshotWhereInput{\nID: pointy.String(\"IscsiLunSnapshot-id\"),\n},\n}\r\n rawResp, err := iscsi_lun_snapshot_api.DeleteIscsiLunSnapshot(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteIscsiLunSnapshot) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteIscsiLunSnapshot)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteIscsiLunSnapshot) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.IscsiLunSnapshotApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n IscsiLunSnapshotApi iscsiLunSnapshotApi = new IscsiLunSnapshotApi(client);\r\n IscsiLunSnapshotDeletionParams params = new IscsiLunSnapshotDeletionParams()\n.where(new IscsiLunSnapshotWhereInput()\n.id(\"IscsiLunSnapshot-id\"));\r\n List resp = iscsiLunSnapshotApi.deleteIscsiLunSnapshot(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-global-alert-rule": { + "/create-iscsi-lun": { + "exampleValue": [ + { + "assigned_size": 1, + "replica_num": 1, + "iscsi_target_id": "ck74rk21wg5lz0786opdnzz5m", + "name": "name-string" + } + ], + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-iscsi-lun \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"assigned_size\":1,\"replica_num\":1,\"iscsi_target_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", + "python": "from cloudtower import ApiClient, Configuration, IscsiLunApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n iscsi_lun_api = IscsiLunApi(client)\r\n resp = iscsi_lun_api.create_iscsi_lun([{\"assigned_size\":1,\"replica_num\":1,\"iscsi_target_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/iscsi_lun\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n iscsi_lun_api := client.IscsiLun\r\n params := iscsi_lun.NewCreateIscsiLunParams()\r\n params.RequestBody = []*models.IscsiLunCreationParams{\n{\nAssignedSize: pointy.Int64(1),\nReplicaNum: pointy.Int32(1),\nIscsiTargetID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := iscsi_lun_api.CreateIscsiLun(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskIscsiLun) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskIscsiLun)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskIscsiLun) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.IscsiLunApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n IscsiLunApi iscsiLunApi = new IscsiLunApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new IscsiLunCreationParams()\n.assignedSize(1L)\n.replicaNum(1)\n.iscsiTargetId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = iscsiLunApi.createIscsiLun(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "/update-iscsi-lun": { "exampleValue": { "data": {}, "where": { - "id": "GlobalAlertRule-id" + "id": "IscsiLun-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-global-alert-rule \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"GlobalAlertRule-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, GlobalAlertRuleApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n global_alert_rule_api = GlobalAlertRuleApi(client)\r\n resp = global_alert_rule_api.update_global_alert_rule({\"data\":{},\"where\":{\"id\":\"GlobalAlertRule-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/global_alert_rule\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n global_alert_rule_api := client.GlobalAlertRule\r\n params := global_alert_rule.NewUpdateGlobalAlertRuleParams()\r\n params.RequestBody = &models.GlobalAlertRuleUpdationParams{\nData: &models.GlobalAlertRuleUpdationParamsData{\n},\nWhere: &models.GlobalAlertRuleWhereInput{\nID: pointy.String(\"GlobalAlertRule-id\"),\n},\n}\r\n rawResp, err := global_alert_rule_api.UpdateGlobalAlertRule(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskGlobalAlertRule) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskGlobalAlertRule)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskGlobalAlertRule) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.GlobalAlertRuleApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n GlobalAlertRuleApi globalAlertRuleApi = new GlobalAlertRuleApi(client);\r\n GlobalAlertRuleUpdationParams params = new GlobalAlertRuleUpdationParams()\n.data(new GlobalAlertRuleUpdationParamsData())\n.where(new GlobalAlertRuleWhereInput()\n.id(\"GlobalAlertRule-id\"));\r\n List resp = globalAlertRuleApi.updateGlobalAlertRule(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-iscsi-lun \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"IscsiLun-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, IscsiLunApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n iscsi_lun_api = IscsiLunApi(client)\r\n resp = iscsi_lun_api.update_iscsi_lun({\"data\":{},\"where\":{\"id\":\"IscsiLun-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/iscsi_lun\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n iscsi_lun_api := client.IscsiLun\r\n params := iscsi_lun.NewUpdateIscsiLunParams()\r\n params.RequestBody = &models.IscsiLunUpdationParams{\nData: &models.IscsiLunUpdationParamsData{\n},\nWhere: &models.IscsiLunWhereInput{\nID: pointy.String(\"IscsiLun-id\"),\n},\n}\r\n rawResp, err := iscsi_lun_api.UpdateIscsiLun(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskIscsiLun) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskIscsiLun)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskIscsiLun) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.IscsiLunApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n IscsiLunApi iscsiLunApi = new IscsiLunApi(client);\r\n IscsiLunUpdationParams params = new IscsiLunUpdationParams()\n.data(new IscsiLunUpdationParamsData())\n.where(new IscsiLunWhereInput()\n.id(\"IscsiLun-id\"));\r\n List resp = iscsiLunApi.updateIscsiLun(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-customize-alert-rule": { + "/delete-iscsi-lun": { "exampleValue": { "data": { - "clusters": { - "id": "Cluster-id" - } + "remove_snapshot": true }, "where": { - "id": "GlobalAlertRule-id" + "id": "IscsiLun-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-customize-alert-rule \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"clusters\":{\"id\":\"Cluster-id\"}},\"where\":{\"id\":\"GlobalAlertRule-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, GlobalAlertRuleApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n global_alert_rule_api = GlobalAlertRuleApi(client)\r\n resp = global_alert_rule_api.update_customize_alert_rule({\"data\":{\"clusters\":{\"id\":\"Cluster-id\"}},\"where\":{\"id\":\"GlobalAlertRule-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/global_alert_rule\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n global_alert_rule_api := client.GlobalAlertRule\r\n params := global_alert_rule.NewUpdateCustomizeAlertRuleParams()\r\n params.RequestBody = &models.CustomizeAlertRuleUpdationParams{\nData: &models.CustomizeAlertRuleUpdationParamsData{\nClusters: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\n},\nWhere: &models.GlobalAlertRuleWhereInput{\nID: pointy.String(\"GlobalAlertRule-id\"),\n},\n}\r\n rawResp, err := global_alert_rule_api.UpdateCustomizeAlertRule(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskGlobalAlertRule) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskGlobalAlertRule)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskGlobalAlertRule) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.GlobalAlertRuleApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n GlobalAlertRuleApi globalAlertRuleApi = new GlobalAlertRuleApi(client);\r\n CustomizeAlertRuleUpdationParams params = new CustomizeAlertRuleUpdationParams()\n.data(new CustomizeAlertRuleUpdationParamsData()\n.clusters(new ClusterWhereInput()\n.id(\"Cluster-id\")))\n.where(new GlobalAlertRuleWhereInput()\n.id(\"GlobalAlertRule-id\"));\r\n List resp = globalAlertRuleApi.updateCustomizeAlertRule(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-iscsi-lun \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"remove_snapshot\":true},\"where\":{\"id\":\"IscsiLun-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, IscsiLunApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n iscsi_lun_api = IscsiLunApi(client)\r\n resp = iscsi_lun_api.delete_iscsi_lun({\"data\":{\"remove_snapshot\":True},\"where\":{\"id\":\"IscsiLun-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/iscsi_lun\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n iscsi_lun_api := client.IscsiLun\r\n params := iscsi_lun.NewDeleteIscsiLunParams()\r\n params.RequestBody = &models.IscsiLunDeletionParams{\nData: &models.IscsiLunDeletionParamsData{\nRemoveSnapshot: pointy.Bool(true),\n},\nWhere: &models.IscsiLunWhereInput{\nID: pointy.String(\"IscsiLun-id\"),\n},\n}\r\n rawResp, err := iscsi_lun_api.DeleteIscsiLun(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteIscsiLun) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteIscsiLun)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteIscsiLun) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.IscsiLunApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n IscsiLunApi iscsiLunApi = new IscsiLunApi(client);\r\n IscsiLunDeletionParams params = new IscsiLunDeletionParams()\n.data(new IscsiLunDeletionParamsData()\n.removeSnapshot(true))\n.where(new IscsiLunWhereInput()\n.id(\"IscsiLun-id\"));\r\n List resp = iscsiLunApi.deleteIscsiLun(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/resolve-alert": { - "exampleValue": { - "where": { - "id": "Alert-id" + "/clone-iscsi-lun-from-snapshot": { + "exampleValue": [ + { + "iscsi_target_id": "ck74rk21wg5lz0786opdnzz5m", + "name": "name-string", + "snapshot_id": "ck74rk21wg5lz0786opdnzz5m" } - }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/resolve-alert \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Alert-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, AlertApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n alert_api = AlertApi(client)\r\n resp = alert_api.resolve_alert({\"where\":{\"id\":\"Alert-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/alert\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n alert_api := client.Alert\r\n params := alert.NewResolveAlertParams()\r\n params.RequestBody = &models.ResolveAlertParams{\nWhere: &models.AlertWhereInput{\nID: pointy.String(\"Alert-id\"),\n},\n}\r\n rawResp, err := alert_api.ResolveAlert(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskAlert) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskAlert)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskAlert) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.AlertApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n AlertApi alertApi = new AlertApi(client);\r\n ResolveAlertParams params = new ResolveAlertParams()\n.where(new AlertWhereInput()\n.id(\"Alert-id\"));\r\n List resp = alertApi.resolveAlert(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + ], + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/clone-iscsi-lun-from-snapshot \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"iscsi_target_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\",\"snapshot_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", + "python": "from cloudtower import ApiClient, Configuration, IscsiLunApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n iscsi_lun_api = IscsiLunApi(client)\r\n resp = iscsi_lun_api.clone_iscsi_lun_from_snapshot([{\"iscsi_target_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\",\"snapshot_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/iscsi_lun\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n iscsi_lun_api := client.IscsiLun\r\n params := iscsi_lun.NewCloneIscsiLunFromSnapshotParams()\r\n params.RequestBody = []*models.IscsiLunCloneParams{\n{\nIscsiTargetID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\nSnapshotID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := iscsi_lun_api.CloneIscsiLunFromSnapshot(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskIscsiLun) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskIscsiLun)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskIscsiLun) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.IscsiLunApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n IscsiLunApi iscsiLunApi = new IscsiLunApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new IscsiLunCloneParams()\n.iscsiTargetId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\")\n.snapshotId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = iscsiLunApi.cloneIscsiLunFromSnapshot(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/create-brick-topo": { + "/rollback-iscsi-lun-from-snapshot": { + "exampleValue": [ + { + "lun_id": "ck74rk21wg5lz0786opdnzz5m", + "snapshot_id": "ck74rk21wg5lz0786opdnzz5m" + } + ], + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/rollback-iscsi-lun-from-snapshot \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"lun_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"snapshot_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", + "python": "from cloudtower import ApiClient, Configuration, IscsiLunApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n iscsi_lun_api = IscsiLunApi(client)\r\n resp = iscsi_lun_api.rollback_iscsi_lun_from_snapshot([{\"lun_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"snapshot_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/iscsi_lun\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n iscsi_lun_api := client.IscsiLun\r\n params := iscsi_lun.NewRollbackIscsiLunFromSnapshotParams()\r\n params.RequestBody = []*models.IscsiLunRollbackParams{\n{\nLunID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nSnapshotID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := iscsi_lun_api.RollbackIscsiLunFromSnapshot(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskIscsiLun) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskIscsiLun)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskIscsiLun) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.IscsiLunApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n IscsiLunApi iscsiLunApi = new IscsiLunApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new IscsiLunRollbackParams()\n.lunId(\"ck74rk21wg5lz0786opdnzz5m\")\n.snapshotId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = iscsiLunApi.rollbackIscsiLunFromSnapshot(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "/copy-iscsi-lun": { "exampleValue": [ { - "cluster_id": "ck74rk21wg5lz0786opdnzz5m", - "height": 1, "name": "name-string", - "position": 1 + "src_lun_id": "ck74rk21wg5lz0786opdnzz5m" } ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-brick-topo \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"height\":1,\"name\":\"name-string\",\"position\":1}]'", - "python": "from cloudtower import ApiClient, Configuration, BrickTopoApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n brick_topo_api = BrickTopoApi(client)\r\n resp = brick_topo_api.create_brick_topo([{\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"height\":1,\"name\":\"name-string\",\"position\":1}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/brick_topo\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n brick_topo_api := client.BrickTopo\r\n params := brick_topo.NewCreateBrickTopoParams()\r\n params.RequestBody = []*models.BrickTopoCreationParams{\n{\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nHeight: pointy.Int32(1),\nName: pointy.String(\"name-string\"),\nPosition: pointy.Int32(1),\n},\n}\r\n rawResp, err := brick_topo_api.CreateBrickTopo(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskBrickTopo) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskBrickTopo)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskBrickTopo) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.BrickTopoApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n BrickTopoApi brickTopoApi = new BrickTopoApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new BrickTopoCreationParams()\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.height(1)\n.name(\"name-string\")\n.position(1));\r\n List resp = brickTopoApi.createBrickTopo(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/copy-iscsi-lun \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"name\":\"name-string\",\"src_lun_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", + "python": "from cloudtower import ApiClient, Configuration, IscsiLunApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n iscsi_lun_api = IscsiLunApi(client)\r\n resp = iscsi_lun_api.copy_iscsi_lun([{\"name\":\"name-string\",\"src_lun_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/iscsi_lun\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n iscsi_lun_api := client.IscsiLun\r\n params := iscsi_lun.NewCopyIscsiLunParams()\r\n params.RequestBody = []*models.CopyIscsiLunParams{\n{\nName: pointy.String(\"name-string\"),\nSrcLunID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := iscsi_lun_api.CopyIscsiLun(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskIscsiLun) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskIscsiLun)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskIscsiLun) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.IscsiLunApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n IscsiLunApi iscsiLunApi = new IscsiLunApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new CopyIscsiLunParams()\n.name(\"name-string\")\n.srcLunId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = iscsiLunApi.copyIscsiLun(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-brick-topo": { - "exampleValue": { - "data": {}, - "where": { - "id": "BrickTopo-id" + "/create-iscsi-target": { + "exampleValue": [ + { + "stripe_size": 1, + "stripe_num": 1, + "replica_num": 1, + "thin_provision": true, + "cluster_id": "ck74rk21wg5lz0786opdnzz5m", + "name": "name-string" } - }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-brick-topo \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"BrickTopo-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, BrickTopoApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n brick_topo_api = BrickTopoApi(client)\r\n resp = brick_topo_api.update_brick_topo({\"data\":{},\"where\":{\"id\":\"BrickTopo-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/brick_topo\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n brick_topo_api := client.BrickTopo\r\n params := brick_topo.NewUpdateBrickTopoParams()\r\n params.RequestBody = &models.BrickTopoUpdationParams{\nData: &models.BrickTopoUpdationParamsData{\n},\nWhere: &models.BrickTopoWhereInput{\nID: pointy.String(\"BrickTopo-id\"),\n},\n}\r\n rawResp, err := brick_topo_api.UpdateBrickTopo(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskBrickTopo) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskBrickTopo)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskBrickTopo) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.BrickTopoApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n BrickTopoApi brickTopoApi = new BrickTopoApi(client);\r\n BrickTopoUpdationParams params = new BrickTopoUpdationParams()\n.data(new BrickTopoUpdationParamsData())\n.where(new BrickTopoWhereInput()\n.id(\"BrickTopo-id\"));\r\n List resp = brickTopoApi.updateBrickTopo(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + ], + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-iscsi-target \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"stripe_size\":1,\"stripe_num\":1,\"replica_num\":1,\"thin_provision\":true,\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", + "python": "from cloudtower import ApiClient, Configuration, IscsiTargetApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n iscsi_target_api = IscsiTargetApi(client)\r\n resp = iscsi_target_api.create_iscsi_target([{\"stripe_size\":1,\"stripe_num\":1,\"replica_num\":1,\"thin_provision\":True,\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/iscsi_target\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n iscsi_target_api := client.IscsiTarget\r\n params := iscsi_target.NewCreateIscsiTargetParams()\r\n params.RequestBody = []*models.IscsiTargetCreationParams{\n{\nStripeSize: pointy.Int64(1),\nStripeNum: pointy.Int32(1),\nReplicaNum: pointy.Int32(1),\nThinProvision: pointy.Bool(true),\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := iscsi_target_api.CreateIscsiTarget(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskIscsiTarget) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskIscsiTarget)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskIscsiTarget) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.IscsiTargetApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n IscsiTargetApi iscsiTargetApi = new IscsiTargetApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new IscsiTargetCreationParams()\n.stripeSize(1L)\n.stripeNum(1)\n.replicaNum(1)\n.thinProvision(true)\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = iscsiTargetApi.createIscsiTarget(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/move-brick-topo": { + "/update-iscsi-target": { "exampleValue": { - "data": { - "position": 1 - }, + "data": {}, "where": { - "id": "BrickTopo-id" + "id": "IscsiTarget-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/move-brick-topo \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"position\":1},\"where\":{\"id\":\"BrickTopo-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, BrickTopoApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n brick_topo_api = BrickTopoApi(client)\r\n resp = brick_topo_api.move_brick_topo({\"data\":{\"position\":1},\"where\":{\"id\":\"BrickTopo-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/brick_topo\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n brick_topo_api := client.BrickTopo\r\n params := brick_topo.NewMoveBrickTopoParams()\r\n params.RequestBody = &models.BrickTopoMoveParams{\nData: &models.BrickTopoMoveParamsData{\nPosition: pointy.Int32(1),\n},\nWhere: &models.BrickTopoWhereInput{\nID: pointy.String(\"BrickTopo-id\"),\n},\n}\r\n rawResp, err := brick_topo_api.MoveBrickTopo(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskBrickTopo) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskBrickTopo)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskBrickTopo) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.BrickTopoApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n BrickTopoApi brickTopoApi = new BrickTopoApi(client);\r\n BrickTopoMoveParams params = new BrickTopoMoveParams()\n.data(new BrickTopoMoveParamsData()\n.position(1))\n.where(new BrickTopoWhereInput()\n.id(\"BrickTopo-id\"));\r\n List resp = brickTopoApi.moveBrickTopo(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-iscsi-target \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"IscsiTarget-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, IscsiTargetApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n iscsi_target_api = IscsiTargetApi(client)\r\n resp = iscsi_target_api.update_iscsi_target({\"data\":{},\"where\":{\"id\":\"IscsiTarget-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/iscsi_target\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n iscsi_target_api := client.IscsiTarget\r\n params := iscsi_target.NewUpdateIscsiTargetParams()\r\n params.RequestBody = &models.IscsiTargetUpdationParams{\nData: &models.IscsiTargetCommonParams{\n},\nWhere: &models.IscsiTargetWhereInput{\nID: pointy.String(\"IscsiTarget-id\"),\n},\n}\r\n rawResp, err := iscsi_target_api.UpdateIscsiTarget(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskIscsiTarget) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskIscsiTarget)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskIscsiTarget) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.IscsiTargetApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n IscsiTargetApi iscsiTargetApi = new IscsiTargetApi(client);\r\n IscsiTargetUpdationParams params = new IscsiTargetUpdationParams()\n.data(new IscsiTargetCommonParams())\n.where(new IscsiTargetWhereInput()\n.id(\"IscsiTarget-id\"));\r\n List resp = iscsiTargetApi.updateIscsiTarget(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/delete-brick-topo": { + "/delete-iscsi-target": { "exampleValue": { "where": { - "id": "BrickTopo-id" + "id": "IscsiTarget-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-brick-topo \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"BrickTopo-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, BrickTopoApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n brick_topo_api = BrickTopoApi(client)\r\n resp = brick_topo_api.delete_brick_topo({\"where\":{\"id\":\"BrickTopo-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/brick_topo\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n brick_topo_api := client.BrickTopo\r\n params := brick_topo.NewDeleteBrickTopoParams()\r\n params.RequestBody = &models.BrickTopoDeletionParams{\nWhere: &models.BrickTopoWhereInput{\nID: pointy.String(\"BrickTopo-id\"),\n},\n}\r\n rawResp, err := brick_topo_api.DeleteBrickTopo(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteBrickTopo) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteBrickTopo)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteBrickTopo) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.BrickTopoApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n BrickTopoApi brickTopoApi = new BrickTopoApi(client);\r\n BrickTopoDeletionParams params = new BrickTopoDeletionParams()\n.where(new BrickTopoWhereInput()\n.id(\"BrickTopo-id\"));\r\n List resp = brickTopoApi.deleteBrickTopo(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-iscsi-target \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"IscsiTarget-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, IscsiTargetApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n iscsi_target_api = IscsiTargetApi(client)\r\n resp = iscsi_target_api.delete_iscsi_target({\"where\":{\"id\":\"IscsiTarget-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/iscsi_target\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n iscsi_target_api := client.IscsiTarget\r\n params := iscsi_target.NewDeleteIscsiTargetParams()\r\n params.RequestBody = &models.IscsiTargetDeletionParams{\nWhere: &models.IscsiTargetWhereInput{\nID: pointy.String(\"IscsiTarget-id\"),\n},\n}\r\n rawResp, err := iscsi_target_api.DeleteIscsiTarget(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteIscsiTarget) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteIscsiTarget)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteIscsiTarget) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.IscsiTargetApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n IscsiTargetApi iscsiTargetApi = new IscsiTargetApi(client);\r\n IscsiTargetDeletionParams params = new IscsiTargetDeletionParams()\n.where(new IscsiTargetWhereInput()\n.id(\"IscsiTarget-id\"));\r\n List resp = iscsiTargetApi.deleteIscsiTarget(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/upload-cloudtower-application-package": { + "/upload-elf-image": { "exampleValue": { "file": "file-string" }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/upload-cloudtower-application-package \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: multipart/form-data' \\\n\t-d '{\"file\":\"file-string\"}'", - "python": "from cloudtower import ApiClient, Configuration, CloudTowerApplicationApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n cloud_tower_application_api = CloudTowerApplicationApi(client)\r\n with open(\"file-path\", \"rb\") as file:\r\n resp = cloud_tower_application_api.upload_cloud_tower_application_package(\r\n file=file\r\n )\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"bytes\"\r\n \"fmt\"\r\n \"io\"\r\n\r\n \"github.com/go-openapi/runtime\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/cloud_tower_application\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n cloud_tower_application_api := client.CloudTowerApplication\r\n params := cloud_tower_application.NewUploadCloudTowerApplicationPackageParams()\r\n params.File = runtime.NamedReader(\"file\",io.NopCloser(bytes.NewReader([]byte(\"file-string\"))))\r\n resp, err := cloud_tower_application_api.UploadCloudTowerApplicationPackage(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.CloudTowerApplicationApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.nio.file.Files;\r\nimport java.nio.file.Path;\r\nimport java.util.ArrayList;\r\nimport java.util.List;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n CloudTowerApplicationApi cloudTowerApplicationApi = new CloudTowerApplicationApi(client);\r\n List resp = cloudTowerApplicationApi.uploadCloudTowerApplicationPackage(\r\n Files.readAllBytes(Path.of(\"file-string\")),\r\n \"name\",\r\n \"size\",\r\n \"size_unit\",\r\n \"upload_task_id\"\r\n );\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/upload-elf-image \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: multipart/form-data' \\\n\t-d '{\"file\":\"file-string\"}'", + "python": "from cloudtower import ApiClient, Configuration, ElfImageApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n elf_image_api = ElfImageApi(client)\r\n with open(\"file-path\", \"rb\") as file:\r\n resp = elf_image_api.create_elf_image(\r\n file=file\r\n )\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"bytes\"\r\n \"fmt\"\r\n \"io\"\r\n\r\n \"github.com/go-openapi/runtime\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/elf_image\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n elf_image_api := client.ElfImage\r\n params := elf_image.NewCreateElfImageParams()\r\n params.File = runtime.NamedReader(\"file\",io.NopCloser(bytes.NewReader([]byte(\"file-string\"))))\r\n resp, err := elf_image_api.CreateElfImage(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.ElfImageApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.nio.file.Files;\r\nimport java.nio.file.Path;\r\nimport java.util.ArrayList;\r\nimport java.util.List;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ElfImageApi elfImageApi = new ElfImageApi(client);\r\n List resp = elfImageApi.createElfImage(\r\n Files.readAllBytes(Path.of(\"file-string\")),\r\n \"cluster_id\",\r\n \"name\",\r\n \"size\",\r\n \"size_unit\",\r\n \"description\",\r\n \"upload_task_id\"\r\n );\r\n }\r\n}" }, - "/delete-cloudtower-application-package": { + "/update-elf-image": { "exampleValue": { + "data": {}, "where": { - "id": "CloudTowerApplicationPackage-id" + "id": "ElfImage-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-cloudtower-application-package \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"CloudTowerApplicationPackage-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, CloudTowerApplicationApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n cloud_tower_application_api = CloudTowerApplicationApi(client)\r\n resp = cloud_tower_application_api.delete_cloud_tower_application_package({\"where\":{\"id\":\"CloudTowerApplicationPackage-id\"}})\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/cloud_tower_application\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n cloud_tower_application_api := client.CloudTowerApplication\r\n params := cloud_tower_application.NewDeleteCloudTowerApplicationPackageParams()\r\n params.RequestBody = &models.DeleteCloudTowerApplicationPackageParams{\nWhere: &models.CloudTowerApplicationPackageWhereInput{\nID: pointy.String(\"CloudTowerApplicationPackage-id\"),\n},\n}\r\n rawResp, err := cloud_tower_application_api.DeleteCloudTowerApplicationPackage(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.CloudTowerApplicationApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n CloudTowerApplicationApi cloudTowerApplicationApi = new CloudTowerApplicationApi(client);\r\n DeleteCloudTowerApplicationPackageParams params = new DeleteCloudTowerApplicationPackageParams()\n.where(new CloudTowerApplicationPackageWhereInput()\n.id(\"CloudTowerApplicationPackage-id\"));\r\n List resp = cloudTowerApplicationApi.deleteCloudTowerApplicationPackage(params);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-elf-image \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"ElfImage-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, ElfImageApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n elf_image_api = ElfImageApi(client)\r\n resp = elf_image_api.update_elf_image({\"data\":{},\"where\":{\"id\":\"ElfImage-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/elf_image\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n elf_image_api := client.ElfImage\r\n params := elf_image.NewUpdateElfImageParams()\r\n params.RequestBody = &models.ElfImageUpdationParams{\nData: &models.ElfImageUpdationParamsData{\n},\nWhere: &models.ElfImageWhereInput{\nID: pointy.String(\"ElfImage-id\"),\n},\n}\r\n rawResp, err := elf_image_api.UpdateElfImage(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskElfImage) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskElfImage)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskElfImage) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ElfImageApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ElfImageApi elfImageApi = new ElfImageApi(client);\r\n ElfImageUpdationParams params = new ElfImageUpdationParams()\n.data(new ElfImageUpdationParamsData())\n.where(new ElfImageWhereInput()\n.id(\"ElfImage-id\"));\r\n List resp = elfImageApi.updateElfImage(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/deploy-cloudtower-application": { - "exampleValue": { - "name": "name-string", - "targetPackage": "targetPackage-string", - "vmSpec": {} - }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/deploy-cloudtower-application \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"name\":\"name-string\",\"targetPackage\":\"targetPackage-string\",\"vmSpec\":{}}'", - "python": "from cloudtower import ApiClient, Configuration, CloudTowerApplicationApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n cloud_tower_application_api = CloudTowerApplicationApi(client)\r\n resp = cloud_tower_application_api.deploy_cloud_tower_application({\"name\":\"name-string\",\"targetPackage\":\"targetPackage-string\",\"vmSpec\":{}})\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/cloud_tower_application\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n cloud_tower_application_api := client.CloudTowerApplication\r\n params := cloud_tower_application.NewDeployCloudTowerApplicationParams()\r\n params.RequestBody = &models.DeployCloudTowerApplicationParams{\nName: pointy.String(\"name-string\"),\nTargetPackage: pointy.String(\"targetPackage-string\"),\nVMSpec: &models.ApplicationVMSpecDefinition{\n},\n}\r\n rawResp, err := cloud_tower_application_api.DeployCloudTowerApplication(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.CloudTowerApplicationApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n CloudTowerApplicationApi cloudTowerApplicationApi = new CloudTowerApplicationApi(client);\r\n DeployCloudTowerApplicationParams params = new DeployCloudTowerApplicationParams()\n.name(\"name-string\")\n.targetPackage(\"targetPackage-string\")\n.vmSpec(new ApplicationVmSpecDefinition());\r\n CloudTowerApplication resp = cloudTowerApplicationApi.deployCloudTowerApplication(params);\r\n }\r\n}" - }, - "/upgrade-cloudtower-application": { - "exampleValue": { - "data": { - "targetPackage": "targetPackage-string" - }, - "where": { - "id": "CloudTowerApplication-id" - } - }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/upgrade-cloudtower-application \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"targetPackage\":\"targetPackage-string\"},\"where\":{\"id\":\"CloudTowerApplication-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, CloudTowerApplicationApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n cloud_tower_application_api = CloudTowerApplicationApi(client)\r\n resp = cloud_tower_application_api.upgrade_cloud_tower_application({\"data\":{\"targetPackage\":\"targetPackage-string\"},\"where\":{\"id\":\"CloudTowerApplication-id\"}})\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/cloud_tower_application\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n cloud_tower_application_api := client.CloudTowerApplication\r\n params := cloud_tower_application.NewUpgradeCloudTowerApplicationParams()\r\n params.RequestBody = &models.UpgradeCloudTowerApplicationParams{\nData: &models.UpgradeCloudTowerApplicationParamsData{\nTargetPackage: pointy.String(\"targetPackage-string\"),\n},\nWhere: &models.CloudTowerApplicationWhereUniqueInput{\nID: pointy.String(\"CloudTowerApplication-id\"),\n},\n}\r\n rawResp, err := cloud_tower_application_api.UpgradeCloudTowerApplication(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.CloudTowerApplicationApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n CloudTowerApplicationApi cloudTowerApplicationApi = new CloudTowerApplicationApi(client);\r\n UpgradeCloudTowerApplicationParams params = new UpgradeCloudTowerApplicationParams()\n.data(new UpgradeCloudTowerApplicationParamsData()\n.targetPackage(\"targetPackage-string\"))\n.where(new CloudTowerApplicationWhereUniqueInput()\n.id(\"CloudTowerApplication-id\"));\r\n CloudTowerApplication resp = cloudTowerApplicationApi.upgradeCloudTowerApplication(params);\r\n }\r\n}" - }, - "/uninstall-cloudtower-application": { + "/delete-elf-image": { "exampleValue": { "where": { - "id": "CloudTowerApplication-id" + "id": "ElfImage-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/uninstall-cloudtower-application \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"CloudTowerApplication-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, CloudTowerApplicationApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n cloud_tower_application_api = CloudTowerApplicationApi(client)\r\n resp = cloud_tower_application_api.uninstall_cloud_tower_application({\"where\":{\"id\":\"CloudTowerApplication-id\"}})\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/cloud_tower_application\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n cloud_tower_application_api := client.CloudTowerApplication\r\n params := cloud_tower_application.NewUninstallCloudTowerApplicationParams()\r\n params.RequestBody = &models.UninstallCloudTowerApplicationParams{\nWhere: &models.CloudTowerApplicationWhereInput{\nID: pointy.String(\"CloudTowerApplication-id\"),\n},\n}\r\n rawResp, err := cloud_tower_application_api.UninstallCloudTowerApplication(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.CloudTowerApplicationApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n CloudTowerApplicationApi cloudTowerApplicationApi = new CloudTowerApplicationApi(client);\r\n UninstallCloudTowerApplicationParams params = new UninstallCloudTowerApplicationParams()\n.where(new CloudTowerApplicationWhereInput()\n.id(\"CloudTowerApplication-id\"));\r\n List resp = cloudTowerApplicationApi.uninstallCloudTowerApplication(params);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-elf-image \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"ElfImage-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, ElfImageApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n elf_image_api = ElfImageApi(client)\r\n resp = elf_image_api.delete_elf_image({\"where\":{\"id\":\"ElfImage-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/elf_image\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n elf_image_api := client.ElfImage\r\n params := elf_image.NewDeleteElfImageParams()\r\n params.RequestBody = &models.ElfImageDeletionParams{\nWhere: &models.ElfImageWhereInput{\nID: pointy.String(\"ElfImage-id\"),\n},\n}\r\n rawResp, err := elf_image_api.DeleteElfImage(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteElfImage) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteElfImage)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteElfImage) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ElfImageApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ElfImageApi elfImageApi = new ElfImageApi(client);\r\n ElfImageDeletionParams params = new ElfImageDeletionParams()\n.where(new ElfImageWhereInput()\n.id(\"ElfImage-id\"));\r\n List resp = elfImageApi.deleteElfImage(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/connect-cluster": { + "/create-label": { "exampleValue": [ { - "password": "password-string", - "username": "username-string", - "ip": "ip-string" + "key": "key-string" } ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/connect-cluster \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"password\":\"password-string\",\"username\":\"username-string\",\"ip\":\"ip-string\"}]'", - "python": "from cloudtower import ApiClient, Configuration, ClusterApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n cluster_api = ClusterApi(client)\r\n resp = cluster_api.connect_cluster([{\"password\":\"password-string\",\"username\":\"username-string\",\"ip\":\"ip-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/cluster\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n cluster_api := client.Cluster\r\n params := cluster.NewConnectClusterParams()\r\n params.RequestBody = []*models.ClusterCreationParams{\n{\nPassword: pointy.String(\"password-string\"),\nUsername: pointy.String(\"username-string\"),\nIP: pointy.String(\"ip-string\"),\n},\n}\r\n rawResp, err := cluster_api.ConnectCluster(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskCluster) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskCluster)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskCluster) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ClusterApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ClusterApi clusterApi = new ClusterApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new ClusterCreationParams()\n.password(\"password-string\")\n.username(\"username-string\")\n.ip(\"ip-string\"));\r\n List resp = clusterApi.connectCluster(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-label \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"key\":\"key-string\"}]'", + "python": "from cloudtower import ApiClient, Configuration, LabelApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n label_api = LabelApi(client)\r\n resp = label_api.create_label([{\"key\":\"key-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/label\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n label_api := client.Label\r\n params := label.NewCreateLabelParams()\r\n params.RequestBody = []*models.LabelCreationParams{\n{\nKey: pointy.String(\"key-string\"),\n},\n}\r\n rawResp, err := label_api.CreateLabel(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskLabel) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskLabel)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskLabel) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.LabelApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n LabelApi labelApi = new LabelApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new LabelCreationParams()\n.key(\"key-string\"));\r\n List resp = labelApi.createLabel(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-cluster": { + "/update-label": { "exampleValue": { "data": {}, "where": { - "id": "Cluster-id" + "id": "Label-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-cluster \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Cluster-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, ClusterApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n cluster_api = ClusterApi(client)\r\n resp = cluster_api.update_cluster({\"data\":{},\"where\":{\"id\":\"Cluster-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/cluster\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n cluster_api := client.Cluster\r\n params := cluster.NewUpdateClusterParams()\r\n params.RequestBody = &models.ClusterUpdationParams{\nData: &models.ClusterUpdationParamsData{\n},\nWhere: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\n}\r\n rawResp, err := cluster_api.UpdateCluster(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskCluster) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskCluster)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskCluster) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ClusterApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ClusterApi clusterApi = new ClusterApi(client);\r\n ClusterUpdationParams params = new ClusterUpdationParams()\n.data(new ClusterUpdationParamsData())\n.where(new ClusterWhereInput()\n.id(\"Cluster-id\"));\r\n List resp = clusterApi.updateCluster(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-label \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Label-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, LabelApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n label_api = LabelApi(client)\r\n resp = label_api.update_label({\"data\":{},\"where\":{\"id\":\"Label-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/label\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n label_api := client.Label\r\n params := label.NewUpdateLabelParams()\r\n params.RequestBody = &models.LabelUpdationParams{\nData: &models.LabelUpdationParamsData{\n},\nWhere: &models.LabelWhereInput{\nID: pointy.String(\"Label-id\"),\n},\n}\r\n rawResp, err := label_api.UpdateLabel(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskLabel) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskLabel)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskLabel) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.LabelApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n LabelApi labelApi = new LabelApi(client);\r\n LabelUpdationParams params = new LabelUpdationParams()\n.data(new LabelUpdationParamsData())\n.where(new LabelWhereInput()\n.id(\"Label-id\"));\r\n List resp = labelApi.updateLabel(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-cluster-license": { + "/add-labels-to-resources": { "exampleValue": { - "data": { - "license": "license-string" - }, + "data": {}, "where": { - "id": "Cluster-id" + "id": "Label-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-cluster-license \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"license\":\"license-string\"},\"where\":{\"id\":\"Cluster-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, ClusterApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n cluster_api = ClusterApi(client)\r\n resp = cluster_api.update_cluster_license({\"data\":{\"license\":\"license-string\"},\"where\":{\"id\":\"Cluster-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/cluster\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n cluster_api := client.Cluster\r\n params := cluster.NewUpdateClusterLicenseParams()\r\n params.RequestBody = &models.ClusterLicenseUpdationParams{\nData: &models.ClusterLicenseUpdationParamsData{\nLicense: pointy.String(\"license-string\"),\n},\nWhere: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\n}\r\n rawResp, err := cluster_api.UpdateClusterLicense(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskCluster) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskCluster)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskCluster) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ClusterApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ClusterApi clusterApi = new ClusterApi(client);\r\n ClusterLicenseUpdationParams params = new ClusterLicenseUpdationParams()\n.data(new ClusterLicenseUpdationParamsData()\n.license(\"license-string\"))\n.where(new ClusterWhereInput()\n.id(\"Cluster-id\"));\r\n List resp = clusterApi.updateClusterLicense(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/add-labels-to-resources \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Label-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, LabelApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n label_api = LabelApi(client)\r\n resp = label_api.add_labels_to_resources({\"data\":{},\"where\":{\"id\":\"Label-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/label\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n label_api := client.Label\r\n params := label.NewAddLabelsToResourcesParams()\r\n params.RequestBody = &models.AddLabelsToResourcesParams{\nData: &models.AddLabelsToResourcesParamsData{\n},\nWhere: &models.LabelWhereInput{\nID: pointy.String(\"Label-id\"),\n},\n}\r\n rawResp, err := label_api.AddLabelsToResources(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskLabel) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskLabel)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskLabel) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.LabelApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n LabelApi labelApi = new LabelApi(client);\r\n AddLabelsToResourcesParams params = new AddLabelsToResourcesParams()\n.data(new AddLabelsToResourcesParamsData())\n.where(new LabelWhereInput()\n.id(\"Label-id\"));\r\n List resp = labelApi.addLabelsToResources(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-cluster-network-setting": { + "/remove-labels-from-resources": { "exampleValue": { "data": {}, "where": { - "id": "Cluster-id" + "id": "Label-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-cluster-network-setting \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Cluster-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, ClusterApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n cluster_api = ClusterApi(client)\r\n resp = cluster_api.update_cluster_network_setting({\"data\":{},\"where\":{\"id\":\"Cluster-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/cluster\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n cluster_api := client.Cluster\r\n params := cluster.NewUpdateClusterNetworkSettingParams()\r\n params.RequestBody = &models.ClusterNetworkSettingUpdationParams{\nData: &models.ClusterNetworkSettingUpdationParamsData{\n},\nWhere: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\n}\r\n rawResp, err := cluster_api.UpdateClusterNetworkSetting(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskCluster) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskCluster)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskCluster) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ClusterApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ClusterApi clusterApi = new ClusterApi(client);\r\n ClusterNetworkSettingUpdationParams params = new ClusterNetworkSettingUpdationParams()\n.data(new ClusterNetworkSettingUpdationParamsData())\n.where(new ClusterWhereInput()\n.id(\"Cluster-id\"));\r\n List resp = clusterApi.updateClusterNetworkSetting(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/remove-labels-from-resources \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Label-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, LabelApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n label_api = LabelApi(client)\r\n resp = label_api.remove_labels_from_resources({\"data\":{},\"where\":{\"id\":\"Label-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/label\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n label_api := client.Label\r\n params := label.NewRemoveLabelsFromResourcesParams()\r\n params.RequestBody = &models.RemoveLabelsFromResourcesParams{\nData: &models.RemoveLabelsFromResourcesParamsData{\n},\nWhere: &models.LabelWhereInput{\nID: pointy.String(\"Label-id\"),\n},\n}\r\n rawResp, err := label_api.RemoveLabelsFromResources(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskLabel) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskLabel)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskLabel) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.LabelApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n LabelApi labelApi = new LabelApi(client);\r\n RemoveLabelsFromResourcesParams params = new RemoveLabelsFromResourcesParams()\n.data(new RemoveLabelsFromResourcesParamsData())\n.where(new LabelWhereInput()\n.id(\"Label-id\"));\r\n List resp = labelApi.removeLabelsFromResources(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-cluster-virtualization-setting": { + "/delete-label": { "exampleValue": { - "data": {}, "where": { - "id": "Cluster-id" + "id": "Label-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-cluster-virtualization-setting \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Cluster-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, ClusterApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n cluster_api = ClusterApi(client)\r\n resp = cluster_api.update_cluster_virtualization_setting({\"data\":{},\"where\":{\"id\":\"Cluster-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/cluster\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n cluster_api := client.Cluster\r\n params := cluster.NewUpdateClusterVirtualizationSettingParams()\r\n params.RequestBody = &models.ClusterVirtualizationUpdationParams{\nData: &models.ClusterVirtualizationUpdationParamsData{\n},\nWhere: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\n}\r\n rawResp, err := cluster_api.UpdateClusterVirtualizationSetting(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskCluster) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskCluster)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskCluster) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ClusterApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ClusterApi clusterApi = new ClusterApi(client);\r\n ClusterVirtualizationUpdationParams params = new ClusterVirtualizationUpdationParams()\n.data(new ClusterVirtualizationUpdationParamsData())\n.where(new ClusterWhereInput()\n.id(\"Cluster-id\"));\r\n List resp = clusterApi.updateClusterVirtualizationSetting(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-label \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Label-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, LabelApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n label_api = LabelApi(client)\r\n resp = label_api.delete_label({\"where\":{\"id\":\"Label-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/label\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n label_api := client.Label\r\n params := label.NewDeleteLabelParams()\r\n params.RequestBody = &models.LabelDeletionParams{\nWhere: &models.LabelWhereInput{\nID: pointy.String(\"Label-id\"),\n},\n}\r\n rawResp, err := label_api.DeleteLabel(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteLabel) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteLabel)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteLabel) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.LabelApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n LabelApi labelApi = new LabelApi(client);\r\n LabelDeletionParams params = new LabelDeletionParams()\n.where(new LabelWhereInput()\n.id(\"Label-id\"));\r\n List resp = labelApi.deleteLabel(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-cluster-ha-setting": { + "/update-license": { "exampleValue": { - "ha": true, - "where": { - "id": "Cluster-id" + "data": { + "license": "license-string" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-cluster-ha-setting \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"ha\":true,\"where\":{\"id\":\"Cluster-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, ClusterApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n cluster_api = ClusterApi(client)\r\n resp = cluster_api.update_cluster_ha_setting({\"ha\":True,\"where\":{\"id\":\"Cluster-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/cluster\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n cluster_api := client.Cluster\r\n params := cluster.NewUpdateClusterHaSettingParams()\r\n params.RequestBody = &models.ClusterHaUpdationParams{\nHa: pointy.Bool(true),\nWhere: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\n}\r\n rawResp, err := cluster_api.UpdateClusterHaSetting(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskClusterSettings) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskClusterSettings)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskClusterSettings) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ClusterApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ClusterApi clusterApi = new ClusterApi(client);\r\n ClusterHaUpdationParams params = new ClusterHaUpdationParams()\n.ha(true)\n.where(new ClusterWhereInput()\n.id(\"Cluster-id\"));\r\n List resp = clusterApi.updateClusterHaSetting(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-license \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"license\":\"license-string\"}}'", + "python": "from cloudtower import ApiClient, Configuration, LicenseApi\r\nfrom cloudtower.utils import login, wait_task\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n license_api = LicenseApi(client)\r\n resp = license_api.update_deploy({\"data\":{\"license\":\"license-string\"}})\r\n wait_task(resp.task_id, client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/license\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n license_api := client.License\r\n params := license.NewUpdateDeployParams()\r\n params.RequestBody = &models.LicenseUpdationParams{\nData: &models.LicenseUpdationParamsData{\nLicense: pointy.String(\"license-string\"),\n},\n}\r\n rawResp, err := license_api.UpdateDeploy(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n err = utils.WaitTask(context.Background(), client, resp.TaskID, 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.LicenseApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n LicenseApi licenseApi = new LicenseApi(client);\r\n LicenseUpdationParams params = new LicenseUpdationParams()\n.data(new LicenseUpdationParamsData()\n.license(\"license-string\"));\r\n WithTaskLicense resp = licenseApi.updateDeploy(params);\r\n TaskUtil.WaitTask(resp.getTaskId(), client);\r\n }\r\n}" }, - "/update-cluster-enable-iscsi-setting": { - "exampleValue": { - "enable_iscsi": true, - "where": { - "id": "Cluster-id" + "/create-log-collection": { + "exampleValue": [ + { + "log_ended_at": "log_ended_at-string", + "log_started_at": "log_started_at-string", + "cluster_id": "ck74rk21wg5lz0786opdnzz5m", + "hosts": { + "id": "Host-id" + } } - }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-cluster-enable-iscsi-setting \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"enable_iscsi\":true,\"where\":{\"id\":\"Cluster-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, ClusterApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n cluster_api = ClusterApi(client)\r\n resp = cluster_api.update_cluster_enable_iscsi_setting({\"enable_iscsi\":True,\"where\":{\"id\":\"Cluster-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/cluster\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n cluster_api := client.Cluster\r\n params := cluster.NewUpdateClusterEnableIscsiSettingParams()\r\n params.RequestBody = &models.ClusterEnableIscsiUpdationParams{\nEnableIscsi: pointy.Bool(true),\nWhere: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\n}\r\n rawResp, err := cluster_api.UpdateClusterEnableIscsiSetting(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskClusterSettings) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskClusterSettings)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskClusterSettings) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ClusterApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ClusterApi clusterApi = new ClusterApi(client);\r\n ClusterEnableIscsiUpdationParams params = new ClusterEnableIscsiUpdationParams()\n.enableIscsi(true)\n.where(new ClusterWhereInput()\n.id(\"Cluster-id\"));\r\n List resp = clusterApi.updateClusterEnableIscsiSetting(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + ], + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-log-collection \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"log_ended_at\":\"log_ended_at-string\",\"log_started_at\":\"log_started_at-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"hosts\":{\"id\":\"Host-id\"}}]'", + "python": "from cloudtower import ApiClient, Configuration, LogCollectionApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n log_collection_api = LogCollectionApi(client)\r\n resp = log_collection_api.create_log_collection([{\"log_ended_at\":\"log_ended_at-string\",\"log_started_at\":\"log_started_at-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"hosts\":{\"id\":\"Host-id\"}}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/log_collection\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n log_collection_api := client.LogCollection\r\n params := log_collection.NewCreateLogCollectionParams()\r\n params.RequestBody = []*models.LogCollectionCreationParams{\n{\nLogEndedAt: pointy.String(\"log_ended_at-string\"),\nLogStartedAt: pointy.String(\"log_started_at-string\"),\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nHosts: &models.HostWhereInput{\nID: pointy.String(\"Host-id\"),\n},\n},\n}\r\n rawResp, err := log_collection_api.CreateLogCollection(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskLogCollection) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskLogCollection)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskLogCollection) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.LogCollectionApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n LogCollectionApi logCollectionApi = new LogCollectionApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new LogCollectionCreationParams()\n.logEndedAt(\"log_ended_at-string\")\n.logStartedAt(\"log_started_at-string\")\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.hosts(new HostWhereInput()\n.id(\"Host-id\")));\r\n List resp = logCollectionApi.createLogCollection(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/delete-cluster": { + "/force-stop-log-collection": { "exampleValue": { "where": { - "id": "Cluster-id" + "id": "LogCollection-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-cluster \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Cluster-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, ClusterApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n cluster_api = ClusterApi(client)\r\n resp = cluster_api.delete_cluster({\"where\":{\"id\":\"Cluster-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/cluster\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n cluster_api := client.Cluster\r\n params := cluster.NewDeleteClusterParams()\r\n params.RequestBody = &models.ClusterDeletionParams{\nWhere: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\n}\r\n rawResp, err := cluster_api.DeleteCluster(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteCluster) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteCluster)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteCluster) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ClusterApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ClusterApi clusterApi = new ClusterApi(client);\r\n ClusterDeletionParams params = new ClusterDeletionParams()\n.where(new ClusterWhereInput()\n.id(\"Cluster-id\"));\r\n List resp = clusterApi.deleteCluster(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/force-stop-log-collection \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"LogCollection-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, LogCollectionApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n log_collection_api = LogCollectionApi(client)\r\n resp = log_collection_api.force_stop_log_collection({\"where\":{\"id\":\"LogCollection-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/log_collection\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n log_collection_api := client.LogCollection\r\n params := log_collection.NewForceStopLogCollectionParams()\r\n params.RequestBody = &models.ForceStopLogCollectionParams{\nWhere: &models.LogCollectionWhereInput{\nID: pointy.String(\"LogCollection-id\"),\n},\n}\r\n rawResp, err := log_collection_api.ForceStopLogCollection(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskLogCollection) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskLogCollection)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskLogCollection) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.LogCollectionApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n LogCollectionApi logCollectionApi = new LogCollectionApi(client);\r\n ForceStopLogCollectionParams params = new ForceStopLogCollectionParams()\n.where(new LogCollectionWhereInput()\n.id(\"LogCollection-id\"));\r\n List resp = logCollectionApi.forceStopLogCollection(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/get-meta-leader": { + "/delete-log-collection": { "exampleValue": { "where": { - "id": "Cluster-id" + "id": "LogCollection-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-meta-leader \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Cluster-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, ClusterApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n cluster_api = ClusterApi(client)\r\n resp = cluster_api.get_meta_leader({\"where\":{\"id\":\"Cluster-id\"}})\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/cluster\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n cluster_api := client.Cluster\r\n params := cluster.NewGetMetaLeaderParams()\r\n params.RequestBody = &models.GetMetaLeaderRequestBody{\nWhere: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\n}\r\n rawResp, err := cluster_api.GetMetaLeader(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.ClusterApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ClusterApi clusterApi = new ClusterApi(client);\r\n GetMetaLeaderRequestBody params = new GetMetaLeaderRequestBody()\n.where(new ClusterWhereInput()\n.id(\"Cluster-id\"));\r\n List resp = clusterApi.getMetaLeader(params);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-log-collection \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"LogCollection-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, LogCollectionApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n log_collection_api = LogCollectionApi(client)\r\n resp = log_collection_api.delete_log_collection({\"where\":{\"id\":\"LogCollection-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/log_collection\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n log_collection_api := client.LogCollection\r\n params := log_collection.NewDeleteLogCollectionParams()\r\n params.RequestBody = &models.LogCollectionDeletionParams{\nWhere: &models.LogCollectionWhereInput{\nID: pointy.String(\"LogCollection-id\"),\n},\n}\r\n rawResp, err := log_collection_api.DeleteLogCollection(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteLogCollection) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteLogCollection)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteLogCollection) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.LogCollectionApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n LogCollectionApi logCollectionApi = new LogCollectionApi(client);\r\n LogCollectionDeletionParams params = new LogCollectionDeletionParams()\n.where(new LogCollectionWhereInput()\n.id(\"LogCollection-id\"));\r\n List resp = logCollectionApi.deleteLogCollection(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/create-consistency-snapshot-group": { - "exampleValue": [ - { - "consistency_group_id": "ck74rk21wg5lz0786opdnzz5m", - "name": "name-string" + "/get-vm-metrics": { + "exampleValue": { + "range": "range-string", + "metrics": [ + "-string" + ], + "vms": { + "id": "Vm-id" } - ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-consistency-snapshot-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"consistency_group_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", - "python": "from cloudtower import ApiClient, Configuration, ConsistencyGroupSnapshotApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n consistency_group_snapshot_api = ConsistencyGroupSnapshotApi(client)\r\n resp = consistency_group_snapshot_api.create_consistency_group_snapshot([{\"consistency_group_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/consistency_group_snapshot\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n consistency_group_snapshot_api := client.ConsistencyGroupSnapshot\r\n params := consistency_group_snapshot.NewCreateConsistencyGroupSnapshotParams()\r\n params.RequestBody = []*models.ConsistencyGroupSnapshotCreationParams{\n{\nConsistencyGroupID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := consistency_group_snapshot_api.CreateConsistencyGroupSnapshot(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskConsistencyGroupSnapshot) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskConsistencyGroupSnapshot)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskConsistencyGroupSnapshot) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ConsistencyGroupSnapshotApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ConsistencyGroupSnapshotApi consistencyGroupSnapshotApi = new ConsistencyGroupSnapshotApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new ConsistencyGroupSnapshotCreationParams()\n.consistencyGroupId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = consistencyGroupSnapshotApi.createConsistencyGroupSnapshot(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-vm-metrics \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"range\":\"range-string\",\"metrics\":[\"-string\"],\"vms\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, MetricsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n metrics_api = MetricsApi(client)\r\n resp = metrics_api.get_vm_metrics({\"range\":\"range-string\",\"metrics\":[\"-string\"],\"vms\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/metrics\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n metrics_api := client.Metrics\r\n params := metrics.NewGetVMMetricsParams()\r\n params.RequestBody = &models.GetVMMetricInput{\nRange: pointy.String(\"range-string\"),\nMetrics: []string{\"-string\",\n},\nVms: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := metrics_api.GetVMMetrics(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskMetric) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskMetric)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskMetric) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.MetricsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n MetricsApi metricsApi = new MetricsApi(client);\r\n GetVmMetricInput params = new GetVmMetricInput()\n.range(\"range-string\")\n.addMetricsItem(\"-string\")\n.vms(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = metricsApi.getVmMetrics(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/rollback-consistency-snapshot-group": { + "/get-vm-network-metrics": { "exampleValue": { - "where": { - "id": "ConsistencyGroupSnapshot-id" + "range": "range-string", + "metrics": [ + "-string" + ], + "vms": { + "id": "Vm-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/rollback-consistency-snapshot-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"ConsistencyGroupSnapshot-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, ConsistencyGroupSnapshotApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n consistency_group_snapshot_api = ConsistencyGroupSnapshotApi(client)\r\n resp = consistency_group_snapshot_api.update_consistency_group_snapshot({\"where\":{\"id\":\"ConsistencyGroupSnapshot-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/consistency_group_snapshot\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n consistency_group_snapshot_api := client.ConsistencyGroupSnapshot\r\n params := consistency_group_snapshot.NewUpdateConsistencyGroupSnapshotParams()\r\n params.RequestBody = &models.ConsistencyGroupSnapshotUpdationParams{\nWhere: &models.ConsistencyGroupSnapshotWhereInput{\nID: pointy.String(\"ConsistencyGroupSnapshot-id\"),\n},\n}\r\n rawResp, err := consistency_group_snapshot_api.UpdateConsistencyGroupSnapshot(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskConsistencyGroupSnapshot) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskConsistencyGroupSnapshot)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskConsistencyGroupSnapshot) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ConsistencyGroupSnapshotApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ConsistencyGroupSnapshotApi consistencyGroupSnapshotApi = new ConsistencyGroupSnapshotApi(client);\r\n ConsistencyGroupSnapshotUpdationParams params = new ConsistencyGroupSnapshotUpdationParams()\n.where(new ConsistencyGroupSnapshotWhereInput()\n.id(\"ConsistencyGroupSnapshot-id\"));\r\n List resp = consistencyGroupSnapshotApi.updateConsistencyGroupSnapshot(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-vm-network-metrics \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"range\":\"range-string\",\"metrics\":[\"-string\"],\"vms\":{\"id\":\"Vm-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, MetricsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n metrics_api = MetricsApi(client)\r\n resp = metrics_api.get_vm_net_work_metrics({\"range\":\"range-string\",\"metrics\":[\"-string\"],\"vms\":{\"id\":\"Vm-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/metrics\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n metrics_api := client.Metrics\r\n params := metrics.NewGetVMNetWorkMetricsParams()\r\n params.RequestBody = &models.GetVMNetWorkMetricInput{\nRange: pointy.String(\"range-string\"),\nMetrics: []string{\"-string\",\n},\nVms: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\n}\r\n rawResp, err := metrics_api.GetVMNetWorkMetrics(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskMetric) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskMetric)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskMetric) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.MetricsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n MetricsApi metricsApi = new MetricsApi(client);\r\n GetVmNetWorkMetricInput params = new GetVmNetWorkMetricInput()\n.range(\"range-string\")\n.addMetricsItem(\"-string\")\n.vms(new VmWhereInput()\n.id(\"Vm-id\"));\r\n List resp = metricsApi.getVmNetWorkMetrics(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/delete-consistency-snapshot-group": { + "/get-disk-metrics": { "exampleValue": { - "data": { - "remain_volume_snapshot": true + "range": "range-string", + "disks": { + "id": "Disk-id" }, - "where": { - "id": "ConsistencyGroupSnapshot-id" - } + "metrics": [ + "-string" + ] }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-consistency-snapshot-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"remain_volume_snapshot\":true},\"where\":{\"id\":\"ConsistencyGroupSnapshot-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, ConsistencyGroupSnapshotApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n consistency_group_snapshot_api = ConsistencyGroupSnapshotApi(client)\r\n resp = consistency_group_snapshot_api.delete_consistency_group_snapshot({\"data\":{\"remain_volume_snapshot\":True},\"where\":{\"id\":\"ConsistencyGroupSnapshot-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/consistency_group_snapshot\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n consistency_group_snapshot_api := client.ConsistencyGroupSnapshot\r\n params := consistency_group_snapshot.NewDeleteConsistencyGroupSnapshotParams()\r\n params.RequestBody = &models.ConsistencyGroupSnapshotDeletionParams{\nData: &models.ConsistencyGroupSnapshotDeletionParamsData{\nRemainVolumeSnapshot: pointy.Bool(true),\n},\nWhere: &models.ConsistencyGroupSnapshotWhereInput{\nID: pointy.String(\"ConsistencyGroupSnapshot-id\"),\n},\n}\r\n rawResp, err := consistency_group_snapshot_api.DeleteConsistencyGroupSnapshot(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteConsistencyGroupSnapshot) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteConsistencyGroupSnapshot)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteConsistencyGroupSnapshot) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ConsistencyGroupSnapshotApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ConsistencyGroupSnapshotApi consistencyGroupSnapshotApi = new ConsistencyGroupSnapshotApi(client);\r\n ConsistencyGroupSnapshotDeletionParams params = new ConsistencyGroupSnapshotDeletionParams()\n.data(new ConsistencyGroupSnapshotDeletionParamsData()\n.remainVolumeSnapshot(true))\n.where(new ConsistencyGroupSnapshotWhereInput()\n.id(\"ConsistencyGroupSnapshot-id\"));\r\n List resp = consistencyGroupSnapshotApi.deleteConsistencyGroupSnapshot(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" - }, - "/create-consistency-group": { - "exampleValue": [ - { - "namespaces_ids": [ - "-string" - ], - "iscsi_luns_ids": [ - "-string" - ], - "cluster_id": "ck74rk21wg5lz0786opdnzz5m", - "name": "name-string" - } - ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-consistency-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"namespaces_ids\":[\"-string\"],\"iscsi_luns_ids\":[\"-string\"],\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", - "python": "from cloudtower import ApiClient, Configuration, ConsistencyGroupApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n consistency_group_api = ConsistencyGroupApi(client)\r\n resp = consistency_group_api.create_consistency_group([{\"namespaces_ids\":[\"-string\"],\"iscsi_luns_ids\":[\"-string\"],\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/consistency_group\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n consistency_group_api := client.ConsistencyGroup\r\n params := consistency_group.NewCreateConsistencyGroupParams()\r\n params.RequestBody = []*models.ConsistencyGroupCreationParams{\n{\nNamespacesIds: []string{\"-string\",\n},\nIscsiLunsIds: []string{\"-string\",\n},\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := consistency_group_api.CreateConsistencyGroup(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskConsistencyGroup) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskConsistencyGroup)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskConsistencyGroup) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ConsistencyGroupApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ConsistencyGroupApi consistencyGroupApi = new ConsistencyGroupApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new ConsistencyGroupCreationParams()\n.addNamespacesIdsItem(\"-string\")\n.addIscsiLunsIdsItem(\"-string\")\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = consistencyGroupApi.createConsistencyGroup(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-disk-metrics \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"range\":\"range-string\",\"disks\":{\"id\":\"Disk-id\"},\"metrics\":[\"-string\"]}'", + "python": "from cloudtower import ApiClient, Configuration, MetricsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n metrics_api = MetricsApi(client)\r\n resp = metrics_api.get_disk_metrics({\"range\":\"range-string\",\"disks\":{\"id\":\"Disk-id\"},\"metrics\":[\"-string\"]})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/metrics\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n metrics_api := client.Metrics\r\n params := metrics.NewGetDiskMetricsParams()\r\n params.RequestBody = &models.GetDiskMetricInput{\nRange: pointy.String(\"range-string\"),\nDisks: &models.DiskWhereInput{\nID: pointy.String(\"Disk-id\"),\n},\nMetrics: []string{\"-string\",\n},\n}\r\n rawResp, err := metrics_api.GetDiskMetrics(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskMetric) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskMetric)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskMetric) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.MetricsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n MetricsApi metricsApi = new MetricsApi(client);\r\n GetDiskMetricInput params = new GetDiskMetricInput()\n.range(\"range-string\")\n.disks(new DiskWhereInput()\n.id(\"Disk-id\"))\n.addMetricsItem(\"-string\");\r\n List resp = metricsApi.getDiskMetrics(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-consistency-group": { + "/get-vm-volume-metrics": { "exampleValue": { - "data": {}, - "where": { - "id": "ConsistencyGroup-id" + "range": "range-string", + "metrics": [ + "-string" + ], + "vmVolumes": { + "id": "VmVolume-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-consistency-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"ConsistencyGroup-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, ConsistencyGroupApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n consistency_group_api = ConsistencyGroupApi(client)\r\n resp = consistency_group_api.update_consistency_group({\"data\":{},\"where\":{\"id\":\"ConsistencyGroup-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/consistency_group\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n consistency_group_api := client.ConsistencyGroup\r\n params := consistency_group.NewUpdateConsistencyGroupParams()\r\n params.RequestBody = &models.ConsistencyGroupUpdationParams{\nData: &models.ConsistencyGroupUpdationParamsData{\n},\nWhere: &models.ConsistencyGroupWhereInput{\nID: pointy.String(\"ConsistencyGroup-id\"),\n},\n}\r\n rawResp, err := consistency_group_api.UpdateConsistencyGroup(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskConsistencyGroup) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskConsistencyGroup)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskConsistencyGroup) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ConsistencyGroupApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ConsistencyGroupApi consistencyGroupApi = new ConsistencyGroupApi(client);\r\n ConsistencyGroupUpdationParams params = new ConsistencyGroupUpdationParams()\n.data(new ConsistencyGroupUpdationParamsData())\n.where(new ConsistencyGroupWhereInput()\n.id(\"ConsistencyGroup-id\"));\r\n List resp = consistencyGroupApi.updateConsistencyGroup(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" - }, - "/delete-consistency-group": { + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-vm-volume-metrics \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"range\":\"range-string\",\"metrics\":[\"-string\"],\"vmVolumes\":{\"id\":\"VmVolume-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, MetricsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n metrics_api = MetricsApi(client)\r\n resp = metrics_api.get_vm_volume_metrics({\"range\":\"range-string\",\"metrics\":[\"-string\"],\"vmVolumes\":{\"id\":\"VmVolume-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/metrics\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n metrics_api := client.Metrics\r\n params := metrics.NewGetVMVolumeMetricsParams()\r\n params.RequestBody = &models.GetVMVolumeMetricInput{\nRange: pointy.String(\"range-string\"),\nMetrics: []string{\"-string\",\n},\nVMVolumes: &models.VMVolumeWhereInput{\nID: pointy.String(\"VmVolume-id\"),\n},\n}\r\n rawResp, err := metrics_api.GetVMVolumeMetrics(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskMetric) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskMetric)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskMetric) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.MetricsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n MetricsApi metricsApi = new MetricsApi(client);\r\n GetVmVolumeMetricInput params = new GetVmVolumeMetricInput()\n.range(\"range-string\")\n.addMetricsItem(\"-string\")\n.vmVolumes(new VmVolumeWhereInput()\n.id(\"VmVolume-id\"));\r\n List resp = metricsApi.getVmVolumeMetrics(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "/get-lun-metrics": { "exampleValue": { - "data": {}, - "where": { - "id": "ConsistencyGroup-id" - } + "range": "range-string", + "luns": { + "id": "IscsiLun-id" + }, + "metrics": [ + "-string" + ] }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-consistency-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"ConsistencyGroup-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, ConsistencyGroupApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n consistency_group_api = ConsistencyGroupApi(client)\r\n resp = consistency_group_api.delete_consistency_group({\"data\":{},\"where\":{\"id\":\"ConsistencyGroup-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/consistency_group\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n consistency_group_api := client.ConsistencyGroup\r\n params := consistency_group.NewDeleteConsistencyGroupParams()\r\n params.RequestBody = &models.ConsistencyGroupDeletionParams{\nData: &models.ConsistencyGroupDeletionParamsData{\n},\nWhere: &models.ConsistencyGroupWhereInput{\nID: pointy.String(\"ConsistencyGroup-id\"),\n},\n}\r\n rawResp, err := consistency_group_api.DeleteConsistencyGroup(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteConsistencyGroup) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteConsistencyGroup)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteConsistencyGroup) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ConsistencyGroupApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ConsistencyGroupApi consistencyGroupApi = new ConsistencyGroupApi(client);\r\n ConsistencyGroupDeletionParams params = new ConsistencyGroupDeletionParams()\n.data(new ConsistencyGroupDeletionParamsData())\n.where(new ConsistencyGroupWhereInput()\n.id(\"ConsistencyGroup-id\"));\r\n List resp = consistencyGroupApi.deleteConsistencyGroup(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" - }, - "/create-datacenter": { - "exampleValue": [ - { - "organization_id": "ck74rk21wg5lz0786opdnzz5m", - "name": "name-string" - } - ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-datacenter \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"organization_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", - "python": "from cloudtower import ApiClient, Configuration, DatacenterApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n datacenter_api = DatacenterApi(client)\r\n resp = datacenter_api.create_datacenter([{\"organization_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/datacenter\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n datacenter_api := client.Datacenter\r\n params := datacenter.NewCreateDatacenterParams()\r\n params.RequestBody = []*models.DatacenterCreationParams{\n{\nOrganizationID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := datacenter_api.CreateDatacenter(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDatacenter) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDatacenter)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDatacenter) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.DatacenterApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n DatacenterApi datacenterApi = new DatacenterApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new DatacenterCreationParams()\n.organizationId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = datacenterApi.createDatacenter(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-lun-metrics \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"range\":\"range-string\",\"luns\":{\"id\":\"IscsiLun-id\"},\"metrics\":[\"-string\"]}'", + "python": "from cloudtower import ApiClient, Configuration, MetricsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n metrics_api = MetricsApi(client)\r\n resp = metrics_api.get_lun_metrics({\"range\":\"range-string\",\"luns\":{\"id\":\"IscsiLun-id\"},\"metrics\":[\"-string\"]})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/metrics\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n metrics_api := client.Metrics\r\n params := metrics.NewGetLunMetricsParams()\r\n params.RequestBody = &models.GetLunMetricInput{\nRange: pointy.String(\"range-string\"),\nLuns: &models.IscsiLunWhereInput{\nID: pointy.String(\"IscsiLun-id\"),\n},\nMetrics: []string{\"-string\",\n},\n}\r\n rawResp, err := metrics_api.GetLunMetrics(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskMetric) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskMetric)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskMetric) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.MetricsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n MetricsApi metricsApi = new MetricsApi(client);\r\n GetLunMetricInput params = new GetLunMetricInput()\n.range(\"range-string\")\n.luns(new IscsiLunWhereInput()\n.id(\"IscsiLun-id\"))\n.addMetricsItem(\"-string\");\r\n List resp = metricsApi.getLunMetrics(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-datacenter": { + "/get-nvmf-namespace-metrics": { "exampleValue": { - "data": {}, - "where": { - "id": "Datacenter-id" - } + "nvmfNamespaces": { + "id": "NvmfNamespace-id" + }, + "metrics": [ + "-string" + ], + "range": "range-string" }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-datacenter \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Datacenter-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, DatacenterApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n datacenter_api = DatacenterApi(client)\r\n resp = datacenter_api.update_datacenter({\"data\":{},\"where\":{\"id\":\"Datacenter-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/datacenter\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n datacenter_api := client.Datacenter\r\n params := datacenter.NewUpdateDatacenterParams()\r\n params.RequestBody = &models.DatacenterUpdationParams{\nData: &models.DatacenterUpdationParamsData{\n},\nWhere: &models.DatacenterWhereInput{\nID: pointy.String(\"Datacenter-id\"),\n},\n}\r\n rawResp, err := datacenter_api.UpdateDatacenter(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDatacenter) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDatacenter)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDatacenter) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.DatacenterApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n DatacenterApi datacenterApi = new DatacenterApi(client);\r\n DatacenterUpdationParams params = new DatacenterUpdationParams()\n.data(new DatacenterUpdationParamsData())\n.where(new DatacenterWhereInput()\n.id(\"Datacenter-id\"));\r\n List resp = datacenterApi.updateDatacenter(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" - }, - "/add-clusters-to-datacenter": { - "exampleValue": [ - { - "data": {}, - "where": { - "id": "Datacenter-id" - } - } - ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/add-clusters-to-datacenter \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"data\":{},\"where\":{\"id\":\"Datacenter-id\"}}]'", - "python": "from cloudtower import ApiClient, Configuration, DatacenterApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n datacenter_api = DatacenterApi(client)\r\n resp = datacenter_api.add_clusters_to_datacenter([{\"data\":{},\"where\":{\"id\":\"Datacenter-id\"}}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/datacenter\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n datacenter_api := client.Datacenter\r\n params := datacenter.NewAddClustersToDatacenterParams()\r\n params.RequestBody = []*models.AddClustersToDatacenterParams{\n{\nData: &models.AddClustersToDatacenterParamsData{\n},\nWhere: &models.DatacenterWhereUniqueInput{\nID: pointy.String(\"Datacenter-id\"),\n},\n},\n}\r\n rawResp, err := datacenter_api.AddClustersToDatacenter(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDatacenter) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDatacenter)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDatacenter) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.DatacenterApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n DatacenterApi datacenterApi = new DatacenterApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new AddClustersToDatacenterParams()\n.data(new AddClustersToDatacenterParamsData())\n.where(new DatacenterWhereUniqueInput()\n.id(\"Datacenter-id\")));\r\n List resp = datacenterApi.addClustersToDatacenter(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" - }, - "/remove-clusters-from-datacenter": { - "exampleValue": [ - { - "data": {}, - "where": { - "id": "Datacenter-id" - } - } - ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/remove-clusters-from-datacenter \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"data\":{},\"where\":{\"id\":\"Datacenter-id\"}}]'", - "python": "from cloudtower import ApiClient, Configuration, DatacenterApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n datacenter_api = DatacenterApi(client)\r\n resp = datacenter_api.remove_clusters_from_datacenter([{\"data\":{},\"where\":{\"id\":\"Datacenter-id\"}}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/datacenter\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n datacenter_api := client.Datacenter\r\n params := datacenter.NewRemoveClustersFromDatacenterParams()\r\n params.RequestBody = []*models.RemoveClustersFromDatacenterParams{\n{\nData: &models.RemoveClustersFromDatacenterParamsData{\n},\nWhere: &models.DatacenterWhereUniqueInput{\nID: pointy.String(\"Datacenter-id\"),\n},\n},\n}\r\n rawResp, err := datacenter_api.RemoveClustersFromDatacenter(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDatacenter) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDatacenter)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDatacenter) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.DatacenterApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n DatacenterApi datacenterApi = new DatacenterApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new RemoveClustersFromDatacenterParams()\n.data(new RemoveClustersFromDatacenterParamsData())\n.where(new DatacenterWhereUniqueInput()\n.id(\"Datacenter-id\")));\r\n List resp = datacenterApi.removeClustersFromDatacenter(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-nvmf-namespace-metrics \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"nvmfNamespaces\":{\"id\":\"NvmfNamespace-id\"},\"metrics\":[\"-string\"],\"range\":\"range-string\"}'", + "python": "from cloudtower import ApiClient, Configuration, MetricsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n metrics_api = MetricsApi(client)\r\n resp = metrics_api.get_nvmf_namespace_metrics({\"nvmfNamespaces\":{\"id\":\"NvmfNamespace-id\"},\"metrics\":[\"-string\"],\"range\":\"range-string\"})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/metrics\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n metrics_api := client.Metrics\r\n params := metrics.NewGetNvmfNamespaceMetricsParams()\r\n params.RequestBody = &models.GetNvmfNamespaceMetricInput{\nNvmfNamespaces: &models.NvmfNamespaceWhereInput{\nID: pointy.String(\"NvmfNamespace-id\"),\n},\nMetrics: []string{\"-string\",\n},\nRange: pointy.String(\"range-string\"),\n}\r\n rawResp, err := metrics_api.GetNvmfNamespaceMetrics(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskMetric) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskMetric)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskMetric) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.MetricsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n MetricsApi metricsApi = new MetricsApi(client);\r\n GetNvmfNamespaceMetricInput params = new GetNvmfNamespaceMetricInput()\n.nvmfNamespaces(new NvmfNamespaceWhereInput()\n.id(\"NvmfNamespace-id\"))\n.addMetricsItem(\"-string\")\n.range(\"range-string\");\r\n List resp = metricsApi.getNvmfNamespaceMetrics(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/delete-datacenter": { + "/get-cluster-metrics": { "exampleValue": { - "where": { - "id": "Datacenter-id" - } + "range": "range-string", + "clusters": { + "id": "Cluster-id" + }, + "metrics": [ + "-string" + ] }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-datacenter \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Datacenter-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, DatacenterApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n datacenter_api = DatacenterApi(client)\r\n resp = datacenter_api.delete_datacenter({\"where\":{\"id\":\"Datacenter-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/datacenter\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n datacenter_api := client.Datacenter\r\n params := datacenter.NewDeleteDatacenterParams()\r\n params.RequestBody = &models.DatacenterDeletionParams{\nWhere: &models.DatacenterWhereInput{\nID: pointy.String(\"Datacenter-id\"),\n},\n}\r\n rawResp, err := datacenter_api.DeleteDatacenter(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteDatacenter) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteDatacenter)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteDatacenter) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.DatacenterApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n DatacenterApi datacenterApi = new DatacenterApi(client);\r\n DatacenterDeletionParams params = new DatacenterDeletionParams()\n.where(new DatacenterWhereInput()\n.id(\"Datacenter-id\"));\r\n List resp = datacenterApi.deleteDatacenter(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-cluster-metrics \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"range\":\"range-string\",\"clusters\":{\"id\":\"Cluster-id\"},\"metrics\":[\"-string\"]}'", + "python": "from cloudtower import ApiClient, Configuration, MetricsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n metrics_api = MetricsApi(client)\r\n resp = metrics_api.get_cluster_metrics({\"range\":\"range-string\",\"clusters\":{\"id\":\"Cluster-id\"},\"metrics\":[\"-string\"]})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/metrics\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n metrics_api := client.Metrics\r\n params := metrics.NewGetClusterMetricsParams()\r\n params.RequestBody = &models.GetClusterMetricInput{\nRange: pointy.String(\"range-string\"),\nClusters: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\nMetrics: []string{\"-string\",\n},\n}\r\n rawResp, err := metrics_api.GetClusterMetrics(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskMetric) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskMetric)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskMetric) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.MetricsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n MetricsApi metricsApi = new MetricsApi(client);\r\n GetClusterMetricInput params = new GetClusterMetricInput()\n.range(\"range-string\")\n.clusters(new ClusterWhereInput()\n.id(\"Cluster-id\"))\n.addMetricsItem(\"-string\");\r\n List resp = metricsApi.getClusterMetrics(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/mount-disk": { + "/get-host-metrics": { "exampleValue": { - "data": { - "function": "BOOT" + "range": "range-string", + "hosts": { + "id": "Host-id" }, - "where": { - "id": "Disk-id" - } + "metrics": [ + "-string" + ] }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/mount-disk \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"function\":\"BOOT\"},\"where\":{\"id\":\"Disk-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, DiskApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n disk_api = DiskApi(client)\r\n resp = disk_api.mount_disk({\"data\":{\"function\":\"BOOT\"},\"where\":{\"id\":\"Disk-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/disk\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n disk_api := client.Disk\r\n params := disk.NewMountDiskParams()\r\n params.RequestBody = &models.DiskMountParams{\nData: &models.DiskMountParamsData{\nFunction: models.DiskFunctionBOOT.Pointer(),\n},\nWhere: &models.DiskWhereInput{\nID: pointy.String(\"Disk-id\"),\n},\n}\r\n rawResp, err := disk_api.MountDisk(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDisk) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDisk)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDisk) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.DiskApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n DiskApi diskApi = new DiskApi(client);\r\n DiskMountParams params = new DiskMountParams()\n.data(new DiskMountParamsData()\n.function(DiskFunction.fromValue(\"BOOT\")))\n.where(new DiskWhereInput()\n.id(\"Disk-id\"));\r\n List resp = diskApi.mountDisk(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-host-metrics \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"range\":\"range-string\",\"hosts\":{\"id\":\"Host-id\"},\"metrics\":[\"-string\"]}'", + "python": "from cloudtower import ApiClient, Configuration, MetricsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n metrics_api = MetricsApi(client)\r\n resp = metrics_api.get_host_metrics({\"range\":\"range-string\",\"hosts\":{\"id\":\"Host-id\"},\"metrics\":[\"-string\"]})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/metrics\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n metrics_api := client.Metrics\r\n params := metrics.NewGetHostMetricsParams()\r\n params.RequestBody = &models.GetHostMetricInput{\nRange: pointy.String(\"range-string\"),\nHosts: &models.HostWhereInput{\nID: pointy.String(\"Host-id\"),\n},\nMetrics: []string{\"-string\",\n},\n}\r\n rawResp, err := metrics_api.GetHostMetrics(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskMetric) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskMetric)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskMetric) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.MetricsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n MetricsApi metricsApi = new MetricsApi(client);\r\n GetHostMetricInput params = new GetHostMetricInput()\n.range(\"range-string\")\n.hosts(new HostWhereInput()\n.id(\"Host-id\"))\n.addMetricsItem(\"-string\");\r\n List resp = metricsApi.getHostMetrics(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/unmount-disk": { + "/get-host-network-metrics": { "exampleValue": { - "where": { - "id": "Disk-id" - } + "hosts": { + "id": "Host-id" + }, + "range": "range-string", + "metrics": [ + "-string" + ] }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/unmount-disk \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Disk-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, DiskApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n disk_api = DiskApi(client)\r\n resp = disk_api.unmount_disk({\"where\":{\"id\":\"Disk-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/disk\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n disk_api := client.Disk\r\n params := disk.NewUnmountDiskParams()\r\n params.RequestBody = &models.DiskUnmountParams{\nWhere: &models.DiskWhereInput{\nID: pointy.String(\"Disk-id\"),\n},\n}\r\n rawResp, err := disk_api.UnmountDisk(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDisk) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDisk)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDisk) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.DiskApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n DiskApi diskApi = new DiskApi(client);\r\n DiskUnmountParams params = new DiskUnmountParams()\n.where(new DiskWhereInput()\n.id(\"Disk-id\"));\r\n List resp = diskApi.unmountDisk(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" - }, - "/create-entity-filter": { - "exampleValue": [ - { - "rules": [ - { - "threshold": 1, - "quantile": 1, - "op": "GT", - "metric": "VM_CPU_USAGE", - "duration": 1, - "aggregation": "AVG" - } - ], - "name": "name-string" - } - ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-entity-filter \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"rules\":[{\"threshold\":1,\"quantile\":1,\"op\":\"GT\",\"metric\":\"VM_CPU_USAGE\",\"duration\":1,\"aggregation\":\"AVG\"}],\"name\":\"name-string\"}]'", - "python": "from cloudtower import ApiClient, Configuration, EntityFilterApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n entity_filter_api = EntityFilterApi(client)\r\n resp = entity_filter_api.create_entity_filter([{\"rules\":[{\"threshold\":1,\"quantile\":1,\"op\":\"GT\",\"metric\":\"VM_CPU_USAGE\",\"duration\":1,\"aggregation\":\"AVG\"}],\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/entity_filter\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n entity_filter_api := client.EntityFilter\r\n params := entity_filter.NewCreateEntityFilterParams()\r\n params.RequestBody = []*models.EntityFilterCreationParams{\n{\nRules: []*models.FilterRuleInput{\n{\nThreshold: pointy.Float64(1),\nQuantile: pointy.Int32(1),\nOp: models.FilterRuleOpEnumGT.Pointer(),\nMetric: models.FilterRuleMetricEnumVM_CPU_USAGE.Pointer(),\nDuration: pointy.Int32(1),\nAggregation: models.FilterRuleAggregationEnumAVG.Pointer(),\n},\n},\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := entity_filter_api.CreateEntityFilter(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskEntityFilter) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskEntityFilter)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskEntityFilter) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.EntityFilterApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n EntityFilterApi entityFilterApi = new EntityFilterApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new EntityFilterCreationParams()\n.addRulesItem(new FilterRuleInput()\n.threshold(1D)\n.quantile(1)\n.op(FilterRuleOpEnum.fromValue(\"GT\"))\n.metric(FilterRuleMetricEnum.fromValue(\"VM_CPU_USAGE\"))\n.duration(1)\n.aggregation(FilterRuleAggregationEnum.fromValue(\"AVG\")))\n.name(\"name-string\"));\r\n List resp = entityFilterApi.createEntityFilter(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-host-network-metrics \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"hosts\":{\"id\":\"Host-id\"},\"range\":\"range-string\",\"metrics\":[\"-string\"]}'", + "python": "from cloudtower import ApiClient, Configuration, MetricsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n metrics_api = MetricsApi(client)\r\n resp = metrics_api.get_host_network_metrics({\"hosts\":{\"id\":\"Host-id\"},\"range\":\"range-string\",\"metrics\":[\"-string\"]})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/metrics\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n metrics_api := client.Metrics\r\n params := metrics.NewGetHostNetworkMetricsParams()\r\n params.RequestBody = &models.GetHostNetworkMetricInput{\nHosts: &models.HostWhereInput{\nID: pointy.String(\"Host-id\"),\n},\nRange: pointy.String(\"range-string\"),\nMetrics: []string{\"-string\",\n},\n}\r\n rawResp, err := metrics_api.GetHostNetworkMetrics(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskMetric) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskMetric)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskMetric) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.MetricsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n MetricsApi metricsApi = new MetricsApi(client);\r\n GetHostNetworkMetricInput params = new GetHostNetworkMetricInput()\n.hosts(new HostWhereInput()\n.id(\"Host-id\"))\n.range(\"range-string\")\n.addMetricsItem(\"-string\");\r\n List resp = metricsApi.getHostNetworkMetrics(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-entity-filter": { + "/get-host-service-metrics": { "exampleValue": { - "data": {}, - "where": { - "id": "EntityFilter-id" - } + "range": "range-string", + "hosts": { + "id": "Host-id" + }, + "services": [ + "-string" + ], + "metrics": [ + "-string" + ] }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-entity-filter \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"EntityFilter-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, EntityFilterApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n entity_filter_api = EntityFilterApi(client)\r\n resp = entity_filter_api.update_entity_filter({\"data\":{},\"where\":{\"id\":\"EntityFilter-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/entity_filter\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n entity_filter_api := client.EntityFilter\r\n params := entity_filter.NewUpdateEntityFilterParams()\r\n params.RequestBody = &models.EntityFilterUpdationParams{\nData: &models.EntityFilterUpdationParamsData{\n},\nWhere: &models.EntityFilterWhereInput{\nID: pointy.String(\"EntityFilter-id\"),\n},\n}\r\n rawResp, err := entity_filter_api.UpdateEntityFilter(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskEntityFilter) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskEntityFilter)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskEntityFilter) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.EntityFilterApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n EntityFilterApi entityFilterApi = new EntityFilterApi(client);\r\n EntityFilterUpdationParams params = new EntityFilterUpdationParams()\n.data(new EntityFilterUpdationParamsData())\n.where(new EntityFilterWhereInput()\n.id(\"EntityFilter-id\"));\r\n List resp = entityFilterApi.updateEntityFilter(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-host-service-metrics \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"range\":\"range-string\",\"hosts\":{\"id\":\"Host-id\"},\"services\":[\"-string\"],\"metrics\":[\"-string\"]}'", + "python": "from cloudtower import ApiClient, Configuration, MetricsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n metrics_api = MetricsApi(client)\r\n resp = metrics_api.get_host_servicek_metrics({\"range\":\"range-string\",\"hosts\":{\"id\":\"Host-id\"},\"services\":[\"-string\"],\"metrics\":[\"-string\"]})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/metrics\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n metrics_api := client.Metrics\r\n params := metrics.NewGetHostServicekMetricsParams()\r\n params.RequestBody = &models.GetHostServiceMetricInput{\nRange: pointy.String(\"range-string\"),\nHosts: &models.HostWhereInput{\nID: pointy.String(\"Host-id\"),\n},\nServices: []string{\"-string\",\n},\nMetrics: []string{\"-string\",\n},\n}\r\n rawResp, err := metrics_api.GetHostServicekMetrics(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskMetric) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskMetric)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskMetric) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.MetricsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n MetricsApi metricsApi = new MetricsApi(client);\r\n GetHostServiceMetricInput params = new GetHostServiceMetricInput()\n.range(\"range-string\")\n.hosts(new HostWhereInput()\n.id(\"Host-id\"))\n.addServicesItem(\"-string\")\n.addMetricsItem(\"-string\");\r\n List resp = metricsApi.getHostServicekMetrics(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/delete-entity-filter": { + "/get-scvm-metrics": { "exampleValue": { - "where": { - "id": "EntityFilter-id" - } + "range": "range-string", + "hosts": { + "id": "Host-id" + }, + "metrics": [ + "-string" + ] }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-entity-filter \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"EntityFilter-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, EntityFilterApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n entity_filter_api = EntityFilterApi(client)\r\n resp = entity_filter_api.delete_entity_filter({\"where\":{\"id\":\"EntityFilter-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/entity_filter\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n entity_filter_api := client.EntityFilter\r\n params := entity_filter.NewDeleteEntityFilterParams()\r\n params.RequestBody = &models.EntityFilterDeletionParams{\nWhere: &models.EntityFilterWhereInput{\nID: pointy.String(\"EntityFilter-id\"),\n},\n}\r\n rawResp, err := entity_filter_api.DeleteEntityFilter(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteEntityFilter) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteEntityFilter)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteEntityFilter) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.EntityFilterApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n EntityFilterApi entityFilterApi = new EntityFilterApi(client);\r\n EntityFilterDeletionParams params = new EntityFilterDeletionParams()\n.where(new EntityFilterWhereInput()\n.id(\"EntityFilter-id\"));\r\n List resp = entityFilterApi.deleteEntityFilter(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-scvm-metrics \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"range\":\"range-string\",\"hosts\":{\"id\":\"Host-id\"},\"metrics\":[\"-string\"]}'", + "python": "from cloudtower import ApiClient, Configuration, MetricsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n metrics_api = MetricsApi(client)\r\n resp = metrics_api.get_scvm_metrics({\"range\":\"range-string\",\"hosts\":{\"id\":\"Host-id\"},\"metrics\":[\"-string\"]})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/metrics\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n metrics_api := client.Metrics\r\n params := metrics.NewGetScvmMetricsParams()\r\n params.RequestBody = &models.GetScvmMetricInput{\nRange: pointy.String(\"range-string\"),\nHosts: &models.HostWhereInput{\nID: pointy.String(\"Host-id\"),\n},\nMetrics: []string{\"-string\",\n},\n}\r\n rawResp, err := metrics_api.GetScvmMetrics(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskMetric) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskMetric)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskMetric) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.MetricsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n MetricsApi metricsApi = new MetricsApi(client);\r\n GetScvmMetricInput params = new GetScvmMetricInput()\n.range(\"range-string\")\n.hosts(new HostWhereInput()\n.id(\"Host-id\"))\n.addMetricsItem(\"-string\");\r\n List resp = metricsApi.getScvmMetrics(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-gpu-device-usage": { + "/get-scvm-network-metrics": { "exampleValue": { - "data": {}, - "where": { - "id": "GpuDevice-id" - } + "range": "range-string", + "hosts": { + "id": "Host-id" + }, + "metrics": [ + "-string" + ] }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-gpu-device-usage \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"GpuDevice-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, GpuDeviceApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n gpu_device_api = GpuDeviceApi(client)\r\n resp = gpu_device_api.update_gpu_device_usage({\"data\":{},\"where\":{\"id\":\"GpuDevice-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/gpu_device\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n gpu_device_api := client.GpuDevice\r\n params := gpu_device.NewUpdateGpuDeviceUsageParams()\r\n params.RequestBody = &models.GpuDeviceUsageUpdationParams{\nData: &models.GpuDeviceUsageUpdationParamsData{\n},\nWhere: &models.GpuDeviceWhereInput{\nID: pointy.String(\"GpuDevice-id\"),\n},\n}\r\n rawResp, err := gpu_device_api.UpdateGpuDeviceUsage(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskGpuDevice) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskGpuDevice)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskGpuDevice) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.GpuDeviceApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n GpuDeviceApi gpuDeviceApi = new GpuDeviceApi(client);\r\n GpuDeviceUsageUpdationParams params = new GpuDeviceUsageUpdationParams()\n.data(new GpuDeviceUsageUpdationParamsData())\n.where(new GpuDeviceWhereInput()\n.id(\"GpuDevice-id\"));\r\n List resp = gpuDeviceApi.updateGpuDeviceUsage(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-scvm-network-metrics \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"range\":\"range-string\",\"hosts\":{\"id\":\"Host-id\"},\"metrics\":[\"-string\"]}'", + "python": "from cloudtower import ApiClient, Configuration, MetricsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n metrics_api = MetricsApi(client)\r\n resp = metrics_api.get_scvm_network_metrics({\"range\":\"range-string\",\"hosts\":{\"id\":\"Host-id\"},\"metrics\":[\"-string\"]})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/metrics\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n metrics_api := client.Metrics\r\n params := metrics.NewGetScvmNetworkMetricsParams()\r\n params.RequestBody = &models.GetScvmNetworkInput{\nRange: pointy.String(\"range-string\"),\nHosts: &models.HostWhereInput{\nID: pointy.String(\"Host-id\"),\n},\nMetrics: []string{\"-string\",\n},\n}\r\n rawResp, err := metrics_api.GetScvmNetworkMetrics(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskMetric) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskMetric)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskMetric) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.MetricsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n MetricsApi metricsApi = new MetricsApi(client);\r\n GetScvmNetworkInput params = new GetScvmNetworkInput()\n.range(\"range-string\")\n.hosts(new HostWhereInput()\n.id(\"Host-id\"))\n.addMetricsItem(\"-string\");\r\n List resp = metricsApi.getScvmNetworkMetrics(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-gpu-device-description": { + "/get-scvm-service-metrics": { "exampleValue": { - "data": { - "description": "description-string" + "range": "range-string", + "hosts": { + "id": "Host-id" }, - "where": { - "id": "GpuDevice-id" - } + "services": [ + "-string" + ], + "metrics": [ + "-string" + ] }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-gpu-device-description \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"description\":\"description-string\"},\"where\":{\"id\":\"GpuDevice-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, GpuDeviceApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n gpu_device_api = GpuDeviceApi(client)\r\n resp = gpu_device_api.update_gpu_device_description({\"data\":{\"description\":\"description-string\"},\"where\":{\"id\":\"GpuDevice-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/gpu_device\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n gpu_device_api := client.GpuDevice\r\n params := gpu_device.NewUpdateGpuDeviceDescriptionParams()\r\n params.RequestBody = &models.GpuDeviceDescriptionUpdationParams{\nData: &models.GpuDeviceDescriptionUpdationParamsData{\nDescription: pointy.String(\"description-string\"),\n},\nWhere: &models.GpuDeviceWhereInput{\nID: pointy.String(\"GpuDevice-id\"),\n},\n}\r\n rawResp, err := gpu_device_api.UpdateGpuDeviceDescription(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskGpuDevice) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskGpuDevice)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskGpuDevice) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.GpuDeviceApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n GpuDeviceApi gpuDeviceApi = new GpuDeviceApi(client);\r\n GpuDeviceDescriptionUpdationParams params = new GpuDeviceDescriptionUpdationParams()\n.data(new GpuDeviceDescriptionUpdationParamsData()\n.description(\"description-string\"))\n.where(new GpuDeviceWhereInput()\n.id(\"GpuDevice-id\"));\r\n List resp = gpuDeviceApi.updateGpuDeviceDescription(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-scvm-service-metrics \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"range\":\"range-string\",\"hosts\":{\"id\":\"Host-id\"},\"services\":[\"-string\"],\"metrics\":[\"-string\"]}'", + "python": "from cloudtower import ApiClient, Configuration, MetricsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n metrics_api = MetricsApi(client)\r\n resp = metrics_api.get_scvm_servicek_metrics({\"range\":\"range-string\",\"hosts\":{\"id\":\"Host-id\"},\"services\":[\"-string\"],\"metrics\":[\"-string\"]})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/metrics\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n metrics_api := client.Metrics\r\n params := metrics.NewGetScvmServicekMetricsParams()\r\n params.RequestBody = &models.GetScvmServiceMetricInput{\nRange: pointy.String(\"range-string\"),\nHosts: &models.HostWhereInput{\nID: pointy.String(\"Host-id\"),\n},\nServices: []string{\"-string\",\n},\nMetrics: []string{\"-string\",\n},\n}\r\n rawResp, err := metrics_api.GetScvmServicekMetrics(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskMetric) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskMetric)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskMetric) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.MetricsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n MetricsApi metricsApi = new MetricsApi(client);\r\n GetScvmServiceMetricInput params = new GetScvmServiceMetricInput()\n.range(\"range-string\")\n.hosts(new HostWhereInput()\n.id(\"Host-id\"))\n.addServicesItem(\"-string\")\n.addMetricsItem(\"-string\");\r\n List resp = metricsApi.getScvmServicekMetrics(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/switch-gpu-device-sriov": { + "/get-scvm-disk-metrics": { "exampleValue": { - "data": { - "enable": true + "range": "range-string", + "disks": { + "id": "Disk-id" }, - "where": { - "id": "GpuDevice-id" - } + "metrics": [ + "-string" + ] }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/switch-gpu-device-sriov \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"enable\":true},\"where\":{\"id\":\"GpuDevice-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, GpuDeviceApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n gpu_device_api = GpuDeviceApi(client)\r\n resp = gpu_device_api.switch_gpu_device_sriov({\"data\":{\"enable\":True},\"where\":{\"id\":\"GpuDevice-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/gpu_device\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n gpu_device_api := client.GpuDevice\r\n params := gpu_device.NewSwitchGpuDeviceSriovParams()\r\n params.RequestBody = &models.GpuDeviceSriovSwitchParams{\nData: &models.GpuDeviceSriovSwitchParamsData{\nEnable: pointy.Bool(true),\n},\nWhere: &models.GpuDeviceWhereInput{\nID: pointy.String(\"GpuDevice-id\"),\n},\n}\r\n rawResp, err := gpu_device_api.SwitchGpuDeviceSriov(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskGpuDevice) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskGpuDevice)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskGpuDevice) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.GpuDeviceApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n GpuDeviceApi gpuDeviceApi = new GpuDeviceApi(client);\r\n GpuDeviceSriovSwitchParams params = new GpuDeviceSriovSwitchParams()\n.data(new GpuDeviceSriovSwitchParamsData()\n.enable(true))\n.where(new GpuDeviceWhereInput()\n.id(\"GpuDevice-id\"));\r\n List resp = gpuDeviceApi.switchGpuDeviceSriov(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-scvm-disk-metrics \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"range\":\"range-string\",\"disks\":{\"id\":\"Disk-id\"},\"metrics\":[\"-string\"]}'", + "python": "from cloudtower import ApiClient, Configuration, MetricsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n metrics_api = MetricsApi(client)\r\n resp = metrics_api.get_scvm_disk_metrics({\"range\":\"range-string\",\"disks\":{\"id\":\"Disk-id\"},\"metrics\":[\"-string\"]})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/metrics\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n metrics_api := client.Metrics\r\n params := metrics.NewGetScvmDiskMetricsParams()\r\n params.RequestBody = &models.GetScvmDiskMetricInput{\nRange: pointy.String(\"range-string\"),\nDisks: &models.DiskWhereInput{\nID: pointy.String(\"Disk-id\"),\n},\nMetrics: []string{\"-string\",\n},\n}\r\n rawResp, err := metrics_api.GetScvmDiskMetrics(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskMetric) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskMetric)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskMetric) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.MetricsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n MetricsApi metricsApi = new MetricsApi(client);\r\n GetScvmDiskMetricInput params = new GetScvmDiskMetricInput()\n.range(\"range-string\")\n.disks(new DiskWhereInput()\n.id(\"Disk-id\"))\n.addMetricsItem(\"-string\");\r\n List resp = metricsApi.getScvmDiskMetrics(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/get-detail-vm-info-by-gpu-devices": { + "/get-zone-metrics": { "exampleValue": { - "where": { - "id": "GpuDevice-id" - } + "range": "range-string", + "type": "primary-to-secondary", + "clusters": { + "id": "Cluster-id" + }, + "metrics": [ + "-string" + ] }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-detail-vm-info-by-gpu-devices \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"GpuDevice-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, GpuDeviceApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n gpu_device_api = GpuDeviceApi(client)\r\n resp = gpu_device_api.get_detail_vm_info_by_gpu_devices({\"where\":{\"id\":\"GpuDevice-id\"}})\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/gpu_device\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n gpu_device_api := client.GpuDevice\r\n params := gpu_device.NewGetDetailVMInfoByGpuDevicesParams()\r\n params.RequestBody = &models.GetGpuDevicesRequestBody{\nWhere: &models.GpuDeviceWhereInput{\nID: pointy.String(\"GpuDevice-id\"),\n},\n}\r\n rawResp, err := gpu_device_api.GetDetailVMInfoByGpuDevices(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.GpuDeviceApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n GpuDeviceApi gpuDeviceApi = new GpuDeviceApi(client);\r\n GetGpuDevicesRequestBody params = new GetGpuDevicesRequestBody()\n.where(new GpuDeviceWhereInput()\n.id(\"GpuDevice-id\"));\r\n List resp = gpuDeviceApi.getDetailVmInfoByGpuDevices(params);\r\n }\r\n}" - }, - "/create-graph": { - "exampleValue": [ - { - "type": "AREA", - "resource_type": "resource_type-string", - "view_id": "ck74rk21wg5lz0786opdnzz5m", - "title": "title-string", - "cluster_id": "ck74rk21wg5lz0786opdnzz5m", - "connect_id": [ - "-string" - ], - "metric_name": "metric_name-string" - } - ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-graph \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"type\":\"AREA\",\"resource_type\":\"resource_type-string\",\"view_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"title\":\"title-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"connect_id\":[\"-string\"],\"metric_name\":\"metric_name-string\"}]'", - "python": "from cloudtower import ApiClient, Configuration, GraphApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n graph_api = GraphApi(client)\r\n resp = graph_api.create_graph([{\"type\":\"AREA\",\"resource_type\":\"resource_type-string\",\"view_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"title\":\"title-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"connect_id\":[\"-string\"],\"metric_name\":\"metric_name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/graph\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n graph_api := client.Graph\r\n params := graph.NewCreateGraphParams()\r\n params.RequestBody = []*models.GraphCreationParams{\n{\nType: models.GraphTypeAREA.Pointer(),\nResourceType: pointy.String(\"resource_type-string\"),\nViewID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nTitle: pointy.String(\"title-string\"),\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nConnectID: []string{\"-string\",\n},\nMetricName: pointy.String(\"metric_name-string\"),\n},\n}\r\n rawResp, err := graph_api.CreateGraph(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskGraph) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskGraph)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskGraph) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.GraphApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n GraphApi graphApi = new GraphApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new GraphCreationParams()\n.type(GraphType.fromValue(\"AREA\"))\n.resourceType(\"resource_type-string\")\n.viewId(\"ck74rk21wg5lz0786opdnzz5m\")\n.title(\"title-string\")\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.addConnectIdItem(\"-string\")\n.metricName(\"metric_name-string\"));\r\n List resp = graphApi.createGraph(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-zone-metrics \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"range\":\"range-string\",\"type\":\"primary-to-secondary\",\"clusters\":{\"id\":\"Cluster-id\"},\"metrics\":[\"-string\"]}'", + "python": "from cloudtower import ApiClient, Configuration, MetricsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n metrics_api = MetricsApi(client)\r\n resp = metrics_api.get_zone_metrics({\"range\":\"range-string\",\"type\":\"primary-to-secondary\",\"clusters\":{\"id\":\"Cluster-id\"},\"metrics\":[\"-string\"]})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/metrics\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n metrics_api := client.Metrics\r\n params := metrics.NewGetZoneMetricsParams()\r\n params.RequestBody = &models.GetZoneMetricInput{\nRange: pointy.String(\"range-string\"),\nType: pointy.String(\"primary-to-secondary\"),\nClusters: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\nMetrics: []string{\"-string\",\n},\n}\r\n rawResp, err := metrics_api.GetZoneMetrics(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskMetric) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskMetric)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskMetric) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.MetricsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n MetricsApi metricsApi = new MetricsApi(client);\r\n GetZoneMetricInput params = new GetZoneMetricInput()\n.range(\"range-string\")\n.type(\"primary-to-secondary\")\n.clusters(new ClusterWhereInput()\n.id(\"Cluster-id\"))\n.addMetricsItem(\"-string\");\r\n List resp = metricsApi.getZoneMetrics(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-graph": { + "/get-witness-metrics": { "exampleValue": { - "where": { - "id": "Graph-id" - } + "range": "range-string", + "clusters": { + "id": "Cluster-id" + }, + "metrics": [ + "-string" + ] }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-graph \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Graph-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, GraphApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n graph_api = GraphApi(client)\r\n resp = graph_api.update_graph({\"where\":{\"id\":\"Graph-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/graph\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n graph_api := client.Graph\r\n params := graph.NewUpdateGraphParams()\r\n params.RequestBody = &models.GraphUpdationParams{\nWhere: &models.GraphWhereInput{\nID: pointy.String(\"Graph-id\"),\n},\n}\r\n rawResp, err := graph_api.UpdateGraph(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskGraph) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskGraph)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskGraph) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.GraphApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n GraphApi graphApi = new GraphApi(client);\r\n GraphUpdationParams params = new GraphUpdationParams()\n.where(new GraphWhereInput()\n.id(\"Graph-id\"));\r\n List resp = graphApi.updateGraph(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-witness-metrics \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"range\":\"range-string\",\"clusters\":{\"id\":\"Cluster-id\"},\"metrics\":[\"-string\"]}'", + "python": "from cloudtower import ApiClient, Configuration, MetricsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n metrics_api = MetricsApi(client)\r\n resp = metrics_api.get_witness_metrics({\"range\":\"range-string\",\"clusters\":{\"id\":\"Cluster-id\"},\"metrics\":[\"-string\"]})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/metrics\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n metrics_api := client.Metrics\r\n params := metrics.NewGetWitnessMetricsParams()\r\n params.RequestBody = &models.GetWitnessMetricInput{\nRange: pointy.String(\"range-string\"),\nClusters: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\nMetrics: []string{\"-string\",\n},\n}\r\n rawResp, err := metrics_api.GetWitnessMetrics(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskMetric) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskMetric)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskMetric) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.MetricsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n MetricsApi metricsApi = new MetricsApi(client);\r\n GetWitnessMetricInput params = new GetWitnessMetricInput()\n.range(\"range-string\")\n.clusters(new ClusterWhereInput()\n.id(\"Cluster-id\"))\n.addMetricsItem(\"-string\");\r\n List resp = metricsApi.getWitnessMetrics(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/delete-graph": { + "/get-top-n-metrics-in-clusters": { "exampleValue": { - "where": { - "id": "Graph-id" - } + "metrics": [ + "-string" + ], + "clusters": { + "id": "Cluster-id" + }, + "type": "top", + "n": 1, + "range": "range-string" }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-graph \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Graph-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, GraphApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n graph_api = GraphApi(client)\r\n resp = graph_api.delete_graph({\"where\":{\"id\":\"Graph-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/graph\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n graph_api := client.Graph\r\n params := graph.NewDeleteGraphParams()\r\n params.RequestBody = &models.GraphDeletionParams{\nWhere: &models.GraphWhereInput{\nID: pointy.String(\"Graph-id\"),\n},\n}\r\n rawResp, err := graph_api.DeleteGraph(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteGraph) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteGraph)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteGraph) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.GraphApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n GraphApi graphApi = new GraphApi(client);\r\n GraphDeletionParams params = new GraphDeletionParams()\n.where(new GraphWhereInput()\n.id(\"Graph-id\"));\r\n List resp = graphApi.deleteGraph(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" - }, - "/create-host": { - "exampleValue": [ - { - "data": [ - { - "ifaces": [ - { - "netmask": "netmask-string", - "name": [ - "-string" - ], - "ip": "ip-string", - "gateway_ip": "gateway_ip-string", - "function": "ACCESS" - } - ], - "disks": [ - { - "drive": "drive-string" - } - ], - "hostname": "hostname-string", - "host_uuid": "ck74rk21wg5lz0786opdnzz5m", - "host_ip": "host_ip-string" - } - ], - "cluster_id": "ck74rk21wg5lz0786opdnzz5m" - } - ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-host \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"data\":[{\"ifaces\":[{\"netmask\":\"netmask-string\",\"name\":[\"-string\"],\"ip\":\"ip-string\",\"gateway_ip\":\"gateway_ip-string\",\"function\":\"ACCESS\"}],\"disks\":[{\"drive\":\"drive-string\"}],\"hostname\":\"hostname-string\",\"host_uuid\":\"ck74rk21wg5lz0786opdnzz5m\",\"host_ip\":\"host_ip-string\"}],\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", - "python": "from cloudtower import ApiClient, Configuration, HostApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n host_api = HostApi(client)\r\n resp = host_api.create_host([{\"data\":[{\"ifaces\":[{\"netmask\":\"netmask-string\",\"name\":[\"-string\"],\"ip\":\"ip-string\",\"gateway_ip\":\"gateway_ip-string\",\"function\":\"ACCESS\"}],\"disks\":[{\"drive\":\"drive-string\"}],\"hostname\":\"hostname-string\",\"host_uuid\":\"ck74rk21wg5lz0786opdnzz5m\",\"host_ip\":\"host_ip-string\"}],\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/host\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n host_api := client.Host\r\n params := host.NewCreateHostParams()\r\n params.RequestBody = []*models.HostCreationParams{\n{\nData: []*models.HostCreationParamsData{\n{\nIfaces: []*models.HostBatchCreateIfaceInput{\n{\nNetmask: pointy.String(\"netmask-string\"),\nName: []string{\"-string\",\n},\nIP: pointy.String(\"ip-string\"),\nGatewayIP: pointy.String(\"gateway_ip-string\"),\nFunction: models.HostBatchCreateIfaceFunctionACCESS.Pointer(),\n},\n},\nDisks: []*models.HostBatchCreateDiskInput{\n{\nDrive: pointy.String(\"drive-string\"),\n},\n},\nHostname: pointy.String(\"hostname-string\"),\nHostUUID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nHostIP: pointy.String(\"host_ip-string\"),\n},\n},\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := host_api.CreateHost(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskBatchHosts) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskBatchHosts)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskBatchHosts) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.HostApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n HostApi hostApi = new HostApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new HostCreationParams()\n.addDataItem(new HostCreationParamsData()\n.addIfacesItem(new HostBatchCreateIfaceInput()\n.netmask(\"netmask-string\")\n.addNameItem(\"-string\")\n.ip(\"ip-string\")\n.gatewayIp(\"gateway_ip-string\")\n.function(HostBatchCreateIfaceFunction.fromValue(\"ACCESS\")))\n.addDisksItem(new HostBatchCreateDiskInput()\n.drive(\"drive-string\"))\n.hostname(\"hostname-string\")\n.hostUuid(\"ck74rk21wg5lz0786opdnzz5m\")\n.hostIp(\"host_ip-string\"))\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = hostApi.createHost(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-top-n-metrics-in-clusters \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"metrics\":[\"-string\"],\"clusters\":{\"id\":\"Cluster-id\"},\"type\":\"top\",\"n\":1,\"range\":\"range-string\"}'", + "python": "from cloudtower import ApiClient, Configuration, MetricsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n metrics_api = MetricsApi(client)\r\n resp = metrics_api.get_top_n_vm_volume_metrics({\"metrics\":[\"-string\"],\"clusters\":{\"id\":\"Cluster-id\"},\"type\":\"top\",\"n\":1,\"range\":\"range-string\"})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/metrics\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n metrics_api := client.Metrics\r\n params := metrics.NewGetTopNVMVolumeMetricsParams()\r\n params.RequestBody = &models.GetTopNMetricInput{\nMetrics: []string{\"-string\",\n},\nClusters: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\nType: pointy.String(\"top\"),\nN: pointy.Int32(1),\nRange: pointy.String(\"range-string\"),\n}\r\n rawResp, err := metrics_api.GetTopNVMVolumeMetrics(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskMetric) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskMetric)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskMetric) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.MetricsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n MetricsApi metricsApi = new MetricsApi(client);\r\n GetTopNMetricInput params = new GetTopNMetricInput()\n.addMetricsItem(\"-string\")\n.clusters(new ClusterWhereInput()\n.id(\"Cluster-id\"))\n.type(\"top\")\n.n(1)\n.range(\"range-string\");\r\n List resp = metricsApi.getTopNVmVolumeMetrics(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/trigger-disk-blink": { + "/create-namespace-group": { "exampleValue": [ { - "disk_name": "disk_name-string", - "host_id": "ck74rk21wg5lz0786opdnzz5m" + "nvmf_subsystem_id": "ck74rk21wg5lz0786opdnzz5m", + "name": "name-string" } ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/trigger-disk-blink \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"disk_name\":\"disk_name-string\",\"host_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", - "python": "from cloudtower import ApiClient, Configuration, HostApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n host_api = HostApi(client)\r\n resp = host_api.trigger_disk_blink([{\"disk_name\":\"disk_name-string\",\"host_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/host\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n host_api := client.Host\r\n params := host.NewTriggerDiskBlinkParams()\r\n params.RequestBody = []*models.TriggerDiskBlinkParams{\n{\nDiskName: pointy.String(\"disk_name-string\"),\nHostID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := host_api.TriggerDiskBlink(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskHost) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskHost)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskHost) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.HostApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n HostApi hostApi = new HostApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new TriggerDiskBlinkParams()\n.diskName(\"disk_name-string\")\n.hostId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = hostApi.triggerDiskBlink(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-namespace-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"nvmf_subsystem_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", + "python": "from cloudtower import ApiClient, Configuration, NamespaceGroupApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n namespace_group_api = NamespaceGroupApi(client)\r\n resp = namespace_group_api.create_namespace_group([{\"nvmf_subsystem_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/namespace_group\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n namespace_group_api := client.NamespaceGroup\r\n params := namespace_group.NewCreateNamespaceGroupParams()\r\n params.RequestBody = []*models.NamespaceGroupCreationParams{\n{\nNvmfSubsystemID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := namespace_group_api.CreateNamespaceGroup(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskNamespaceGroup) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskNamespaceGroup)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskNamespaceGroup) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.NamespaceGroupApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n NamespaceGroupApi namespaceGroupApi = new NamespaceGroupApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new NamespaceGroupCreationParams()\n.nvmfSubsystemId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = namespaceGroupApi.createNamespaceGroup(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-host": { + "/update-namespace-group": { "exampleValue": { "data": {}, "where": { - "id": "Host-id" - } - }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-host \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Host-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, HostApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n host_api = HostApi(client)\r\n resp = host_api.update_host({\"data\":{},\"where\":{\"id\":\"Host-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/host\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n host_api := client.Host\r\n params := host.NewUpdateHostParams()\r\n params.RequestBody = &models.HostUpdationParams{\nData: &models.HostUpdationParamsData{\n},\nWhere: &models.HostWhereInput{\nID: pointy.String(\"Host-id\"),\n},\n}\r\n rawResp, err := host_api.UpdateHost(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskHost) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskHost)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskHost) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.HostApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n HostApi hostApi = new HostApi(client);\r\n HostUpdationParams params = new HostUpdationParams()\n.data(new HostUpdationParamsData())\n.where(new HostWhereInput()\n.id(\"Host-id\"));\r\n List resp = hostApi.updateHost(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" - }, - "/operate-host-power": { - "exampleValue": { - "data": { - "force": true, - "action": "poweroff" - }, - "where": { - "host_id": "ck74rk21wg5lz0786opdnzz5m" - } - }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/operate-host-power \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"force\":true,\"action\":\"poweroff\"},\"where\":{\"host_id\":\"ck74rk21wg5lz0786opdnzz5m\"}}'", - "python": "from cloudtower import ApiClient, Configuration, HostApi\r\nfrom cloudtower.utils import login, wait_task\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n host_api = HostApi(client)\r\n resp = host_api.power_off_host({\"data\":{\"force\":True,\"action\":\"poweroff\"},\"where\":{\"host_id\":\"ck74rk21wg5lz0786opdnzz5m\"}})\r\n wait_task(resp.task_id, client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/host\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n host_api := client.Host\r\n params := host.NewPowerOffHostParams()\r\n params.RequestBody = &models.OperateHostPowerParams{\nData: &models.OperateHostPowerData{\nForce: pointy.Bool(true),\nAction: models.OperateActionEnumpoweroff.Pointer(),\n},\nWhere: &models.OperateHostPowerParamsWhere{\nHostID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := host_api.PowerOffHost(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n err = utils.WaitTask(context.Background(), client, resp.TaskID, 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.HostApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n HostApi hostApi = new HostApi(client);\r\n OperateHostPowerParams params = new OperateHostPowerParams()\n.data(new OperateHostPowerData()\n.force(true)\n.action(OperateActionEnum.fromValue(\"poweroff\")))\n.where(new OperateHostPowerParamsWhere()\n.hostId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n WithTaskHost resp = hostApi.powerOffHost(params);\r\n TaskUtil.WaitTask(resp.getTaskId(), client);\r\n }\r\n}" - }, - "/enter-maintenance-mode-precheck": { - "exampleValue": { - "where": { - "id": "Host-id" + "id": "NamespaceGroup-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/enter-maintenance-mode-precheck \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Host-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, HostApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n host_api = HostApi(client)\r\n resp = host_api.enter_maintenance_mode_pre_check({\"where\":{\"id\":\"Host-id\"}})\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/host\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n host_api := client.Host\r\n params := host.NewEnterMaintenanceModePreCheckParams()\r\n params.RequestBody = &models.EnterMaintenanceModeCheckParams{\nWhere: &models.HostWhereInput{\nID: pointy.String(\"Host-id\"),\n},\n}\r\n rawResp, err := host_api.EnterMaintenanceModePreCheck(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.HostApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n HostApi hostApi = new HostApi(client);\r\n EnterMaintenanceModeCheckParams params = new EnterMaintenanceModeCheckParams()\n.where(new HostWhereInput()\n.id(\"Host-id\"));\r\n EnterMaintenanceModeCheckResult resp = hostApi.enterMaintenanceModePreCheck(params);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-namespace-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"NamespaceGroup-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, NamespaceGroupApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n namespace_group_api = NamespaceGroupApi(client)\r\n resp = namespace_group_api.update_namespace_group({\"data\":{},\"where\":{\"id\":\"NamespaceGroup-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/namespace_group\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n namespace_group_api := client.NamespaceGroup\r\n params := namespace_group.NewUpdateNamespaceGroupParams()\r\n params.RequestBody = &models.NamespaceGroupUpdationParams{\nData: &models.NamespaceGroupUpdationParamsData{\n},\nWhere: &models.NamespaceGroupWhereInput{\nID: pointy.String(\"NamespaceGroup-id\"),\n},\n}\r\n rawResp, err := namespace_group_api.UpdateNamespaceGroup(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskNamespaceGroup) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskNamespaceGroup)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskNamespaceGroup) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.NamespaceGroupApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n NamespaceGroupApi namespaceGroupApi = new NamespaceGroupApi(client);\r\n NamespaceGroupUpdationParams params = new NamespaceGroupUpdationParams()\n.data(new NamespaceGroupUpdationParamsData())\n.where(new NamespaceGroupWhereInput()\n.id(\"NamespaceGroup-id\"));\r\n List resp = namespaceGroupApi.updateNamespaceGroup(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/enter-maintance-mode-precheck-result": { + "/delete-namespace-group": { "exampleValue": { "where": { - "task_id": "ck74rk21wg5lz0786opdnzz5m" + "id": "NamespaceGroup-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/enter-maintance-mode-precheck-result \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"task_id\":\"ck74rk21wg5lz0786opdnzz5m\"}}'", - "python": "from cloudtower import ApiClient, Configuration, HostApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n host_api = HostApi(client)\r\n resp = host_api.enter_maintenance_mode_precheck_result({\"where\":{\"task_id\":\"ck74rk21wg5lz0786opdnzz5m\"}})\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/host\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n host_api := client.Host\r\n params := host.NewEnterMaintenanceModePrecheckResultParams()\r\n params.RequestBody = &models.EnterMaintenanceModeResultParams{\nWhere: &models.EnterMaintenanceModeResultParamsWhere{\nTaskID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := host_api.EnterMaintenanceModePrecheckResult(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.HostApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n HostApi hostApi = new HostApi(client);\r\n EnterMaintenanceModeResultParams params = new EnterMaintenanceModeResultParams()\n.where(new EnterMaintenanceModeResultParamsWhere()\n.taskId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n EnterMaintenanceModeResult resp = hostApi.enterMaintenanceModePrecheckResult(params);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-namespace-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"NamespaceGroup-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, NamespaceGroupApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n namespace_group_api = NamespaceGroupApi(client)\r\n resp = namespace_group_api.delete_namespace_group({\"where\":{\"id\":\"NamespaceGroup-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/namespace_group\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n namespace_group_api := client.NamespaceGroup\r\n params := namespace_group.NewDeleteNamespaceGroupParams()\r\n params.RequestBody = &models.NamespaceGroupDeletionParams{\nWhere: &models.NamespaceGroupWhereInput{\nID: pointy.String(\"NamespaceGroup-id\"),\n},\n}\r\n rawResp, err := namespace_group_api.DeleteNamespaceGroup(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteNamespaceGroup) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteNamespaceGroup)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteNamespaceGroup) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.NamespaceGroupApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n NamespaceGroupApi namespaceGroupApi = new NamespaceGroupApi(client);\r\n NamespaceGroupDeletionParams params = new NamespaceGroupDeletionParams()\n.where(new NamespaceGroupWhereInput()\n.id(\"NamespaceGroup-id\"));\r\n List resp = namespaceGroupApi.deleteNamespaceGroup(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/enter-maintance-mode": { + "/create-nfs-export": { + "exampleValue": [ + { + "cluster_id": "ck74rk21wg5lz0786opdnzz5m", + "thin_provision": true, + "replica_num": 1, + "name": "name-string" + } + ], + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-nfs-export \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"thin_provision\":true,\"replica_num\":1,\"name\":\"name-string\"}]'", + "python": "from cloudtower import ApiClient, Configuration, NfsExportApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n nfs_export_api = NfsExportApi(client)\r\n resp = nfs_export_api.create_nfs_export([{\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"thin_provision\":True,\"replica_num\":1,\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/nfs_export\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n nfs_export_api := client.NfsExport\r\n params := nfs_export.NewCreateNfsExportParams()\r\n params.RequestBody = []*models.NfsExportCreationParams{\n{\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nThinProvision: pointy.Bool(true),\nReplicaNum: pointy.Int32(1),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := nfs_export_api.CreateNfsExport(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskNfsExport) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskNfsExport)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskNfsExport) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.NfsExportApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n NfsExportApi nfsExportApi = new NfsExportApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new NfsExportCreationParams()\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.thinProvision(true)\n.replicaNum(1)\n.name(\"name-string\"));\r\n List resp = nfsExportApi.createNfsExport(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "/update-nfs-export": { "exampleValue": { - "data": {}, "where": { - "host_id": "ck74rk21wg5lz0786opdnzz5m" + "id": "NfsExport-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/enter-maintance-mode \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"host_id\":\"ck74rk21wg5lz0786opdnzz5m\"}}'", - "python": "from cloudtower import ApiClient, Configuration, HostApi\r\nfrom cloudtower.utils import login, wait_task\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n host_api = HostApi(client)\r\n resp = host_api.enter_maintenance_mode({\"data\":{},\"where\":{\"host_id\":\"ck74rk21wg5lz0786opdnzz5m\"}})\r\n wait_task(resp.task_id, client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/host\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n host_api := client.Host\r\n params := host.NewEnterMaintenanceModeParams()\r\n params.RequestBody = &models.EnterMaintenanceModeParams{\nData: &models.EnterMaintenanceModeInput{\n},\nWhere: &models.EnterMaintenanceModeParamsWhere{\nHostID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := host_api.EnterMaintenanceMode(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n err = utils.WaitTask(context.Background(), client, resp.TaskID, 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.HostApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n HostApi hostApi = new HostApi(client);\r\n EnterMaintenanceModeParams params = new EnterMaintenanceModeParams()\n.data(new EnterMaintenanceModeInput())\n.where(new EnterMaintenanceModeParamsWhere()\n.hostId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n WithTaskHost resp = hostApi.enterMaintenanceMode(params);\r\n TaskUtil.WaitTask(resp.getTaskId(), client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-nfs-export \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"NfsExport-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, NfsExportApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n nfs_export_api = NfsExportApi(client)\r\n resp = nfs_export_api.update_nfs_export({\"where\":{\"id\":\"NfsExport-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/nfs_export\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n nfs_export_api := client.NfsExport\r\n params := nfs_export.NewUpdateNfsExportParams()\r\n params.RequestBody = &models.NfsExportUpdationParams{\nWhere: &models.NfsExportWhereInput{\nID: pointy.String(\"NfsExport-id\"),\n},\n}\r\n rawResp, err := nfs_export_api.UpdateNfsExport(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskNfsExport) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskNfsExport)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskNfsExport) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.NfsExportApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n NfsExportApi nfsExportApi = new NfsExportApi(client);\r\n NfsExportUpdationParams params = new NfsExportUpdationParams()\n.where(new NfsExportWhereInput()\n.id(\"NfsExport-id\"));\r\n List resp = nfsExportApi.updateNfsExport(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/exit-maintance-mode-precheck-result": { + "/delete-nfs-export": { "exampleValue": { "where": { - "id": "Host-id" + "id": "NfsExport-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/exit-maintance-mode-precheck-result \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Host-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, HostApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n host_api = HostApi(client)\r\n resp = host_api.exit_maintenance_mode_precheck_result({\"where\":{\"id\":\"Host-id\"}})\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/host\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n host_api := client.Host\r\n params := host.NewExitMaintenanceModePrecheckResultParams()\r\n params.RequestBody = &models.ExitMaintenanceModeResultParams{\nWhere: &models.HostWhereInput{\nID: pointy.String(\"Host-id\"),\n},\n}\r\n rawResp, err := host_api.ExitMaintenanceModePrecheckResult(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.HostApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n HostApi hostApi = new HostApi(client);\r\n ExitMaintenanceModeResultParams params = new ExitMaintenanceModeResultParams()\n.where(new HostWhereInput()\n.id(\"Host-id\"));\r\n ExitMaintenanceModeResult resp = hostApi.exitMaintenanceModePrecheckResult(params);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-nfs-export \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"NfsExport-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, NfsExportApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n nfs_export_api = NfsExportApi(client)\r\n resp = nfs_export_api.delete_nfs_export({\"where\":{\"id\":\"NfsExport-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/nfs_export\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n nfs_export_api := client.NfsExport\r\n params := nfs_export.NewDeleteNfsExportParams()\r\n params.RequestBody = &models.NfsExportDeletionParams{\nWhere: &models.NfsExportWhereInput{\nID: pointy.String(\"NfsExport-id\"),\n},\n}\r\n rawResp, err := nfs_export_api.DeleteNfsExport(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteNfsExport) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteNfsExport)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteNfsExport) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.NfsExportApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n NfsExportApi nfsExportApi = new NfsExportApi(client);\r\n NfsExportDeletionParams params = new NfsExportDeletionParams()\n.where(new NfsExportWhereInput()\n.id(\"NfsExport-id\"));\r\n List resp = nfsExportApi.deleteNfsExport(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/exit-maintance-mode": { + "/update-nic": { "exampleValue": { "data": {}, "where": { - "host_id": "ck74rk21wg5lz0786opdnzz5m" + "id": "Nic-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/exit-maintance-mode \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"host_id\":\"ck74rk21wg5lz0786opdnzz5m\"}}'", - "python": "from cloudtower import ApiClient, Configuration, HostApi\r\nfrom cloudtower.utils import login, wait_task\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n host_api = HostApi(client)\r\n resp = host_api.exit_maintenance_mode({\"data\":{},\"where\":{\"host_id\":\"ck74rk21wg5lz0786opdnzz5m\"}})\r\n wait_task(resp.task_id, client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/host\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n host_api := client.Host\r\n params := host.NewExitMaintenanceModeParams()\r\n params.RequestBody = &models.ExitMaintenanceModeParams{\nData: &models.ExitMaintenanceModeInput{\n},\nWhere: &models.ExitMaintenanceModeParamsWhere{\nHostID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := host_api.ExitMaintenanceMode(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n err = utils.WaitTask(context.Background(), client, resp.TaskID, 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.HostApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n HostApi hostApi = new HostApi(client);\r\n ExitMaintenanceModeParams params = new ExitMaintenanceModeParams()\n.data(new ExitMaintenanceModeInput())\n.where(new ExitMaintenanceModeParamsWhere()\n.hostId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n WithTaskHost resp = hostApi.exitMaintenanceMode(params);\r\n TaskUtil.WaitTask(resp.getTaskId(), client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-nic \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Nic-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, NicApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n nic_api = NicApi(client)\r\n resp = nic_api.update_nic({\"data\":{},\"where\":{\"id\":\"Nic-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/nic\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n nic_api := client.Nic\r\n params := nic.NewUpdateNicParams()\r\n params.RequestBody = &models.NicUpdationParams{\nData: &models.NicUpdationParamsData{\n},\nWhere: &models.NicWhereInput{\nID: pointy.String(\"Nic-id\"),\n},\n}\r\n rawResp, err := nic_api.UpdateNic(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskNic) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskNic)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskNic) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.NicApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n NicApi nicApi = new NicApi(client);\r\n NicUpdationParams params = new NicUpdationParams()\n.data(new NicUpdationParamsData())\n.where(new NicWhereInput()\n.id(\"Nic-id\"));\r\n List resp = nicApi.updateNic(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/create-iscsi-lun-snapshot": { + "/move-node-topo": { "exampleValue": [ { - "iscsi_target_id": "ck74rk21wg5lz0786opdnzz5m", + "data": {}, + "where": { + "id": "NodeTopo-id" + } + } + ], + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/move-node-topo \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"data\":{},\"where\":{\"id\":\"NodeTopo-id\"}}]'", + "python": "from cloudtower import ApiClient, Configuration, NodeTopoApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n node_topo_api = NodeTopoApi(client)\r\n resp = node_topo_api.update_node_topo([{\"data\":{},\"where\":{\"id\":\"NodeTopo-id\"}}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/node_topo\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n node_topo_api := client.NodeTopo\r\n params := node_topo.NewUpdateNodeTopoParams()\r\n params.RequestBody = []*models.NodeTopUpdationParam{\n{\nData: &models.NodeTopoUpdationParamsData{\n},\nWhere: &models.NodeTopoWhereUniqueInput{\nID: pointy.String(\"NodeTopo-id\"),\n},\n},\n}\r\n rawResp, err := node_topo_api.UpdateNodeTopo(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskNodeTopo) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskNodeTopo)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskNodeTopo) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.NodeTopoApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n NodeTopoApi nodeTopoApi = new NodeTopoApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new NodeTopUpdationParam()\n.data(new NodeTopoUpdationParamsData())\n.where(new NodeTopoWhereUniqueInput()\n.id(\"NodeTopo-id\")));\r\n List resp = nodeTopoApi.updateNodeTopo(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "/create-nvmf-namespace-snapshot": { + "exampleValue": [ + { + "nvmf_subsystem_id": "ck74rk21wg5lz0786opdnzz5m", "name": "name-string", - "iscsi_lun_id": "ck74rk21wg5lz0786opdnzz5m" + "nvmf_namespace_id": "ck74rk21wg5lz0786opdnzz5m" } ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-iscsi-lun-snapshot \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"iscsi_target_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\",\"iscsi_lun_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", - "python": "from cloudtower import ApiClient, Configuration, IscsiLunSnapshotApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n iscsi_lun_snapshot_api = IscsiLunSnapshotApi(client)\r\n resp = iscsi_lun_snapshot_api.create_iscsi_lun_snapshot([{\"iscsi_target_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\",\"iscsi_lun_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/iscsi_lun_snapshot\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n iscsi_lun_snapshot_api := client.IscsiLunSnapshot\r\n params := iscsi_lun_snapshot.NewCreateIscsiLunSnapshotParams()\r\n params.RequestBody = []*models.IscsiLunSnapshotCreationParams{\n{\nIscsiTargetID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\nIscsiLunID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := iscsi_lun_snapshot_api.CreateIscsiLunSnapshot(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskIscsiLunSnapshot) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskIscsiLunSnapshot)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskIscsiLunSnapshot) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.IscsiLunSnapshotApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n IscsiLunSnapshotApi iscsiLunSnapshotApi = new IscsiLunSnapshotApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new IscsiLunSnapshotCreationParams()\n.iscsiTargetId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\")\n.iscsiLunId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = iscsiLunSnapshotApi.createIscsiLunSnapshot(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-nvmf-namespace-snapshot \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"nvmf_subsystem_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\",\"nvmf_namespace_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", + "python": "from cloudtower import ApiClient, Configuration, NvmfNamespaceSnapshotApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n nvmf_namespace_snapshot_api = NvmfNamespaceSnapshotApi(client)\r\n resp = nvmf_namespace_snapshot_api.create_nvmf_namespace_snapshot([{\"nvmf_subsystem_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\",\"nvmf_namespace_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/nvmf_namespace_snapshot\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n nvmf_namespace_snapshot_api := client.NvmfNamespaceSnapshot\r\n params := nvmf_namespace_snapshot.NewCreateNvmfNamespaceSnapshotParams()\r\n params.RequestBody = []*models.NvmfNamespaceSnapshotCreationParams{\n{\nNvmfSubsystemID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\nNvmfNamespaceID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := nvmf_namespace_snapshot_api.CreateNvmfNamespaceSnapshot(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskNvmfNamespaceSnapshot) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskNvmfNamespaceSnapshot)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskNvmfNamespaceSnapshot) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.NvmfNamespaceSnapshotApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n NvmfNamespaceSnapshotApi nvmfNamespaceSnapshotApi = new NvmfNamespaceSnapshotApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new NvmfNamespaceSnapshotCreationParams()\n.nvmfSubsystemId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\")\n.nvmfNamespaceId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = nvmfNamespaceSnapshotApi.createNvmfNamespaceSnapshot(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/delete-iscsi-lun-snapshot": { + "/delete-nvmf-namespace-snapshot": { "exampleValue": { "where": { - "id": "IscsiLunSnapshot-id" + "id": "NvmfNamespaceSnapshot-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-iscsi-lun-snapshot \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"IscsiLunSnapshot-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, IscsiLunSnapshotApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n iscsi_lun_snapshot_api = IscsiLunSnapshotApi(client)\r\n resp = iscsi_lun_snapshot_api.delete_iscsi_lun_snapshot({\"where\":{\"id\":\"IscsiLunSnapshot-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/iscsi_lun_snapshot\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n iscsi_lun_snapshot_api := client.IscsiLunSnapshot\r\n params := iscsi_lun_snapshot.NewDeleteIscsiLunSnapshotParams()\r\n params.RequestBody = &models.IscsiLunSnapshotDeletionParams{\nWhere: &models.IscsiLunSnapshotWhereInput{\nID: pointy.String(\"IscsiLunSnapshot-id\"),\n},\n}\r\n rawResp, err := iscsi_lun_snapshot_api.DeleteIscsiLunSnapshot(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteIscsiLunSnapshot) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteIscsiLunSnapshot)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteIscsiLunSnapshot) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.IscsiLunSnapshotApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n IscsiLunSnapshotApi iscsiLunSnapshotApi = new IscsiLunSnapshotApi(client);\r\n IscsiLunSnapshotDeletionParams params = new IscsiLunSnapshotDeletionParams()\n.where(new IscsiLunSnapshotWhereInput()\n.id(\"IscsiLunSnapshot-id\"));\r\n List resp = iscsiLunSnapshotApi.deleteIscsiLunSnapshot(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-nvmf-namespace-snapshot \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"NvmfNamespaceSnapshot-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, NvmfNamespaceSnapshotApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n nvmf_namespace_snapshot_api = NvmfNamespaceSnapshotApi(client)\r\n resp = nvmf_namespace_snapshot_api.delete_nvmf_namespace_snapshot({\"where\":{\"id\":\"NvmfNamespaceSnapshot-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/nvmf_namespace_snapshot\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n nvmf_namespace_snapshot_api := client.NvmfNamespaceSnapshot\r\n params := nvmf_namespace_snapshot.NewDeleteNvmfNamespaceSnapshotParams()\r\n params.RequestBody = &models.NvmfNamespaceSnapshotDeletionParams{\nWhere: &models.NvmfNamespaceSnapshotWhereInput{\nID: pointy.String(\"NvmfNamespaceSnapshot-id\"),\n},\n}\r\n rawResp, err := nvmf_namespace_snapshot_api.DeleteNvmfNamespaceSnapshot(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteNvmfNamespaceSnapshot) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteNvmfNamespaceSnapshot)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteNvmfNamespaceSnapshot) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.NvmfNamespaceSnapshotApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n NvmfNamespaceSnapshotApi nvmfNamespaceSnapshotApi = new NvmfNamespaceSnapshotApi(client);\r\n NvmfNamespaceSnapshotDeletionParams params = new NvmfNamespaceSnapshotDeletionParams()\n.where(new NvmfNamespaceSnapshotWhereInput()\n.id(\"NvmfNamespaceSnapshot-id\"));\r\n List resp = nvmfNamespaceSnapshotApi.deleteNvmfNamespaceSnapshot(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/create-iscsi-lun": { + "/create-nvmf-namespace": { "exampleValue": [ { "assigned_size": 1, "replica_num": 1, - "iscsi_target_id": "ck74rk21wg5lz0786opdnzz5m", + "nvmf_subsystem_id": "ck74rk21wg5lz0786opdnzz5m", "name": "name-string" } ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-iscsi-lun \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"assigned_size\":1,\"replica_num\":1,\"iscsi_target_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", - "python": "from cloudtower import ApiClient, Configuration, IscsiLunApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n iscsi_lun_api = IscsiLunApi(client)\r\n resp = iscsi_lun_api.create_iscsi_lun([{\"assigned_size\":1,\"replica_num\":1,\"iscsi_target_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/iscsi_lun\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n iscsi_lun_api := client.IscsiLun\r\n params := iscsi_lun.NewCreateIscsiLunParams()\r\n params.RequestBody = []*models.IscsiLunCreationParams{\n{\nAssignedSize: pointy.Int64(1),\nReplicaNum: pointy.Int32(1),\nIscsiTargetID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := iscsi_lun_api.CreateIscsiLun(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskIscsiLun) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskIscsiLun)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskIscsiLun) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.IscsiLunApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n IscsiLunApi iscsiLunApi = new IscsiLunApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new IscsiLunCreationParams()\n.assignedSize(1L)\n.replicaNum(1)\n.iscsiTargetId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = iscsiLunApi.createIscsiLun(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-nvmf-namespace \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"assigned_size\":1,\"replica_num\":1,\"nvmf_subsystem_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", + "python": "from cloudtower import ApiClient, Configuration, NvmfNamespaceApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n nvmf_namespace_api = NvmfNamespaceApi(client)\r\n resp = nvmf_namespace_api.create_nvmf_namespace([{\"assigned_size\":1,\"replica_num\":1,\"nvmf_subsystem_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/nvmf_namespace\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n nvmf_namespace_api := client.NvmfNamespace\r\n params := nvmf_namespace.NewCreateNvmfNamespaceParams()\r\n params.RequestBody = []*models.NvmfNamespaceCreationParams{\n{\nAssignedSize: pointy.Int64(1),\nReplicaNum: pointy.Int32(1),\nNvmfSubsystemID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := nvmf_namespace_api.CreateNvmfNamespace(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskNvmfNamespace) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskNvmfNamespace)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskNvmfNamespace) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.NvmfNamespaceApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n NvmfNamespaceApi nvmfNamespaceApi = new NvmfNamespaceApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new NvmfNamespaceCreationParams()\n.assignedSize(1L)\n.replicaNum(1)\n.nvmfSubsystemId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = nvmfNamespaceApi.createNvmfNamespace(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-iscsi-lun": { + "/update-nvmf-namespace": { "exampleValue": { "data": {}, "where": { - "id": "IscsiLun-id" + "id": "NvmfNamespace-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-iscsi-lun \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"IscsiLun-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, IscsiLunApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n iscsi_lun_api = IscsiLunApi(client)\r\n resp = iscsi_lun_api.update_iscsi_lun({\"data\":{},\"where\":{\"id\":\"IscsiLun-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/iscsi_lun\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n iscsi_lun_api := client.IscsiLun\r\n params := iscsi_lun.NewUpdateIscsiLunParams()\r\n params.RequestBody = &models.IscsiLunUpdationParams{\nData: &models.IscsiLunUpdationParamsData{\n},\nWhere: &models.IscsiLunWhereInput{\nID: pointy.String(\"IscsiLun-id\"),\n},\n}\r\n rawResp, err := iscsi_lun_api.UpdateIscsiLun(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskIscsiLun) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskIscsiLun)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskIscsiLun) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.IscsiLunApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n IscsiLunApi iscsiLunApi = new IscsiLunApi(client);\r\n IscsiLunUpdationParams params = new IscsiLunUpdationParams()\n.data(new IscsiLunUpdationParamsData())\n.where(new IscsiLunWhereInput()\n.id(\"IscsiLun-id\"));\r\n List resp = iscsiLunApi.updateIscsiLun(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-nvmf-namespace \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"NvmfNamespace-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, NvmfNamespaceApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n nvmf_namespace_api = NvmfNamespaceApi(client)\r\n resp = nvmf_namespace_api.update_nvmf_namespace({\"data\":{},\"where\":{\"id\":\"NvmfNamespace-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/nvmf_namespace\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n nvmf_namespace_api := client.NvmfNamespace\r\n params := nvmf_namespace.NewUpdateNvmfNamespaceParams()\r\n params.RequestBody = &models.NvmfNamespaceUpdationParams{\nData: &models.NvmfNamespaceUpdationParamsData{\n},\nWhere: &models.NvmfNamespaceWhereInput{\nID: pointy.String(\"NvmfNamespace-id\"),\n},\n}\r\n rawResp, err := nvmf_namespace_api.UpdateNvmfNamespace(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskNvmfNamespace) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskNvmfNamespace)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskNvmfNamespace) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.NvmfNamespaceApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n NvmfNamespaceApi nvmfNamespaceApi = new NvmfNamespaceApi(client);\r\n NvmfNamespaceUpdationParams params = new NvmfNamespaceUpdationParams()\n.data(new NvmfNamespaceUpdationParamsData())\n.where(new NvmfNamespaceWhereInput()\n.id(\"NvmfNamespace-id\"));\r\n List resp = nvmfNamespaceApi.updateNvmfNamespace(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/delete-iscsi-lun": { + "/delete-nvmf-namespace": { "exampleValue": { "data": { "remove_snapshot": true }, "where": { - "id": "IscsiLun-id" + "id": "NvmfNamespace-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-iscsi-lun \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"remove_snapshot\":true},\"where\":{\"id\":\"IscsiLun-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, IscsiLunApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n iscsi_lun_api = IscsiLunApi(client)\r\n resp = iscsi_lun_api.delete_iscsi_lun({\"data\":{\"remove_snapshot\":True},\"where\":{\"id\":\"IscsiLun-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/iscsi_lun\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n iscsi_lun_api := client.IscsiLun\r\n params := iscsi_lun.NewDeleteIscsiLunParams()\r\n params.RequestBody = &models.IscsiLunDeletionParams{\nData: &models.IscsiLunDeletionParamsData{\nRemoveSnapshot: pointy.Bool(true),\n},\nWhere: &models.IscsiLunWhereInput{\nID: pointy.String(\"IscsiLun-id\"),\n},\n}\r\n rawResp, err := iscsi_lun_api.DeleteIscsiLun(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteIscsiLun) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteIscsiLun)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteIscsiLun) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.IscsiLunApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n IscsiLunApi iscsiLunApi = new IscsiLunApi(client);\r\n IscsiLunDeletionParams params = new IscsiLunDeletionParams()\n.data(new IscsiLunDeletionParamsData()\n.removeSnapshot(true))\n.where(new IscsiLunWhereInput()\n.id(\"IscsiLun-id\"));\r\n List resp = iscsiLunApi.deleteIscsiLun(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-nvmf-namespace \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"remove_snapshot\":true},\"where\":{\"id\":\"NvmfNamespace-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, NvmfNamespaceApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n nvmf_namespace_api = NvmfNamespaceApi(client)\r\n resp = nvmf_namespace_api.delete_nvmf_namespace({\"data\":{\"remove_snapshot\":True},\"where\":{\"id\":\"NvmfNamespace-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/nvmf_namespace\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n nvmf_namespace_api := client.NvmfNamespace\r\n params := nvmf_namespace.NewDeleteNvmfNamespaceParams()\r\n params.RequestBody = &models.NvmfNamespaceDeletionParams{\nData: &models.NvmfNamespaceDeletionParamsData{\nRemoveSnapshot: pointy.Bool(true),\n},\nWhere: &models.NvmfNamespaceWhereInput{\nID: pointy.String(\"NvmfNamespace-id\"),\n},\n}\r\n rawResp, err := nvmf_namespace_api.DeleteNvmfNamespace(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteNvmfNamespace) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteNvmfNamespace)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteNvmfNamespace) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.NvmfNamespaceApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n NvmfNamespaceApi nvmfNamespaceApi = new NvmfNamespaceApi(client);\r\n NvmfNamespaceDeletionParams params = new NvmfNamespaceDeletionParams()\n.data(new NvmfNamespaceDeletionParamsData()\n.removeSnapshot(true))\n.where(new NvmfNamespaceWhereInput()\n.id(\"NvmfNamespace-id\"));\r\n List resp = nvmfNamespaceApi.deleteNvmfNamespace(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/clone-iscsi-lun-from-snapshot": { + "/clone-nvmf-namespace-from-snapshot": { "exampleValue": [ { - "iscsi_target_id": "ck74rk21wg5lz0786opdnzz5m", + "nvmf_subsystem_id": "ck74rk21wg5lz0786opdnzz5m", "name": "name-string", "snapshot_id": "ck74rk21wg5lz0786opdnzz5m" } ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/clone-iscsi-lun-from-snapshot \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"iscsi_target_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\",\"snapshot_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", - "python": "from cloudtower import ApiClient, Configuration, IscsiLunApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n iscsi_lun_api = IscsiLunApi(client)\r\n resp = iscsi_lun_api.clone_iscsi_lun_from_snapshot([{\"iscsi_target_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\",\"snapshot_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/iscsi_lun\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n iscsi_lun_api := client.IscsiLun\r\n params := iscsi_lun.NewCloneIscsiLunFromSnapshotParams()\r\n params.RequestBody = []*models.IscsiLunCloneParams{\n{\nIscsiTargetID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\nSnapshotID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := iscsi_lun_api.CloneIscsiLunFromSnapshot(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskIscsiLun) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskIscsiLun)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskIscsiLun) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.IscsiLunApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n IscsiLunApi iscsiLunApi = new IscsiLunApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new IscsiLunCloneParams()\n.iscsiTargetId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\")\n.snapshotId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = iscsiLunApi.cloneIscsiLunFromSnapshot(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/clone-nvmf-namespace-from-snapshot \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"nvmf_subsystem_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\",\"snapshot_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", + "python": "from cloudtower import ApiClient, Configuration, NvmfNamespaceApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n nvmf_namespace_api = NvmfNamespaceApi(client)\r\n resp = nvmf_namespace_api.clone_nvmf_namespace_from_snapshot([{\"nvmf_subsystem_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\",\"snapshot_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/nvmf_namespace\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n nvmf_namespace_api := client.NvmfNamespace\r\n params := nvmf_namespace.NewCloneNvmfNamespaceFromSnapshotParams()\r\n params.RequestBody = []*models.NvmfNamespaceCloneParams{\n{\nNvmfSubsystemID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\nSnapshotID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := nvmf_namespace_api.CloneNvmfNamespaceFromSnapshot(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskNvmfNamespace) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskNvmfNamespace)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskNvmfNamespace) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.NvmfNamespaceApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n NvmfNamespaceApi nvmfNamespaceApi = new NvmfNamespaceApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new NvmfNamespaceCloneParams()\n.nvmfSubsystemId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\")\n.snapshotId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = nvmfNamespaceApi.cloneNvmfNamespaceFromSnapshot(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/rollback-iscsi-lun-from-snapshot": { + "/rollback-nvmf-namespace-from-snapshot": { "exampleValue": [ { - "lun_id": "ck74rk21wg5lz0786opdnzz5m", + "namespace_id": "ck74rk21wg5lz0786opdnzz5m", "snapshot_id": "ck74rk21wg5lz0786opdnzz5m" } ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/rollback-iscsi-lun-from-snapshot \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"lun_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"snapshot_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", - "python": "from cloudtower import ApiClient, Configuration, IscsiLunApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n iscsi_lun_api = IscsiLunApi(client)\r\n resp = iscsi_lun_api.rollback_iscsi_lun_from_snapshot([{\"lun_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"snapshot_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/iscsi_lun\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n iscsi_lun_api := client.IscsiLun\r\n params := iscsi_lun.NewRollbackIscsiLunFromSnapshotParams()\r\n params.RequestBody = []*models.IscsiLunRollbackParams{\n{\nLunID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nSnapshotID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := iscsi_lun_api.RollbackIscsiLunFromSnapshot(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskIscsiLun) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskIscsiLun)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskIscsiLun) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.IscsiLunApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n IscsiLunApi iscsiLunApi = new IscsiLunApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new IscsiLunRollbackParams()\n.lunId(\"ck74rk21wg5lz0786opdnzz5m\")\n.snapshotId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = iscsiLunApi.rollbackIscsiLunFromSnapshot(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" - }, - "/copy-iscsi-lun": { - "exampleValue": [ - { - "name": "name-string", - "src_lun_id": "ck74rk21wg5lz0786opdnzz5m" - } - ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/copy-iscsi-lun \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"name\":\"name-string\",\"src_lun_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", - "python": "from cloudtower import ApiClient, Configuration, IscsiLunApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n iscsi_lun_api = IscsiLunApi(client)\r\n resp = iscsi_lun_api.copy_iscsi_lun([{\"name\":\"name-string\",\"src_lun_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/iscsi_lun\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n iscsi_lun_api := client.IscsiLun\r\n params := iscsi_lun.NewCopyIscsiLunParams()\r\n params.RequestBody = []*models.CopyIscsiLunParams{\n{\nName: pointy.String(\"name-string\"),\nSrcLunID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := iscsi_lun_api.CopyIscsiLun(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskIscsiLun) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskIscsiLun)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskIscsiLun) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.IscsiLunApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n IscsiLunApi iscsiLunApi = new IscsiLunApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new CopyIscsiLunParams()\n.name(\"name-string\")\n.srcLunId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = iscsiLunApi.copyIscsiLun(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/rollback-nvmf-namespace-from-snapshot \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"namespace_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"snapshot_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", + "python": "from cloudtower import ApiClient, Configuration, NvmfNamespaceApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n nvmf_namespace_api = NvmfNamespaceApi(client)\r\n resp = nvmf_namespace_api.rollback_nvmf_namespace_from_snapshot([{\"namespace_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"snapshot_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/nvmf_namespace\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n nvmf_namespace_api := client.NvmfNamespace\r\n params := nvmf_namespace.NewRollbackNvmfNamespaceFromSnapshotParams()\r\n params.RequestBody = []*models.NvmfNamespaceRollbackParams{\n{\nNamespaceID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nSnapshotID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := nvmf_namespace_api.RollbackNvmfNamespaceFromSnapshot(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskNvmfNamespace) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskNvmfNamespace)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskNvmfNamespace) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.NvmfNamespaceApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n NvmfNamespaceApi nvmfNamespaceApi = new NvmfNamespaceApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new NvmfNamespaceRollbackParams()\n.namespaceId(\"ck74rk21wg5lz0786opdnzz5m\")\n.snapshotId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = nvmfNamespaceApi.rollbackNvmfNamespaceFromSnapshot(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/create-iscsi-target": { + "/create-nvmf-subsystem": { "exampleValue": [ { - "stripe_size": 1, - "stripe_num": 1, "replica_num": 1, "thin_provision": true, + "stripe_size": 1, + "stripe_num": 1, + "policy": "BALANCE", "cluster_id": "ck74rk21wg5lz0786opdnzz5m", "name": "name-string" } ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-iscsi-target \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"stripe_size\":1,\"stripe_num\":1,\"replica_num\":1,\"thin_provision\":true,\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", - "python": "from cloudtower import ApiClient, Configuration, IscsiTargetApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n iscsi_target_api = IscsiTargetApi(client)\r\n resp = iscsi_target_api.create_iscsi_target([{\"stripe_size\":1,\"stripe_num\":1,\"replica_num\":1,\"thin_provision\":True,\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/iscsi_target\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n iscsi_target_api := client.IscsiTarget\r\n params := iscsi_target.NewCreateIscsiTargetParams()\r\n params.RequestBody = []*models.IscsiTargetCreationParams{\n{\nStripeSize: pointy.Int64(1),\nStripeNum: pointy.Int32(1),\nReplicaNum: pointy.Int32(1),\nThinProvision: pointy.Bool(true),\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := iscsi_target_api.CreateIscsiTarget(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskIscsiTarget) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskIscsiTarget)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskIscsiTarget) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.IscsiTargetApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n IscsiTargetApi iscsiTargetApi = new IscsiTargetApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new IscsiTargetCreationParams()\n.stripeSize(1L)\n.stripeNum(1)\n.replicaNum(1)\n.thinProvision(true)\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = iscsiTargetApi.createIscsiTarget(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-nvmf-subsystem \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"replica_num\":1,\"thin_provision\":true,\"stripe_size\":1,\"stripe_num\":1,\"policy\":\"BALANCE\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", + "python": "from cloudtower import ApiClient, Configuration, NvmfSubsystemApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n nvmf_subsystem_api = NvmfSubsystemApi(client)\r\n resp = nvmf_subsystem_api.create_nvmf_subsystem([{\"replica_num\":1,\"thin_provision\":True,\"stripe_size\":1,\"stripe_num\":1,\"policy\":\"BALANCE\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/nvmf_subsystem\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n nvmf_subsystem_api := client.NvmfSubsystem\r\n params := nvmf_subsystem.NewCreateNvmfSubsystemParams()\r\n params.RequestBody = []*models.NvmfSubsystemCreationParams{\n{\nReplicaNum: pointy.Int32(1),\nThinProvision: pointy.Bool(true),\nStripeSize: pointy.Int64(1),\nStripeNum: pointy.Int32(1),\nPolicy: models.NvmfSubsystemPolicyTypeBALANCE.Pointer(),\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := nvmf_subsystem_api.CreateNvmfSubsystem(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskNvmfSubsystem) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskNvmfSubsystem)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskNvmfSubsystem) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.NvmfSubsystemApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n NvmfSubsystemApi nvmfSubsystemApi = new NvmfSubsystemApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new NvmfSubsystemCreationParams()\n.replicaNum(1)\n.thinProvision(true)\n.stripeSize(1L)\n.stripeNum(1)\n.policy(NvmfSubsystemPolicyType.fromValue(\"BALANCE\"))\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = nvmfSubsystemApi.createNvmfSubsystem(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-iscsi-target": { + "/update-nvmf-subsystem": { "exampleValue": { "data": {}, "where": { - "id": "IscsiTarget-id" + "id": "NvmfSubsystem-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-iscsi-target \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"IscsiTarget-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, IscsiTargetApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n iscsi_target_api = IscsiTargetApi(client)\r\n resp = iscsi_target_api.update_iscsi_target({\"data\":{},\"where\":{\"id\":\"IscsiTarget-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/iscsi_target\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n iscsi_target_api := client.IscsiTarget\r\n params := iscsi_target.NewUpdateIscsiTargetParams()\r\n params.RequestBody = &models.IscsiTargetUpdationParams{\nData: &models.IscsiTargetCommonParams{\n},\nWhere: &models.IscsiTargetWhereInput{\nID: pointy.String(\"IscsiTarget-id\"),\n},\n}\r\n rawResp, err := iscsi_target_api.UpdateIscsiTarget(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskIscsiTarget) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskIscsiTarget)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskIscsiTarget) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.IscsiTargetApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n IscsiTargetApi iscsiTargetApi = new IscsiTargetApi(client);\r\n IscsiTargetUpdationParams params = new IscsiTargetUpdationParams()\n.data(new IscsiTargetCommonParams())\n.where(new IscsiTargetWhereInput()\n.id(\"IscsiTarget-id\"));\r\n List resp = iscsiTargetApi.updateIscsiTarget(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-nvmf-subsystem \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"NvmfSubsystem-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, NvmfSubsystemApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n nvmf_subsystem_api = NvmfSubsystemApi(client)\r\n resp = nvmf_subsystem_api.update_nvmf_subsystem({\"data\":{},\"where\":{\"id\":\"NvmfSubsystem-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/nvmf_subsystem\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n nvmf_subsystem_api := client.NvmfSubsystem\r\n params := nvmf_subsystem.NewUpdateNvmfSubsystemParams()\r\n params.RequestBody = &models.NvmfSubsystemUpdationParams{\nData: &models.NvmfSubsystemCommonParams{\n},\nWhere: &models.NvmfSubsystemWhereInput{\nID: pointy.String(\"NvmfSubsystem-id\"),\n},\n}\r\n rawResp, err := nvmf_subsystem_api.UpdateNvmfSubsystem(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskNvmfSubsystem) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskNvmfSubsystem)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskNvmfSubsystem) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.NvmfSubsystemApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n NvmfSubsystemApi nvmfSubsystemApi = new NvmfSubsystemApi(client);\r\n NvmfSubsystemUpdationParams params = new NvmfSubsystemUpdationParams()\n.data(new NvmfSubsystemCommonParams())\n.where(new NvmfSubsystemWhereInput()\n.id(\"NvmfSubsystem-id\"));\r\n List resp = nvmfSubsystemApi.updateNvmfSubsystem(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/delete-iscsi-target": { + "/delete-nvmf-subsystem": { "exampleValue": { "where": { - "id": "IscsiTarget-id" + "id": "NvmfSubsystem-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-iscsi-target \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"IscsiTarget-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, IscsiTargetApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n iscsi_target_api = IscsiTargetApi(client)\r\n resp = iscsi_target_api.delete_iscsi_target({\"where\":{\"id\":\"IscsiTarget-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/iscsi_target\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n iscsi_target_api := client.IscsiTarget\r\n params := iscsi_target.NewDeleteIscsiTargetParams()\r\n params.RequestBody = &models.IscsiTargetDeletionParams{\nWhere: &models.IscsiTargetWhereInput{\nID: pointy.String(\"IscsiTarget-id\"),\n},\n}\r\n rawResp, err := iscsi_target_api.DeleteIscsiTarget(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteIscsiTarget) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteIscsiTarget)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteIscsiTarget) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.IscsiTargetApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n IscsiTargetApi iscsiTargetApi = new IscsiTargetApi(client);\r\n IscsiTargetDeletionParams params = new IscsiTargetDeletionParams()\n.where(new IscsiTargetWhereInput()\n.id(\"IscsiTarget-id\"));\r\n List resp = iscsiTargetApi.deleteIscsiTarget(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-nvmf-subsystem \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"NvmfSubsystem-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, NvmfSubsystemApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n nvmf_subsystem_api = NvmfSubsystemApi(client)\r\n resp = nvmf_subsystem_api.delete_nvmf_subsystem({\"where\":{\"id\":\"NvmfSubsystem-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/nvmf_subsystem\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n nvmf_subsystem_api := client.NvmfSubsystem\r\n params := nvmf_subsystem.NewDeleteNvmfSubsystemParams()\r\n params.RequestBody = &models.NvmfSubsystemDeletionParams{\nWhere: &models.NvmfSubsystemWhereInput{\nID: pointy.String(\"NvmfSubsystem-id\"),\n},\n}\r\n rawResp, err := nvmf_subsystem_api.DeleteNvmfSubsystem(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteNvmfSubsystem) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteNvmfSubsystem)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteNvmfSubsystem) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.NvmfSubsystemApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n NvmfSubsystemApi nvmfSubsystemApi = new NvmfSubsystemApi(client);\r\n NvmfSubsystemDeletionParams params = new NvmfSubsystemDeletionParams()\n.where(new NvmfSubsystemWhereInput()\n.id(\"NvmfSubsystem-id\"));\r\n List resp = nvmfSubsystemApi.deleteNvmfSubsystem(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-license": { + "/create-organization": { + "exampleValue": [ + { + "name": "name-string" + } + ], + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-organization \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"name\":\"name-string\"}]'", + "python": "from cloudtower import ApiClient, Configuration, OrganizationApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n organization_api = OrganizationApi(client)\r\n resp = organization_api.create_organization([{\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/organization\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n organization_api := client.Organization\r\n params := organization.NewCreateOrganizationParams()\r\n params.RequestBody = []*models.OrganizationCreationParams{\n{\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := organization_api.CreateOrganization(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskOrganization) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskOrganization)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskOrganization) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.OrganizationApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n OrganizationApi organizationApi = new OrganizationApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new OrganizationCreationParams()\n.name(\"name-string\"));\r\n List resp = organizationApi.createOrganization(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "/update-organization": { "exampleValue": { - "data": { - "license": "license-string" + "data": {}, + "where": { + "id": "Organization-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-license \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"license\":\"license-string\"}}'", - "python": "from cloudtower import ApiClient, Configuration, LicenseApi\r\nfrom cloudtower.utils import login, wait_task\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n license_api = LicenseApi(client)\r\n resp = license_api.update_deploy({\"data\":{\"license\":\"license-string\"}})\r\n wait_task(resp.task_id, client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/license\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n license_api := client.License\r\n params := license.NewUpdateDeployParams()\r\n params.RequestBody = &models.LicenseUpdationParams{\nData: &models.LicenseUpdationParamsData{\nLicense: pointy.String(\"license-string\"),\n},\n}\r\n rawResp, err := license_api.UpdateDeploy(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n err = utils.WaitTask(context.Background(), client, resp.TaskID, 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.LicenseApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n LicenseApi licenseApi = new LicenseApi(client);\r\n LicenseUpdationParams params = new LicenseUpdationParams()\n.data(new LicenseUpdationParamsData()\n.license(\"license-string\"));\r\n WithTaskLicense resp = licenseApi.updateDeploy(params);\r\n TaskUtil.WaitTask(resp.getTaskId(), client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-organization \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Organization-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, OrganizationApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n organization_api = OrganizationApi(client)\r\n resp = organization_api.update_organization({\"data\":{},\"where\":{\"id\":\"Organization-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/organization\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n organization_api := client.Organization\r\n params := organization.NewUpdateOrganizationParams()\r\n params.RequestBody = &models.OrganizationUpdationParams{\nData: &models.OrganizationUpdationParamsData{\n},\nWhere: &models.OrganizationWhereInput{\nID: pointy.String(\"Organization-id\"),\n},\n}\r\n rawResp, err := organization_api.UpdateOrganization(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskOrganization) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskOrganization)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskOrganization) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.OrganizationApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n OrganizationApi organizationApi = new OrganizationApi(client);\r\n OrganizationUpdationParams params = new OrganizationUpdationParams()\n.data(new OrganizationUpdationParamsData())\n.where(new OrganizationWhereInput()\n.id(\"Organization-id\"));\r\n List resp = organizationApi.updateOrganization(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "/delete-organization": { + "exampleValue": { + "where": { + "id": "Organization-id" + } + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-organization \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Organization-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, OrganizationApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n organization_api = OrganizationApi(client)\r\n resp = organization_api.delete_organization({\"where\":{\"id\":\"Organization-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/organization\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n organization_api := client.Organization\r\n params := organization.NewDeleteOrganizationParams()\r\n params.RequestBody = &models.OrganizationDeletionParams{\nWhere: &models.OrganizationWhereInput{\nID: pointy.String(\"Organization-id\"),\n},\n}\r\n rawResp, err := organization_api.DeleteOrganization(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteOrganization) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteOrganization)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteOrganization) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.OrganizationApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n OrganizationApi organizationApi = new OrganizationApi(client);\r\n OrganizationDeletionParams params = new OrganizationDeletionParams()\n.where(new OrganizationWhereInput()\n.id(\"Organization-id\"));\r\n List resp = organizationApi.deleteOrganization(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/create-log-collection": { + "/create-rack-topo": { "exampleValue": [ { - "log_ended_at": "log_ended_at-string", - "log_started_at": "log_started_at-string", "cluster_id": "ck74rk21wg5lz0786opdnzz5m", - "hosts": { - "id": "Host-id" - } + "zone_topo_id": "ck74rk21wg5lz0786opdnzz5m", + "height": 1, + "name": "name-string" } ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-log-collection \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"log_ended_at\":\"log_ended_at-string\",\"log_started_at\":\"log_started_at-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"hosts\":{\"id\":\"Host-id\"}}]'", - "python": "from cloudtower import ApiClient, Configuration, LogCollectionApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n log_collection_api = LogCollectionApi(client)\r\n resp = log_collection_api.create_log_collection([{\"log_ended_at\":\"log_ended_at-string\",\"log_started_at\":\"log_started_at-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"hosts\":{\"id\":\"Host-id\"}}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/log_collection\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n log_collection_api := client.LogCollection\r\n params := log_collection.NewCreateLogCollectionParams()\r\n params.RequestBody = []*models.LogCollectionCreationParams{\n{\nLogEndedAt: pointy.String(\"log_ended_at-string\"),\nLogStartedAt: pointy.String(\"log_started_at-string\"),\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nHosts: &models.HostWhereInput{\nID: pointy.String(\"Host-id\"),\n},\n},\n}\r\n rawResp, err := log_collection_api.CreateLogCollection(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskLogCollection) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskLogCollection)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskLogCollection) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.LogCollectionApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n LogCollectionApi logCollectionApi = new LogCollectionApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new LogCollectionCreationParams()\n.logEndedAt(\"log_ended_at-string\")\n.logStartedAt(\"log_started_at-string\")\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.hosts(new HostWhereInput()\n.id(\"Host-id\")));\r\n List resp = logCollectionApi.createLogCollection(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-rack-topo \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"zone_topo_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"height\":1,\"name\":\"name-string\"}]'", + "python": "from cloudtower import ApiClient, Configuration, RackTopoApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n rack_topo_api = RackTopoApi(client)\r\n resp = rack_topo_api.create_rack_topo([{\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"zone_topo_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"height\":1,\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/rack_topo\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n rack_topo_api := client.RackTopo\r\n params := rack_topo.NewCreateRackTopoParams()\r\n params.RequestBody = []*models.RackTopoCreationParams{\n{\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nZoneTopoID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nHeight: pointy.Int32(1),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := rack_topo_api.CreateRackTopo(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskRackTopo) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskRackTopo)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskRackTopo) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.RackTopoApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n RackTopoApi rackTopoApi = new RackTopoApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new RackTopoCreationParams()\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.zoneTopoId(\"ck74rk21wg5lz0786opdnzz5m\")\n.height(1)\n.name(\"name-string\"));\r\n List resp = rackTopoApi.createRackTopo(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/force-stop-log-collection": { + "/update-rack-topo": { "exampleValue": { + "data": {}, "where": { - "id": "LogCollection-id" + "id": "RackTopo-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/force-stop-log-collection \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"LogCollection-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, LogCollectionApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n log_collection_api = LogCollectionApi(client)\r\n resp = log_collection_api.force_stop_log_collection({\"where\":{\"id\":\"LogCollection-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/log_collection\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n log_collection_api := client.LogCollection\r\n params := log_collection.NewForceStopLogCollectionParams()\r\n params.RequestBody = &models.ForceStopLogCollectionParams{\nWhere: &models.LogCollectionWhereInput{\nID: pointy.String(\"LogCollection-id\"),\n},\n}\r\n rawResp, err := log_collection_api.ForceStopLogCollection(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskLogCollection) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskLogCollection)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskLogCollection) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.LogCollectionApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n LogCollectionApi logCollectionApi = new LogCollectionApi(client);\r\n ForceStopLogCollectionParams params = new ForceStopLogCollectionParams()\n.where(new LogCollectionWhereInput()\n.id(\"LogCollection-id\"));\r\n List resp = logCollectionApi.forceStopLogCollection(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-rack-topo \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"RackTopo-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, RackTopoApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n rack_topo_api = RackTopoApi(client)\r\n resp = rack_topo_api.update_rack_topo({\"data\":{},\"where\":{\"id\":\"RackTopo-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/rack_topo\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n rack_topo_api := client.RackTopo\r\n params := rack_topo.NewUpdateRackTopoParams()\r\n params.RequestBody = &models.RackTopoUpdationParams{\nData: &models.RackTopoUpdationParamsData{\n},\nWhere: &models.RackTopoWhereInput{\nID: pointy.String(\"RackTopo-id\"),\n},\n}\r\n rawResp, err := rack_topo_api.UpdateRackTopo(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskRackTopo) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskRackTopo)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskRackTopo) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.RackTopoApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n RackTopoApi rackTopoApi = new RackTopoApi(client);\r\n RackTopoUpdationParams params = new RackTopoUpdationParams()\n.data(new RackTopoUpdationParamsData())\n.where(new RackTopoWhereInput()\n.id(\"RackTopo-id\"));\r\n List resp = rackTopoApi.updateRackTopo(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/delete-log-collection": { + "/delete-rack-topo": { "exampleValue": { "where": { - "id": "LogCollection-id" + "id": "RackTopo-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-log-collection \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"LogCollection-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, LogCollectionApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n log_collection_api = LogCollectionApi(client)\r\n resp = log_collection_api.delete_log_collection({\"where\":{\"id\":\"LogCollection-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/log_collection\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n log_collection_api := client.LogCollection\r\n params := log_collection.NewDeleteLogCollectionParams()\r\n params.RequestBody = &models.LogCollectionDeletionParams{\nWhere: &models.LogCollectionWhereInput{\nID: pointy.String(\"LogCollection-id\"),\n},\n}\r\n rawResp, err := log_collection_api.DeleteLogCollection(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteLogCollection) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteLogCollection)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteLogCollection) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.LogCollectionApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n LogCollectionApi logCollectionApi = new LogCollectionApi(client);\r\n LogCollectionDeletionParams params = new LogCollectionDeletionParams()\n.where(new LogCollectionWhereInput()\n.id(\"LogCollection-id\"));\r\n List resp = logCollectionApi.deleteLogCollection(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-rack-topo \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"RackTopo-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, RackTopoApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n rack_topo_api = RackTopoApi(client)\r\n resp = rack_topo_api.delete_rack_topo({\"where\":{\"id\":\"RackTopo-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/rack_topo\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n rack_topo_api := client.RackTopo\r\n params := rack_topo.NewDeleteRackTopoParams()\r\n params.RequestBody = &models.RackTopoDeletionParams{\nWhere: &models.RackTopoWhereInput{\nID: pointy.String(\"RackTopo-id\"),\n},\n}\r\n rawResp, err := rack_topo_api.DeleteRackTopo(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteRackTopo) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteRackTopo)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteRackTopo) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.RackTopoApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n RackTopoApi rackTopoApi = new RackTopoApi(client);\r\n RackTopoDeletionParams params = new RackTopoDeletionParams()\n.where(new RackTopoWhereInput()\n.id(\"RackTopo-id\"));\r\n List resp = rackTopoApi.deleteRackTopo(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/create-namespace-group": { - "exampleValue": [ - { - "nvmf_subsystem_id": "ck74rk21wg5lz0786opdnzz5m", - "name": "name-string" + "/update-global-recycle-bin-setting": { + "exampleValue": { + "retain": 1, + "enabled": true + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-global-recycle-bin-setting \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"retain\":1,\"enabled\":true}'", + "python": "from cloudtower import ApiClient, Configuration, GlobalSettingsApi\r\nfrom cloudtower.utils import login, wait_task\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n global_settings_api = GlobalSettingsApi(client)\r\n resp = global_settings_api.update_global_recycle_bin_setting({\"retain\":1,\"enabled\":True})\r\n wait_task(resp.task_id, client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/global_settings\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n global_settings_api := client.GlobalSettings\r\n params := global_settings.NewUpdateGlobalRecycleBinSettingParams()\r\n params.RequestBody = &models.GlobalRecycleBinUpdationParams{\nRetain: pointy.Int32(1),\nEnabled: pointy.Bool(true),\n}\r\n rawResp, err := global_settings_api.UpdateGlobalRecycleBinSetting(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n err = utils.WaitTask(context.Background(), client, resp.TaskID, 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.GlobalSettingsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n GlobalSettingsApi globalSettingsApi = new GlobalSettingsApi(client);\r\n GlobalRecycleBinUpdationParams params = new GlobalRecycleBinUpdationParams()\n.retain(1)\n.enabled(true);\r\n WithTaskGlobalSettings resp = globalSettingsApi.updateGlobalRecycleBinSetting(params);\r\n TaskUtil.WaitTask(resp.getTaskId(), client);\r\n }\r\n}" + }, + "/create-cluster-recycle-bin-setting": { + "exampleValue": { + "data": { + "retain": 1, + "enabled": true + }, + "where": { + "id": "Cluster-id" } - ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-namespace-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"nvmf_subsystem_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", - "python": "from cloudtower import ApiClient, Configuration, NamespaceGroupApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n namespace_group_api = NamespaceGroupApi(client)\r\n resp = namespace_group_api.create_namespace_group([{\"nvmf_subsystem_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/namespace_group\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n namespace_group_api := client.NamespaceGroup\r\n params := namespace_group.NewCreateNamespaceGroupParams()\r\n params.RequestBody = []*models.NamespaceGroupCreationParams{\n{\nNvmfSubsystemID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := namespace_group_api.CreateNamespaceGroup(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskNamespaceGroup) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskNamespaceGroup)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskNamespaceGroup) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.NamespaceGroupApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n NamespaceGroupApi namespaceGroupApi = new NamespaceGroupApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new NamespaceGroupCreationParams()\n.nvmfSubsystemId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = namespaceGroupApi.createNamespaceGroup(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-cluster-recycle-bin-setting \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"retain\":1,\"enabled\":true},\"where\":{\"id\":\"Cluster-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, GlobalSettingsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n global_settings_api = GlobalSettingsApi(client)\r\n resp = global_settings_api.create_cluster_recycle_bin_setting({\"data\":{\"retain\":1,\"enabled\":True},\"where\":{\"id\":\"Cluster-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/global_settings\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n global_settings_api := client.GlobalSettings\r\n params := global_settings.NewCreateClusterRecycleBinSettingParams()\r\n params.RequestBody = &models.ClusterRecycleBinCreationParams{\nData: &models.ClusterRecycleBinCreationParamsData{\nRetain: pointy.Int32(1),\nEnabled: pointy.Bool(true),\n},\nWhere: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\n}\r\n rawResp, err := global_settings_api.CreateClusterRecycleBinSetting(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskClusterSettings) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskClusterSettings)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskClusterSettings) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.GlobalSettingsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n GlobalSettingsApi globalSettingsApi = new GlobalSettingsApi(client);\r\n ClusterRecycleBinCreationParams params = new ClusterRecycleBinCreationParams()\n.data(new ClusterRecycleBinCreationParamsData()\n.retain(1)\n.enabled(true))\n.where(new ClusterWhereInput()\n.id(\"Cluster-id\"));\r\n List resp = globalSettingsApi.createClusterRecycleBinSetting(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-namespace-group": { + "/update-cluster-recycle-bin-setting": { "exampleValue": { - "data": {}, + "data": { + "retain": 1, + "enabled": true + }, "where": { - "id": "NamespaceGroup-id" + "id": "Cluster-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-namespace-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"NamespaceGroup-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, NamespaceGroupApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n namespace_group_api = NamespaceGroupApi(client)\r\n resp = namespace_group_api.update_namespace_group({\"data\":{},\"where\":{\"id\":\"NamespaceGroup-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/namespace_group\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n namespace_group_api := client.NamespaceGroup\r\n params := namespace_group.NewUpdateNamespaceGroupParams()\r\n params.RequestBody = &models.NamespaceGroupUpdationParams{\nData: &models.NamespaceGroupUpdationParamsData{\n},\nWhere: &models.NamespaceGroupWhereInput{\nID: pointy.String(\"NamespaceGroup-id\"),\n},\n}\r\n rawResp, err := namespace_group_api.UpdateNamespaceGroup(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskNamespaceGroup) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskNamespaceGroup)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskNamespaceGroup) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.NamespaceGroupApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n NamespaceGroupApi namespaceGroupApi = new NamespaceGroupApi(client);\r\n NamespaceGroupUpdationParams params = new NamespaceGroupUpdationParams()\n.data(new NamespaceGroupUpdationParamsData())\n.where(new NamespaceGroupWhereInput()\n.id(\"NamespaceGroup-id\"));\r\n List resp = namespaceGroupApi.updateNamespaceGroup(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-cluster-recycle-bin-setting \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"retain\":1,\"enabled\":true},\"where\":{\"id\":\"Cluster-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, GlobalSettingsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n global_settings_api = GlobalSettingsApi(client)\r\n resp = global_settings_api.update_cluster_recycle_bin_setting({\"data\":{\"retain\":1,\"enabled\":True},\"where\":{\"id\":\"Cluster-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/global_settings\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n global_settings_api := client.GlobalSettings\r\n params := global_settings.NewUpdateClusterRecycleBinSettingParams()\r\n params.RequestBody = &models.ClusterRecycleBinUpdationParams{\nData: &models.ClusterRecycleBinUpdationParamsData{\nRetain: pointy.Int32(1),\nEnabled: pointy.Bool(true),\n},\nWhere: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\n}\r\n rawResp, err := global_settings_api.UpdateClusterRecycleBinSetting(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskClusterSettings) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskClusterSettings)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskClusterSettings) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.GlobalSettingsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n GlobalSettingsApi globalSettingsApi = new GlobalSettingsApi(client);\r\n ClusterRecycleBinUpdationParams params = new ClusterRecycleBinUpdationParams()\n.data(new ClusterRecycleBinUpdationParamsData()\n.retain(1)\n.enabled(true))\n.where(new ClusterWhereInput()\n.id(\"Cluster-id\"));\r\n List resp = globalSettingsApi.updateClusterRecycleBinSetting(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/delete-namespace-group": { + "/delete-cluster-recycle-bin-setting": { "exampleValue": { "where": { - "id": "NamespaceGroup-id" + "id": "Cluster-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-namespace-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"NamespaceGroup-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, NamespaceGroupApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n namespace_group_api = NamespaceGroupApi(client)\r\n resp = namespace_group_api.delete_namespace_group({\"where\":{\"id\":\"NamespaceGroup-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/namespace_group\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n namespace_group_api := client.NamespaceGroup\r\n params := namespace_group.NewDeleteNamespaceGroupParams()\r\n params.RequestBody = &models.NamespaceGroupDeletionParams{\nWhere: &models.NamespaceGroupWhereInput{\nID: pointy.String(\"NamespaceGroup-id\"),\n},\n}\r\n rawResp, err := namespace_group_api.DeleteNamespaceGroup(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteNamespaceGroup) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteNamespaceGroup)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteNamespaceGroup) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.NamespaceGroupApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n NamespaceGroupApi namespaceGroupApi = new NamespaceGroupApi(client);\r\n NamespaceGroupDeletionParams params = new NamespaceGroupDeletionParams()\n.where(new NamespaceGroupWhereInput()\n.id(\"NamespaceGroup-id\"));\r\n List resp = namespaceGroupApi.deleteNamespaceGroup(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-cluster-recycle-bin-setting \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Cluster-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, GlobalSettingsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n global_settings_api = GlobalSettingsApi(client)\r\n resp = global_settings_api.delete_cluster_recycle_bin_setting({\"where\":{\"id\":\"Cluster-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/global_settings\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n global_settings_api := client.GlobalSettings\r\n params := global_settings.NewDeleteClusterRecycleBinSettingParams()\r\n params.RequestBody = &models.ClusterRecycleBinDeletionParams{\nWhere: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\n}\r\n rawResp, err := global_settings_api.DeleteClusterRecycleBinSetting(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteClusterRecycleBin) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteClusterRecycleBin)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteClusterRecycleBin) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.GlobalSettingsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n GlobalSettingsApi globalSettingsApi = new GlobalSettingsApi(client);\r\n ClusterRecycleBinDeletionParams params = new ClusterRecycleBinDeletionParams()\n.where(new ClusterWhereInput()\n.id(\"Cluster-id\"));\r\n List resp = globalSettingsApi.deleteClusterRecycleBinSetting(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/create-nfs-export": { + "/create-report-template": { "exampleValue": [ { - "cluster_id": "ck74rk21wg5lz0786opdnzz5m", - "thin_provision": true, - "replica_num": 1, + "resource_meta": [ + { + "type": "ALERT", + "name": "name-string", + "filter": "", + "fields": [ + "-string" + ] + } + ], + "execute_plan": [ + { + "start_at": "start_at-string", + "retain": 1, + "period": "period-string", + "id": "ck74rk21wg5lz0786opdnzz5m", + "enabled": true + } + ], "name": "name-string" } ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-nfs-export \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"thin_provision\":true,\"replica_num\":1,\"name\":\"name-string\"}]'", - "python": "from cloudtower import ApiClient, Configuration, NfsExportApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n nfs_export_api = NfsExportApi(client)\r\n resp = nfs_export_api.create_nfs_export([{\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"thin_provision\":True,\"replica_num\":1,\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/nfs_export\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n nfs_export_api := client.NfsExport\r\n params := nfs_export.NewCreateNfsExportParams()\r\n params.RequestBody = []*models.NfsExportCreationParams{\n{\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nThinProvision: pointy.Bool(true),\nReplicaNum: pointy.Int32(1),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := nfs_export_api.CreateNfsExport(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskNfsExport) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskNfsExport)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskNfsExport) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.NfsExportApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n NfsExportApi nfsExportApi = new NfsExportApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new NfsExportCreationParams()\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.thinProvision(true)\n.replicaNum(1)\n.name(\"name-string\"));\r\n List resp = nfsExportApi.createNfsExport(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-report-template \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"resource_meta\":[{\"type\":\"ALERT\",\"name\":\"name-string\",\"filter\":\"\",\"fields\":[\"-string\"]}],\"execute_plan\":[{\"start_at\":\"start_at-string\",\"retain\":1,\"period\":\"period-string\",\"id\":\"ck74rk21wg5lz0786opdnzz5m\",\"enabled\":true}],\"name\":\"name-string\"}]'", + "python": "from cloudtower import ApiClient, Configuration, ReportTemplateApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n report_template_api = ReportTemplateApi(client)\r\n resp = report_template_api.create_report_template([{\"resource_meta\":[{\"type\":\"ALERT\",\"name\":\"name-string\",\"filter\":\"\",\"fields\":[\"-string\"]}],\"execute_plan\":[{\"start_at\":\"start_at-string\",\"retain\":1,\"period\":\"period-string\",\"id\":\"ck74rk21wg5lz0786opdnzz5m\",\"enabled\":True}],\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/report_template\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n report_template_api := client.ReportTemplate\r\n params := report_template.NewCreateReportTemplateParams()\r\n params.RequestBody = []*models.ReportTemplateCreationParams{\n{\nResourceMeta: []*models.ResourceMeta{\n{\nType: models.ReportResourceInputEnumALERT.Pointer(),\nName: pointy.String(\"name-string\"),\nFilter: interface{}(\"\"),\nFields: []string{\"-string\",\n},\n},\n},\nExecutePlan: []*models.ExecutePlan{\n{\nStartAt: pointy.String(\"start_at-string\"),\nRetain: pointy.Int32(1),\nPeriod: pointy.String(\"period-string\"),\nID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nEnabled: pointy.Bool(true),\n},\n},\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := report_template_api.CreateReportTemplate(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskReportTemplate) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskReportTemplate)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskReportTemplate) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ReportTemplateApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ReportTemplateApi reportTemplateApi = new ReportTemplateApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new ReportTemplateCreationParams()\n.addResourceMetaItem(new ResourceMeta()\n.type(ReportResourceInputEnum.fromValue(\"ALERT\"))\n.name(\"name-string\")\n.filter(new Object())\n.addFieldsItem(\"-string\"))\n.addExecutePlanItem(new ExecutePlan()\n.startAt(\"start_at-string\")\n.retain(1)\n.period(\"period-string\")\n.id(\"ck74rk21wg5lz0786opdnzz5m\")\n.enabled(true))\n.name(\"name-string\"));\r\n List resp = reportTemplateApi.createReportTemplate(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-nfs-export": { + "/update-report-template": { "exampleValue": { + "data": {}, "where": { - "id": "NfsExport-id" + "id": "ReportTemplate-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-nfs-export \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"NfsExport-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, NfsExportApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n nfs_export_api = NfsExportApi(client)\r\n resp = nfs_export_api.update_nfs_export({\"where\":{\"id\":\"NfsExport-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/nfs_export\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n nfs_export_api := client.NfsExport\r\n params := nfs_export.NewUpdateNfsExportParams()\r\n params.RequestBody = &models.NfsExportUpdationParams{\nWhere: &models.NfsExportWhereInput{\nID: pointy.String(\"NfsExport-id\"),\n},\n}\r\n rawResp, err := nfs_export_api.UpdateNfsExport(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskNfsExport) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskNfsExport)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskNfsExport) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.NfsExportApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n NfsExportApi nfsExportApi = new NfsExportApi(client);\r\n NfsExportUpdationParams params = new NfsExportUpdationParams()\n.where(new NfsExportWhereInput()\n.id(\"NfsExport-id\"));\r\n List resp = nfsExportApi.updateNfsExport(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-report-template \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"ReportTemplate-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, ReportTemplateApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n report_template_api = ReportTemplateApi(client)\r\n resp = report_template_api.update_report_template({\"data\":{},\"where\":{\"id\":\"ReportTemplate-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/report_template\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n report_template_api := client.ReportTemplate\r\n params := report_template.NewUpdateReportTemplateParams()\r\n params.RequestBody = &models.ReportTemplateUpdationParams{\nData: &models.ReportTemplateUpdationParamsData{\n},\nWhere: &models.ReportTemplateWhereInput{\nID: pointy.String(\"ReportTemplate-id\"),\n},\n}\r\n rawResp, err := report_template_api.UpdateReportTemplate(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskReportTemplate) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskReportTemplate)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskReportTemplate) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ReportTemplateApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ReportTemplateApi reportTemplateApi = new ReportTemplateApi(client);\r\n ReportTemplateUpdationParams params = new ReportTemplateUpdationParams()\n.data(new ReportTemplateUpdationParamsData())\n.where(new ReportTemplateWhereInput()\n.id(\"ReportTemplate-id\"));\r\n List resp = reportTemplateApi.updateReportTemplate(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/delete-nfs-export": { + "/generate-from-report-template": { "exampleValue": { "where": { - "id": "NfsExport-id" + "id": "ReportTemplate-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-nfs-export \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"NfsExport-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, NfsExportApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n nfs_export_api = NfsExportApi(client)\r\n resp = nfs_export_api.delete_nfs_export({\"where\":{\"id\":\"NfsExport-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/nfs_export\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n nfs_export_api := client.NfsExport\r\n params := nfs_export.NewDeleteNfsExportParams()\r\n params.RequestBody = &models.NfsExportDeletionParams{\nWhere: &models.NfsExportWhereInput{\nID: pointy.String(\"NfsExport-id\"),\n},\n}\r\n rawResp, err := nfs_export_api.DeleteNfsExport(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteNfsExport) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteNfsExport)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteNfsExport) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.NfsExportApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n NfsExportApi nfsExportApi = new NfsExportApi(client);\r\n NfsExportDeletionParams params = new NfsExportDeletionParams()\n.where(new NfsExportWhereInput()\n.id(\"NfsExport-id\"));\r\n List resp = nfsExportApi.deleteNfsExport(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/generate-from-report-template \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"ReportTemplate-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, ReportTemplateApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n report_template_api = ReportTemplateApi(client)\r\n resp = report_template_api.generate_from_report_template({\"where\":{\"id\":\"ReportTemplate-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/report_template\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n report_template_api := client.ReportTemplate\r\n params := report_template.NewGenerateFromReportTemplateParams()\r\n params.RequestBody = &models.ReporteTemplateGenerationParams{\nWhere: &models.ReportTemplateWhereInput{\nID: pointy.String(\"ReportTemplate-id\"),\n},\n}\r\n rawResp, err := report_template_api.GenerateFromReportTemplate(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskReportTask) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskReportTask)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskReportTask) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ReportTemplateApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ReportTemplateApi reportTemplateApi = new ReportTemplateApi(client);\r\n ReporteTemplateGenerationParams params = new ReporteTemplateGenerationParams()\n.where(new ReportTemplateWhereInput()\n.id(\"ReportTemplate-id\"));\r\n List resp = reportTemplateApi.generateFromReportTemplate(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-nic": { + "/delete-report-template": { "exampleValue": { - "data": {}, "where": { - "id": "Nic-id" + "id": "ReportTemplate-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-nic \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Nic-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, NicApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n nic_api = NicApi(client)\r\n resp = nic_api.update_nic({\"data\":{},\"where\":{\"id\":\"Nic-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/nic\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n nic_api := client.Nic\r\n params := nic.NewUpdateNicParams()\r\n params.RequestBody = &models.NicUpdationParams{\nData: &models.NicUpdationParamsData{\n},\nWhere: &models.NicWhereInput{\nID: pointy.String(\"Nic-id\"),\n},\n}\r\n rawResp, err := nic_api.UpdateNic(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskNic) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskNic)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskNic) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.NicApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n NicApi nicApi = new NicApi(client);\r\n NicUpdationParams params = new NicUpdationParams()\n.data(new NicUpdationParamsData())\n.where(new NicWhereInput()\n.id(\"Nic-id\"));\r\n List resp = nicApi.updateNic(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-report-template \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"ReportTemplate-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, ReportTemplateApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n report_template_api = ReportTemplateApi(client)\r\n resp = report_template_api.delete_report_template({\"where\":{\"id\":\"ReportTemplate-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/report_template\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n report_template_api := client.ReportTemplate\r\n params := report_template.NewDeleteReportTemplateParams()\r\n params.RequestBody = &models.ReportTemplateDeletionParams{\nWhere: &models.ReportTemplateWhereInput{\nID: pointy.String(\"ReportTemplate-id\"),\n},\n}\r\n rawResp, err := report_template_api.DeleteReportTemplate(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteReportTemplate) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteReportTemplate)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteReportTemplate) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ReportTemplateApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ReportTemplateApi reportTemplateApi = new ReportTemplateApi(client);\r\n ReportTemplateDeletionParams params = new ReportTemplateDeletionParams()\n.where(new ReportTemplateWhereInput()\n.id(\"ReportTemplate-id\"));\r\n List resp = reportTemplateApi.deleteReportTemplate(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/move-node-topo": { + "/create-role": { "exampleValue": [ { - "data": {}, - "where": { - "id": "NodeTopo-id" - } + "actions": [ + "*" + ], + "name": "name-string" } ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/move-node-topo \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"data\":{},\"where\":{\"id\":\"NodeTopo-id\"}}]'", - "python": "from cloudtower import ApiClient, Configuration, NodeTopoApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n node_topo_api = NodeTopoApi(client)\r\n resp = node_topo_api.update_node_topo([{\"data\":{},\"where\":{\"id\":\"NodeTopo-id\"}}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/node_topo\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n node_topo_api := client.NodeTopo\r\n params := node_topo.NewUpdateNodeTopoParams()\r\n params.RequestBody = []*models.NodeTopUpdationParam{\n{\nData: &models.NodeTopoUpdationParamsData{\n},\nWhere: &models.NodeTopoWhereUniqueInput{\nID: pointy.String(\"NodeTopo-id\"),\n},\n},\n}\r\n rawResp, err := node_topo_api.UpdateNodeTopo(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskNodeTopo) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskNodeTopo)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskNodeTopo) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.NodeTopoApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n NodeTopoApi nodeTopoApi = new NodeTopoApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new NodeTopUpdationParam()\n.data(new NodeTopoUpdationParamsData())\n.where(new NodeTopoWhereUniqueInput()\n.id(\"NodeTopo-id\")));\r\n List resp = nodeTopoApi.updateNodeTopo(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-role \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"actions\":[\"*\"],\"name\":\"name-string\"}]'", + "python": "from cloudtower import ApiClient, Configuration, UserRoleNextApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n user_role_next_api = UserRoleNextApi(client)\r\n resp = user_role_next_api.create_role([{\"actions\":[\"*\"],\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/user_role_next\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n user_role_next_api := client.UserRoleNext\r\n params := user_role_next.NewCreateRoleParams()\r\n params.RequestBody = []*models.RoleCreationParams{\n{\nActions: []*models.RoleAction{\nmodels.RoleAction*.Pointer(),\n},\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := user_role_next_api.CreateRole(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskUserRoleNext) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskUserRoleNext)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskUserRoleNext) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.UserRoleNextApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n UserRoleNextApi userRoleNextApi = new UserRoleNextApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new RoleCreationParams()\n.addActionsItem(RoleAction.fromValue(\"*\"))\n.name(\"name-string\"));\r\n List resp = userRoleNextApi.createRole(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/create-nvmf-namespace-snapshot": { - "exampleValue": [ - { - "nvmf_subsystem_id": "ck74rk21wg5lz0786opdnzz5m", - "name": "name-string", - "nvmf_namespace_id": "ck74rk21wg5lz0786opdnzz5m" + "/update-role": { + "exampleValue": { + "data": {}, + "where": { + "id": "UserRoleNext-id" } - ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-nvmf-namespace-snapshot \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"nvmf_subsystem_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\",\"nvmf_namespace_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", - "python": "from cloudtower import ApiClient, Configuration, NvmfNamespaceSnapshotApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n nvmf_namespace_snapshot_api = NvmfNamespaceSnapshotApi(client)\r\n resp = nvmf_namespace_snapshot_api.create_nvmf_namespace_snapshot([{\"nvmf_subsystem_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\",\"nvmf_namespace_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/nvmf_namespace_snapshot\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n nvmf_namespace_snapshot_api := client.NvmfNamespaceSnapshot\r\n params := nvmf_namespace_snapshot.NewCreateNvmfNamespaceSnapshotParams()\r\n params.RequestBody = []*models.NvmfNamespaceSnapshotCreationParams{\n{\nNvmfSubsystemID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\nNvmfNamespaceID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := nvmf_namespace_snapshot_api.CreateNvmfNamespaceSnapshot(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskNvmfNamespaceSnapshot) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskNvmfNamespaceSnapshot)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskNvmfNamespaceSnapshot) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.NvmfNamespaceSnapshotApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n NvmfNamespaceSnapshotApi nvmfNamespaceSnapshotApi = new NvmfNamespaceSnapshotApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new NvmfNamespaceSnapshotCreationParams()\n.nvmfSubsystemId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\")\n.nvmfNamespaceId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = nvmfNamespaceSnapshotApi.createNvmfNamespaceSnapshot(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-role \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"UserRoleNext-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, UserRoleNextApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n user_role_next_api = UserRoleNextApi(client)\r\n resp = user_role_next_api.update_role({\"data\":{},\"where\":{\"id\":\"UserRoleNext-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/user_role_next\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n user_role_next_api := client.UserRoleNext\r\n params := user_role_next.NewUpdateRoleParams()\r\n params.RequestBody = &models.RoleUpdationParams{\nData: &models.RoleUpdationParamsData{\n},\nWhere: &models.UserRoleNextWhereInput{\nID: pointy.String(\"UserRoleNext-id\"),\n},\n}\r\n rawResp, err := user_role_next_api.UpdateRole(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskUserRoleNext) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskUserRoleNext)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskUserRoleNext) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.UserRoleNextApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n UserRoleNextApi userRoleNextApi = new UserRoleNextApi(client);\r\n RoleUpdationParams params = new RoleUpdationParams()\n.data(new RoleUpdationParamsData())\n.where(new UserRoleNextWhereInput()\n.id(\"UserRoleNext-id\"));\r\n List resp = userRoleNextApi.updateRole(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/delete-nvmf-namespace-snapshot": { + "/delete-role": { "exampleValue": { "where": { - "id": "NvmfNamespaceSnapshot-id" + "id": "UserRoleNext-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-nvmf-namespace-snapshot \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"NvmfNamespaceSnapshot-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, NvmfNamespaceSnapshotApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n nvmf_namespace_snapshot_api = NvmfNamespaceSnapshotApi(client)\r\n resp = nvmf_namespace_snapshot_api.delete_nvmf_namespace_snapshot({\"where\":{\"id\":\"NvmfNamespaceSnapshot-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/nvmf_namespace_snapshot\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n nvmf_namespace_snapshot_api := client.NvmfNamespaceSnapshot\r\n params := nvmf_namespace_snapshot.NewDeleteNvmfNamespaceSnapshotParams()\r\n params.RequestBody = &models.NvmfNamespaceSnapshotDeletionParams{\nWhere: &models.NvmfNamespaceSnapshotWhereInput{\nID: pointy.String(\"NvmfNamespaceSnapshot-id\"),\n},\n}\r\n rawResp, err := nvmf_namespace_snapshot_api.DeleteNvmfNamespaceSnapshot(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteNvmfNamespaceSnapshot) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteNvmfNamespaceSnapshot)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteNvmfNamespaceSnapshot) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.NvmfNamespaceSnapshotApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n NvmfNamespaceSnapshotApi nvmfNamespaceSnapshotApi = new NvmfNamespaceSnapshotApi(client);\r\n NvmfNamespaceSnapshotDeletionParams params = new NvmfNamespaceSnapshotDeletionParams()\n.where(new NvmfNamespaceSnapshotWhereInput()\n.id(\"NvmfNamespaceSnapshot-id\"));\r\n List resp = nvmfNamespaceSnapshotApi.deleteNvmfNamespaceSnapshot(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-role \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"UserRoleNext-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, UserRoleNextApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n user_role_next_api = UserRoleNextApi(client)\r\n resp = user_role_next_api.delete_role({\"where\":{\"id\":\"UserRoleNext-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/user_role_next\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n user_role_next_api := client.UserRoleNext\r\n params := user_role_next.NewDeleteRoleParams()\r\n params.RequestBody = &models.RoleDeletionParams{\nWhere: &models.UserRoleNextWhereInput{\nID: pointy.String(\"UserRoleNext-id\"),\n},\n}\r\n rawResp, err := user_role_next_api.DeleteRole(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteRole) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteRole)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteRole) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.UserRoleNextApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n UserRoleNextApi userRoleNextApi = new UserRoleNextApi(client);\r\n RoleDeletionParams params = new RoleDeletionParams()\n.where(new UserRoleNextWhereInput()\n.id(\"UserRoleNext-id\"));\r\n List resp = userRoleNextApi.deleteRole(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/create-nvmf-namespace": { - "exampleValue": [ - { - "assigned_size": 1, - "replica_num": 1, - "nvmf_subsystem_id": "ck74rk21wg5lz0786opdnzz5m", - "name": "name-string" + "/create-security-group": { + "exampleValue": { + "everoute_cluster_id": "ck74rk21wg5lz0786opdnzz5m", + "name": "name-string" + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-security-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"everoute_cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}'", + "python": "from cloudtower import ApiClient, Configuration, SecurityGroupApi\r\nfrom cloudtower.utils import login, wait_task\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n security_group_api = SecurityGroupApi(client)\r\n resp = security_group_api.create_security_group({\"everoute_cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"})\r\n wait_task(resp.task_id, client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/security_group\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n security_group_api := client.SecurityGroup\r\n params := security_group.NewCreateSecurityGroupParams()\r\n params.RequestBody = &models.SecurityGroupCreateParams{\nEverouteClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n}\r\n rawResp, err := security_group_api.CreateSecurityGroup(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n err = utils.WaitTask(context.Background(), client, resp.TaskID, 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SecurityGroupApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SecurityGroupApi securityGroupApi = new SecurityGroupApi(client);\r\n SecurityGroupCreateParams params = new SecurityGroupCreateParams()\n.everouteClusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\");\r\n WithTaskSecurityGroup resp = securityGroupApi.createSecurityGroup(params);\r\n TaskUtil.WaitTask(resp.getTaskId(), client);\r\n }\r\n}" + }, + "/delete-security-group": { + "exampleValue": { + "where": { + "id": "SecurityGroup-id" } - ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-nvmf-namespace \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"assigned_size\":1,\"replica_num\":1,\"nvmf_subsystem_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", - "python": "from cloudtower import ApiClient, Configuration, NvmfNamespaceApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n nvmf_namespace_api = NvmfNamespaceApi(client)\r\n resp = nvmf_namespace_api.create_nvmf_namespace([{\"assigned_size\":1,\"replica_num\":1,\"nvmf_subsystem_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/nvmf_namespace\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n nvmf_namespace_api := client.NvmfNamespace\r\n params := nvmf_namespace.NewCreateNvmfNamespaceParams()\r\n params.RequestBody = []*models.NvmfNamespaceCreationParams{\n{\nAssignedSize: pointy.Int64(1),\nReplicaNum: pointy.Int32(1),\nNvmfSubsystemID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := nvmf_namespace_api.CreateNvmfNamespace(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskNvmfNamespace) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskNvmfNamespace)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskNvmfNamespace) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.NvmfNamespaceApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n NvmfNamespaceApi nvmfNamespaceApi = new NvmfNamespaceApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new NvmfNamespaceCreationParams()\n.assignedSize(1L)\n.replicaNum(1)\n.nvmfSubsystemId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = nvmfNamespaceApi.createNvmfNamespace(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-security-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"SecurityGroup-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, SecurityGroupApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n security_group_api = SecurityGroupApi(client)\r\n resp = security_group_api.delete_security_group({\"where\":{\"id\":\"SecurityGroup-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/security_group\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n security_group_api := client.SecurityGroup\r\n params := security_group.NewDeleteSecurityGroupParams()\r\n params.RequestBody = &models.SecurityGroupDeleteParams{\nWhere: &models.SecurityGroupWhereInput{\nID: pointy.String(\"SecurityGroup-id\"),\n},\n}\r\n rawResp, err := security_group_api.DeleteSecurityGroup(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteSecurityGroup) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteSecurityGroup)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteSecurityGroup) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SecurityGroupApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SecurityGroupApi securityGroupApi = new SecurityGroupApi(client);\r\n SecurityGroupDeleteParams params = new SecurityGroupDeleteParams()\n.where(new SecurityGroupWhereInput()\n.id(\"SecurityGroup-id\"));\r\n List resp = securityGroupApi.deleteSecurityGroup(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-nvmf-namespace": { + "/update-security-group": { "exampleValue": { "data": {}, "where": { - "id": "NvmfNamespace-id" + "id": "SecurityGroup-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-nvmf-namespace \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"NvmfNamespace-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, NvmfNamespaceApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n nvmf_namespace_api = NvmfNamespaceApi(client)\r\n resp = nvmf_namespace_api.update_nvmf_namespace({\"data\":{},\"where\":{\"id\":\"NvmfNamespace-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/nvmf_namespace\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n nvmf_namespace_api := client.NvmfNamespace\r\n params := nvmf_namespace.NewUpdateNvmfNamespaceParams()\r\n params.RequestBody = &models.NvmfNamespaceUpdationParams{\nData: &models.NvmfNamespaceUpdationParamsData{\n},\nWhere: &models.NvmfNamespaceWhereInput{\nID: pointy.String(\"NvmfNamespace-id\"),\n},\n}\r\n rawResp, err := nvmf_namespace_api.UpdateNvmfNamespace(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskNvmfNamespace) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskNvmfNamespace)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskNvmfNamespace) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.NvmfNamespaceApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n NvmfNamespaceApi nvmfNamespaceApi = new NvmfNamespaceApi(client);\r\n NvmfNamespaceUpdationParams params = new NvmfNamespaceUpdationParams()\n.data(new NvmfNamespaceUpdationParamsData())\n.where(new NvmfNamespaceWhereInput()\n.id(\"NvmfNamespace-id\"));\r\n List resp = nvmfNamespaceApi.updateNvmfNamespace(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-security-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"SecurityGroup-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, SecurityGroupApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n security_group_api = SecurityGroupApi(client)\r\n resp = security_group_api.update_security_group({\"data\":{},\"where\":{\"id\":\"SecurityGroup-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/security_group\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n security_group_api := client.SecurityGroup\r\n params := security_group.NewUpdateSecurityGroupParams()\r\n params.RequestBody = &models.SecurityGroupUpdateBody{\nData: &models.SecurityGroupUpdateParams{\n},\nWhere: &models.SecurityGroupWhereInput{\nID: pointy.String(\"SecurityGroup-id\"),\n},\n}\r\n rawResp, err := security_group_api.UpdateSecurityGroup(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskSecurityGroup) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskSecurityGroup)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskSecurityGroup) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SecurityGroupApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SecurityGroupApi securityGroupApi = new SecurityGroupApi(client);\r\n SecurityGroupUpdateBody params = new SecurityGroupUpdateBody()\n.data(new SecurityGroupUpdateParams())\n.where(new SecurityGroupWhereInput()\n.id(\"SecurityGroup-id\"));\r\n List resp = securityGroupApi.updateSecurityGroup(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/delete-nvmf-namespace": { + "/create-security-policy": { + "exampleValue": { + "everoute_cluster_id": "ck74rk21wg5lz0786opdnzz5m", + "name": "name-string" + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-security-policy \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"everoute_cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}'", + "python": "from cloudtower import ApiClient, Configuration, SecurityPolicyApi\r\nfrom cloudtower.utils import login, wait_task\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n security_policy_api = SecurityPolicyApi(client)\r\n resp = security_policy_api.create_security_policy({\"everoute_cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"})\r\n wait_task(resp.task_id, client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/security_policy\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n security_policy_api := client.SecurityPolicy\r\n params := security_policy.NewCreateSecurityPolicyParams()\r\n params.RequestBody = &models.SecurityPolicyCreateParams{\nEverouteClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n}\r\n rawResp, err := security_policy_api.CreateSecurityPolicy(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n err = utils.WaitTask(context.Background(), client, resp.TaskID, 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SecurityPolicyApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SecurityPolicyApi securityPolicyApi = new SecurityPolicyApi(client);\r\n SecurityPolicyCreateParams params = new SecurityPolicyCreateParams()\n.everouteClusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\");\r\n WithTaskSecurityPolicy resp = securityPolicyApi.createSecurityPolicy(params);\r\n TaskUtil.WaitTask(resp.getTaskId(), client);\r\n }\r\n}" + }, + "/delete-security-policy": { "exampleValue": { - "data": { - "remove_snapshot": true - }, "where": { - "id": "NvmfNamespace-id" + "id": "SecurityPolicy-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-nvmf-namespace \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"remove_snapshot\":true},\"where\":{\"id\":\"NvmfNamespace-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, NvmfNamespaceApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n nvmf_namespace_api = NvmfNamespaceApi(client)\r\n resp = nvmf_namespace_api.delete_nvmf_namespace({\"data\":{\"remove_snapshot\":True},\"where\":{\"id\":\"NvmfNamespace-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/nvmf_namespace\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n nvmf_namespace_api := client.NvmfNamespace\r\n params := nvmf_namespace.NewDeleteNvmfNamespaceParams()\r\n params.RequestBody = &models.NvmfNamespaceDeletionParams{\nData: &models.NvmfNamespaceDeletionParamsData{\nRemoveSnapshot: pointy.Bool(true),\n},\nWhere: &models.NvmfNamespaceWhereInput{\nID: pointy.String(\"NvmfNamespace-id\"),\n},\n}\r\n rawResp, err := nvmf_namespace_api.DeleteNvmfNamespace(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteNvmfNamespace) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteNvmfNamespace)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteNvmfNamespace) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.NvmfNamespaceApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n NvmfNamespaceApi nvmfNamespaceApi = new NvmfNamespaceApi(client);\r\n NvmfNamespaceDeletionParams params = new NvmfNamespaceDeletionParams()\n.data(new NvmfNamespaceDeletionParamsData()\n.removeSnapshot(true))\n.where(new NvmfNamespaceWhereInput()\n.id(\"NvmfNamespace-id\"));\r\n List resp = nvmfNamespaceApi.deleteNvmfNamespace(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-security-policy \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"SecurityPolicy-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, SecurityPolicyApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n security_policy_api = SecurityPolicyApi(client)\r\n resp = security_policy_api.delete_security_policy({\"where\":{\"id\":\"SecurityPolicy-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/security_policy\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n security_policy_api := client.SecurityPolicy\r\n params := security_policy.NewDeleteSecurityPolicyParams()\r\n params.RequestBody = &models.SecurityPolicyDeleteParams{\nWhere: &models.SecurityPolicyWhereInput{\nID: pointy.String(\"SecurityPolicy-id\"),\n},\n}\r\n rawResp, err := security_policy_api.DeleteSecurityPolicy(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteSecurityPolicy) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteSecurityPolicy)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteSecurityPolicy) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SecurityPolicyApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SecurityPolicyApi securityPolicyApi = new SecurityPolicyApi(client);\r\n SecurityPolicyDeleteParams params = new SecurityPolicyDeleteParams()\n.where(new SecurityPolicyWhereInput()\n.id(\"SecurityPolicy-id\"));\r\n List resp = securityPolicyApi.deleteSecurityPolicy(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/clone-nvmf-namespace-from-snapshot": { - "exampleValue": [ - { - "nvmf_subsystem_id": "ck74rk21wg5lz0786opdnzz5m", - "name": "name-string", - "snapshot_id": "ck74rk21wg5lz0786opdnzz5m" + "/update-security-policy": { + "exampleValue": { + "data": {}, + "where": { + "id": "SecurityPolicy-id" } - ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/clone-nvmf-namespace-from-snapshot \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"nvmf_subsystem_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\",\"snapshot_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", - "python": "from cloudtower import ApiClient, Configuration, NvmfNamespaceApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n nvmf_namespace_api = NvmfNamespaceApi(client)\r\n resp = nvmf_namespace_api.clone_nvmf_namespace_from_snapshot([{\"nvmf_subsystem_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\",\"snapshot_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/nvmf_namespace\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n nvmf_namespace_api := client.NvmfNamespace\r\n params := nvmf_namespace.NewCloneNvmfNamespaceFromSnapshotParams()\r\n params.RequestBody = []*models.NvmfNamespaceCloneParams{\n{\nNvmfSubsystemID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\nSnapshotID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := nvmf_namespace_api.CloneNvmfNamespaceFromSnapshot(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskNvmfNamespace) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskNvmfNamespace)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskNvmfNamespace) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.NvmfNamespaceApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n NvmfNamespaceApi nvmfNamespaceApi = new NvmfNamespaceApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new NvmfNamespaceCloneParams()\n.nvmfSubsystemId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\")\n.snapshotId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = nvmfNamespaceApi.cloneNvmfNamespaceFromSnapshot(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-security-policy \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"SecurityPolicy-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, SecurityPolicyApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n security_policy_api = SecurityPolicyApi(client)\r\n resp = security_policy_api.update_security_policy({\"data\":{},\"where\":{\"id\":\"SecurityPolicy-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/security_policy\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n security_policy_api := client.SecurityPolicy\r\n params := security_policy.NewUpdateSecurityPolicyParams()\r\n params.RequestBody = &models.SecurityPolicyUpdateBody{\nData: &models.SecurityPolicyUpdateParams{\n},\nWhere: &models.SecurityPolicyWhereInput{\nID: pointy.String(\"SecurityPolicy-id\"),\n},\n}\r\n rawResp, err := security_policy_api.UpdateSecurityPolicy(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskSecurityPolicy) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskSecurityPolicy)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskSecurityPolicy) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SecurityPolicyApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SecurityPolicyApi securityPolicyApi = new SecurityPolicyApi(client);\r\n SecurityPolicyUpdateBody params = new SecurityPolicyUpdateBody()\n.data(new SecurityPolicyUpdateParams())\n.where(new SecurityPolicyWhereInput()\n.id(\"SecurityPolicy-id\"));\r\n List resp = securityPolicyApi.updateSecurityPolicy(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/rollback-nvmf-namespace-from-snapshot": { - "exampleValue": [ - { - "namespace_id": "ck74rk21wg5lz0786opdnzz5m", - "snapshot_id": "ck74rk21wg5lz0786opdnzz5m" - } - ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/rollback-nvmf-namespace-from-snapshot \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"namespace_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"snapshot_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", - "python": "from cloudtower import ApiClient, Configuration, NvmfNamespaceApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n nvmf_namespace_api = NvmfNamespaceApi(client)\r\n resp = nvmf_namespace_api.rollback_nvmf_namespace_from_snapshot([{\"namespace_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"snapshot_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/nvmf_namespace\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n nvmf_namespace_api := client.NvmfNamespace\r\n params := nvmf_namespace.NewRollbackNvmfNamespaceFromSnapshotParams()\r\n params.RequestBody = []*models.NvmfNamespaceRollbackParams{\n{\nNamespaceID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nSnapshotID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := nvmf_namespace_api.RollbackNvmfNamespaceFromSnapshot(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskNvmfNamespace) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskNvmfNamespace)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskNvmfNamespace) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.NvmfNamespaceApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n NvmfNamespaceApi nvmfNamespaceApi = new NvmfNamespaceApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new NvmfNamespaceRollbackParams()\n.namespaceId(\"ck74rk21wg5lz0786opdnzz5m\")\n.snapshotId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = nvmfNamespaceApi.rollbackNvmfNamespaceFromSnapshot(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "/update-password-security": { + "exampleValue": {}, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-password-security \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{}'", + "python": "from cloudtower import ApiClient, Configuration, GlobalSettingsApi\r\nfrom cloudtower.utils import login, wait_task\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n global_settings_api = GlobalSettingsApi(client)\r\n resp = global_settings_api.update_password_security({})\r\n wait_task(resp.task_id, client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/global_settings\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n global_settings_api := client.GlobalSettings\r\n params := global_settings.NewUpdatePasswordSecurityParams()\r\n params.RequestBody = &models.UpdatePassrodSecurityParams{\n}\r\n rawResp, err := global_settings_api.UpdatePasswordSecurity(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n err = utils.WaitTask(context.Background(), client, resp.TaskID, 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.GlobalSettingsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n GlobalSettingsApi globalSettingsApi = new GlobalSettingsApi(client);\r\n UpdatePassrodSecurityParams params = new UpdatePassrodSecurityParams();\r\n WithTaskGlobalSettings resp = globalSettingsApi.updatePasswordSecurity(params);\r\n TaskUtil.WaitTask(resp.getTaskId(), client);\r\n }\r\n}" }, - "/create-nvmf-subsystem": { - "exampleValue": [ - { - "replica_num": 1, - "thin_provision": true, - "stripe_size": 1, - "stripe_num": 1, - "policy": "BALANCE", - "cluster_id": "ck74rk21wg5lz0786opdnzz5m", - "name": "name-string" - } - ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-nvmf-subsystem \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"replica_num\":1,\"thin_provision\":true,\"stripe_size\":1,\"stripe_num\":1,\"policy\":\"BALANCE\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", - "python": "from cloudtower import ApiClient, Configuration, NvmfSubsystemApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n nvmf_subsystem_api = NvmfSubsystemApi(client)\r\n resp = nvmf_subsystem_api.create_nvmf_subsystem([{\"replica_num\":1,\"thin_provision\":True,\"stripe_size\":1,\"stripe_num\":1,\"policy\":\"BALANCE\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/nvmf_subsystem\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n nvmf_subsystem_api := client.NvmfSubsystem\r\n params := nvmf_subsystem.NewCreateNvmfSubsystemParams()\r\n params.RequestBody = []*models.NvmfSubsystemCreationParams{\n{\nReplicaNum: pointy.Int32(1),\nThinProvision: pointy.Bool(true),\nStripeSize: pointy.Int64(1),\nStripeNum: pointy.Int32(1),\nPolicy: models.NvmfSubsystemPolicyTypeBALANCE.Pointer(),\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := nvmf_subsystem_api.CreateNvmfSubsystem(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskNvmfSubsystem) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskNvmfSubsystem)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskNvmfSubsystem) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.NvmfSubsystemApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n NvmfSubsystemApi nvmfSubsystemApi = new NvmfSubsystemApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new NvmfSubsystemCreationParams()\n.replicaNum(1)\n.thinProvision(true)\n.stripeSize(1L)\n.stripeNum(1)\n.policy(NvmfSubsystemPolicyType.fromValue(\"BALANCE\"))\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = nvmfSubsystemApi.createNvmfSubsystem(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "/update-access-restriction": { + "exampleValue": { + "access_list": [ + "-string" + ], + "access_mode": "ALLOW" + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-access-restriction \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"access_list\":[\"-string\"],\"access_mode\":\"ALLOW\"}'", + "python": "from cloudtower import ApiClient, Configuration, GlobalSettingsApi\r\nfrom cloudtower.utils import login, wait_task\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n global_settings_api = GlobalSettingsApi(client)\r\n resp = global_settings_api.update_access_restriction({\"access_list\":[\"-string\"],\"access_mode\":\"ALLOW\"})\r\n wait_task(resp.task_id, client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/global_settings\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n global_settings_api := client.GlobalSettings\r\n params := global_settings.NewUpdateAccessRestrictionParams()\r\n params.RequestBody = &models.UpdateAccessRestrictionParams{\nAccessList: []string{\"-string\",\n},\nAccessMode: models.AccessModeALLOW.Pointer(),\n}\r\n rawResp, err := global_settings_api.UpdateAccessRestriction(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n err = utils.WaitTask(context.Background(), client, resp.TaskID, 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.GlobalSettingsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n GlobalSettingsApi globalSettingsApi = new GlobalSettingsApi(client);\r\n UpdateAccessRestrictionParams params = new UpdateAccessRestrictionParams()\n.addAccessListItem(\"-string\")\n.accessMode(AccessMode.fromValue(\"ALLOW\"));\r\n WithTaskGlobalSettings resp = globalSettingsApi.updateAccessRestriction(params);\r\n TaskUtil.WaitTask(resp.getTaskId(), client);\r\n }\r\n}" }, - "/update-nvmf-subsystem": { + "/update-session-timeout": { "exampleValue": { - "data": {}, - "where": { - "id": "NvmfSubsystem-id" - } + "session_max_age": 1 }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-nvmf-subsystem \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"NvmfSubsystem-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, NvmfSubsystemApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n nvmf_subsystem_api = NvmfSubsystemApi(client)\r\n resp = nvmf_subsystem_api.update_nvmf_subsystem({\"data\":{},\"where\":{\"id\":\"NvmfSubsystem-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/nvmf_subsystem\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n nvmf_subsystem_api := client.NvmfSubsystem\r\n params := nvmf_subsystem.NewUpdateNvmfSubsystemParams()\r\n params.RequestBody = &models.NvmfSubsystemUpdationParams{\nData: &models.NvmfSubsystemCommonParams{\n},\nWhere: &models.NvmfSubsystemWhereInput{\nID: pointy.String(\"NvmfSubsystem-id\"),\n},\n}\r\n rawResp, err := nvmf_subsystem_api.UpdateNvmfSubsystem(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskNvmfSubsystem) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskNvmfSubsystem)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskNvmfSubsystem) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.NvmfSubsystemApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n NvmfSubsystemApi nvmfSubsystemApi = new NvmfSubsystemApi(client);\r\n NvmfSubsystemUpdationParams params = new NvmfSubsystemUpdationParams()\n.data(new NvmfSubsystemCommonParams())\n.where(new NvmfSubsystemWhereInput()\n.id(\"NvmfSubsystem-id\"));\r\n List resp = nvmfSubsystemApi.updateNvmfSubsystem(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-session-timeout \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"session_max_age\":1}'", + "python": "from cloudtower import ApiClient, Configuration, GlobalSettingsApi\r\nfrom cloudtower.utils import login, wait_task\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n global_settings_api = GlobalSettingsApi(client)\r\n resp = global_settings_api.update_session_timeout({\"session_max_age\":1})\r\n wait_task(resp.task_id, client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/global_settings\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n global_settings_api := client.GlobalSettings\r\n params := global_settings.NewUpdateSessionTimeoutParams()\r\n params.RequestBody = &models.UpdateSessionTimeoutParams{\nSessionMaxAge: pointy.Int32(1),\n}\r\n rawResp, err := global_settings_api.UpdateSessionTimeout(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n err = utils.WaitTask(context.Background(), client, resp.TaskID, 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.GlobalSettingsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n GlobalSettingsApi globalSettingsApi = new GlobalSettingsApi(client);\r\n UpdateSessionTimeoutParams params = new UpdateSessionTimeoutParams()\n.sessionMaxAge(1);\r\n WithTaskGlobalSettings resp = globalSettingsApi.updateSessionTimeout(params);\r\n TaskUtil.WaitTask(resp.getTaskId(), client);\r\n }\r\n}" }, - "/delete-nvmf-subsystem": { + "/rollback-snapshot-group": { "exampleValue": { "where": { - "id": "NvmfSubsystem-id" + "id": "SnapshotGroup-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-nvmf-subsystem \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"NvmfSubsystem-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, NvmfSubsystemApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n nvmf_subsystem_api = NvmfSubsystemApi(client)\r\n resp = nvmf_subsystem_api.delete_nvmf_subsystem({\"where\":{\"id\":\"NvmfSubsystem-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/nvmf_subsystem\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n nvmf_subsystem_api := client.NvmfSubsystem\r\n params := nvmf_subsystem.NewDeleteNvmfSubsystemParams()\r\n params.RequestBody = &models.NvmfSubsystemDeletionParams{\nWhere: &models.NvmfSubsystemWhereInput{\nID: pointy.String(\"NvmfSubsystem-id\"),\n},\n}\r\n rawResp, err := nvmf_subsystem_api.DeleteNvmfSubsystem(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteNvmfSubsystem) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteNvmfSubsystem)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteNvmfSubsystem) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.NvmfSubsystemApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n NvmfSubsystemApi nvmfSubsystemApi = new NvmfSubsystemApi(client);\r\n NvmfSubsystemDeletionParams params = new NvmfSubsystemDeletionParams()\n.where(new NvmfSubsystemWhereInput()\n.id(\"NvmfSubsystem-id\"));\r\n List resp = nvmfSubsystemApi.deleteNvmfSubsystem(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/rollback-snapshot-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"SnapshotGroup-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, SnapshotGroupApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n snapshot_group_api = SnapshotGroupApi(client)\r\n resp = snapshot_group_api.rollback_snapshot_group({\"where\":{\"id\":\"SnapshotGroup-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/snapshot_group\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n snapshot_group_api := client.SnapshotGroup\r\n params := snapshot_group.NewRollbackSnapshotGroupParams()\r\n params.RequestBody = &models.SnapshotGroupRollbackParams{\nWhere: &models.SnapshotGroupWhereInput{\nID: pointy.String(\"SnapshotGroup-id\"),\n},\n}\r\n rawResp, err := snapshot_group_api.RollbackSnapshotGroup(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskSnapshotGroup) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskSnapshotGroup)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskSnapshotGroup) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SnapshotGroupApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SnapshotGroupApi snapshotGroupApi = new SnapshotGroupApi(client);\r\n SnapshotGroupRollbackParams params = new SnapshotGroupRollbackParams()\n.where(new SnapshotGroupWhereInput()\n.id(\"SnapshotGroup-id\"));\r\n List resp = snapshotGroupApi.rollbackSnapshotGroup(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/create-organization": { + "/clone-snapshot-group": { "exampleValue": [ { - "name": "name-string" + "clone": [ + { + "from_source_vm_id": "ck74rk21wg5lz0786opdnzz5m", + "to_cloned_vm_name": "to_cloned_vm_name-string" + } + ], + "id": "ck74rk21wg5lz0786opdnzz5m" } ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-organization \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"name\":\"name-string\"}]'", - "python": "from cloudtower import ApiClient, Configuration, OrganizationApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n organization_api = OrganizationApi(client)\r\n resp = organization_api.create_organization([{\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/organization\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n organization_api := client.Organization\r\n params := organization.NewCreateOrganizationParams()\r\n params.RequestBody = []*models.OrganizationCreationParams{\n{\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := organization_api.CreateOrganization(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskOrganization) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskOrganization)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskOrganization) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.OrganizationApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n OrganizationApi organizationApi = new OrganizationApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new OrganizationCreationParams()\n.name(\"name-string\"));\r\n List resp = organizationApi.createOrganization(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/clone-snapshot-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"clone\":[{\"from_source_vm_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"to_cloned_vm_name\":\"to_cloned_vm_name-string\"}],\"id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", + "python": "from cloudtower import ApiClient, Configuration, SnapshotGroupApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n snapshot_group_api = SnapshotGroupApi(client)\r\n resp = snapshot_group_api.clone_snapshot_group([{\"clone\":[{\"from_source_vm_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"to_cloned_vm_name\":\"to_cloned_vm_name-string\"}],\"id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/snapshot_group\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n snapshot_group_api := client.SnapshotGroup\r\n params := snapshot_group.NewCloneSnapshotGroupParams()\r\n params.RequestBody = []*models.SnapshotGroupCloneParams{\n{\nClone: []*models.SnapshotGroupCloneParam{\n{\nFromSourceVMID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nToClonedVMName: pointy.String(\"to_cloned_vm_name-string\"),\n},\n},\nID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := snapshot_group_api.CloneSnapshotGroup(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskSnapshotGroup) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskSnapshotGroup)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskSnapshotGroup) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SnapshotGroupApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SnapshotGroupApi snapshotGroupApi = new SnapshotGroupApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new SnapshotGroupCloneParams()\n.addCloneItem(new SnapshotGroupCloneParam()\n.fromSourceVmId(\"ck74rk21wg5lz0786opdnzz5m\")\n.toClonedVmName(\"to_cloned_vm_name-string\"))\n.id(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = snapshotGroupApi.cloneSnapshotGroup(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-organization": { + "/keep-snapshot-group": { "exampleValue": { - "data": {}, "where": { - "id": "Organization-id" + "id": "SnapshotGroup-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-organization \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Organization-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, OrganizationApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n organization_api = OrganizationApi(client)\r\n resp = organization_api.update_organization({\"data\":{},\"where\":{\"id\":\"Organization-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/organization\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n organization_api := client.Organization\r\n params := organization.NewUpdateOrganizationParams()\r\n params.RequestBody = &models.OrganizationUpdationParams{\nData: &models.OrganizationUpdationParamsData{\n},\nWhere: &models.OrganizationWhereInput{\nID: pointy.String(\"Organization-id\"),\n},\n}\r\n rawResp, err := organization_api.UpdateOrganization(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskOrganization) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskOrganization)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskOrganization) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.OrganizationApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n OrganizationApi organizationApi = new OrganizationApi(client);\r\n OrganizationUpdationParams params = new OrganizationUpdationParams()\n.data(new OrganizationUpdationParamsData())\n.where(new OrganizationWhereInput()\n.id(\"Organization-id\"));\r\n List resp = organizationApi.updateOrganization(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/keep-snapshot-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"SnapshotGroup-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, SnapshotGroupApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n snapshot_group_api = SnapshotGroupApi(client)\r\n resp = snapshot_group_api.keep_snapshot_group({\"where\":{\"id\":\"SnapshotGroup-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/snapshot_group\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n snapshot_group_api := client.SnapshotGroup\r\n params := snapshot_group.NewKeepSnapshotGroupParams()\r\n params.RequestBody = &models.SnapshotGroupKeepParams{\nWhere: &models.SnapshotGroupWhereInput{\nID: pointy.String(\"SnapshotGroup-id\"),\n},\n}\r\n rawResp, err := snapshot_group_api.KeepSnapshotGroup(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskSnapshotGroup) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskSnapshotGroup)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskSnapshotGroup) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SnapshotGroupApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SnapshotGroupApi snapshotGroupApi = new SnapshotGroupApi(client);\r\n SnapshotGroupKeepParams params = new SnapshotGroupKeepParams()\n.where(new SnapshotGroupWhereInput()\n.id(\"SnapshotGroup-id\"));\r\n List resp = snapshotGroupApi.keepSnapshotGroup(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/delete-organization": { + "/delete-snapshot-group": { "exampleValue": { "where": { - "id": "Organization-id" + "id": "SnapshotGroup-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-organization \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Organization-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, OrganizationApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n organization_api = OrganizationApi(client)\r\n resp = organization_api.delete_organization({\"where\":{\"id\":\"Organization-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/organization\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n organization_api := client.Organization\r\n params := organization.NewDeleteOrganizationParams()\r\n params.RequestBody = &models.OrganizationDeletionParams{\nWhere: &models.OrganizationWhereInput{\nID: pointy.String(\"Organization-id\"),\n},\n}\r\n rawResp, err := organization_api.DeleteOrganization(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteOrganization) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteOrganization)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteOrganization) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.OrganizationApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n OrganizationApi organizationApi = new OrganizationApi(client);\r\n OrganizationDeletionParams params = new OrganizationDeletionParams()\n.where(new OrganizationWhereInput()\n.id(\"Organization-id\"));\r\n List resp = organizationApi.deleteOrganization(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-snapshot-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"SnapshotGroup-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, SnapshotGroupApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n snapshot_group_api = SnapshotGroupApi(client)\r\n resp = snapshot_group_api.delete_snapshot_group({\"where\":{\"id\":\"SnapshotGroup-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/snapshot_group\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n snapshot_group_api := client.SnapshotGroup\r\n params := snapshot_group.NewDeleteSnapshotGroupParams()\r\n params.RequestBody = &models.SnapshotGroupDeletionParams{\nWhere: &models.SnapshotGroupWhereInput{\nID: pointy.String(\"SnapshotGroup-id\"),\n},\n}\r\n rawResp, err := snapshot_group_api.DeleteSnapshotGroup(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteSnapshotGroup) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteSnapshotGroup)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteSnapshotGroup) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SnapshotGroupApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SnapshotGroupApi snapshotGroupApi = new SnapshotGroupApi(client);\r\n SnapshotGroupDeletionParams params = new SnapshotGroupDeletionParams()\n.where(new SnapshotGroupWhereInput()\n.id(\"SnapshotGroup-id\"));\r\n List resp = snapshotGroupApi.deleteSnapshotGroup(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/create-rack-topo": { + "/create-snapshot-plan": { "exampleValue": [ { + "vm_ids": [ + "-string" + ], + "execute_intervals": [ + 1 + ], + "execute_plan_type": "DAY", + "start_time": "start_time-string", + "remain_snapshot_num": 1, "cluster_id": "ck74rk21wg5lz0786opdnzz5m", - "zone_topo_id": "ck74rk21wg5lz0786opdnzz5m", - "height": 1, "name": "name-string" } ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-rack-topo \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"zone_topo_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"height\":1,\"name\":\"name-string\"}]'", - "python": "from cloudtower import ApiClient, Configuration, RackTopoApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n rack_topo_api = RackTopoApi(client)\r\n resp = rack_topo_api.create_rack_topo([{\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"zone_topo_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"height\":1,\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/rack_topo\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n rack_topo_api := client.RackTopo\r\n params := rack_topo.NewCreateRackTopoParams()\r\n params.RequestBody = []*models.RackTopoCreationParams{\n{\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nZoneTopoID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nHeight: pointy.Int32(1),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := rack_topo_api.CreateRackTopo(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskRackTopo) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskRackTopo)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskRackTopo) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.RackTopoApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n RackTopoApi rackTopoApi = new RackTopoApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new RackTopoCreationParams()\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.zoneTopoId(\"ck74rk21wg5lz0786opdnzz5m\")\n.height(1)\n.name(\"name-string\"));\r\n List resp = rackTopoApi.createRackTopo(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-snapshot-plan \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"vm_ids\":[\"-string\"],\"execute_intervals\":[1],\"execute_plan_type\":\"DAY\",\"start_time\":\"start_time-string\",\"remain_snapshot_num\":1,\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", + "python": "from cloudtower import ApiClient, Configuration, SnapshotPlanApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n snapshot_plan_api = SnapshotPlanApi(client)\r\n resp = snapshot_plan_api.create_snapshot_plan([{\"vm_ids\":[\"-string\"],\"execute_intervals\":[1],\"execute_plan_type\":\"DAY\",\"start_time\":\"start_time-string\",\"remain_snapshot_num\":1,\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/snapshot_plan\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n snapshot_plan_api := client.SnapshotPlan\r\n params := snapshot_plan.NewCreateSnapshotPlanParams()\r\n params.RequestBody = []*models.SnapshotPlanCreationParams{\n{\nVMIds: []string{\"-string\",\n},\nExecuteIntervals: []int{1\n},\nExecutePlanType: models.SnapshotPlanExecuteTypeDAY.Pointer(),\nStartTime: pointy.String(\"start_time-string\"),\nRemainSnapshotNum: pointy.Int32(1),\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := snapshot_plan_api.CreateSnapshotPlan(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskSnapshotPlan) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskSnapshotPlan)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskSnapshotPlan) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SnapshotPlanApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SnapshotPlanApi snapshotPlanApi = new SnapshotPlanApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new SnapshotPlanCreationParams()\n.addVmIdsItem(\"-string\")\n.addExecuteIntervalsItem(1)\n.executePlanType(SnapshotPlanExecuteType.fromValue(\"DAY\"))\n.startTime(\"start_time-string\")\n.remainSnapshotNum(1)\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = snapshotPlanApi.createSnapshotPlan(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-rack-topo": { + "/update-snapshot-plan": { "exampleValue": { - "data": {}, "where": { - "id": "RackTopo-id" + "id": "SnapshotPlan-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-rack-topo \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"RackTopo-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, RackTopoApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n rack_topo_api = RackTopoApi(client)\r\n resp = rack_topo_api.update_rack_topo({\"data\":{},\"where\":{\"id\":\"RackTopo-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/rack_topo\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n rack_topo_api := client.RackTopo\r\n params := rack_topo.NewUpdateRackTopoParams()\r\n params.RequestBody = &models.RackTopoUpdationParams{\nData: &models.RackTopoUpdationParamsData{\n},\nWhere: &models.RackTopoWhereInput{\nID: pointy.String(\"RackTopo-id\"),\n},\n}\r\n rawResp, err := rack_topo_api.UpdateRackTopo(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskRackTopo) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskRackTopo)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskRackTopo) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.RackTopoApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n RackTopoApi rackTopoApi = new RackTopoApi(client);\r\n RackTopoUpdationParams params = new RackTopoUpdationParams()\n.data(new RackTopoUpdationParamsData())\n.where(new RackTopoWhereInput()\n.id(\"RackTopo-id\"));\r\n List resp = rackTopoApi.updateRackTopo(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-snapshot-plan \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"SnapshotPlan-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, SnapshotPlanApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n snapshot_plan_api = SnapshotPlanApi(client)\r\n resp = snapshot_plan_api.update_snapshot_plan({\"where\":{\"id\":\"SnapshotPlan-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/snapshot_plan\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n snapshot_plan_api := client.SnapshotPlan\r\n params := snapshot_plan.NewUpdateSnapshotPlanParams()\r\n params.RequestBody = &models.SnapshotPlanUpdationParams{\nWhere: &models.SnapshotPlanWhereInput{\nID: pointy.String(\"SnapshotPlan-id\"),\n},\n}\r\n rawResp, err := snapshot_plan_api.UpdateSnapshotPlan(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskSnapshotPlan) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskSnapshotPlan)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskSnapshotPlan) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SnapshotPlanApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SnapshotPlanApi snapshotPlanApi = new SnapshotPlanApi(client);\r\n SnapshotPlanUpdationParams params = new SnapshotPlanUpdationParams()\n.where(new SnapshotPlanWhereInput()\n.id(\"SnapshotPlan-id\"));\r\n List resp = snapshotPlanApi.updateSnapshotPlan(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/delete-rack-topo": { + "/delete-snapshot-plan": { "exampleValue": { "where": { - "id": "RackTopo-id" + "id": "SnapshotPlan-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-rack-topo \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"RackTopo-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, RackTopoApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n rack_topo_api = RackTopoApi(client)\r\n resp = rack_topo_api.delete_rack_topo({\"where\":{\"id\":\"RackTopo-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/rack_topo\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n rack_topo_api := client.RackTopo\r\n params := rack_topo.NewDeleteRackTopoParams()\r\n params.RequestBody = &models.RackTopoDeletionParams{\nWhere: &models.RackTopoWhereInput{\nID: pointy.String(\"RackTopo-id\"),\n},\n}\r\n rawResp, err := rack_topo_api.DeleteRackTopo(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteRackTopo) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteRackTopo)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteRackTopo) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.RackTopoApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n RackTopoApi rackTopoApi = new RackTopoApi(client);\r\n RackTopoDeletionParams params = new RackTopoDeletionParams()\n.where(new RackTopoWhereInput()\n.id(\"RackTopo-id\"));\r\n List resp = rackTopoApi.deleteRackTopo(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" - }, - "/update-global-recycle-bin-setting": { - "exampleValue": { - "retain": 1, - "enabled": true - }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-global-recycle-bin-setting \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"retain\":1,\"enabled\":true}'", - "python": "from cloudtower import ApiClient, Configuration, GlobalSettingsApi\r\nfrom cloudtower.utils import login, wait_task\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n global_settings_api = GlobalSettingsApi(client)\r\n resp = global_settings_api.update_global_recycle_bin_setting({\"retain\":1,\"enabled\":True})\r\n wait_task(resp.task_id, client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/global_settings\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n global_settings_api := client.GlobalSettings\r\n params := global_settings.NewUpdateGlobalRecycleBinSettingParams()\r\n params.RequestBody = &models.GlobalRecycleBinUpdationParams{\nRetain: pointy.Int32(1),\nEnabled: pointy.Bool(true),\n}\r\n rawResp, err := global_settings_api.UpdateGlobalRecycleBinSetting(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n err = utils.WaitTask(context.Background(), client, resp.TaskID, 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.GlobalSettingsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n GlobalSettingsApi globalSettingsApi = new GlobalSettingsApi(client);\r\n GlobalRecycleBinUpdationParams params = new GlobalRecycleBinUpdationParams()\n.retain(1)\n.enabled(true);\r\n WithTaskGlobalSettings resp = globalSettingsApi.updateGlobalRecycleBinSetting(params);\r\n TaskUtil.WaitTask(resp.getTaskId(), client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-snapshot-plan \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"SnapshotPlan-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, SnapshotPlanApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n snapshot_plan_api = SnapshotPlanApi(client)\r\n resp = snapshot_plan_api.delete_snapshot_plan({\"where\":{\"id\":\"SnapshotPlan-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/snapshot_plan\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n snapshot_plan_api := client.SnapshotPlan\r\n params := snapshot_plan.NewDeleteSnapshotPlanParams()\r\n params.RequestBody = &models.SnapshotPlanDeletionParams{\nWhere: &models.SnapshotPlanWhereInput{\nID: pointy.String(\"SnapshotPlan-id\"),\n},\n}\r\n rawResp, err := snapshot_plan_api.DeleteSnapshotPlan(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteSnapshotPlan) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteSnapshotPlan)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteSnapshotPlan) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SnapshotPlanApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SnapshotPlanApi snapshotPlanApi = new SnapshotPlanApi(client);\r\n SnapshotPlanDeletionParams params = new SnapshotPlanDeletionParams()\n.where(new SnapshotPlanWhereInput()\n.id(\"SnapshotPlan-id\"));\r\n List resp = snapshotPlanApi.deleteSnapshotPlan(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/create-cluster-recycle-bin-setting": { + "/execute-snapshot-plan": { "exampleValue": { "data": { - "retain": 1, - "enabled": true + "task_name": "task_name-string" }, "where": { - "id": "Cluster-id" + "id": "SnapshotPlan-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-cluster-recycle-bin-setting \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"retain\":1,\"enabled\":true},\"where\":{\"id\":\"Cluster-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, GlobalSettingsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n global_settings_api = GlobalSettingsApi(client)\r\n resp = global_settings_api.create_cluster_recycle_bin_setting({\"data\":{\"retain\":1,\"enabled\":True},\"where\":{\"id\":\"Cluster-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/global_settings\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n global_settings_api := client.GlobalSettings\r\n params := global_settings.NewCreateClusterRecycleBinSettingParams()\r\n params.RequestBody = &models.ClusterRecycleBinCreationParams{\nData: &models.ClusterRecycleBinCreationParamsData{\nRetain: pointy.Int32(1),\nEnabled: pointy.Bool(true),\n},\nWhere: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\n}\r\n rawResp, err := global_settings_api.CreateClusterRecycleBinSetting(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskClusterSettings) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskClusterSettings)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskClusterSettings) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.GlobalSettingsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n GlobalSettingsApi globalSettingsApi = new GlobalSettingsApi(client);\r\n ClusterRecycleBinCreationParams params = new ClusterRecycleBinCreationParams()\n.data(new ClusterRecycleBinCreationParamsData()\n.retain(1)\n.enabled(true))\n.where(new ClusterWhereInput()\n.id(\"Cluster-id\"));\r\n List resp = globalSettingsApi.createClusterRecycleBinSetting(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/execute-snapshot-plan \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"task_name\":\"task_name-string\"},\"where\":{\"id\":\"SnapshotPlan-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, SnapshotPlanApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n snapshot_plan_api = SnapshotPlanApi(client)\r\n resp = snapshot_plan_api.execute_snapshot_plan({\"data\":{\"task_name\":\"task_name-string\"},\"where\":{\"id\":\"SnapshotPlan-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/snapshot_plan\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n snapshot_plan_api := client.SnapshotPlan\r\n params := snapshot_plan.NewExecuteSnapshotPlanParams()\r\n params.RequestBody = &models.SnapshotPlanExecutionParams{\nData: &models.SnapshotPlanExecutionParamsData{\nTaskName: pointy.String(\"task_name-string\"),\n},\nWhere: &models.SnapshotPlanWhereInput{\nID: pointy.String(\"SnapshotPlan-id\"),\n},\n}\r\n rawResp, err := snapshot_plan_api.ExecuteSnapshotPlan(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskSnapshotPlan) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskSnapshotPlan)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskSnapshotPlan) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SnapshotPlanApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SnapshotPlanApi snapshotPlanApi = new SnapshotPlanApi(client);\r\n SnapshotPlanExecutionParams params = new SnapshotPlanExecutionParams()\n.data(new SnapshotPlanExecutionParamsData()\n.taskName(\"task_name-string\"))\n.where(new SnapshotPlanWhereInput()\n.id(\"SnapshotPlan-id\"));\r\n List resp = snapshotPlanApi.executeSnapshotPlan(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-cluster-recycle-bin-setting": { + "/suspend-snapshot-plan": { "exampleValue": { - "data": { - "retain": 1, - "enabled": true - }, "where": { - "id": "Cluster-id" + "id": "SnapshotPlan-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-cluster-recycle-bin-setting \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"retain\":1,\"enabled\":true},\"where\":{\"id\":\"Cluster-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, GlobalSettingsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n global_settings_api = GlobalSettingsApi(client)\r\n resp = global_settings_api.update_cluster_recycle_bin_setting({\"data\":{\"retain\":1,\"enabled\":True},\"where\":{\"id\":\"Cluster-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/global_settings\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n global_settings_api := client.GlobalSettings\r\n params := global_settings.NewUpdateClusterRecycleBinSettingParams()\r\n params.RequestBody = &models.ClusterRecycleBinUpdationParams{\nData: &models.ClusterRecycleBinUpdationParamsData{\nRetain: pointy.Int32(1),\nEnabled: pointy.Bool(true),\n},\nWhere: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\n}\r\n rawResp, err := global_settings_api.UpdateClusterRecycleBinSetting(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskClusterSettings) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskClusterSettings)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskClusterSettings) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.GlobalSettingsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n GlobalSettingsApi globalSettingsApi = new GlobalSettingsApi(client);\r\n ClusterRecycleBinUpdationParams params = new ClusterRecycleBinUpdationParams()\n.data(new ClusterRecycleBinUpdationParamsData()\n.retain(1)\n.enabled(true))\n.where(new ClusterWhereInput()\n.id(\"Cluster-id\"));\r\n List resp = globalSettingsApi.updateClusterRecycleBinSetting(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/suspend-snapshot-plan \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"SnapshotPlan-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, SnapshotPlanApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n snapshot_plan_api = SnapshotPlanApi(client)\r\n resp = snapshot_plan_api.suspend_snapshot_plan({\"where\":{\"id\":\"SnapshotPlan-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/snapshot_plan\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n snapshot_plan_api := client.SnapshotPlan\r\n params := snapshot_plan.NewSuspendSnapshotPlanParams()\r\n params.RequestBody = &models.SnapshotPlanSuspendedParams{\nWhere: &models.SnapshotPlanWhereInput{\nID: pointy.String(\"SnapshotPlan-id\"),\n},\n}\r\n rawResp, err := snapshot_plan_api.SuspendSnapshotPlan(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskSnapshotPlan) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskSnapshotPlan)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskSnapshotPlan) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SnapshotPlanApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SnapshotPlanApi snapshotPlanApi = new SnapshotPlanApi(client);\r\n SnapshotPlanSuspendedParams params = new SnapshotPlanSuspendedParams()\n.where(new SnapshotPlanWhereInput()\n.id(\"SnapshotPlan-id\"));\r\n List resp = snapshotPlanApi.suspendSnapshotPlan(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/delete-cluster-recycle-bin-setting": { + "/resume-snapshot-plan": { "exampleValue": { "where": { - "id": "Cluster-id" + "id": "SnapshotPlan-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-cluster-recycle-bin-setting \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Cluster-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, GlobalSettingsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n global_settings_api = GlobalSettingsApi(client)\r\n resp = global_settings_api.delete_cluster_recycle_bin_setting({\"where\":{\"id\":\"Cluster-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/global_settings\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n global_settings_api := client.GlobalSettings\r\n params := global_settings.NewDeleteClusterRecycleBinSettingParams()\r\n params.RequestBody = &models.ClusterRecycleBinDeletionParams{\nWhere: &models.ClusterWhereInput{\nID: pointy.String(\"Cluster-id\"),\n},\n}\r\n rawResp, err := global_settings_api.DeleteClusterRecycleBinSetting(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteClusterRecycleBin) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteClusterRecycleBin)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteClusterRecycleBin) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.GlobalSettingsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n GlobalSettingsApi globalSettingsApi = new GlobalSettingsApi(client);\r\n ClusterRecycleBinDeletionParams params = new ClusterRecycleBinDeletionParams()\n.where(new ClusterWhereInput()\n.id(\"Cluster-id\"));\r\n List resp = globalSettingsApi.deleteClusterRecycleBinSetting(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/resume-snapshot-plan \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"SnapshotPlan-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, SnapshotPlanApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n snapshot_plan_api = SnapshotPlanApi(client)\r\n resp = snapshot_plan_api.resume_snapshot_plan({\"where\":{\"id\":\"SnapshotPlan-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/snapshot_plan\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n snapshot_plan_api := client.SnapshotPlan\r\n params := snapshot_plan.NewResumeSnapshotPlanParams()\r\n params.RequestBody = &models.SnapshotPlanResumeParams{\nWhere: &models.SnapshotPlanWhereInput{\nID: pointy.String(\"SnapshotPlan-id\"),\n},\n}\r\n rawResp, err := snapshot_plan_api.ResumeSnapshotPlan(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskSnapshotPlan) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskSnapshotPlan)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskSnapshotPlan) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SnapshotPlanApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SnapshotPlanApi snapshotPlanApi = new SnapshotPlanApi(client);\r\n SnapshotPlanResumeParams params = new SnapshotPlanResumeParams()\n.where(new SnapshotPlanWhereInput()\n.id(\"SnapshotPlan-id\"));\r\n List resp = snapshotPlanApi.resumeSnapshotPlan(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/create-report-template": { + "/create-snmp-transport": { "exampleValue": [ { - "resource_meta": [ - { - "type": "ALERT", - "name": "name-string", - "filter": "", - "fields": [ - "-string" - ] - } - ], - "execute_plan": [ - { - "start_at": "start_at-string", - "retain": 1, - "period": "period-string", - "id": "ck74rk21wg5lz0786opdnzz5m", - "enabled": true - } - ], - "name": "name-string" + "port": 1, + "protocol": "TCP", + "version": "V2C", + "name": "name-string", + "cluster_id": "ck74rk21wg5lz0786opdnzz5m" } ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-report-template \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"resource_meta\":[{\"type\":\"ALERT\",\"name\":\"name-string\",\"filter\":\"\",\"fields\":[\"-string\"]}],\"execute_plan\":[{\"start_at\":\"start_at-string\",\"retain\":1,\"period\":\"period-string\",\"id\":\"ck74rk21wg5lz0786opdnzz5m\",\"enabled\":true}],\"name\":\"name-string\"}]'", - "python": "from cloudtower import ApiClient, Configuration, ReportTemplateApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n report_template_api = ReportTemplateApi(client)\r\n resp = report_template_api.create_report_template([{\"resource_meta\":[{\"type\":\"ALERT\",\"name\":\"name-string\",\"filter\":\"\",\"fields\":[\"-string\"]}],\"execute_plan\":[{\"start_at\":\"start_at-string\",\"retain\":1,\"period\":\"period-string\",\"id\":\"ck74rk21wg5lz0786opdnzz5m\",\"enabled\":True}],\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/report_template\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n report_template_api := client.ReportTemplate\r\n params := report_template.NewCreateReportTemplateParams()\r\n params.RequestBody = []*models.ReportTemplateCreationParams{\n{\nResourceMeta: []*models.ResourceMeta{\n{\nType: models.ReportResourceInputEnumALERT.Pointer(),\nName: pointy.String(\"name-string\"),\nFilter: interface{}(\"\"),\nFields: []string{\"-string\",\n},\n},\n},\nExecutePlan: []*models.ExecutePlan{\n{\nStartAt: pointy.String(\"start_at-string\"),\nRetain: pointy.Int32(1),\nPeriod: pointy.String(\"period-string\"),\nID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nEnabled: pointy.Bool(true),\n},\n},\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := report_template_api.CreateReportTemplate(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskReportTemplate) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskReportTemplate)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskReportTemplate) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ReportTemplateApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ReportTemplateApi reportTemplateApi = new ReportTemplateApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new ReportTemplateCreationParams()\n.addResourceMetaItem(new ResourceMeta()\n.type(ReportResourceInputEnum.fromValue(\"ALERT\"))\n.name(\"name-string\")\n.filter(new Object())\n.addFieldsItem(\"-string\"))\n.addExecutePlanItem(new ExecutePlan()\n.startAt(\"start_at-string\")\n.retain(1)\n.period(\"period-string\")\n.id(\"ck74rk21wg5lz0786opdnzz5m\")\n.enabled(true))\n.name(\"name-string\"));\r\n List resp = reportTemplateApi.createReportTemplate(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-snmp-transport \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"port\":1,\"protocol\":\"TCP\",\"version\":\"V2C\",\"name\":\"name-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", + "python": "from cloudtower import ApiClient, Configuration, SnmpTransportApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n snmp_transport_api = SnmpTransportApi(client)\r\n resp = snmp_transport_api.create_snmp_transport([{\"port\":1,\"protocol\":\"TCP\",\"version\":\"V2C\",\"name\":\"name-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/snmp_transport\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n snmp_transport_api := client.SnmpTransport\r\n params := snmp_transport.NewCreateSnmpTransportParams()\r\n params.RequestBody = []*models.SnmpTransportCreationParams{\n{\nPort: pointy.Int32(1),\nProtocol: models.SnmpProtocolTCP.Pointer(),\nVersion: models.SnmpVersionV2C.Pointer(),\nName: pointy.String(\"name-string\"),\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := snmp_transport_api.CreateSnmpTransport(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskSnmpTransport) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskSnmpTransport)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskSnmpTransport) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SnmpTransportApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SnmpTransportApi snmpTransportApi = new SnmpTransportApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new SnmpTransportCreationParams()\n.port(1)\n.protocol(SnmpProtocol.fromValue(\"TCP\"))\n.version(SnmpVersion.fromValue(\"V2C\"))\n.name(\"name-string\")\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = snmpTransportApi.createSnmpTransport(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-report-template": { + "/update-snmp-transport": { "exampleValue": { "data": {}, "where": { - "id": "ReportTemplate-id" - } - }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-report-template \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"ReportTemplate-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, ReportTemplateApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n report_template_api = ReportTemplateApi(client)\r\n resp = report_template_api.update_report_template({\"data\":{},\"where\":{\"id\":\"ReportTemplate-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/report_template\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n report_template_api := client.ReportTemplate\r\n params := report_template.NewUpdateReportTemplateParams()\r\n params.RequestBody = &models.ReportTemplateUpdationParams{\nData: &models.ReportTemplateUpdationParamsData{\n},\nWhere: &models.ReportTemplateWhereInput{\nID: pointy.String(\"ReportTemplate-id\"),\n},\n}\r\n rawResp, err := report_template_api.UpdateReportTemplate(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskReportTemplate) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskReportTemplate)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskReportTemplate) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ReportTemplateApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ReportTemplateApi reportTemplateApi = new ReportTemplateApi(client);\r\n ReportTemplateUpdationParams params = new ReportTemplateUpdationParams()\n.data(new ReportTemplateUpdationParamsData())\n.where(new ReportTemplateWhereInput()\n.id(\"ReportTemplate-id\"));\r\n List resp = reportTemplateApi.updateReportTemplate(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" - }, - "/generate-from-report-template": { - "exampleValue": { - "where": { - "id": "ReportTemplate-id" + "id": "SnmpTransport-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/generate-from-report-template \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"ReportTemplate-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, ReportTemplateApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n report_template_api = ReportTemplateApi(client)\r\n resp = report_template_api.generate_from_report_template({\"where\":{\"id\":\"ReportTemplate-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/report_template\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n report_template_api := client.ReportTemplate\r\n params := report_template.NewGenerateFromReportTemplateParams()\r\n params.RequestBody = &models.ReporteTemplateGenerationParams{\nWhere: &models.ReportTemplateWhereInput{\nID: pointy.String(\"ReportTemplate-id\"),\n},\n}\r\n rawResp, err := report_template_api.GenerateFromReportTemplate(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskReportTask) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskReportTask)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskReportTask) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ReportTemplateApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ReportTemplateApi reportTemplateApi = new ReportTemplateApi(client);\r\n ReporteTemplateGenerationParams params = new ReporteTemplateGenerationParams()\n.where(new ReportTemplateWhereInput()\n.id(\"ReportTemplate-id\"));\r\n List resp = reportTemplateApi.generateFromReportTemplate(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-snmp-transport \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"SnmpTransport-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, SnmpTransportApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n snmp_transport_api = SnmpTransportApi(client)\r\n resp = snmp_transport_api.update_snmp_transport({\"data\":{},\"where\":{\"id\":\"SnmpTransport-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/snmp_transport\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n snmp_transport_api := client.SnmpTransport\r\n params := snmp_transport.NewUpdateSnmpTransportParams()\r\n params.RequestBody = &models.SnmpTransportUpdationParams{\nData: &models.SnmpTransportUpdationParamsData{\n},\nWhere: &models.SnmpTransportWhereInput{\nID: pointy.String(\"SnmpTransport-id\"),\n},\n}\r\n rawResp, err := snmp_transport_api.UpdateSnmpTransport(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskSnmpTransport) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskSnmpTransport)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskSnmpTransport) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SnmpTransportApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SnmpTransportApi snmpTransportApi = new SnmpTransportApi(client);\r\n SnmpTransportUpdationParams params = new SnmpTransportUpdationParams()\n.data(new SnmpTransportUpdationParamsData())\n.where(new SnmpTransportWhereInput()\n.id(\"SnmpTransport-id\"));\r\n List resp = snmpTransportApi.updateSnmpTransport(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/delete-report-template": { + "/delete-snmp-transport": { "exampleValue": { "where": { - "id": "ReportTemplate-id" + "id": "SnmpTransport-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-report-template \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"ReportTemplate-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, ReportTemplateApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n report_template_api = ReportTemplateApi(client)\r\n resp = report_template_api.delete_report_template({\"where\":{\"id\":\"ReportTemplate-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/report_template\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n report_template_api := client.ReportTemplate\r\n params := report_template.NewDeleteReportTemplateParams()\r\n params.RequestBody = &models.ReportTemplateDeletionParams{\nWhere: &models.ReportTemplateWhereInput{\nID: pointy.String(\"ReportTemplate-id\"),\n},\n}\r\n rawResp, err := report_template_api.DeleteReportTemplate(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteReportTemplate) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteReportTemplate)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteReportTemplate) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ReportTemplateApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ReportTemplateApi reportTemplateApi = new ReportTemplateApi(client);\r\n ReportTemplateDeletionParams params = new ReportTemplateDeletionParams()\n.where(new ReportTemplateWhereInput()\n.id(\"ReportTemplate-id\"));\r\n List resp = reportTemplateApi.deleteReportTemplate(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-snmp-transport \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"SnmpTransport-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, SnmpTransportApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n snmp_transport_api = SnmpTransportApi(client)\r\n resp = snmp_transport_api.delete_snmp_transport({\"where\":{\"id\":\"SnmpTransport-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/snmp_transport\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n snmp_transport_api := client.SnmpTransport\r\n params := snmp_transport.NewDeleteSnmpTransportParams()\r\n params.RequestBody = &models.SnmpTransportDeletionParams{\nWhere: &models.SnmpTransportWhereInput{\nID: pointy.String(\"SnmpTransport-id\"),\n},\n}\r\n rawResp, err := snmp_transport_api.DeleteSnmpTransport(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteSnmpTransport) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteSnmpTransport)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteSnmpTransport) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SnmpTransportApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SnmpTransportApi snmpTransportApi = new SnmpTransportApi(client);\r\n SnmpTransportDeletionParams params = new SnmpTransportDeletionParams()\n.where(new SnmpTransportWhereInput()\n.id(\"SnmpTransport-id\"));\r\n List resp = snmpTransportApi.deleteSnmpTransport(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/create-role": { + "/create-snmp-trap-receiver": { "exampleValue": [ { - "actions": [ - "*" - ], - "name": "name-string" + "language_code": "EN_US", + "port": 1, + "host": "host-string", + "protocol": "TCP", + "version": "V2C", + "name": "name-string", + "cluster_id": "ck74rk21wg5lz0786opdnzz5m" } ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-role \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"actions\":[\"*\"],\"name\":\"name-string\"}]'", - "python": "from cloudtower import ApiClient, Configuration, UserRoleNextApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n user_role_next_api = UserRoleNextApi(client)\r\n resp = user_role_next_api.create_role([{\"actions\":[\"*\"],\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/user_role_next\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n user_role_next_api := client.UserRoleNext\r\n params := user_role_next.NewCreateRoleParams()\r\n params.RequestBody = []*models.RoleCreationParams{\n{\nActions: []*models.RoleAction{\nmodels.RoleAction*.Pointer(),\n},\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := user_role_next_api.CreateRole(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskUserRoleNext) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskUserRoleNext)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskUserRoleNext) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.UserRoleNextApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n UserRoleNextApi userRoleNextApi = new UserRoleNextApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new RoleCreationParams()\n.addActionsItem(RoleAction.fromValue(\"*\"))\n.name(\"name-string\"));\r\n List resp = userRoleNextApi.createRole(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-snmp-trap-receiver \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"language_code\":\"EN_US\",\"port\":1,\"host\":\"host-string\",\"protocol\":\"TCP\",\"version\":\"V2C\",\"name\":\"name-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", + "python": "from cloudtower import ApiClient, Configuration, SnmpTrapReceiverApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n snmp_trap_receiver_api = SnmpTrapReceiverApi(client)\r\n resp = snmp_trap_receiver_api.create_snmp_trap_receiver([{\"language_code\":\"EN_US\",\"port\":1,\"host\":\"host-string\",\"protocol\":\"TCP\",\"version\":\"V2C\",\"name\":\"name-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/snmp_trap_receiver\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n snmp_trap_receiver_api := client.SnmpTrapReceiver\r\n params := snmp_trap_receiver.NewCreateSnmpTrapReceiverParams()\r\n params.RequestBody = []*models.SnmpTrapReceiverCreationParams{\n{\nLanguageCode: models.SnmpLanguageCodeEN_US.Pointer(),\nPort: pointy.Int32(1),\nHost: pointy.String(\"host-string\"),\nProtocol: models.SnmpProtocolTCP.Pointer(),\nVersion: models.SnmpVersionV2C.Pointer(),\nName: pointy.String(\"name-string\"),\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := snmp_trap_receiver_api.CreateSnmpTrapReceiver(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskSnmpTrapReceiver) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskSnmpTrapReceiver)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskSnmpTrapReceiver) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SnmpTrapReceiverApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SnmpTrapReceiverApi snmpTrapReceiverApi = new SnmpTrapReceiverApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new SnmpTrapReceiverCreationParams()\n.languageCode(SnmpLanguageCode.fromValue(\"EN_US\"))\n.port(1)\n.host(\"host-string\")\n.protocol(SnmpProtocol.fromValue(\"TCP\"))\n.version(SnmpVersion.fromValue(\"V2C\"))\n.name(\"name-string\")\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = snmpTrapReceiverApi.createSnmpTrapReceiver(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-role": { + "/update-snmp-trap-receiver": { "exampleValue": { "data": {}, "where": { - "id": "UserRoleNext-id" + "id": "SnmpTrapReceiver-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-role \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"UserRoleNext-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, UserRoleNextApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n user_role_next_api = UserRoleNextApi(client)\r\n resp = user_role_next_api.update_role({\"data\":{},\"where\":{\"id\":\"UserRoleNext-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/user_role_next\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n user_role_next_api := client.UserRoleNext\r\n params := user_role_next.NewUpdateRoleParams()\r\n params.RequestBody = &models.RoleUpdationParams{\nData: &models.RoleUpdationParamsData{\n},\nWhere: &models.UserRoleNextWhereInput{\nID: pointy.String(\"UserRoleNext-id\"),\n},\n}\r\n rawResp, err := user_role_next_api.UpdateRole(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskUserRoleNext) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskUserRoleNext)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskUserRoleNext) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.UserRoleNextApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n UserRoleNextApi userRoleNextApi = new UserRoleNextApi(client);\r\n RoleUpdationParams params = new RoleUpdationParams()\n.data(new RoleUpdationParamsData())\n.where(new UserRoleNextWhereInput()\n.id(\"UserRoleNext-id\"));\r\n List resp = userRoleNextApi.updateRole(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-snmp-trap-receiver \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"SnmpTrapReceiver-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, SnmpTrapReceiverApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n snmp_trap_receiver_api = SnmpTrapReceiverApi(client)\r\n resp = snmp_trap_receiver_api.update_snmp_trap_receiver({\"data\":{},\"where\":{\"id\":\"SnmpTrapReceiver-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/snmp_trap_receiver\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n snmp_trap_receiver_api := client.SnmpTrapReceiver\r\n params := snmp_trap_receiver.NewUpdateSnmpTrapReceiverParams()\r\n params.RequestBody = &models.SnmpTrapReceiverUpdationParams{\nData: &models.SnmpTrapReceiverUpdationParamsData{\n},\nWhere: &models.SnmpTrapReceiverWhereInput{\nID: pointy.String(\"SnmpTrapReceiver-id\"),\n},\n}\r\n rawResp, err := snmp_trap_receiver_api.UpdateSnmpTrapReceiver(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskSnmpTrapReceiver) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskSnmpTrapReceiver)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskSnmpTrapReceiver) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SnmpTrapReceiverApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SnmpTrapReceiverApi snmpTrapReceiverApi = new SnmpTrapReceiverApi(client);\r\n SnmpTrapReceiverUpdationParams params = new SnmpTrapReceiverUpdationParams()\n.data(new SnmpTrapReceiverUpdationParamsData())\n.where(new SnmpTrapReceiverWhereInput()\n.id(\"SnmpTrapReceiver-id\"));\r\n List resp = snmpTrapReceiverApi.updateSnmpTrapReceiver(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/delete-role": { + "/delete-snmp-trap-receiver": { "exampleValue": { "where": { - "id": "UserRoleNext-id" + "id": "SnmpTrapReceiver-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-role \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"UserRoleNext-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, UserRoleNextApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n user_role_next_api = UserRoleNextApi(client)\r\n resp = user_role_next_api.delete_role({\"where\":{\"id\":\"UserRoleNext-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/user_role_next\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n user_role_next_api := client.UserRoleNext\r\n params := user_role_next.NewDeleteRoleParams()\r\n params.RequestBody = &models.RoleDeletionParams{\nWhere: &models.UserRoleNextWhereInput{\nID: pointy.String(\"UserRoleNext-id\"),\n},\n}\r\n rawResp, err := user_role_next_api.DeleteRole(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteRole) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteRole)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteRole) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.UserRoleNextApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n UserRoleNextApi userRoleNextApi = new UserRoleNextApi(client);\r\n RoleDeletionParams params = new RoleDeletionParams()\n.where(new UserRoleNextWhereInput()\n.id(\"UserRoleNext-id\"));\r\n List resp = userRoleNextApi.deleteRole(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-snmp-trap-receiver \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"SnmpTrapReceiver-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, SnmpTrapReceiverApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n snmp_trap_receiver_api = SnmpTrapReceiverApi(client)\r\n resp = snmp_trap_receiver_api.delete_snmp_trap_receiver({\"where\":{\"id\":\"SnmpTrapReceiver-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/snmp_trap_receiver\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n snmp_trap_receiver_api := client.SnmpTrapReceiver\r\n params := snmp_trap_receiver.NewDeleteSnmpTrapReceiverParams()\r\n params.RequestBody = &models.SnmpTrapReceiverDeletionParams{\nWhere: &models.SnmpTrapReceiverWhereInput{\nID: pointy.String(\"SnmpTrapReceiver-id\"),\n},\n}\r\n rawResp, err := snmp_trap_receiver_api.DeleteSnmpTrapReceiver(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteSnmpTrapReceiver) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteSnmpTrapReceiver)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteSnmpTrapReceiver) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SnmpTrapReceiverApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SnmpTrapReceiverApi snmpTrapReceiverApi = new SnmpTrapReceiverApi(client);\r\n SnmpTrapReceiverDeletionParams params = new SnmpTrapReceiverDeletionParams()\n.where(new SnmpTrapReceiverWhereInput()\n.id(\"SnmpTrapReceiver-id\"));\r\n List resp = snmpTrapReceiverApi.deleteSnmpTrapReceiver(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/create-security-group": { + "/upload-svt-image": { "exampleValue": { - "everoute_cluster_id": "ck74rk21wg5lz0786opdnzz5m", + "file": "file-string" + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/upload-svt-image \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: multipart/form-data' \\\n\t-d '{\"file\":\"file-string\"}'", + "python": "from cloudtower import ApiClient, Configuration, SvtImageApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n svt_image_api = SvtImageApi(client)\r\n with open(\"file-path\", \"rb\") as file:\r\n resp = svt_image_api.upload_svt_image(\r\n file=file\r\n )\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"bytes\"\r\n \"fmt\"\r\n \"io\"\r\n\r\n \"github.com/go-openapi/runtime\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/svt_image\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n svt_image_api := client.SvtImage\r\n params := svt_image.NewUploadSvtImageParams()\r\n params.File = runtime.NamedReader(\"file\",io.NopCloser(bytes.NewReader([]byte(\"file-string\"))))\r\n resp, err := svt_image_api.UploadSvtImage(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.SvtImageApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.nio.file.Files;\r\nimport java.nio.file.Path;\r\nimport java.util.ArrayList;\r\nimport java.util.List;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SvtImageApi svtImageApi = new SvtImageApi(client);\r\n List resp = svtImageApi.uploadSvtImage(\r\n Files.readAllBytes(Path.of(\"file-string\")),\r\n \"cluster_id\",\r\n \"name\",\r\n \"size\",\r\n \"size_unit\",\r\n \"version\",\r\n \"upload_task_id\"\r\n );\r\n }\r\n}" + }, + "/export-csv": { + "exampleValue": { + "filter": {}, + "columns": [ + { + "name": "name-string", + "path": "path-string" + } + ], "name": "name-string" }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-security-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"everoute_cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}'", - "python": "from cloudtower import ApiClient, Configuration, SecurityGroupApi\r\nfrom cloudtower.utils import login, wait_task\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n security_group_api = SecurityGroupApi(client)\r\n resp = security_group_api.create_security_group({\"everoute_cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"})\r\n wait_task(resp.task_id, client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/security_group\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n security_group_api := client.SecurityGroup\r\n params := security_group.NewCreateSecurityGroupParams()\r\n params.RequestBody = &models.SecurityGroupCreateParams{\nEverouteClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n}\r\n rawResp, err := security_group_api.CreateSecurityGroup(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n err = utils.WaitTask(context.Background(), client, resp.TaskID, 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SecurityGroupApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SecurityGroupApi securityGroupApi = new SecurityGroupApi(client);\r\n SecurityGroupCreateParams params = new SecurityGroupCreateParams()\n.everouteClusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\");\r\n WithTaskSecurityGroup resp = securityGroupApi.createSecurityGroup(params);\r\n TaskUtil.WaitTask(resp.getTaskId(), client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/export-csv \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"filter\":{},\"columns\":[{\"name\":\"name-string\",\"path\":\"path-string\"}],\"name\":\"name-string\"}'", + "python": "from cloudtower import ApiClient, Configuration, TableReporterApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n table_reporter_api = TableReporterApi(client)\r\n resp = table_reporter_api.export_csv({\"filter\":{},\"columns\":[{\"name\":\"name-string\",\"path\":\"path-string\"}],\"name\":\"name-string\"})\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/table_reporter\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n table_reporter_api := client.TableReporter\r\n params := table_reporter.NewExportCsvParams()\r\n params.RequestBody = &models.TableReporterParams{\nFilter: &models.TableReporterParamsFilter{\n},\nColumns: []*models.ColumnConfig{\n{\nName: pointy.String(\"name-string\"),\nPath: pointy.String(\"path-string\"),\n},\n},\nName: pointy.String(\"name-string\"),\n}\r\n rawResp, err := table_reporter_api.ExportCsv(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.TableReporterApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n TableReporterApi tableReporterApi = new TableReporterApi(client);\r\n TableReporterParams params = new TableReporterParams()\n.filter(new TableReporterParamsFilter())\n.addColumnsItem(new ColumnConfig()\n.name(\"name-string\")\n.path(\"path-string\"))\n.name(\"name-string\");\r\n String resp = tableReporterApi.exportCsv(params);\r\n }\r\n}" }, - "/delete-security-group": { + "/cancel-upload-task": { "exampleValue": { "where": { - "id": "SecurityGroup-id" + "id": "UploadTask-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-security-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"SecurityGroup-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, SecurityGroupApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n security_group_api = SecurityGroupApi(client)\r\n resp = security_group_api.delete_security_group({\"where\":{\"id\":\"SecurityGroup-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/security_group\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n security_group_api := client.SecurityGroup\r\n params := security_group.NewDeleteSecurityGroupParams()\r\n params.RequestBody = &models.SecurityGroupDeleteParams{\nWhere: &models.SecurityGroupWhereInput{\nID: pointy.String(\"SecurityGroup-id\"),\n},\n}\r\n rawResp, err := security_group_api.DeleteSecurityGroup(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteSecurityGroup) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteSecurityGroup)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteSecurityGroup) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SecurityGroupApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SecurityGroupApi securityGroupApi = new SecurityGroupApi(client);\r\n SecurityGroupDeleteParams params = new SecurityGroupDeleteParams()\n.where(new SecurityGroupWhereInput()\n.id(\"SecurityGroup-id\"));\r\n List resp = securityGroupApi.deleteSecurityGroup(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/cancel-upload-task \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"UploadTask-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, UploadTaskApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n upload_task_api = UploadTaskApi(client)\r\n resp = upload_task_api.cancel_upload_task({\"where\":{\"id\":\"UploadTask-id\"}})\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/upload_task\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n upload_task_api := client.UploadTask\r\n params := upload_task.NewCancelUploadTaskParams()\r\n params.RequestBody = &models.CancelUploadTaskParams{\nWhere: &models.UploadTaskWhereInput{\nID: pointy.String(\"UploadTask-id\"),\n},\n}\r\n rawResp, err := upload_task_api.CancelUploadTask(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.UploadTaskApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n UploadTaskApi uploadTaskApi = new UploadTaskApi(client);\r\n CancelUploadTaskParams params = new CancelUploadTaskParams()\n.where(new UploadTaskWhereInput()\n.id(\"UploadTask-id\"));\r\n List resp = uploadTaskApi.cancelUploadTask(params);\r\n }\r\n}" }, - "/update-security-group": { + "/mount-usb-device": { "exampleValue": { "data": {}, "where": { - "id": "SecurityGroup-id" + "id": "UsbDevice-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-security-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"SecurityGroup-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, SecurityGroupApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n security_group_api = SecurityGroupApi(client)\r\n resp = security_group_api.update_security_group({\"data\":{},\"where\":{\"id\":\"SecurityGroup-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/security_group\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n security_group_api := client.SecurityGroup\r\n params := security_group.NewUpdateSecurityGroupParams()\r\n params.RequestBody = &models.SecurityGroupUpdateBody{\nData: &models.SecurityGroupUpdateParams{\n},\nWhere: &models.SecurityGroupWhereInput{\nID: pointy.String(\"SecurityGroup-id\"),\n},\n}\r\n rawResp, err := security_group_api.UpdateSecurityGroup(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskSecurityGroup) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskSecurityGroup)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskSecurityGroup) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SecurityGroupApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SecurityGroupApi securityGroupApi = new SecurityGroupApi(client);\r\n SecurityGroupUpdateBody params = new SecurityGroupUpdateBody()\n.data(new SecurityGroupUpdateParams())\n.where(new SecurityGroupWhereInput()\n.id(\"SecurityGroup-id\"));\r\n List resp = securityGroupApi.updateSecurityGroup(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/mount-usb-device \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"UsbDevice-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, UsbDeviceApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n usb_device_api = UsbDeviceApi(client)\r\n resp = usb_device_api.mount_usb_device({\"data\":{},\"where\":{\"id\":\"UsbDevice-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/usb_device\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n usb_device_api := client.UsbDevice\r\n params := usb_device.NewMountUsbDeviceParams()\r\n params.RequestBody = &models.UsbDeviceMountParams{\nData: &models.UsbDeviceMountParamsData{\n},\nWhere: &models.UsbDeviceWhereInput{\nID: pointy.String(\"UsbDevice-id\"),\n},\n}\r\n rawResp, err := usb_device_api.MountUsbDevice(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskUsbDevice) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskUsbDevice)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskUsbDevice) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.UsbDeviceApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n UsbDeviceApi usbDeviceApi = new UsbDeviceApi(client);\r\n UsbDeviceMountParams params = new UsbDeviceMountParams()\n.data(new UsbDeviceMountParamsData())\n.where(new UsbDeviceWhereInput()\n.id(\"UsbDevice-id\"));\r\n List resp = usbDeviceApi.mountUsbDevice(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/create-security-policy": { + "/unmount-usb-device": { "exampleValue": { - "everoute_cluster_id": "ck74rk21wg5lz0786opdnzz5m", - "name": "name-string" + "where": { + "id": "UsbDevice-id" + } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-security-policy \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"everoute_cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}'", - "python": "from cloudtower import ApiClient, Configuration, SecurityPolicyApi\r\nfrom cloudtower.utils import login, wait_task\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n security_policy_api = SecurityPolicyApi(client)\r\n resp = security_policy_api.create_security_policy({\"everoute_cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"})\r\n wait_task(resp.task_id, client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/security_policy\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n security_policy_api := client.SecurityPolicy\r\n params := security_policy.NewCreateSecurityPolicyParams()\r\n params.RequestBody = &models.SecurityPolicyCreateParams{\nEverouteClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n}\r\n rawResp, err := security_policy_api.CreateSecurityPolicy(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n err = utils.WaitTask(context.Background(), client, resp.TaskID, 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SecurityPolicyApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SecurityPolicyApi securityPolicyApi = new SecurityPolicyApi(client);\r\n SecurityPolicyCreateParams params = new SecurityPolicyCreateParams()\n.everouteClusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\");\r\n WithTaskSecurityPolicy resp = securityPolicyApi.createSecurityPolicy(params);\r\n TaskUtil.WaitTask(resp.getTaskId(), client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/unmount-usb-device \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"UsbDevice-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, UsbDeviceApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n usb_device_api = UsbDeviceApi(client)\r\n resp = usb_device_api.unmount_usb_device({\"where\":{\"id\":\"UsbDevice-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/usb_device\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n usb_device_api := client.UsbDevice\r\n params := usb_device.NewUnmountUsbDeviceParams()\r\n params.RequestBody = &models.UsbDeviceUnmountParams{\nWhere: &models.UsbDeviceWhereInput{\nID: pointy.String(\"UsbDevice-id\"),\n},\n}\r\n rawResp, err := usb_device_api.UnmountUsbDevice(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskUsbDevice) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskUsbDevice)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskUsbDevice) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.UsbDeviceApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n UsbDeviceApi usbDeviceApi = new UsbDeviceApi(client);\r\n UsbDeviceUnmountParams params = new UsbDeviceUnmountParams()\n.where(new UsbDeviceWhereInput()\n.id(\"UsbDevice-id\"));\r\n List resp = usbDeviceApi.unmountUsbDevice(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/delete-security-policy": { + "/get-usb-devices": { "exampleValue": { "where": { - "id": "SecurityPolicy-id" + "id": "UsbDevice-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-security-policy \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"SecurityPolicy-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, SecurityPolicyApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n security_policy_api = SecurityPolicyApi(client)\r\n resp = security_policy_api.delete_security_policy({\"where\":{\"id\":\"SecurityPolicy-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/security_policy\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n security_policy_api := client.SecurityPolicy\r\n params := security_policy.NewDeleteSecurityPolicyParams()\r\n params.RequestBody = &models.SecurityPolicyDeleteParams{\nWhere: &models.SecurityPolicyWhereInput{\nID: pointy.String(\"SecurityPolicy-id\"),\n},\n}\r\n rawResp, err := security_policy_api.DeleteSecurityPolicy(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteSecurityPolicy) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteSecurityPolicy)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteSecurityPolicy) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SecurityPolicyApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SecurityPolicyApi securityPolicyApi = new SecurityPolicyApi(client);\r\n SecurityPolicyDeleteParams params = new SecurityPolicyDeleteParams()\n.where(new SecurityPolicyWhereInput()\n.id(\"SecurityPolicy-id\"));\r\n List resp = securityPolicyApi.deleteSecurityPolicy(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-usb-devices \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"UsbDevice-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, UsbDeviceApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n usb_device_api = UsbDeviceApi(client)\r\n resp = usb_device_api.get_usb_devices({\"where\":{\"id\":\"UsbDevice-id\"}})\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/usb_device\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n usb_device_api := client.UsbDevice\r\n params := usb_device.NewGetUsbDevicesParams()\r\n params.RequestBody = &models.GetUsbDevicesRequestBody{\nWhere: &models.UsbDeviceWhereInput{\nID: pointy.String(\"UsbDevice-id\"),\n},\n}\r\n rawResp, err := usb_device_api.GetUsbDevices(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.UsbDeviceApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n UsbDeviceApi usbDeviceApi = new UsbDeviceApi(client);\r\n GetUsbDevicesRequestBody params = new GetUsbDevicesRequestBody()\n.where(new UsbDeviceWhereInput()\n.id(\"UsbDevice-id\"));\r\n List resp = usbDeviceApi.getUsbDevices(params);\r\n }\r\n}" }, - "/update-security-policy": { + "/login": { + "exampleValue": { + "username": "username-string", + "password": "password-string" + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/login \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"username\":\"username-string\",\"password\":\"password-string\"}'", + "python": "from cloudtower import ApiClient, Configuration, UserApi\r\nfrom cloudtower.utils import login, wait_task\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n user_api = UserApi(client)\r\n resp = user_api.login({\"username\":\"username-string\",\"password\":\"password-string\"})\r\n wait_task(resp.task_id, client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/user\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n user_api := client.User\r\n params := user.NewLoginParams()\r\n params.RequestBody = &models.LoginInput{\nUsername: pointy.String(\"username-string\"),\nPassword: pointy.String(\"password-string\"),\n}\r\n rawResp, err := user_api.Login(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n err = utils.WaitTask(context.Background(), client, resp.TaskID, 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.UserApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n UserApi userApi = new UserApi(client);\r\n LoginInput params = new LoginInput()\n.username(\"username-string\")\n.password(\"password-string\");\r\n WithTaskLoginResponse resp = userApi.login(params);\r\n TaskUtil.WaitTask(resp.getTaskId(), client);\r\n }\r\n}" + }, + "/create-user": { + "exampleValue": [ + { + "role_id": "ck74rk21wg5lz0786opdnzz5m", + "name": "name-string", + "username": "username-string" + } + ], + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-user \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"role_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\",\"username\":\"username-string\"}]'", + "python": "from cloudtower import ApiClient, Configuration, UserApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n user_api = UserApi(client)\r\n resp = user_api.create_user([{\"role_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\",\"username\":\"username-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/user\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n user_api := client.User\r\n params := user.NewCreateUserParams()\r\n params.RequestBody = []*models.UserCreationParams{\n{\nRoleID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\nUsername: pointy.String(\"username-string\"),\n},\n}\r\n rawResp, err := user_api.CreateUser(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskUser) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskUser)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskUser) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.UserApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n UserApi userApi = new UserApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new UserCreationParams()\n.roleId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\")\n.username(\"username-string\"));\r\n List resp = userApi.createUser(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "/update-user": { "exampleValue": { "data": {}, "where": { - "id": "SecurityPolicy-id" + "id": "User-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-security-policy \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"SecurityPolicy-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, SecurityPolicyApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n security_policy_api = SecurityPolicyApi(client)\r\n resp = security_policy_api.update_security_policy({\"data\":{},\"where\":{\"id\":\"SecurityPolicy-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/security_policy\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n security_policy_api := client.SecurityPolicy\r\n params := security_policy.NewUpdateSecurityPolicyParams()\r\n params.RequestBody = &models.SecurityPolicyUpdateBody{\nData: &models.SecurityPolicyUpdateParams{\n},\nWhere: &models.SecurityPolicyWhereInput{\nID: pointy.String(\"SecurityPolicy-id\"),\n},\n}\r\n rawResp, err := security_policy_api.UpdateSecurityPolicy(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskSecurityPolicy) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskSecurityPolicy)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskSecurityPolicy) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SecurityPolicyApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SecurityPolicyApi securityPolicyApi = new SecurityPolicyApi(client);\r\n SecurityPolicyUpdateBody params = new SecurityPolicyUpdateBody()\n.data(new SecurityPolicyUpdateParams())\n.where(new SecurityPolicyWhereInput()\n.id(\"SecurityPolicy-id\"));\r\n List resp = securityPolicyApi.updateSecurityPolicy(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-user \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"User-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, UserApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n user_api = UserApi(client)\r\n resp = user_api.update_user({\"data\":{},\"where\":{\"id\":\"User-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/user\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n user_api := client.User\r\n params := user.NewUpdateUserParams()\r\n params.RequestBody = &models.UserUpdationParams{\nData: &models.UserUpdationParamsData{\n},\nWhere: &models.UserWhereInput{\nID: pointy.String(\"User-id\"),\n},\n}\r\n rawResp, err := user_api.UpdateUser(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskUser) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskUser)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskUser) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.UserApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n UserApi userApi = new UserApi(client);\r\n UserUpdationParams params = new UserUpdationParams()\n.data(new UserUpdationParamsData())\n.where(new UserWhereInput()\n.id(\"User-id\"));\r\n List resp = userApi.updateUser(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-password-security": { - "exampleValue": {}, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-password-security \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{}'", - "python": "from cloudtower import ApiClient, Configuration, GlobalSettingsApi\r\nfrom cloudtower.utils import login, wait_task\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n global_settings_api = GlobalSettingsApi(client)\r\n resp = global_settings_api.update_password_security({})\r\n wait_task(resp.task_id, client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/global_settings\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n global_settings_api := client.GlobalSettings\r\n params := global_settings.NewUpdatePasswordSecurityParams()\r\n params.RequestBody = &models.UpdatePassrodSecurityParams{\n}\r\n rawResp, err := global_settings_api.UpdatePasswordSecurity(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n err = utils.WaitTask(context.Background(), client, resp.TaskID, 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.GlobalSettingsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n GlobalSettingsApi globalSettingsApi = new GlobalSettingsApi(client);\r\n UpdatePassrodSecurityParams params = new UpdatePassrodSecurityParams();\r\n WithTaskGlobalSettings resp = globalSettingsApi.updatePasswordSecurity(params);\r\n TaskUtil.WaitTask(resp.getTaskId(), client);\r\n }\r\n}" + "/delete-user": { + "exampleValue": { + "where": { + "id": "User-id" + } + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-user \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"User-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, UserApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n user_api = UserApi(client)\r\n resp = user_api.delete_user({\"where\":{\"id\":\"User-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/user\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n user_api := client.User\r\n params := user.NewDeleteUserParams()\r\n params.RequestBody = &models.UserDeletionParams{\nWhere: &models.UserWhereInput{\nID: pointy.String(\"User-id\"),\n},\n}\r\n rawResp, err := user_api.DeleteUser(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteUser) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteUser)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteUser) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.UserApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n UserApi userApi = new UserApi(client);\r\n UserDeletionParams params = new UserDeletionParams()\n.where(new UserWhereInput()\n.id(\"User-id\"));\r\n List resp = userApi.deleteUser(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-access-restriction": { + "/create-root-user": { "exampleValue": { - "access_list": [ - "-string" - ], - "access_mode": "ALLOW" + "password": "password-string" }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-access-restriction \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"access_list\":[\"-string\"],\"access_mode\":\"ALLOW\"}'", - "python": "from cloudtower import ApiClient, Configuration, GlobalSettingsApi\r\nfrom cloudtower.utils import login, wait_task\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n global_settings_api = GlobalSettingsApi(client)\r\n resp = global_settings_api.update_access_restriction({\"access_list\":[\"-string\"],\"access_mode\":\"ALLOW\"})\r\n wait_task(resp.task_id, client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/global_settings\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n global_settings_api := client.GlobalSettings\r\n params := global_settings.NewUpdateAccessRestrictionParams()\r\n params.RequestBody = &models.UpdateAccessRestrictionParams{\nAccessList: []string{\"-string\",\n},\nAccessMode: models.AccessModeALLOW.Pointer(),\n}\r\n rawResp, err := global_settings_api.UpdateAccessRestriction(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n err = utils.WaitTask(context.Background(), client, resp.TaskID, 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.GlobalSettingsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n GlobalSettingsApi globalSettingsApi = new GlobalSettingsApi(client);\r\n UpdateAccessRestrictionParams params = new UpdateAccessRestrictionParams()\n.addAccessListItem(\"-string\")\n.accessMode(AccessMode.fromValue(\"ALLOW\"));\r\n WithTaskGlobalSettings resp = globalSettingsApi.updateAccessRestriction(params);\r\n TaskUtil.WaitTask(resp.getTaskId(), client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-root-user \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"password\":\"password-string\"}'", + "python": "from cloudtower import ApiClient, Configuration, UserApi\r\nfrom cloudtower.utils import login, wait_task\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n user_api = UserApi(client)\r\n resp = user_api.create_root_user({\"password\":\"password-string\"})\r\n wait_task(resp.task_id, client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/user\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n user_api := client.User\r\n params := user.NewCreateRootUserParams()\r\n params.RequestBody = &models.RootUserCreationParams{\nPassword: pointy.String(\"password-string\"),\n}\r\n rawResp, err := user_api.CreateRootUser(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n err = utils.WaitTask(context.Background(), client, resp.TaskID, 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.UserApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n UserApi userApi = new UserApi(client);\r\n RootUserCreationParams params = new RootUserCreationParams()\n.password(\"password-string\");\r\n WithTaskUser resp = userApi.createRootUser(params);\r\n TaskUtil.WaitTask(resp.getTaskId(), client);\r\n }\r\n}" }, - "/update-session-timeout": { + "/create-vcenter-account": { "exampleValue": { - "session_max_age": 1 + "data": { + "port": 1, + "password": "password-string", + "username": "username-string", + "ip": "ip-string", + "cluster_id": "ck74rk21wg5lz0786opdnzz5m" + } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-session-timeout \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"session_max_age\":1}'", - "python": "from cloudtower import ApiClient, Configuration, GlobalSettingsApi\r\nfrom cloudtower.utils import login, wait_task\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n global_settings_api = GlobalSettingsApi(client)\r\n resp = global_settings_api.update_session_timeout({\"session_max_age\":1})\r\n wait_task(resp.task_id, client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/global_settings\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n global_settings_api := client.GlobalSettings\r\n params := global_settings.NewUpdateSessionTimeoutParams()\r\n params.RequestBody = &models.UpdateSessionTimeoutParams{\nSessionMaxAge: pointy.Int32(1),\n}\r\n rawResp, err := global_settings_api.UpdateSessionTimeout(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n err = utils.WaitTask(context.Background(), client, resp.TaskID, 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.GlobalSettingsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n GlobalSettingsApi globalSettingsApi = new GlobalSettingsApi(client);\r\n UpdateSessionTimeoutParams params = new UpdateSessionTimeoutParams()\n.sessionMaxAge(1);\r\n WithTaskGlobalSettings resp = globalSettingsApi.updateSessionTimeout(params);\r\n TaskUtil.WaitTask(resp.getTaskId(), client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-vcenter-account \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"port\":1,\"password\":\"password-string\",\"username\":\"username-string\",\"ip\":\"ip-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VcenterAccountApi\r\nfrom cloudtower.utils import login, wait_task\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vcenter_account_api = VcenterAccountApi(client)\r\n resp = vcenter_account_api.create_vcenter_account({\"data\":{\"port\":1,\"password\":\"password-string\",\"username\":\"username-string\",\"ip\":\"ip-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}})\r\n wait_task(resp.task_id, client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vcenter_account\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vcenter_account_api := client.VcenterAccount\r\n params := vcenter_account.NewCreateVcenterAccountParams()\r\n params.RequestBody = &models.CreateVcenterAccountParams{\nData: &models.CreateVcenterAccountParamsData{\nPort: pointy.Int32(1),\nPassword: pointy.String(\"password-string\"),\nUsername: pointy.String(\"username-string\"),\nIP: pointy.String(\"ip-string\"),\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := vcenter_account_api.CreateVcenterAccount(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n err = utils.WaitTask(context.Background(), client, resp.TaskID, 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VcenterAccountApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VcenterAccountApi vcenterAccountApi = new VcenterAccountApi(client);\r\n CreateVcenterAccountParams params = new CreateVcenterAccountParams()\n.data(new CreateVcenterAccountParamsData()\n.port(1)\n.password(\"password-string\")\n.username(\"username-string\")\n.ip(\"ip-string\")\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n WithTaskVcenterAccount resp = vcenterAccountApi.createVcenterAccount(params);\r\n TaskUtil.WaitTask(resp.getTaskId(), client);\r\n }\r\n}" }, - "/rollback-snapshot-group": { + "/update-vcenter-account": { "exampleValue": { + "data": { + "port": 1, + "password": "password-string", + "username": "username-string", + "ip": "ip-string" + }, "where": { - "id": "SnapshotGroup-id" + "id": "VcenterAccount-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/rollback-snapshot-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"SnapshotGroup-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, SnapshotGroupApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n snapshot_group_api = SnapshotGroupApi(client)\r\n resp = snapshot_group_api.rollback_snapshot_group({\"where\":{\"id\":\"SnapshotGroup-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/snapshot_group\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n snapshot_group_api := client.SnapshotGroup\r\n params := snapshot_group.NewRollbackSnapshotGroupParams()\r\n params.RequestBody = &models.SnapshotGroupRollbackParams{\nWhere: &models.SnapshotGroupWhereInput{\nID: pointy.String(\"SnapshotGroup-id\"),\n},\n}\r\n rawResp, err := snapshot_group_api.RollbackSnapshotGroup(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskSnapshotGroup) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskSnapshotGroup)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskSnapshotGroup) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SnapshotGroupApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SnapshotGroupApi snapshotGroupApi = new SnapshotGroupApi(client);\r\n SnapshotGroupRollbackParams params = new SnapshotGroupRollbackParams()\n.where(new SnapshotGroupWhereInput()\n.id(\"SnapshotGroup-id\"));\r\n List resp = snapshotGroupApi.rollbackSnapshotGroup(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-vcenter-account \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"port\":1,\"password\":\"password-string\",\"username\":\"username-string\",\"ip\":\"ip-string\"},\"where\":{\"id\":\"VcenterAccount-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VcenterAccountApi\r\nfrom cloudtower.utils import login, wait_task\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vcenter_account_api = VcenterAccountApi(client)\r\n resp = vcenter_account_api.update_vcenter_account({\"data\":{\"port\":1,\"password\":\"password-string\",\"username\":\"username-string\",\"ip\":\"ip-string\"},\"where\":{\"id\":\"VcenterAccount-id\"}})\r\n wait_task(resp.task_id, client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vcenter_account\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vcenter_account_api := client.VcenterAccount\r\n params := vcenter_account.NewUpdateVcenterAccountParams()\r\n params.RequestBody = &models.UpdateVcenterAccountParams{\nData: &models.UpdateVcenterAccountParamsData{\nPort: pointy.Int32(1),\nPassword: pointy.String(\"password-string\"),\nUsername: pointy.String(\"username-string\"),\nIP: pointy.String(\"ip-string\"),\n},\nWhere: &models.VcenterAccountWhereUniqueInput{\nID: pointy.String(\"VcenterAccount-id\"),\n},\n}\r\n rawResp, err := vcenter_account_api.UpdateVcenterAccount(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n err = utils.WaitTask(context.Background(), client, resp.TaskID, 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VcenterAccountApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VcenterAccountApi vcenterAccountApi = new VcenterAccountApi(client);\r\n UpdateVcenterAccountParams params = new UpdateVcenterAccountParams()\n.data(new UpdateVcenterAccountParamsData()\n.port(1)\n.password(\"password-string\")\n.username(\"username-string\")\n.ip(\"ip-string\"))\n.where(new VcenterAccountWhereUniqueInput()\n.id(\"VcenterAccount-id\"));\r\n WithTaskVcenterAccount resp = vcenterAccountApi.updateVcenterAccount(params);\r\n TaskUtil.WaitTask(resp.getTaskId(), client);\r\n }\r\n}" }, - "/clone-snapshot-group": { + "/create-vds-with-migrate-vlan": { "exampleValue": [ { - "clone": [ - { - "from_source_vm_id": "ck74rk21wg5lz0786opdnzz5m", - "to_cloned_vm_name": "to_cloned_vm_name-string" - } + "nic_ids": [ + "-string" ], - "id": "ck74rk21wg5lz0786opdnzz5m" + "cluster_id": "ck74rk21wg5lz0786opdnzz5m", + "name": "name-string", + "vlan": { + "extra_ip": [ + { + "management_ip": "management_ip-string", + "host_id": "ck74rk21wg5lz0786opdnzz5m" + } + ], + "subnetmask": "subnetmask-string", + "vlan_id": 1 + } } ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/clone-snapshot-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"clone\":[{\"from_source_vm_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"to_cloned_vm_name\":\"to_cloned_vm_name-string\"}],\"id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", - "python": "from cloudtower import ApiClient, Configuration, SnapshotGroupApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n snapshot_group_api = SnapshotGroupApi(client)\r\n resp = snapshot_group_api.clone_snapshot_group([{\"clone\":[{\"from_source_vm_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"to_cloned_vm_name\":\"to_cloned_vm_name-string\"}],\"id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/snapshot_group\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n snapshot_group_api := client.SnapshotGroup\r\n params := snapshot_group.NewCloneSnapshotGroupParams()\r\n params.RequestBody = []*models.SnapshotGroupCloneParams{\n{\nClone: []*models.SnapshotGroupCloneParam{\n{\nFromSourceVMID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nToClonedVMName: pointy.String(\"to_cloned_vm_name-string\"),\n},\n},\nID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := snapshot_group_api.CloneSnapshotGroup(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskSnapshotGroup) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskSnapshotGroup)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskSnapshotGroup) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SnapshotGroupApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SnapshotGroupApi snapshotGroupApi = new SnapshotGroupApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new SnapshotGroupCloneParams()\n.addCloneItem(new SnapshotGroupCloneParam()\n.fromSourceVmId(\"ck74rk21wg5lz0786opdnzz5m\")\n.toClonedVmName(\"to_cloned_vm_name-string\"))\n.id(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = snapshotGroupApi.cloneSnapshotGroup(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-vds-with-migrate-vlan \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"nic_ids\":[\"-string\"],\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\",\"vlan\":{\"extra_ip\":[{\"management_ip\":\"management_ip-string\",\"host_id\":\"ck74rk21wg5lz0786opdnzz5m\"}],\"subnetmask\":\"subnetmask-string\",\"vlan_id\":1}}]'", + "python": "from cloudtower import ApiClient, Configuration, VdsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vds_api = VdsApi(client)\r\n resp = vds_api.create_vds_with_migrate_vlan([{\"nic_ids\":[\"-string\"],\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\",\"vlan\":{\"extra_ip\":[{\"management_ip\":\"management_ip-string\",\"host_id\":\"ck74rk21wg5lz0786opdnzz5m\"}],\"subnetmask\":\"subnetmask-string\",\"vlan_id\":1}}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vds\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vds_api := client.Vds\r\n params := vds.NewCreateVdsWithMigrateVlanParams()\r\n params.RequestBody = []*models.VdsCreationWithMigrateVlanParams{\n{\nNicIds: []string{\"-string\",\n},\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\nVlan: &models.VdsCreationWithMigrateVlanParamsVlan{\nExtraIP: []*models.VdsCreationWithMigrateVlanParamsVlanExtraip{\n{\nManagementIP: pointy.String(\"management_ip-string\"),\nHostID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n},\nSubnetmask: pointy.String(\"subnetmask-string\"),\nVlanID: pointy.Int32(1),\n},\n},\n}\r\n rawResp, err := vds_api.CreateVdsWithMigrateVlan(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVds) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVds)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVds) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VdsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VdsApi vdsApi = new VdsApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new VdsCreationWithMigrateVlanParams()\n.addNicIdsItem(\"-string\")\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\")\n.vlan(new VdsCreationWithMigrateVlanParamsVlan()\n.addExtraIpItem(new VdsCreationWithMigrateVlanParamsVlanExtraip()\n.managementIp(\"management_ip-string\")\n.hostId(\"ck74rk21wg5lz0786opdnzz5m\"))\n.subnetmask(\"subnetmask-string\")\n.vlanId(1)));\r\n List resp = vdsApi.createVdsWithMigrateVlan(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/keep-snapshot-group": { + "/create-vds-with-access-vlan": { + "exampleValue": [ + { + "nic_ids": [ + "-string" + ], + "cluster_id": "ck74rk21wg5lz0786opdnzz5m", + "name": "name-string", + "vlan": { + "extra_ip": [ + { + "management_ip": "management_ip-string", + "host_id": "ck74rk21wg5lz0786opdnzz5m" + } + ], + "subnetmask": "subnetmask-string", + "vlan_id": 1 + } + } + ], + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-vds-with-access-vlan \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"nic_ids\":[\"-string\"],\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\",\"vlan\":{\"extra_ip\":[{\"management_ip\":\"management_ip-string\",\"host_id\":\"ck74rk21wg5lz0786opdnzz5m\"}],\"subnetmask\":\"subnetmask-string\",\"vlan_id\":1}}]'", + "python": "from cloudtower import ApiClient, Configuration, VdsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vds_api = VdsApi(client)\r\n resp = vds_api.create_vds_with_access_vlan([{\"nic_ids\":[\"-string\"],\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\",\"vlan\":{\"extra_ip\":[{\"management_ip\":\"management_ip-string\",\"host_id\":\"ck74rk21wg5lz0786opdnzz5m\"}],\"subnetmask\":\"subnetmask-string\",\"vlan_id\":1}}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vds\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vds_api := client.Vds\r\n params := vds.NewCreateVdsWithAccessVlanParams()\r\n params.RequestBody = []*models.VdsCreationWithMAccessVlanParams{\n{\nNicIds: []string{\"-string\",\n},\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\nVlan: &models.VdsCreationWithMAccessVlanParamsVlan{\nExtraIP: []*models.VdsCreationWithMAccessVlanParamsVlanExtraip{\n{\nManagementIP: pointy.String(\"management_ip-string\"),\nHostID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n},\nSubnetmask: pointy.String(\"subnetmask-string\"),\nVlanID: pointy.Int32(1),\n},\n},\n}\r\n rawResp, err := vds_api.CreateVdsWithAccessVlan(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVds) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVds)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVds) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VdsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VdsApi vdsApi = new VdsApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new VdsCreationWithMAccessVlanParams()\n.addNicIdsItem(\"-string\")\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\")\n.vlan(new VdsCreationWithMAccessVlanParamsVlan()\n.addExtraIpItem(new VdsCreationWithMAccessVlanParamsVlanExtraip()\n.managementIp(\"management_ip-string\")\n.hostId(\"ck74rk21wg5lz0786opdnzz5m\"))\n.subnetmask(\"subnetmask-string\")\n.vlanId(1)));\r\n List resp = vdsApi.createVdsWithAccessVlan(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "/create-vds": { + "exampleValue": [ + { + "nic_ids": [ + "-string" + ], + "cluster_id": "ck74rk21wg5lz0786opdnzz5m", + "name": "name-string" + } + ], + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-vds \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"nic_ids\":[\"-string\"],\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", + "python": "from cloudtower import ApiClient, Configuration, VdsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vds_api = VdsApi(client)\r\n resp = vds_api.create_vds([{\"nic_ids\":[\"-string\"],\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vds\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vds_api := client.Vds\r\n params := vds.NewCreateVdsParams()\r\n params.RequestBody = []*models.VdsCreationParams{\n{\nNicIds: []string{\"-string\",\n},\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := vds_api.CreateVds(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVds) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVds)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVds) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VdsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VdsApi vdsApi = new VdsApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new VdsCreationParams()\n.addNicIdsItem(\"-string\")\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = vdsApi.createVds(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "/update-vds": { "exampleValue": { + "data": {}, "where": { - "id": "SnapshotGroup-id" + "id": "Vds-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/keep-snapshot-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"SnapshotGroup-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, SnapshotGroupApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n snapshot_group_api = SnapshotGroupApi(client)\r\n resp = snapshot_group_api.keep_snapshot_group({\"where\":{\"id\":\"SnapshotGroup-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/snapshot_group\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n snapshot_group_api := client.SnapshotGroup\r\n params := snapshot_group.NewKeepSnapshotGroupParams()\r\n params.RequestBody = &models.SnapshotGroupKeepParams{\nWhere: &models.SnapshotGroupWhereInput{\nID: pointy.String(\"SnapshotGroup-id\"),\n},\n}\r\n rawResp, err := snapshot_group_api.KeepSnapshotGroup(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskSnapshotGroup) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskSnapshotGroup)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskSnapshotGroup) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SnapshotGroupApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SnapshotGroupApi snapshotGroupApi = new SnapshotGroupApi(client);\r\n SnapshotGroupKeepParams params = new SnapshotGroupKeepParams()\n.where(new SnapshotGroupWhereInput()\n.id(\"SnapshotGroup-id\"));\r\n List resp = snapshotGroupApi.keepSnapshotGroup(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-vds \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Vds-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VdsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vds_api = VdsApi(client)\r\n resp = vds_api.update_vds({\"data\":{},\"where\":{\"id\":\"Vds-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vds\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vds_api := client.Vds\r\n params := vds.NewUpdateVdsParams()\r\n params.RequestBody = &models.VdsUpdationParams{\nData: &models.VdsUpdationParamsData{\n},\nWhere: &models.VdsWhereInput{\nID: pointy.String(\"Vds-id\"),\n},\n}\r\n rawResp, err := vds_api.UpdateVds(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVds) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVds)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVds) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VdsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VdsApi vdsApi = new VdsApi(client);\r\n VdsUpdationParams params = new VdsUpdationParams()\n.data(new VdsUpdationParamsData())\n.where(new VdsWhereInput()\n.id(\"Vds-id\"));\r\n List resp = vdsApi.updateVds(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/delete-snapshot-group": { + "/delete-vds": { "exampleValue": { "where": { - "id": "SnapshotGroup-id" + "id": "Vds-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-snapshot-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"SnapshotGroup-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, SnapshotGroupApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n snapshot_group_api = SnapshotGroupApi(client)\r\n resp = snapshot_group_api.delete_snapshot_group({\"where\":{\"id\":\"SnapshotGroup-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/snapshot_group\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n snapshot_group_api := client.SnapshotGroup\r\n params := snapshot_group.NewDeleteSnapshotGroupParams()\r\n params.RequestBody = &models.SnapshotGroupDeletionParams{\nWhere: &models.SnapshotGroupWhereInput{\nID: pointy.String(\"SnapshotGroup-id\"),\n},\n}\r\n rawResp, err := snapshot_group_api.DeleteSnapshotGroup(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteSnapshotGroup) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteSnapshotGroup)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteSnapshotGroup) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SnapshotGroupApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SnapshotGroupApi snapshotGroupApi = new SnapshotGroupApi(client);\r\n SnapshotGroupDeletionParams params = new SnapshotGroupDeletionParams()\n.where(new SnapshotGroupWhereInput()\n.id(\"SnapshotGroup-id\"));\r\n List resp = snapshotGroupApi.deleteSnapshotGroup(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-vds \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Vds-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VdsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vds_api = VdsApi(client)\r\n resp = vds_api.delete_vds({\"where\":{\"id\":\"Vds-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vds\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vds_api := client.Vds\r\n params := vds.NewDeleteVdsParams()\r\n params.RequestBody = &models.VdsDeletionParams{\nWhere: &models.VdsWhereInput{\nID: pointy.String(\"Vds-id\"),\n},\n}\r\n rawResp, err := vds_api.DeleteVds(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteVds) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteVds)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteVds) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VdsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VdsApi vdsApi = new VdsApi(client);\r\n VdsDeletionParams params = new VdsDeletionParams()\n.where(new VdsWhereInput()\n.id(\"Vds-id\"));\r\n List resp = vdsApi.deleteVds(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/create-snapshot-plan": { + "/create-view": { "exampleValue": [ { - "vm_ids": [ - "-string" - ], - "execute_intervals": [ - 1 - ], - "execute_plan_type": "DAY", - "start_time": "start_time-string", - "remain_snapshot_num": 1, + "time_unit": "DAY", + "time_span": 1, "cluster_id": "ck74rk21wg5lz0786opdnzz5m", "name": "name-string" } ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-snapshot-plan \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"vm_ids\":[\"-string\"],\"execute_intervals\":[1],\"execute_plan_type\":\"DAY\",\"start_time\":\"start_time-string\",\"remain_snapshot_num\":1,\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", - "python": "from cloudtower import ApiClient, Configuration, SnapshotPlanApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n snapshot_plan_api = SnapshotPlanApi(client)\r\n resp = snapshot_plan_api.create_snapshot_plan([{\"vm_ids\":[\"-string\"],\"execute_intervals\":[1],\"execute_plan_type\":\"DAY\",\"start_time\":\"start_time-string\",\"remain_snapshot_num\":1,\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/snapshot_plan\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n snapshot_plan_api := client.SnapshotPlan\r\n params := snapshot_plan.NewCreateSnapshotPlanParams()\r\n params.RequestBody = []*models.SnapshotPlanCreationParams{\n{\nVMIds: []string{\"-string\",\n},\nExecuteIntervals: []int{1\n},\nExecutePlanType: models.SnapshotPlanExecuteTypeDAY.Pointer(),\nStartTime: pointy.String(\"start_time-string\"),\nRemainSnapshotNum: pointy.Int32(1),\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := snapshot_plan_api.CreateSnapshotPlan(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskSnapshotPlan) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskSnapshotPlan)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskSnapshotPlan) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SnapshotPlanApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SnapshotPlanApi snapshotPlanApi = new SnapshotPlanApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new SnapshotPlanCreationParams()\n.addVmIdsItem(\"-string\")\n.addExecuteIntervalsItem(1)\n.executePlanType(SnapshotPlanExecuteType.fromValue(\"DAY\"))\n.startTime(\"start_time-string\")\n.remainSnapshotNum(1)\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = snapshotPlanApi.createSnapshotPlan(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-view \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"time_unit\":\"DAY\",\"time_span\":1,\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", + "python": "from cloudtower import ApiClient, Configuration, ViewApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n view_api = ViewApi(client)\r\n resp = view_api.create_view([{\"time_unit\":\"DAY\",\"time_span\":1,\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/view\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n view_api := client.View\r\n params := view.NewCreateViewParams()\r\n params.RequestBody = []*models.ViewCreationParams{\n{\nTimeUnit: models.TimeUnitDAY.Pointer(),\nTimeSpan: pointy.Int32(1),\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := view_api.CreateView(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskView) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskView)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskView) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ViewApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ViewApi viewApi = new ViewApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new ViewCreationParams()\n.timeUnit(TimeUnit.fromValue(\"DAY\"))\n.timeSpan(1)\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = viewApi.createView(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-snapshot-plan": { + "/update-view": { "exampleValue": { "where": { - "id": "SnapshotPlan-id" + "id": "View-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-snapshot-plan \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"SnapshotPlan-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, SnapshotPlanApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n snapshot_plan_api = SnapshotPlanApi(client)\r\n resp = snapshot_plan_api.update_snapshot_plan({\"where\":{\"id\":\"SnapshotPlan-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/snapshot_plan\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n snapshot_plan_api := client.SnapshotPlan\r\n params := snapshot_plan.NewUpdateSnapshotPlanParams()\r\n params.RequestBody = &models.SnapshotPlanUpdationParams{\nWhere: &models.SnapshotPlanWhereInput{\nID: pointy.String(\"SnapshotPlan-id\"),\n},\n}\r\n rawResp, err := snapshot_plan_api.UpdateSnapshotPlan(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskSnapshotPlan) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskSnapshotPlan)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskSnapshotPlan) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SnapshotPlanApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SnapshotPlanApi snapshotPlanApi = new SnapshotPlanApi(client);\r\n SnapshotPlanUpdationParams params = new SnapshotPlanUpdationParams()\n.where(new SnapshotPlanWhereInput()\n.id(\"SnapshotPlan-id\"));\r\n List resp = snapshotPlanApi.updateSnapshotPlan(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-view \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"View-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, ViewApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n view_api = ViewApi(client)\r\n resp = view_api.update_view({\"where\":{\"id\":\"View-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/view\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n view_api := client.View\r\n params := view.NewUpdateViewParams()\r\n params.RequestBody = &models.ViewUpdationParams{\nWhere: &models.ViewWhereInput{\nID: pointy.String(\"View-id\"),\n},\n}\r\n rawResp, err := view_api.UpdateView(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskView) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskView)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskView) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ViewApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ViewApi viewApi = new ViewApi(client);\r\n ViewUpdationParams params = new ViewUpdationParams()\n.where(new ViewWhereInput()\n.id(\"View-id\"));\r\n List resp = viewApi.updateView(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/delete-snapshot-plan": { + "/delete-view": { "exampleValue": { "where": { - "id": "SnapshotPlan-id" + "id": "View-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-snapshot-plan \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"SnapshotPlan-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, SnapshotPlanApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n snapshot_plan_api = SnapshotPlanApi(client)\r\n resp = snapshot_plan_api.delete_snapshot_plan({\"where\":{\"id\":\"SnapshotPlan-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/snapshot_plan\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n snapshot_plan_api := client.SnapshotPlan\r\n params := snapshot_plan.NewDeleteSnapshotPlanParams()\r\n params.RequestBody = &models.SnapshotPlanDeletionParams{\nWhere: &models.SnapshotPlanWhereInput{\nID: pointy.String(\"SnapshotPlan-id\"),\n},\n}\r\n rawResp, err := snapshot_plan_api.DeleteSnapshotPlan(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteSnapshotPlan) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteSnapshotPlan)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteSnapshotPlan) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SnapshotPlanApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SnapshotPlanApi snapshotPlanApi = new SnapshotPlanApi(client);\r\n SnapshotPlanDeletionParams params = new SnapshotPlanDeletionParams()\n.where(new SnapshotPlanWhereInput()\n.id(\"SnapshotPlan-id\"));\r\n List resp = snapshotPlanApi.deleteSnapshotPlan(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-view \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"View-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, ViewApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n view_api = ViewApi(client)\r\n resp = view_api.delete_view({\"where\":{\"id\":\"View-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/view\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n view_api := client.View\r\n params := view.NewDeleteViewParams()\r\n params.RequestBody = &models.ViewDeletionParams{\nWhere: &models.ViewWhereInput{\nID: pointy.String(\"View-id\"),\n},\n}\r\n rawResp, err := view_api.DeleteView(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteView) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteView)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteView) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ViewApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ViewApi viewApi = new ViewApi(client);\r\n ViewDeletionParams params = new ViewDeletionParams()\n.where(new ViewWhereInput()\n.id(\"View-id\"));\r\n List resp = viewApi.deleteView(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/execute-snapshot-plan": { + "/create-vm-vlan": { + "exampleValue": [ + { + "vds_id": "ck74rk21wg5lz0786opdnzz5m", + "name": "name-string" + } + ], + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-vm-vlan \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"vds_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", + "python": "from cloudtower import ApiClient, Configuration, VlanApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vlan_api = VlanApi(client)\r\n resp = vlan_api.create_vm_vlan([{\"vds_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vlan\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vlan_api := client.Vlan\r\n params := vlan.NewCreateVMVlanParams()\r\n params.RequestBody = []*models.VMVlanCreationParams{\n{\nVdsID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := vlan_api.CreateVMVlan(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVlan) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVlan)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVlan) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VlanApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VlanApi vlanApi = new VlanApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new VmVlanCreationParams()\n.vdsId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = vlanApi.createVmVlan(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "/update-vm-vlan": { "exampleValue": { - "data": { - "task_name": "task_name-string" - }, + "data": {}, "where": { - "id": "SnapshotPlan-id" + "id": "Vlan-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/execute-snapshot-plan \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"task_name\":\"task_name-string\"},\"where\":{\"id\":\"SnapshotPlan-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, SnapshotPlanApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n snapshot_plan_api = SnapshotPlanApi(client)\r\n resp = snapshot_plan_api.execute_snapshot_plan({\"data\":{\"task_name\":\"task_name-string\"},\"where\":{\"id\":\"SnapshotPlan-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/snapshot_plan\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n snapshot_plan_api := client.SnapshotPlan\r\n params := snapshot_plan.NewExecuteSnapshotPlanParams()\r\n params.RequestBody = &models.SnapshotPlanExecutionParams{\nData: &models.SnapshotPlanExecutionParamsData{\nTaskName: pointy.String(\"task_name-string\"),\n},\nWhere: &models.SnapshotPlanWhereInput{\nID: pointy.String(\"SnapshotPlan-id\"),\n},\n}\r\n rawResp, err := snapshot_plan_api.ExecuteSnapshotPlan(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskSnapshotPlan) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskSnapshotPlan)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskSnapshotPlan) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SnapshotPlanApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SnapshotPlanApi snapshotPlanApi = new SnapshotPlanApi(client);\r\n SnapshotPlanExecutionParams params = new SnapshotPlanExecutionParams()\n.data(new SnapshotPlanExecutionParamsData()\n.taskName(\"task_name-string\"))\n.where(new SnapshotPlanWhereInput()\n.id(\"SnapshotPlan-id\"));\r\n List resp = snapshotPlanApi.executeSnapshotPlan(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-vm-vlan \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Vlan-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VlanApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vlan_api = VlanApi(client)\r\n resp = vlan_api.update_vlan({\"data\":{},\"where\":{\"id\":\"Vlan-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vlan\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vlan_api := client.Vlan\r\n params := vlan.NewUpdateVlanParams()\r\n params.RequestBody = &models.VMVlanUpdationParams{\nData: &models.VMVlanUpdationParamsData{\n},\nWhere: &models.VlanWhereInput{\nID: pointy.String(\"Vlan-id\"),\n},\n}\r\n rawResp, err := vlan_api.UpdateVlan(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVlan) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVlan)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVlan) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VlanApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VlanApi vlanApi = new VlanApi(client);\r\n VmVlanUpdationParams params = new VmVlanUpdationParams()\n.data(new VmVlanUpdationParamsData())\n.where(new VlanWhereInput()\n.id(\"Vlan-id\"));\r\n List resp = vlanApi.updateVlan(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/suspend-snapshot-plan": { + "/update-management-vlan": { "exampleValue": { + "data": {}, "where": { - "id": "SnapshotPlan-id" + "id": "Vlan-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/suspend-snapshot-plan \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"SnapshotPlan-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, SnapshotPlanApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n snapshot_plan_api = SnapshotPlanApi(client)\r\n resp = snapshot_plan_api.suspend_snapshot_plan({\"where\":{\"id\":\"SnapshotPlan-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/snapshot_plan\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n snapshot_plan_api := client.SnapshotPlan\r\n params := snapshot_plan.NewSuspendSnapshotPlanParams()\r\n params.RequestBody = &models.SnapshotPlanSuspendedParams{\nWhere: &models.SnapshotPlanWhereInput{\nID: pointy.String(\"SnapshotPlan-id\"),\n},\n}\r\n rawResp, err := snapshot_plan_api.SuspendSnapshotPlan(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskSnapshotPlan) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskSnapshotPlan)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskSnapshotPlan) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SnapshotPlanApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SnapshotPlanApi snapshotPlanApi = new SnapshotPlanApi(client);\r\n SnapshotPlanSuspendedParams params = new SnapshotPlanSuspendedParams()\n.where(new SnapshotPlanWhereInput()\n.id(\"SnapshotPlan-id\"));\r\n List resp = snapshotPlanApi.suspendSnapshotPlan(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-management-vlan \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Vlan-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VlanApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vlan_api = VlanApi(client)\r\n resp = vlan_api.update_management_vlan({\"data\":{},\"where\":{\"id\":\"Vlan-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vlan\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vlan_api := client.Vlan\r\n params := vlan.NewUpdateManagementVlanParams()\r\n params.RequestBody = &models.ManagementVlanUpdationParams{\nData: &models.ManagementVlanUpdationParamsData{\n},\nWhere: &models.VlanWhereInput{\nID: pointy.String(\"Vlan-id\"),\n},\n}\r\n rawResp, err := vlan_api.UpdateManagementVlan(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVlan) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVlan)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVlan) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VlanApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VlanApi vlanApi = new VlanApi(client);\r\n ManagementVlanUpdationParams params = new ManagementVlanUpdationParams()\n.data(new ManagementVlanUpdationParamsData())\n.where(new VlanWhereInput()\n.id(\"Vlan-id\"));\r\n List resp = vlanApi.updateManagementVlan(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/resume-snapshot-plan": { + "/update-migration-vlan": { "exampleValue": { "where": { - "id": "SnapshotPlan-id" + "id": "Vlan-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/resume-snapshot-plan \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"SnapshotPlan-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, SnapshotPlanApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n snapshot_plan_api = SnapshotPlanApi(client)\r\n resp = snapshot_plan_api.resume_snapshot_plan({\"where\":{\"id\":\"SnapshotPlan-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/snapshot_plan\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n snapshot_plan_api := client.SnapshotPlan\r\n params := snapshot_plan.NewResumeSnapshotPlanParams()\r\n params.RequestBody = &models.SnapshotPlanResumeParams{\nWhere: &models.SnapshotPlanWhereInput{\nID: pointy.String(\"SnapshotPlan-id\"),\n},\n}\r\n rawResp, err := snapshot_plan_api.ResumeSnapshotPlan(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskSnapshotPlan) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskSnapshotPlan)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskSnapshotPlan) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SnapshotPlanApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SnapshotPlanApi snapshotPlanApi = new SnapshotPlanApi(client);\r\n SnapshotPlanResumeParams params = new SnapshotPlanResumeParams()\n.where(new SnapshotPlanWhereInput()\n.id(\"SnapshotPlan-id\"));\r\n List resp = snapshotPlanApi.resumeSnapshotPlan(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-migration-vlan \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Vlan-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VlanApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vlan_api = VlanApi(client)\r\n resp = vlan_api.update_migration_vlan({\"where\":{\"id\":\"Vlan-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vlan\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vlan_api := client.Vlan\r\n params := vlan.NewUpdateMigrationVlanParams()\r\n params.RequestBody = &models.MigrationVlanUpdationParams{\nWhere: &models.VlanWhereInput{\nID: pointy.String(\"Vlan-id\"),\n},\n}\r\n rawResp, err := vlan_api.UpdateMigrationVlan(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVlan) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVlan)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVlan) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VlanApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VlanApi vlanApi = new VlanApi(client);\r\n MigrationVlanUpdationParams params = new MigrationVlanUpdationParams()\n.where(new VlanWhereInput()\n.id(\"Vlan-id\"));\r\n List resp = vlanApi.updateMigrationVlan(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "/delete-vm-vlan": { + "exampleValue": { + "where": { + "id": "Vlan-id" + } + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-vm-vlan \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Vlan-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VlanApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vlan_api = VlanApi(client)\r\n resp = vlan_api.delete_vlan({\"where\":{\"id\":\"Vlan-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vlan\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vlan_api := client.Vlan\r\n params := vlan.NewDeleteVlanParams()\r\n params.RequestBody = &models.VlanDeletionParams{\nWhere: &models.VlanWhereInput{\nID: pointy.String(\"Vlan-id\"),\n},\n}\r\n rawResp, err := vlan_api.DeleteVlan(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteVlan) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteVlan)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteVlan) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VlanApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VlanApi vlanApi = new VlanApi(client);\r\n VlanDeletionParams params = new VlanDeletionParams()\n.where(new VlanWhereInput()\n.id(\"Vlan-id\"));\r\n List resp = vlanApi.deleteVlan(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/create-snmp-transport": { + "/create-vm-folder": { "exampleValue": [ { - "port": 1, - "protocol": "TCP", - "version": "V2C", - "name": "name-string", - "cluster_id": "ck74rk21wg5lz0786opdnzz5m" + "cluster_id": "ck74rk21wg5lz0786opdnzz5m", + "name": "name-string" } ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-snmp-transport \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"port\":1,\"protocol\":\"TCP\",\"version\":\"V2C\",\"name\":\"name-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", - "python": "from cloudtower import ApiClient, Configuration, SnmpTransportApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n snmp_transport_api = SnmpTransportApi(client)\r\n resp = snmp_transport_api.create_snmp_transport([{\"port\":1,\"protocol\":\"TCP\",\"version\":\"V2C\",\"name\":\"name-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/snmp_transport\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n snmp_transport_api := client.SnmpTransport\r\n params := snmp_transport.NewCreateSnmpTransportParams()\r\n params.RequestBody = []*models.SnmpTransportCreationParams{\n{\nPort: pointy.Int32(1),\nProtocol: models.SnmpProtocolTCP.Pointer(),\nVersion: models.SnmpVersionV2C.Pointer(),\nName: pointy.String(\"name-string\"),\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := snmp_transport_api.CreateSnmpTransport(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskSnmpTransport) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskSnmpTransport)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskSnmpTransport) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SnmpTransportApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SnmpTransportApi snmpTransportApi = new SnmpTransportApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new SnmpTransportCreationParams()\n.port(1)\n.protocol(SnmpProtocol.fromValue(\"TCP\"))\n.version(SnmpVersion.fromValue(\"V2C\"))\n.name(\"name-string\")\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = snmpTransportApi.createSnmpTransport(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-vm-folder \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", + "python": "from cloudtower import ApiClient, Configuration, VmFolderApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_folder_api = VmFolderApi(client)\r\n resp = vm_folder_api.create_vm_folder([{\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_folder\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_folder_api := client.VMFolder\r\n params := vm_folder.NewCreateVMFolderParams()\r\n params.RequestBody = []*models.VMFolderCreationParams{\n{\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := vm_folder_api.CreateVMFolder(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVMFolder) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVMFolder)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVMFolder) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmFolderApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmFolderApi vmFolderApi = new VmFolderApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new VmFolderCreationParams()\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = vmFolderApi.createVmFolder(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-snmp-transport": { + "/update-vm-folder": { "exampleValue": { - "data": {}, + "data": { + "name": "name-string" + }, "where": { - "id": "SnmpTransport-id" + "id": "VmFolder-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-snmp-transport \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"SnmpTransport-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, SnmpTransportApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n snmp_transport_api = SnmpTransportApi(client)\r\n resp = snmp_transport_api.update_snmp_transport({\"data\":{},\"where\":{\"id\":\"SnmpTransport-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/snmp_transport\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n snmp_transport_api := client.SnmpTransport\r\n params := snmp_transport.NewUpdateSnmpTransportParams()\r\n params.RequestBody = &models.SnmpTransportUpdationParams{\nData: &models.SnmpTransportUpdationParamsData{\n},\nWhere: &models.SnmpTransportWhereInput{\nID: pointy.String(\"SnmpTransport-id\"),\n},\n}\r\n rawResp, err := snmp_transport_api.UpdateSnmpTransport(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskSnmpTransport) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskSnmpTransport)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskSnmpTransport) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SnmpTransportApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SnmpTransportApi snmpTransportApi = new SnmpTransportApi(client);\r\n SnmpTransportUpdationParams params = new SnmpTransportUpdationParams()\n.data(new SnmpTransportUpdationParamsData())\n.where(new SnmpTransportWhereInput()\n.id(\"SnmpTransport-id\"));\r\n List resp = snmpTransportApi.updateSnmpTransport(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-vm-folder \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"name\":\"name-string\"},\"where\":{\"id\":\"VmFolder-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmFolderApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_folder_api = VmFolderApi(client)\r\n resp = vm_folder_api.update_vm_folder({\"data\":{\"name\":\"name-string\"},\"where\":{\"id\":\"VmFolder-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_folder\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_folder_api := client.VMFolder\r\n params := vm_folder.NewUpdateVMFolderParams()\r\n params.RequestBody = &models.VMFolderUpdationParams{\nData: &models.VMFolderUpdationParamsData{\nName: pointy.String(\"name-string\"),\n},\nWhere: &models.VMFolderWhereInput{\nID: pointy.String(\"VmFolder-id\"),\n},\n}\r\n rawResp, err := vm_folder_api.UpdateVMFolder(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVMFolder) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVMFolder)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVMFolder) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmFolderApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmFolderApi vmFolderApi = new VmFolderApi(client);\r\n VmFolderUpdationParams params = new VmFolderUpdationParams()\n.data(new VmFolderUpdationParamsData()\n.name(\"name-string\"))\n.where(new VmFolderWhereInput()\n.id(\"VmFolder-id\"));\r\n List resp = vmFolderApi.updateVmFolder(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/delete-snmp-transport": { + "/delete-vm-folder": { "exampleValue": { "where": { - "id": "SnmpTransport-id" + "id": "VmFolder-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-snmp-transport \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"SnmpTransport-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, SnmpTransportApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n snmp_transport_api = SnmpTransportApi(client)\r\n resp = snmp_transport_api.delete_snmp_transport({\"where\":{\"id\":\"SnmpTransport-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/snmp_transport\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n snmp_transport_api := client.SnmpTransport\r\n params := snmp_transport.NewDeleteSnmpTransportParams()\r\n params.RequestBody = &models.SnmpTransportDeletionParams{\nWhere: &models.SnmpTransportWhereInput{\nID: pointy.String(\"SnmpTransport-id\"),\n},\n}\r\n rawResp, err := snmp_transport_api.DeleteSnmpTransport(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteSnmpTransport) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteSnmpTransport)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteSnmpTransport) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SnmpTransportApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SnmpTransportApi snmpTransportApi = new SnmpTransportApi(client);\r\n SnmpTransportDeletionParams params = new SnmpTransportDeletionParams()\n.where(new SnmpTransportWhereInput()\n.id(\"SnmpTransport-id\"));\r\n List resp = snmpTransportApi.deleteSnmpTransport(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-vm-folder \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"VmFolder-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmFolderApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_folder_api = VmFolderApi(client)\r\n resp = vm_folder_api.delete_vm_folder({\"where\":{\"id\":\"VmFolder-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_folder\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_folder_api := client.VMFolder\r\n params := vm_folder.NewDeleteVMFolderParams()\r\n params.RequestBody = &models.VMFolderDeletionParams{\nWhere: &models.VMFolderWhereInput{\nID: pointy.String(\"VmFolder-id\"),\n},\n}\r\n rawResp, err := vm_folder_api.DeleteVMFolder(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteVMFolder) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteVMFolder)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteVMFolder) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmFolderApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmFolderApi vmFolderApi = new VmFolderApi(client);\r\n VmFolderDeletionParams params = new VmFolderDeletionParams()\n.where(new VmFolderWhereInput()\n.id(\"VmFolder-id\"));\r\n List resp = vmFolderApi.deleteVmFolder(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/create-snmp-trap-receiver": { + "/create-vm-placement-group": { "exampleValue": [ { - "language_code": "EN_US", - "port": 1, - "host": "host-string", - "protocol": "TCP", - "version": "V2C", "name": "name-string", + "enabled": true, "cluster_id": "ck74rk21wg5lz0786opdnzz5m" } ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-snmp-trap-receiver \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"language_code\":\"EN_US\",\"port\":1,\"host\":\"host-string\",\"protocol\":\"TCP\",\"version\":\"V2C\",\"name\":\"name-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", - "python": "from cloudtower import ApiClient, Configuration, SnmpTrapReceiverApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n snmp_trap_receiver_api = SnmpTrapReceiverApi(client)\r\n resp = snmp_trap_receiver_api.create_snmp_trap_receiver([{\"language_code\":\"EN_US\",\"port\":1,\"host\":\"host-string\",\"protocol\":\"TCP\",\"version\":\"V2C\",\"name\":\"name-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/snmp_trap_receiver\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n snmp_trap_receiver_api := client.SnmpTrapReceiver\r\n params := snmp_trap_receiver.NewCreateSnmpTrapReceiverParams()\r\n params.RequestBody = []*models.SnmpTrapReceiverCreationParams{\n{\nLanguageCode: models.SnmpLanguageCodeEN_US.Pointer(),\nPort: pointy.Int32(1),\nHost: pointy.String(\"host-string\"),\nProtocol: models.SnmpProtocolTCP.Pointer(),\nVersion: models.SnmpVersionV2C.Pointer(),\nName: pointy.String(\"name-string\"),\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := snmp_trap_receiver_api.CreateSnmpTrapReceiver(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskSnmpTrapReceiver) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskSnmpTrapReceiver)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskSnmpTrapReceiver) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SnmpTrapReceiverApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SnmpTrapReceiverApi snmpTrapReceiverApi = new SnmpTrapReceiverApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new SnmpTrapReceiverCreationParams()\n.languageCode(SnmpLanguageCode.fromValue(\"EN_US\"))\n.port(1)\n.host(\"host-string\")\n.protocol(SnmpProtocol.fromValue(\"TCP\"))\n.version(SnmpVersion.fromValue(\"V2C\"))\n.name(\"name-string\")\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = snmpTrapReceiverApi.createSnmpTrapReceiver(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-vm-placement-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"name\":\"name-string\",\"enabled\":true,\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", + "python": "from cloudtower import ApiClient, Configuration, VmPlacementGroupApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_placement_group_api = VmPlacementGroupApi(client)\r\n resp = vm_placement_group_api.create_vm_placement_group([{\"name\":\"name-string\",\"enabled\":True,\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_placement_group\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_placement_group_api := client.VMPlacementGroup\r\n params := vm_placement_group.NewCreateVMPlacementGroupParams()\r\n params.RequestBody = []*models.VMPlacementGroupCreationParams{\n{\nName: pointy.String(\"name-string\"),\nEnabled: pointy.Bool(true),\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := vm_placement_group_api.CreateVMPlacementGroup(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVMPlacementGroup) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVMPlacementGroup)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVMPlacementGroup) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmPlacementGroupApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmPlacementGroupApi vmPlacementGroupApi = new VmPlacementGroupApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new VmPlacementGroupCreationParams()\n.name(\"name-string\")\n.enabled(true)\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = vmPlacementGroupApi.createVmPlacementGroup(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-snmp-trap-receiver": { + "/update-vm-placement-group": { "exampleValue": { "data": {}, "where": { - "id": "SnmpTrapReceiver-id" + "id": "VmPlacementGroup-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-snmp-trap-receiver \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"SnmpTrapReceiver-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, SnmpTrapReceiverApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n snmp_trap_receiver_api = SnmpTrapReceiverApi(client)\r\n resp = snmp_trap_receiver_api.update_snmp_trap_receiver({\"data\":{},\"where\":{\"id\":\"SnmpTrapReceiver-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/snmp_trap_receiver\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n snmp_trap_receiver_api := client.SnmpTrapReceiver\r\n params := snmp_trap_receiver.NewUpdateSnmpTrapReceiverParams()\r\n params.RequestBody = &models.SnmpTrapReceiverUpdationParams{\nData: &models.SnmpTrapReceiverUpdationParamsData{\n},\nWhere: &models.SnmpTrapReceiverWhereInput{\nID: pointy.String(\"SnmpTrapReceiver-id\"),\n},\n}\r\n rawResp, err := snmp_trap_receiver_api.UpdateSnmpTrapReceiver(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskSnmpTrapReceiver) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskSnmpTrapReceiver)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskSnmpTrapReceiver) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SnmpTrapReceiverApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SnmpTrapReceiverApi snmpTrapReceiverApi = new SnmpTrapReceiverApi(client);\r\n SnmpTrapReceiverUpdationParams params = new SnmpTrapReceiverUpdationParams()\n.data(new SnmpTrapReceiverUpdationParamsData())\n.where(new SnmpTrapReceiverWhereInput()\n.id(\"SnmpTrapReceiver-id\"));\r\n List resp = snmpTrapReceiverApi.updateSnmpTrapReceiver(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-vm-placement-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"VmPlacementGroup-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmPlacementGroupApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_placement_group_api = VmPlacementGroupApi(client)\r\n resp = vm_placement_group_api.update_vm_placement_group({\"data\":{},\"where\":{\"id\":\"VmPlacementGroup-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_placement_group\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_placement_group_api := client.VMPlacementGroup\r\n params := vm_placement_group.NewUpdateVMPlacementGroupParams()\r\n params.RequestBody = &models.VMPlacementGroupUpdationParams{\nData: &models.VMPlacementGroupUpdationParamsData{\n},\nWhere: &models.VMPlacementGroupWhereInput{\nID: pointy.String(\"VmPlacementGroup-id\"),\n},\n}\r\n rawResp, err := vm_placement_group_api.UpdateVMPlacementGroup(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVMPlacementGroup) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVMPlacementGroup)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVMPlacementGroup) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmPlacementGroupApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmPlacementGroupApi vmPlacementGroupApi = new VmPlacementGroupApi(client);\r\n VmPlacementGroupUpdationParams params = new VmPlacementGroupUpdationParams()\n.data(new VmPlacementGroupUpdationParamsData())\n.where(new VmPlacementGroupWhereInput()\n.id(\"VmPlacementGroup-id\"));\r\n List resp = vmPlacementGroupApi.updateVmPlacementGroup(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/delete-snmp-trap-receiver": { + "/delete-vm-placement-group": { "exampleValue": { "where": { - "id": "SnmpTrapReceiver-id" + "id": "VmPlacementGroup-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-snmp-trap-receiver \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"SnmpTrapReceiver-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, SnmpTrapReceiverApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n snmp_trap_receiver_api = SnmpTrapReceiverApi(client)\r\n resp = snmp_trap_receiver_api.delete_snmp_trap_receiver({\"where\":{\"id\":\"SnmpTrapReceiver-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/snmp_trap_receiver\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n snmp_trap_receiver_api := client.SnmpTrapReceiver\r\n params := snmp_trap_receiver.NewDeleteSnmpTrapReceiverParams()\r\n params.RequestBody = &models.SnmpTrapReceiverDeletionParams{\nWhere: &models.SnmpTrapReceiverWhereInput{\nID: pointy.String(\"SnmpTrapReceiver-id\"),\n},\n}\r\n rawResp, err := snmp_trap_receiver_api.DeleteSnmpTrapReceiver(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteSnmpTrapReceiver) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteSnmpTrapReceiver)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteSnmpTrapReceiver) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.SnmpTrapReceiverApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n SnmpTrapReceiverApi snmpTrapReceiverApi = new SnmpTrapReceiverApi(client);\r\n SnmpTrapReceiverDeletionParams params = new SnmpTrapReceiverDeletionParams()\n.where(new SnmpTrapReceiverWhereInput()\n.id(\"SnmpTrapReceiver-id\"));\r\n List resp = snmpTrapReceiverApi.deleteSnmpTrapReceiver(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-vm-placement-group \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"VmPlacementGroup-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmPlacementGroupApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_placement_group_api = VmPlacementGroupApi(client)\r\n resp = vm_placement_group_api.delete_vm_placement_group({\"where\":{\"id\":\"VmPlacementGroup-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_placement_group\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_placement_group_api := client.VMPlacementGroup\r\n params := vm_placement_group.NewDeleteVMPlacementGroupParams()\r\n params.RequestBody = &models.VMPlacementGroupDeletionParams{\nWhere: &models.VMPlacementGroupWhereInput{\nID: pointy.String(\"VmPlacementGroup-id\"),\n},\n}\r\n rawResp, err := vm_placement_group_api.DeleteVMPlacementGroup(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteVMPlacementGroup) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteVMPlacementGroup)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteVMPlacementGroup) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmPlacementGroupApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmPlacementGroupApi vmPlacementGroupApi = new VmPlacementGroupApi(client);\r\n VmPlacementGroupDeletionParams params = new VmPlacementGroupDeletionParams()\n.where(new VmPlacementGroupWhereInput()\n.id(\"VmPlacementGroup-id\"));\r\n List resp = vmPlacementGroupApi.deleteVmPlacementGroup(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/export-csv": { + "/create-vm-snapshot": { "exampleValue": { - "filter": {}, - "columns": [ + "data": [ { "name": "name-string", - "path": "path-string" + "vm_id": "ck74rk21wg5lz0786opdnzz5m" } - ], - "name": "name-string" + ] }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/export-csv \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"filter\":{},\"columns\":[{\"name\":\"name-string\",\"path\":\"path-string\"}],\"name\":\"name-string\"}'", - "python": "from cloudtower import ApiClient, Configuration, TableReporterApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n table_reporter_api = TableReporterApi(client)\r\n resp = table_reporter_api.export_csv({\"filter\":{},\"columns\":[{\"name\":\"name-string\",\"path\":\"path-string\"}],\"name\":\"name-string\"})\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/table_reporter\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n table_reporter_api := client.TableReporter\r\n params := table_reporter.NewExportCsvParams()\r\n params.RequestBody = &models.TableReporterParams{\nFilter: &models.TableReporterParamsFilter{\n},\nColumns: []*models.ColumnConfig{\n{\nName: pointy.String(\"name-string\"),\nPath: pointy.String(\"path-string\"),\n},\n},\nName: pointy.String(\"name-string\"),\n}\r\n rawResp, err := table_reporter_api.ExportCsv(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.TableReporterApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n TableReporterApi tableReporterApi = new TableReporterApi(client);\r\n TableReporterParams params = new TableReporterParams()\n.filter(new TableReporterParamsFilter())\n.addColumnsItem(new ColumnConfig()\n.name(\"name-string\")\n.path(\"path-string\"))\n.name(\"name-string\");\r\n String resp = tableReporterApi.exportCsv(params);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-vm-snapshot \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":[{\"name\":\"name-string\",\"vm_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]}'", + "python": "from cloudtower import ApiClient, Configuration, VmSnapshotApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_snapshot_api = VmSnapshotApi(client)\r\n resp = vm_snapshot_api.create_vm_snapshot({\"data\":[{\"name\":\"name-string\",\"vm_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_snapshot\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_snapshot_api := client.VMSnapshot\r\n params := vm_snapshot.NewCreateVMSnapshotParams()\r\n params.RequestBody = &models.VMSnapshotCreationParams{\nData: []*models.VMSnapshotCreationParamsData{\n{\nName: pointy.String(\"name-string\"),\nVMID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n},\n}\r\n rawResp, err := vm_snapshot_api.CreateVMSnapshot(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVMSnapshot) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVMSnapshot)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVMSnapshot) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmSnapshotApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmSnapshotApi vmSnapshotApi = new VmSnapshotApi(client);\r\n VmSnapshotCreationParams params = new VmSnapshotCreationParams()\n.addDataItem(new VmSnapshotCreationParamsData()\n.name(\"name-string\")\n.vmId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = vmSnapshotApi.createVmSnapshot(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/cancel-upload-task": { + "/delete-vm-snapshot": { "exampleValue": { "where": { - "id": "UploadTask-id" + "id": "VmSnapshot-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/cancel-upload-task \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"UploadTask-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, UploadTaskApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n upload_task_api = UploadTaskApi(client)\r\n resp = upload_task_api.cancel_upload_task({\"where\":{\"id\":\"UploadTask-id\"}})\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/upload_task\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n upload_task_api := client.UploadTask\r\n params := upload_task.NewCancelUploadTaskParams()\r\n params.RequestBody = &models.CancelUploadTaskParams{\nWhere: &models.UploadTaskWhereInput{\nID: pointy.String(\"UploadTask-id\"),\n},\n}\r\n rawResp, err := upload_task_api.CancelUploadTask(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.UploadTaskApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n UploadTaskApi uploadTaskApi = new UploadTaskApi(client);\r\n CancelUploadTaskParams params = new CancelUploadTaskParams()\n.where(new UploadTaskWhereInput()\n.id(\"UploadTask-id\"));\r\n List resp = uploadTaskApi.cancelUploadTask(params);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-vm-snapshot \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"VmSnapshot-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmSnapshotApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_snapshot_api = VmSnapshotApi(client)\r\n resp = vm_snapshot_api.delete_vm_snapshot({\"where\":{\"id\":\"VmSnapshot-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_snapshot\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_snapshot_api := client.VMSnapshot\r\n params := vm_snapshot.NewDeleteVMSnapshotParams()\r\n params.RequestBody = &models.VMSnapshotDeletionParams{\nWhere: &models.VMSnapshotWhereInput{\nID: pointy.String(\"VmSnapshot-id\"),\n},\n}\r\n rawResp, err := vm_snapshot_api.DeleteVMSnapshot(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteVMSnapshot) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteVMSnapshot)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteVMSnapshot) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmSnapshotApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmSnapshotApi vmSnapshotApi = new VmSnapshotApi(client);\r\n VmSnapshotDeletionParams params = new VmSnapshotDeletionParams()\n.where(new VmSnapshotWhereInput()\n.id(\"VmSnapshot-id\"));\r\n List resp = vmSnapshotApi.deleteVmSnapshot(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/create-vcenter-account": { + "/clone-vm-template-from-vm": { + "exampleValue": [ + { + "cloud_init_supported": true, + "vm_id": "ck74rk21wg5lz0786opdnzz5m", + "name": "name-string" + } + ], + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/clone-vm-template-from-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"cloud_init_supported\":true,\"vm_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", + "python": "from cloudtower import ApiClient, Configuration, VmTemplateApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_template_api = VmTemplateApi(client)\r\n resp = vm_template_api.clone_vm_template_from_vm([{\"cloud_init_supported\":True,\"vm_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_template\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_template_api := client.VMTemplate\r\n params := vm_template.NewCloneVMTemplateFromVMParams()\r\n params.RequestBody = []*models.VMTemplateCreationParams{\n{\nCloudInitSupported: pointy.Bool(true),\nVMID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := vm_template_api.CloneVMTemplateFromVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVMTemplate) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVMTemplate)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVMTemplate) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmTemplateApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmTemplateApi vmTemplateApi = new VmTemplateApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new VmTemplateCreationParams()\n.cloudInitSupported(true)\n.vmId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = vmTemplateApi.cloneVmTemplateFromVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "/convert-vm-template-from-vm": { + "exampleValue": [ + { + "cloud_init_supported": true, + "vm_id": "ck74rk21wg5lz0786opdnzz5m", + "name": "name-string" + } + ], + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/convert-vm-template-from-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"cloud_init_supported\":true,\"vm_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", + "python": "from cloudtower import ApiClient, Configuration, VmTemplateApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_template_api = VmTemplateApi(client)\r\n resp = vm_template_api.convert_vm_template_from_vm([{\"cloud_init_supported\":True,\"vm_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_template\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_template_api := client.VMTemplate\r\n params := vm_template.NewConvertVMTemplateFromVMParams()\r\n params.RequestBody = []*models.VMTemplateCreationParams{\n{\nCloudInitSupported: pointy.Bool(true),\nVMID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := vm_template_api.ConvertVMTemplateFromVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVMTemplate) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVMTemplate)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVMTemplate) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmTemplateApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmTemplateApi vmTemplateApi = new VmTemplateApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new VmTemplateCreationParams()\n.cloudInitSupported(true)\n.vmId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = vmTemplateApi.convertVmTemplateFromVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "/update-vm-template": { "exampleValue": { - "data": { - "port": 1, - "password": "password-string", - "username": "username-string", - "ip": "ip-string", - "cluster_id": "ck74rk21wg5lz0786opdnzz5m" + "where": { + "id": "VmTemplate-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-vcenter-account \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"port\":1,\"password\":\"password-string\",\"username\":\"username-string\",\"ip\":\"ip-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VcenterAccountApi\r\nfrom cloudtower.utils import login, wait_task\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vcenter_account_api = VcenterAccountApi(client)\r\n resp = vcenter_account_api.create_vcenter_account({\"data\":{\"port\":1,\"password\":\"password-string\",\"username\":\"username-string\",\"ip\":\"ip-string\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}})\r\n wait_task(resp.task_id, client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vcenter_account\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vcenter_account_api := client.VcenterAccount\r\n params := vcenter_account.NewCreateVcenterAccountParams()\r\n params.RequestBody = &models.CreateVcenterAccountParams{\nData: &models.CreateVcenterAccountParamsData{\nPort: pointy.Int32(1),\nPassword: pointy.String(\"password-string\"),\nUsername: pointy.String(\"username-string\"),\nIP: pointy.String(\"ip-string\"),\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := vcenter_account_api.CreateVcenterAccount(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n err = utils.WaitTask(context.Background(), client, resp.TaskID, 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VcenterAccountApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VcenterAccountApi vcenterAccountApi = new VcenterAccountApi(client);\r\n CreateVcenterAccountParams params = new CreateVcenterAccountParams()\n.data(new CreateVcenterAccountParamsData()\n.port(1)\n.password(\"password-string\")\n.username(\"username-string\")\n.ip(\"ip-string\")\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n WithTaskVcenterAccount resp = vcenterAccountApi.createVcenterAccount(params);\r\n TaskUtil.WaitTask(resp.getTaskId(), client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-vm-template \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"VmTemplate-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmTemplateApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_template_api = VmTemplateApi(client)\r\n resp = vm_template_api.update_vm_template({\"where\":{\"id\":\"VmTemplate-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_template\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_template_api := client.VMTemplate\r\n params := vm_template.NewUpdateVMTemplateParams()\r\n params.RequestBody = &models.VMTemplateUpdationParams{\nWhere: &models.VMTemplateWhereInput{\nID: pointy.String(\"VmTemplate-id\"),\n},\n}\r\n rawResp, err := vm_template_api.UpdateVMTemplate(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVMTemplate) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVMTemplate)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVMTemplate) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmTemplateApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmTemplateApi vmTemplateApi = new VmTemplateApi(client);\r\n VmTemplateUpdationParams params = new VmTemplateUpdationParams()\n.where(new VmTemplateWhereInput()\n.id(\"VmTemplate-id\"));\r\n List resp = vmTemplateApi.updateVmTemplate(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-vcenter-account": { + "/delete-vm-template": { "exampleValue": { - "data": { - "port": 1, - "password": "password-string", - "username": "username-string", - "ip": "ip-string" - }, "where": { - "id": "VcenterAccount-id" + "id": "VmTemplate-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-vcenter-account \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"port\":1,\"password\":\"password-string\",\"username\":\"username-string\",\"ip\":\"ip-string\"},\"where\":{\"id\":\"VcenterAccount-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VcenterAccountApi\r\nfrom cloudtower.utils import login, wait_task\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vcenter_account_api = VcenterAccountApi(client)\r\n resp = vcenter_account_api.update_vcenter_account({\"data\":{\"port\":1,\"password\":\"password-string\",\"username\":\"username-string\",\"ip\":\"ip-string\"},\"where\":{\"id\":\"VcenterAccount-id\"}})\r\n wait_task(resp.task_id, client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vcenter_account\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vcenter_account_api := client.VcenterAccount\r\n params := vcenter_account.NewUpdateVcenterAccountParams()\r\n params.RequestBody = &models.UpdateVcenterAccountParams{\nData: &models.UpdateVcenterAccountParamsData{\nPort: pointy.Int32(1),\nPassword: pointy.String(\"password-string\"),\nUsername: pointy.String(\"username-string\"),\nIP: pointy.String(\"ip-string\"),\n},\nWhere: &models.VcenterAccountWhereUniqueInput{\nID: pointy.String(\"VcenterAccount-id\"),\n},\n}\r\n rawResp, err := vcenter_account_api.UpdateVcenterAccount(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n err = utils.WaitTask(context.Background(), client, resp.TaskID, 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VcenterAccountApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VcenterAccountApi vcenterAccountApi = new VcenterAccountApi(client);\r\n UpdateVcenterAccountParams params = new UpdateVcenterAccountParams()\n.data(new UpdateVcenterAccountParamsData()\n.port(1)\n.password(\"password-string\")\n.username(\"username-string\")\n.ip(\"ip-string\"))\n.where(new VcenterAccountWhereUniqueInput()\n.id(\"VcenterAccount-id\"));\r\n WithTaskVcenterAccount resp = vcenterAccountApi.updateVcenterAccount(params);\r\n TaskUtil.WaitTask(resp.getTaskId(), client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-vm-template \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"VmTemplate-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmTemplateApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_template_api = VmTemplateApi(client)\r\n resp = vm_template_api.delete_vm_template({\"where\":{\"id\":\"VmTemplate-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_template\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_template_api := client.VMTemplate\r\n params := vm_template.NewDeleteVMTemplateParams()\r\n params.RequestBody = &models.VMTemplateDeletionParams{\nWhere: &models.VMTemplateWhereInput{\nID: pointy.String(\"VmTemplate-id\"),\n},\n}\r\n rawResp, err := vm_template_api.DeleteVMTemplate(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteVMTemplate) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteVMTemplate)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteVMTemplate) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmTemplateApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmTemplateApi vmTemplateApi = new VmTemplateApi(client);\r\n VmTemplateDeletionParams params = new VmTemplateDeletionParams()\n.where(new VmTemplateWhereInput()\n.id(\"VmTemplate-id\"));\r\n List resp = vmTemplateApi.deleteVmTemplate(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/create-vds-with-migrate-vlan": { + "/create-vm-volume-snapshot": { "exampleValue": [ { - "nic_ids": [ - "-string" - ], - "cluster_id": "ck74rk21wg5lz0786opdnzz5m", - "name": "name-string", - "vlan": { - "extra_ip": [ - { - "management_ip": "management_ip-string", - "host_id": "ck74rk21wg5lz0786opdnzz5m" - } - ], - "subnetmask": "subnetmask-string", - "vlan_id": 1 - } + "volume_id": "ck74rk21wg5lz0786opdnzz5m", + "description": "description-string", + "name": "name-string" } ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-vds-with-migrate-vlan \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"nic_ids\":[\"-string\"],\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\",\"vlan\":{\"extra_ip\":[{\"management_ip\":\"management_ip-string\",\"host_id\":\"ck74rk21wg5lz0786opdnzz5m\"}],\"subnetmask\":\"subnetmask-string\",\"vlan_id\":1}}]'", - "python": "from cloudtower import ApiClient, Configuration, VdsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vds_api = VdsApi(client)\r\n resp = vds_api.create_vds_with_migrate_vlan([{\"nic_ids\":[\"-string\"],\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\",\"vlan\":{\"extra_ip\":[{\"management_ip\":\"management_ip-string\",\"host_id\":\"ck74rk21wg5lz0786opdnzz5m\"}],\"subnetmask\":\"subnetmask-string\",\"vlan_id\":1}}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vds\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vds_api := client.Vds\r\n params := vds.NewCreateVdsWithMigrateVlanParams()\r\n params.RequestBody = []*models.VdsCreationWithMigrateVlanParams{\n{\nNicIds: []string{\"-string\",\n},\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\nVlan: &models.VdsCreationWithMigrateVlanParamsVlan{\nExtraIP: []*models.VdsCreationWithMigrateVlanParamsVlanExtraip{\n{\nManagementIP: pointy.String(\"management_ip-string\"),\nHostID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n},\nSubnetmask: pointy.String(\"subnetmask-string\"),\nVlanID: pointy.Int32(1),\n},\n},\n}\r\n rawResp, err := vds_api.CreateVdsWithMigrateVlan(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVds) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVds)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVds) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VdsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VdsApi vdsApi = new VdsApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new VdsCreationWithMigrateVlanParams()\n.addNicIdsItem(\"-string\")\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\")\n.vlan(new VdsCreationWithMigrateVlanParamsVlan()\n.addExtraIpItem(new VdsCreationWithMigrateVlanParamsVlanExtraip()\n.managementIp(\"management_ip-string\")\n.hostId(\"ck74rk21wg5lz0786opdnzz5m\"))\n.subnetmask(\"subnetmask-string\")\n.vlanId(1)));\r\n List resp = vdsApi.createVdsWithMigrateVlan(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-vm-volume-snapshot \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"volume_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"description\":\"description-string\",\"name\":\"name-string\"}]'", + "python": "from cloudtower import ApiClient, Configuration, VmVolumeSnapshotApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_volume_snapshot_api = VmVolumeSnapshotApi(client)\r\n resp = vm_volume_snapshot_api.create_vm_volume_snapshot([{\"volume_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"description\":\"description-string\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_volume_snapshot\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_volume_snapshot_api := client.VMVolumeSnapshot\r\n params := vm_volume_snapshot.NewCreateVMVolumeSnapshotParams()\r\n params.RequestBody = []*models.VMVolumeSnapshotCreationParams{\n{\nVolumeID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nDescription: pointy.String(\"description-string\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := vm_volume_snapshot_api.CreateVMVolumeSnapshot(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVMVolumeSnapshot) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVMVolumeSnapshot)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVMVolumeSnapshot) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmVolumeSnapshotApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmVolumeSnapshotApi vmVolumeSnapshotApi = new VmVolumeSnapshotApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new VmVolumeSnapshotCreationParams()\n.volumeId(\"ck74rk21wg5lz0786opdnzz5m\")\n.description(\"description-string\")\n.name(\"name-string\"));\r\n List resp = vmVolumeSnapshotApi.createVmVolumeSnapshot(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/create-vds-with-access-vlan": { - "exampleValue": [ - { - "nic_ids": [ - "-string" - ], - "cluster_id": "ck74rk21wg5lz0786opdnzz5m", - "name": "name-string", - "vlan": { - "extra_ip": [ - { - "management_ip": "management_ip-string", - "host_id": "ck74rk21wg5lz0786opdnzz5m" - } - ], - "subnetmask": "subnetmask-string", - "vlan_id": 1 - } + "/delete-vm-volume-snapshot": { + "exampleValue": { + "where": { + "id": "VmVolumeSnapshot-id" } - ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-vds-with-access-vlan \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"nic_ids\":[\"-string\"],\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\",\"vlan\":{\"extra_ip\":[{\"management_ip\":\"management_ip-string\",\"host_id\":\"ck74rk21wg5lz0786opdnzz5m\"}],\"subnetmask\":\"subnetmask-string\",\"vlan_id\":1}}]'", - "python": "from cloudtower import ApiClient, Configuration, VdsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vds_api = VdsApi(client)\r\n resp = vds_api.create_vds_with_access_vlan([{\"nic_ids\":[\"-string\"],\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\",\"vlan\":{\"extra_ip\":[{\"management_ip\":\"management_ip-string\",\"host_id\":\"ck74rk21wg5lz0786opdnzz5m\"}],\"subnetmask\":\"subnetmask-string\",\"vlan_id\":1}}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vds\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vds_api := client.Vds\r\n params := vds.NewCreateVdsWithAccessVlanParams()\r\n params.RequestBody = []*models.VdsCreationWithMAccessVlanParams{\n{\nNicIds: []string{\"-string\",\n},\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\nVlan: &models.VdsCreationWithMAccessVlanParamsVlan{\nExtraIP: []*models.VdsCreationWithMAccessVlanParamsVlanExtraip{\n{\nManagementIP: pointy.String(\"management_ip-string\"),\nHostID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n},\nSubnetmask: pointy.String(\"subnetmask-string\"),\nVlanID: pointy.Int32(1),\n},\n},\n}\r\n rawResp, err := vds_api.CreateVdsWithAccessVlan(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVds) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVds)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVds) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VdsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VdsApi vdsApi = new VdsApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new VdsCreationWithMAccessVlanParams()\n.addNicIdsItem(\"-string\")\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\")\n.vlan(new VdsCreationWithMAccessVlanParamsVlan()\n.addExtraIpItem(new VdsCreationWithMAccessVlanParamsVlanExtraip()\n.managementIp(\"management_ip-string\")\n.hostId(\"ck74rk21wg5lz0786opdnzz5m\"))\n.subnetmask(\"subnetmask-string\")\n.vlanId(1)));\r\n List resp = vdsApi.createVdsWithAccessVlan(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-vm-volume-snapshot \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"VmVolumeSnapshot-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmVolumeSnapshotApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_volume_snapshot_api = VmVolumeSnapshotApi(client)\r\n resp = vm_volume_snapshot_api.delete_vm_volume_snapshot({\"where\":{\"id\":\"VmVolumeSnapshot-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_volume_snapshot\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_volume_snapshot_api := client.VMVolumeSnapshot\r\n params := vm_volume_snapshot.NewDeleteVMVolumeSnapshotParams()\r\n params.RequestBody = &models.VMVolumeSnapshotDeletionParams{\nWhere: &models.VMVolumeSnapshotWhereInput{\nID: pointy.String(\"VmVolumeSnapshot-id\"),\n},\n}\r\n rawResp, err := vm_volume_snapshot_api.DeleteVMVolumeSnapshot(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteVMVolumeSnapshot) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteVMVolumeSnapshot)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteVMVolumeSnapshot) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmVolumeSnapshotApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmVolumeSnapshotApi vmVolumeSnapshotApi = new VmVolumeSnapshotApi(client);\r\n VmVolumeSnapshotDeletionParams params = new VmVolumeSnapshotDeletionParams()\n.where(new VmVolumeSnapshotWhereInput()\n.id(\"VmVolumeSnapshot-id\"));\r\n List resp = vmVolumeSnapshotApi.deleteVmVolumeSnapshot(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/create-vds": { + "/create-vm-volume": { "exampleValue": [ { - "nic_ids": [ - "-string" - ], + "elf_storage_policy": "EC", + "size": 1, + "sharing": true, "cluster_id": "ck74rk21wg5lz0786opdnzz5m", "name": "name-string" } ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-vds \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"nic_ids\":[\"-string\"],\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", - "python": "from cloudtower import ApiClient, Configuration, VdsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vds_api = VdsApi(client)\r\n resp = vds_api.create_vds([{\"nic_ids\":[\"-string\"],\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vds\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vds_api := client.Vds\r\n params := vds.NewCreateVdsParams()\r\n params.RequestBody = []*models.VdsCreationParams{\n{\nNicIds: []string{\"-string\",\n},\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := vds_api.CreateVds(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVds) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVds)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVds) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VdsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VdsApi vdsApi = new VdsApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new VdsCreationParams()\n.addNicIdsItem(\"-string\")\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = vdsApi.createVds(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-vm-volume \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"elf_storage_policy\":\"EC\",\"size\":1,\"sharing\":true,\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", + "python": "from cloudtower import ApiClient, Configuration, VmVolumeApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_volume_api = VmVolumeApi(client)\r\n resp = vm_volume_api.create_vm_volume([{\"elf_storage_policy\":\"EC\",\"size\":1,\"sharing\":True,\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_volume\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_volume_api := client.VMVolume\r\n params := vm_volume.NewCreateVMVolumeParams()\r\n params.RequestBody = []*models.VMVolumeCreationParams{\n{\nElfStoragePolicy: models.VMVolumeElfStoragePolicyTypeEC.Pointer(),\nSize: pointy.Int64(1),\nSharing: pointy.Bool(true),\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := vm_volume_api.CreateVMVolume(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVMVolume) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVMVolume)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVMVolume) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmVolumeApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmVolumeApi vmVolumeApi = new VmVolumeApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new VmVolumeCreationParams()\n.elfStoragePolicy(VmVolumeElfStoragePolicyType.fromValue(\"EC\"))\n.size(1L)\n.sharing(true)\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = vmVolumeApi.createVmVolume(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-vds": { + "/delete-vm-volume": { "exampleValue": { - "data": {}, "where": { - "id": "Vds-id" + "id": "VmVolume-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-vds \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"Vds-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VdsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vds_api = VdsApi(client)\r\n resp = vds_api.update_vds({\"data\":{},\"where\":{\"id\":\"Vds-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vds\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vds_api := client.Vds\r\n params := vds.NewUpdateVdsParams()\r\n params.RequestBody = &models.VdsUpdationParams{\nData: &models.VdsUpdationParamsData{\n},\nWhere: &models.VdsWhereInput{\nID: pointy.String(\"Vds-id\"),\n},\n}\r\n rawResp, err := vds_api.UpdateVds(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVds) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVds)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVds) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VdsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VdsApi vdsApi = new VdsApi(client);\r\n VdsUpdationParams params = new VdsUpdationParams()\n.data(new VdsUpdationParamsData())\n.where(new VdsWhereInput()\n.id(\"Vds-id\"));\r\n List resp = vdsApi.updateVds(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-vm-volume \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"VmVolume-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmVolumeApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_volume_api = VmVolumeApi(client)\r\n resp = vm_volume_api.delete_vm_volume_from_vm({\"where\":{\"id\":\"VmVolume-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_volume\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_volume_api := client.VMVolume\r\n params := vm_volume.NewDeleteVMVolumeFromVMParams()\r\n params.RequestBody = &models.VMVolumeDeletionParams{\nWhere: &models.VMVolumeWhereInput{\nID: pointy.String(\"VmVolume-id\"),\n},\n}\r\n rawResp, err := vm_volume_api.DeleteVMVolumeFromVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteVMVolume) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteVMVolume)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteVMVolume) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmVolumeApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmVolumeApi vmVolumeApi = new VmVolumeApi(client);\r\n VmVolumeDeletionParams params = new VmVolumeDeletionParams()\n.where(new VmVolumeWhereInput()\n.id(\"VmVolume-id\"));\r\n List resp = vmVolumeApi.deleteVmVolumeFromVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/delete-vds": { - "exampleValue": { - "where": { - "id": "Vds-id" + "/rebuild-vm-volume": { + "exampleValue": [ + { + "name": "name-string", + "description": "description-string", + "volume_snapshot_id": "ck74rk21wg5lz0786opdnzz5m" } - }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-vds \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"Vds-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, VdsApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vds_api = VdsApi(client)\r\n resp = vds_api.delete_vds({\"where\":{\"id\":\"Vds-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vds\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vds_api := client.Vds\r\n params := vds.NewDeleteVdsParams()\r\n params.RequestBody = &models.VdsDeletionParams{\nWhere: &models.VdsWhereInput{\nID: pointy.String(\"Vds-id\"),\n},\n}\r\n rawResp, err := vds_api.DeleteVds(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteVds) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteVds)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteVds) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VdsApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VdsApi vdsApi = new VdsApi(client);\r\n VdsDeletionParams params = new VdsDeletionParams()\n.where(new VdsWhereInput()\n.id(\"Vds-id\"));\r\n List resp = vdsApi.deleteVds(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + ], + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/rebuild-vm-volume \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"name\":\"name-string\",\"description\":\"description-string\",\"volume_snapshot_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", + "python": "from cloudtower import ApiClient, Configuration, VmVolumeApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_volume_api = VmVolumeApi(client)\r\n resp = vm_volume_api.rebuild_vm_volume([{\"name\":\"name-string\",\"description\":\"description-string\",\"volume_snapshot_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_volume\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_volume_api := client.VMVolume\r\n params := vm_volume.NewRebuildVMVolumeParams()\r\n params.RequestBody = []*models.VMVolumeRebuildParams{\n{\nName: pointy.String(\"name-string\"),\nDescription: pointy.String(\"description-string\"),\nVolumeSnapshotID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := vm_volume_api.RebuildVMVolume(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVMVolume) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVMVolume)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVMVolume) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmVolumeApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmVolumeApi vmVolumeApi = new VmVolumeApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new VmVolumeRebuildParams()\n.name(\"name-string\")\n.description(\"description-string\")\n.volumeSnapshotId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = vmVolumeApi.rebuildVmVolume(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/create-view": { + "/rollback-vm-volume": { "exampleValue": [ { - "time_unit": "DAY", - "time_span": 1, - "cluster_id": "ck74rk21wg5lz0786opdnzz5m", - "name": "name-string" + "volume_snapshot_id": "ck74rk21wg5lz0786opdnzz5m" } ], - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-view \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"time_unit\":\"DAY\",\"time_span\":1,\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", - "python": "from cloudtower import ApiClient, Configuration, ViewApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n view_api = ViewApi(client)\r\n resp = view_api.create_view([{\"time_unit\":\"DAY\",\"time_span\":1,\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/view\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n view_api := client.View\r\n params := view.NewCreateViewParams()\r\n params.RequestBody = []*models.ViewCreationParams{\n{\nTimeUnit: models.TimeUnitDAY.Pointer(),\nTimeSpan: pointy.Int32(1),\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := view_api.CreateView(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskView) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskView)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskView) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ViewApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ViewApi viewApi = new ViewApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new ViewCreationParams()\n.timeUnit(TimeUnit.fromValue(\"DAY\"))\n.timeSpan(1)\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = viewApi.createView(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/rollback-vm-volume \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"volume_snapshot_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", + "python": "from cloudtower import ApiClient, Configuration, VmVolumeApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_volume_api = VmVolumeApi(client)\r\n resp = vm_volume_api.rollback_vm_volume([{\"volume_snapshot_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_volume\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_volume_api := client.VMVolume\r\n params := vm_volume.NewRollbackVMVolumeParams()\r\n params.RequestBody = []*models.VMVolumeRollbackParams{\n{\nVolumeSnapshotID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := vm_volume_api.RollbackVMVolume(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVMVolume) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVMVolume)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVMVolume) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmVolumeApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmVolumeApi vmVolumeApi = new VmVolumeApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new VmVolumeRollbackParams()\n.volumeSnapshotId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = vmVolumeApi.rollbackVmVolume(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/update-view": { + "/clone-vm-volume": { + "exampleValue": [ + { + "where": { + "id": "VmVolume-id" + }, + "data": { + "name": "name-string" + } + } + ], + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/clone-vm-volume \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"where\":{\"id\":\"VmVolume-id\"},\"data\":{\"name\":\"name-string\"}}]'", + "python": "from cloudtower import ApiClient, Configuration, VmVolumeApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_volume_api = VmVolumeApi(client)\r\n resp = vm_volume_api.clone_vm_volume([{\"where\":{\"id\":\"VmVolume-id\"},\"data\":{\"name\":\"name-string\"}}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_volume\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_volume_api := client.VMVolume\r\n params := vm_volume.NewCloneVMVolumeParams()\r\n params.RequestBody = []*models.CloneVMVolumeParams{\n{\nWhere: &models.VMVolumeWhereUniqueInput{\nID: pointy.String(\"VmVolume-id\"),\n},\nData: &models.CloneVMVolumeParamsData{\nName: pointy.String(\"name-string\"),\n},\n},\n}\r\n rawResp, err := vm_volume_api.CloneVMVolume(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVMVolume) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVMVolume)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVMVolume) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmVolumeApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmVolumeApi vmVolumeApi = new VmVolumeApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new CloneVmVolumeParams()\n.where(new VmVolumeWhereUniqueInput()\n.id(\"VmVolume-id\"))\n.data(new CloneVmVolumeParamsData()\n.name(\"name-string\")));\r\n List resp = vmVolumeApi.cloneVmVolume(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "/update-vm-volume": { "exampleValue": { "where": { - "id": "View-id" - } + "id": "VmVolume-id" + }, + "data": {} }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-view \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"View-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, ViewApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n view_api = ViewApi(client)\r\n resp = view_api.update_view({\"where\":{\"id\":\"View-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/view\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n view_api := client.View\r\n params := view.NewUpdateViewParams()\r\n params.RequestBody = &models.ViewUpdationParams{\nWhere: &models.ViewWhereInput{\nID: pointy.String(\"View-id\"),\n},\n}\r\n rawResp, err := view_api.UpdateView(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskView) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskView)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskView) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ViewApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ViewApi viewApi = new ViewApi(client);\r\n ViewUpdationParams params = new ViewUpdationParams()\n.where(new ViewWhereInput()\n.id(\"View-id\"));\r\n List resp = viewApi.updateView(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-vm-volume \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"VmVolume-id\"},\"data\":{}}'", + "python": "from cloudtower import ApiClient, Configuration, VmVolumeApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_volume_api = VmVolumeApi(client)\r\n resp = vm_volume_api.update_vm_volume({\"where\":{\"id\":\"VmVolume-id\"},\"data\":{}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_volume\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_volume_api := client.VMVolume\r\n params := vm_volume.NewUpdateVMVolumeParams()\r\n params.RequestBody = &models.UpdateVMVolumeParams{\nWhere: &models.VMVolumeWhereInput{\nID: pointy.String(\"VmVolume-id\"),\n},\nData: &models.UpdateVMVolumeParamsData{\n},\n}\r\n rawResp, err := vm_volume_api.UpdateVMVolume(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVMVolume) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVMVolume)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVMVolume) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmVolumeApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmVolumeApi vmVolumeApi = new VmVolumeApi(client);\r\n UpdateVmVolumeParams params = new UpdateVmVolumeParams()\n.where(new VmVolumeWhereInput()\n.id(\"VmVolume-id\"))\n.data(new UpdateVmVolumeParamsData());\r\n List resp = vmVolumeApi.updateVmVolume(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/delete-view": { + "/export-vm-volume": { "exampleValue": { + "data": { + "type": "QCOW2" + }, "where": { - "id": "View-id" + "id": "VmVolume-id" } }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-view \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"View-id\"}}'", - "python": "from cloudtower import ApiClient, Configuration, ViewApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n view_api = ViewApi(client)\r\n resp = view_api.delete_view({\"where\":{\"id\":\"View-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/view\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n view_api := client.View\r\n params := view.NewDeleteViewParams()\r\n params.RequestBody = &models.ViewDeletionParams{\nWhere: &models.ViewWhereInput{\nID: pointy.String(\"View-id\"),\n},\n}\r\n rawResp, err := view_api.DeleteView(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteView) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteView)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteView) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ViewApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ViewApi viewApi = new ViewApi(client);\r\n ViewDeletionParams params = new ViewDeletionParams()\n.where(new ViewWhereInput()\n.id(\"View-id\"));\r\n List resp = viewApi.deleteView(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/export-vm-volume \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"type\":\"QCOW2\"},\"where\":{\"id\":\"VmVolume-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, VmVolumeApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_volume_api = VmVolumeApi(client)\r\n resp = vm_volume_api.export_vm_volume({\"data\":{\"type\":\"QCOW2\"},\"where\":{\"id\":\"VmVolume-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_volume\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_volume_api := client.VMVolume\r\n params := vm_volume.NewExportVMVolumeParams()\r\n params.RequestBody = &models.ExportVMVolumeParams{\nData: &models.ExportVMVolumeParamsData{\nType: models.VMVolumeExportFileTypeQCOW2.Pointer(),\n},\nWhere: &models.VMVolumeWhereInput{\nID: pointy.String(\"VmVolume-id\"),\n},\n}\r\n rawResp, err := vm_volume_api.ExportVMVolume(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVMExportFile) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVMExportFile)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVMExportFile) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmVolumeApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmVolumeApi vmVolumeApi = new VmVolumeApi(client);\r\n ExportVmVolumeParams params = new ExportVmVolumeParams()\n.data(new ExportVmVolumeParamsData()\n.type(VmVolumeExportFileType.fromValue(\"QCOW2\")))\n.where(new VmVolumeWhereInput()\n.id(\"VmVolume-id\"));\r\n List resp = vmVolumeApi.exportVmVolume(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "/import-vm-volume": { + "exampleValue": [ + { + "upload_task_id": "ck74rk21wg5lz0786opdnzz5m", + "name": "name-string", + "storage_policy": "EC", + "cluster_id": "ck74rk21wg5lz0786opdnzz5m" + } + ], + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/import-vm-volume \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"upload_task_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\",\"storage_policy\":\"EC\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}]'", + "python": "from cloudtower import ApiClient, Configuration, VmVolumeApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n vm_volume_api = VmVolumeApi(client)\r\n resp = vm_volume_api.import_vm_volume([{\"upload_task_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\",\"storage_policy\":\"EC\",\"cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/vm_volume\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n vm_volume_api := client.VMVolume\r\n params := vm_volume.NewImportVMVolumeParams()\r\n params.RequestBody = []*models.ImportVMVolumeParams{\n{\nUploadTaskID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\nStoragePolicy: models.VMVolumeElfStoragePolicyTypeEC.Pointer(),\nClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n}\r\n rawResp, err := vm_volume_api.ImportVMVolume(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskVMVolume) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskVMVolume)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskVMVolume) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VmVolumeApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VmVolumeApi vmVolumeApi = new VmVolumeApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new ImportVmVolumeParams()\n.uploadTaskId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\")\n.storagePolicy(VmVolumeElfStoragePolicyType.fromValue(\"EC\"))\n.clusterId(\"ck74rk21wg5lz0786opdnzz5m\"));\r\n List resp = vmVolumeApi.importVmVolume(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, "/update-vsphere-esxi-account": { "exampleValue": { @@ -3623,6 +3623,154 @@ "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/user_audit_log\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n user_audit_log_api := client.UserAuditLog\r\n params := user_audit_log.NewCreateUserAuditLogParams()\r\n params.RequestBody = []*models.UserAuditLogCreationParams{\n{\nStatus: models.UserAuditLogStatusFAILED.Pointer(),\nUserID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nMessage: &models.UserAuditLogMessage{\nEnUs: pointy.String(\"en-US-string\"),\nZhCn: pointy.String(\"zh-CN-string\"),\n},\nResourceType: pointy.String(\"resource_type-string\"),\nAction: pointy.String(\"action-string\"),\n},\n}\r\n rawResp, err := user_audit_log_api.CreateUserAuditLog(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskUserAuditLog) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskUserAuditLog)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskUserAuditLog) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.UserAuditLogApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n UserAuditLogApi userAuditLogApi = new UserAuditLogApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new UserAuditLogCreationParams()\n.status(UserAuditLogStatus.fromValue(\"FAILED\"))\n.userId(\"ck74rk21wg5lz0786opdnzz5m\")\n.message(new UserAuditLogMessage()\n.enUs(\"en-US-string\")\n.zhCn(\"zh-CN-string\"))\n.resourceType(\"resource_type-string\")\n.action(\"action-string\"));\r\n List resp = userAuditLogApi.createUserAuditLog(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, + "/create-backup-plan": { + "exampleValue": [ + { + "keep_policy_value": 1, + "keep_policy": "COUNT", + "enable_window": true, + "full_time_point": { + "minute": 1, + "hour": 1 + }, + "full_period": "DAILY", + "full_interval": 1, + "incremental_interval": 1, + "incremental_period": "DAILY", + "snapshot_consistent_type": "CRASH_CONSISTENT", + "compression": true, + "vms": { + "id": "Vm-id" + }, + "backup_store_repository_id": "ck74rk21wg5lz0786opdnzz5m", + "backup_service_id": "ck74rk21wg5lz0786opdnzz5m", + "name": "name-string" + } + ], + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/create-backup-plan \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '[{\"keep_policy_value\":1,\"keep_policy\":\"COUNT\",\"enable_window\":true,\"full_time_point\":{\"minute\":1,\"hour\":1},\"full_period\":\"DAILY\",\"full_interval\":1,\"incremental_interval\":1,\"incremental_period\":\"DAILY\",\"snapshot_consistent_type\":\"CRASH_CONSISTENT\",\"compression\":true,\"vms\":{\"id\":\"Vm-id\"},\"backup_store_repository_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"backup_service_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}]'", + "python": "from cloudtower import ApiClient, Configuration, BackupPlanApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n backup_plan_api = BackupPlanApi(client)\r\n resp = backup_plan_api.create_backup_plan([{\"keep_policy_value\":1,\"keep_policy\":\"COUNT\",\"enable_window\":True,\"full_time_point\":{\"minute\":1,\"hour\":1},\"full_period\":\"DAILY\",\"full_interval\":1,\"incremental_interval\":1,\"incremental_period\":\"DAILY\",\"snapshot_consistent_type\":\"CRASH_CONSISTENT\",\"compression\":True,\"vms\":{\"id\":\"Vm-id\"},\"backup_store_repository_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"backup_service_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"name\":\"name-string\"}])\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/backup_plan\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n backup_plan_api := client.BackupPlan\r\n params := backup_plan.NewCreateBackupPlanParams()\r\n params.RequestBody = []*models.BackupPlanCreationParams{\n{\nKeepPolicyValue: pointy.Int32(1),\nKeepPolicy: models.BackupPlanKeepPolicyCOUNT.Pointer(),\nEnableWindow: pointy.Bool(true),\nFullTimePoint: &models.BackupPlanTimePoint{\nMinute: pointy.Int32(1),\nHour: pointy.Int32(1),\n},\nFullPeriod: models.BackupPlanPeriodDAILY.Pointer(),\nFullInterval: pointy.Int32(1),\nIncrementalInterval: pointy.Int32(1),\nIncrementalPeriod: models.BackupPlanPeriodDAILY.Pointer(),\nSnapshotConsistentType: models.ConsistentTypeCRASH_CONSISTENT.Pointer(),\nCompression: pointy.Bool(true),\nVms: &models.VMWhereInput{\nID: pointy.String(\"Vm-id\"),\n},\nBackupStoreRepositoryID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nBackupServiceID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nName: pointy.String(\"name-string\"),\n},\n}\r\n rawResp, err := backup_plan_api.CreateBackupPlan(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskBackupPlan) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskBackupPlan)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskBackupPlan) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.BackupPlanApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n BackupPlanApi backupPlanApi = new BackupPlanApi(client);\r\n List params = new ArrayList<>();\r\n params.add(new BackupPlanCreationParams()\n.keepPolicyValue(1)\n.keepPolicy(BackupPlanKeepPolicy.fromValue(\"COUNT\"))\n.enableWindow(true)\n.fullTimePoint(new BackupPlanTimePoint()\n.minute(1)\n.hour(1))\n.fullPeriod(BackupPlanPeriod.fromValue(\"DAILY\"))\n.fullInterval(1)\n.incrementalInterval(1)\n.incrementalPeriod(BackupPlanPeriod.fromValue(\"DAILY\"))\n.snapshotConsistentType(ConsistentType.fromValue(\"CRASH_CONSISTENT\"))\n.compression(true)\n.vms(new VmWhereInput()\n.id(\"Vm-id\"))\n.backupStoreRepositoryId(\"ck74rk21wg5lz0786opdnzz5m\")\n.backupServiceId(\"ck74rk21wg5lz0786opdnzz5m\")\n.name(\"name-string\"));\r\n List resp = backupPlanApi.createBackupPlan(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "/update-backup-plan": { + "exampleValue": { + "data": {}, + "where": { + "id": "BackupPlan-id" + } + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/update-backup-plan \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{},\"where\":{\"id\":\"BackupPlan-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, BackupPlanApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n backup_plan_api = BackupPlanApi(client)\r\n resp = backup_plan_api.update_backup_plan({\"data\":{},\"where\":{\"id\":\"BackupPlan-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/backup_plan\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n backup_plan_api := client.BackupPlan\r\n params := backup_plan.NewUpdateBackupPlanParams()\r\n params.RequestBody = &models.BackupPlanUpdationParams{\nData: &models.BackupPlanUpdationParamsData{\n},\nWhere: &models.BackupPlanWhereInput{\nID: pointy.String(\"BackupPlan-id\"),\n},\n}\r\n rawResp, err := backup_plan_api.UpdateBackupPlan(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskBackupPlan) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskBackupPlan)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskBackupPlan) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.BackupPlanApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n BackupPlanApi backupPlanApi = new BackupPlanApi(client);\r\n BackupPlanUpdationParams params = new BackupPlanUpdationParams()\n.data(new BackupPlanUpdationParamsData())\n.where(new BackupPlanWhereInput()\n.id(\"BackupPlan-id\"));\r\n List resp = backupPlanApi.updateBackupPlan(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "/delete-backup-plan": { + "exampleValue": { + "data": { + "delete_strategy": "DELETE_RESTORE_POINT" + }, + "where": { + "id": "BackupPlan-id" + } + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-backup-plan \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"delete_strategy\":\"DELETE_RESTORE_POINT\"},\"where\":{\"id\":\"BackupPlan-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, BackupPlanApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n backup_plan_api = BackupPlanApi(client)\r\n resp = backup_plan_api.delete_backup_plan({\"data\":{\"delete_strategy\":\"DELETE_RESTORE_POINT\"},\"where\":{\"id\":\"BackupPlan-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/backup_plan\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n backup_plan_api := client.BackupPlan\r\n params := backup_plan.NewDeleteBackupPlanParams()\r\n params.RequestBody = &models.BackupPlanDeletionParams{\nData: &models.BackupPlanDeletionParamsData{\nDeleteStrategy: models.BackupPlanDeleteStrategyDELETE_RESTORE_POINT.Pointer(),\n},\nWhere: &models.BackupPlanWhereInput{\nID: pointy.String(\"BackupPlan-id\"),\n},\n}\r\n rawResp, err := backup_plan_api.DeleteBackupPlan(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteBackupPlan) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteBackupPlan)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteBackupPlan) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.BackupPlanApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n BackupPlanApi backupPlanApi = new BackupPlanApi(client);\r\n BackupPlanDeletionParams params = new BackupPlanDeletionParams()\n.data(new BackupPlanDeletionParamsData()\n.deleteStrategy(BackupPlanDeleteStrategy.fromValue(\"DELETE_RESTORE_POINT\")))\n.where(new BackupPlanWhereInput()\n.id(\"BackupPlan-id\"));\r\n List resp = backupPlanApi.deleteBackupPlan(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "/suspend-backup-plan": { + "exampleValue": { + "where": { + "id": "BackupPlan-id" + } + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/suspend-backup-plan \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"BackupPlan-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, BackupPlanApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n backup_plan_api = BackupPlanApi(client)\r\n resp = backup_plan_api.suspend_backup_plan({\"where\":{\"id\":\"BackupPlan-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/backup_plan\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n backup_plan_api := client.BackupPlan\r\n params := backup_plan.NewSuspendBackupPlanParams()\r\n params.RequestBody = &models.BackupPlanSuspendParams{\nWhere: &models.BackupPlanWhereInput{\nID: pointy.String(\"BackupPlan-id\"),\n},\n}\r\n rawResp, err := backup_plan_api.SuspendBackupPlan(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskBackupPlan) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskBackupPlan)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskBackupPlan) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.BackupPlanApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n BackupPlanApi backupPlanApi = new BackupPlanApi(client);\r\n BackupPlanSuspendParams params = new BackupPlanSuspendParams()\n.where(new BackupPlanWhereInput()\n.id(\"BackupPlan-id\"));\r\n List resp = backupPlanApi.suspendBackupPlan(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "/resume-backup-plan": { + "exampleValue": { + "where": { + "id": "BackupPlan-id" + } + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/resume-backup-plan \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"BackupPlan-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, BackupPlanApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n backup_plan_api = BackupPlanApi(client)\r\n resp = backup_plan_api.resume_backup_plan({\"where\":{\"id\":\"BackupPlan-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/backup_plan\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n backup_plan_api := client.BackupPlan\r\n params := backup_plan.NewResumeBackupPlanParams()\r\n params.RequestBody = &models.BackupPlanResumeParams{\nWhere: &models.BackupPlanWhereInput{\nID: pointy.String(\"BackupPlan-id\"),\n},\n}\r\n rawResp, err := backup_plan_api.ResumeBackupPlan(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskBackupPlan) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskBackupPlan)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskBackupPlan) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.BackupPlanApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n BackupPlanApi backupPlanApi = new BackupPlanApi(client);\r\n BackupPlanResumeParams params = new BackupPlanResumeParams()\n.where(new BackupPlanWhereInput()\n.id(\"BackupPlan-id\"));\r\n List resp = backupPlanApi.resumeBackupPlan(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "/execute-backup-plan": { + "exampleValue": { + "data": { + "type": "FULL" + }, + "where": { + "id": "BackupPlan-id" + } + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/execute-backup-plan \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"type\":\"FULL\"},\"where\":{\"id\":\"BackupPlan-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, BackupPlanApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n backup_plan_api = BackupPlanApi(client)\r\n resp = backup_plan_api.execute_backup_plan({\"data\":{\"type\":\"FULL\"},\"where\":{\"id\":\"BackupPlan-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/backup_plan\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n backup_plan_api := client.BackupPlan\r\n params := backup_plan.NewExecuteBackupPlanParams()\r\n params.RequestBody = &models.BackupPlanExecuteParams{\nData: &models.BackupPlanExecuteParamsData{\nType: models.BackupExecutionTypeFULL.Pointer(),\n},\nWhere: &models.BackupPlanWhereInput{\nID: pointy.String(\"BackupPlan-id\"),\n},\n}\r\n rawResp, err := backup_plan_api.ExecuteBackupPlan(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskBackupPlanExecution) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskBackupPlanExecution)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskBackupPlanExecution) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.BackupPlanApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n BackupPlanApi backupPlanApi = new BackupPlanApi(client);\r\n BackupPlanExecuteParams params = new BackupPlanExecuteParams()\n.data(new BackupPlanExecuteParamsData()\n.type(BackupExecutionType.fromValue(\"FULL\")))\n.where(new BackupPlanWhereInput()\n.id(\"BackupPlan-id\"));\r\n List resp = backupPlanApi.executeBackupPlan(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "/backup-rebuild-vm": { + "exampleValue": { + "data": { + "rebuild_network_mapping": [ + { + "src_vlan_id": "ck74rk21wg5lz0786opdnzz5m", + "dst_vlan_id": "ck74rk21wg5lz0786opdnzz5m" + } + ], + "rebuild_target_host_id": "ck74rk21wg5lz0786opdnzz5m", + "rebuild_target_cluster_id": "ck74rk21wg5lz0786opdnzz5m", + "rebuild_name": "rebuild_name-string", + "startup_after_restore": true + }, + "where": { + "id": "BackupRestorePoint-id" + } + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/backup-rebuild-vm \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"rebuild_network_mapping\":[{\"src_vlan_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"dst_vlan_id\":\"ck74rk21wg5lz0786opdnzz5m\"}],\"rebuild_target_host_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"rebuild_target_cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"rebuild_name\":\"rebuild_name-string\",\"startup_after_restore\":true},\"where\":{\"id\":\"BackupRestorePoint-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, BackupPlanApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n backup_plan_api = BackupPlanApi(client)\r\n resp = backup_plan_api.backup_rebuild_vm({\"data\":{\"rebuild_network_mapping\":[{\"src_vlan_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"dst_vlan_id\":\"ck74rk21wg5lz0786opdnzz5m\"}],\"rebuild_target_host_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"rebuild_target_cluster_id\":\"ck74rk21wg5lz0786opdnzz5m\",\"rebuild_name\":\"rebuild_name-string\",\"startup_after_restore\":True},\"where\":{\"id\":\"BackupRestorePoint-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/backup_plan\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n backup_plan_api := client.BackupPlan\r\n params := backup_plan.NewBackupRebuildVMParams()\r\n params.RequestBody = &models.BackupRestorePointRebuildParams{\nData: &models.BackupRestorePointRebuildParamsData{\nRebuildNetworkMapping: []*models.BackupRestoreExecutionNetworkMapping{\n{\nSrcVlanID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nDstVlanID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n},\n},\nRebuildTargetHostID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nRebuildTargetClusterID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\nRebuildName: pointy.String(\"rebuild_name-string\"),\nStartupAfterRestore: pointy.Bool(true),\n},\nWhere: &models.BackupRestorePointWhereInput{\nID: pointy.String(\"BackupRestorePoint-id\"),\n},\n}\r\n rawResp, err := backup_plan_api.BackupRebuildVM(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskBackupRestoreExecution) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskBackupRestoreExecution)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskBackupRestoreExecution) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.BackupPlanApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n BackupPlanApi backupPlanApi = new BackupPlanApi(client);\r\n BackupRestorePointRebuildParams params = new BackupRestorePointRebuildParams()\n.data(new BackupRestorePointRebuildParamsData()\n.addRebuildNetworkMappingItem(new BackupRestoreExecutionNetworkMapping()\n.srcVlanId(\"ck74rk21wg5lz0786opdnzz5m\")\n.dstVlanId(\"ck74rk21wg5lz0786opdnzz5m\"))\n.rebuildTargetHostId(\"ck74rk21wg5lz0786opdnzz5m\")\n.rebuildTargetClusterId(\"ck74rk21wg5lz0786opdnzz5m\")\n.rebuildName(\"rebuild_name-string\")\n.startupAfterRestore(true))\n.where(new BackupRestorePointWhereInput()\n.id(\"BackupRestorePoint-id\"));\r\n List resp = backupPlanApi.backupRebuildVm(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "/backup-restore-vm-in-place": { + "exampleValue": { + "data": { + "startup_after_restore": true + }, + "where": { + "id": "BackupRestorePoint-id" + } + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/backup-restore-vm-in-place \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"data\":{\"startup_after_restore\":true},\"where\":{\"id\":\"BackupRestorePoint-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, BackupPlanApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n backup_plan_api = BackupPlanApi(client)\r\n resp = backup_plan_api.backup_restore_vm_in_place({\"data\":{\"startup_after_restore\":True},\"where\":{\"id\":\"BackupRestorePoint-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/backup_plan\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n backup_plan_api := client.BackupPlan\r\n params := backup_plan.NewBackupRestoreVMInPlaceParams()\r\n params.RequestBody = &models.BackupRestorePointRestoreInPlaceParams{\nData: &models.BackupRestorePointRestoreInPlaceParamsData{\nStartupAfterRestore: pointy.Bool(true),\n},\nWhere: &models.BackupRestorePointWhereInput{\nID: pointy.String(\"BackupRestorePoint-id\"),\n},\n}\r\n rawResp, err := backup_plan_api.BackupRestoreVMInPlace(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskBackupRestoreExecution) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskBackupRestoreExecution)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskBackupRestoreExecution) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.BackupPlanApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n BackupPlanApi backupPlanApi = new BackupPlanApi(client);\r\n BackupRestorePointRestoreInPlaceParams params = new BackupRestorePointRestoreInPlaceParams()\n.data(new BackupRestorePointRestoreInPlaceParamsData()\n.startupAfterRestore(true))\n.where(new BackupRestorePointWhereInput()\n.id(\"BackupRestorePoint-id\"));\r\n List resp = backupPlanApi.backupRestoreVmInPlace(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "/delete-backup-restore-point": { + "exampleValue": { + "where": { + "id": "BackupRestorePoint-id" + } + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/delete-backup-restore-point \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"BackupRestorePoint-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, BackupPlanApi\r\nfrom cloudtower.utils import login, wait_tasks\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n backup_plan_api = BackupPlanApi(client)\r\n resp = backup_plan_api.delete_backup_restore_point({\"where\":{\"id\":\"BackupRestorePoint-id\"}})\r\n wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id], client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/backup_plan\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n backup_plan_api := client.BackupPlan\r\n params := backup_plan.NewDeleteBackupRestorePointParams()\r\n params.RequestBody = &models.BackupRestorePointDeletionParams{\nWhere: &models.BackupRestorePointWhereInput{\nID: pointy.String(\"BackupRestorePoint-id\"),\n},\n}\r\n rawResp, err := backup_plan_api.DeleteBackupRestorePoint(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteBackupRestorePointArray) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteBackupRestorePointArray)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteBackupRestorePointArray) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.BackupPlanApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n BackupPlanApi backupPlanApi = new BackupPlanApi(client);\r\n BackupRestorePointDeletionParams params = new BackupRestorePointDeletionParams()\n.where(new BackupRestorePointWhereInput()\n.id(\"BackupRestorePoint-id\"));\r\n List resp = backupPlanApi.deleteBackupRestorePoint(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" + }, + "/disassociate-system-service-from-obs-service": { + "exampleValue": { + "system_service_id": "ck74rk21wg5lz0786opdnzz5m" + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/disassociate-system-service-from-obs-service \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"system_service_id\":\"ck74rk21wg5lz0786opdnzz5m\"}'", + "python": "from cloudtower import ApiClient, Configuration, ObservabilityApi\r\nfrom cloudtower.utils import login, wait_task\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n observability_api = ObservabilityApi(client)\r\n resp = observability_api.disassociate_system_service_from_obs_service({\"system_service_id\":\"ck74rk21wg5lz0786opdnzz5m\"})\r\n wait_task(resp.task_id, client)\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/observability\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n observability_api := client.Observability\r\n params := observability.NewDisassociateSystemServiceFromObsServiceParams()\r\n params.RequestBody = &models.DisassociateSystemServiceFromObsServiceParams{\nSystemServiceID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n}\r\n rawResp, err := observability_api.DisassociateSystemServiceFromObsService(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n err = utils.WaitTask(context.Background(), client, resp.TaskID, 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ObservabilityApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ObservabilityApi observabilityApi = new ObservabilityApi(client);\r\n DisassociateSystemServiceFromObsServiceParams params = new DisassociateSystemServiceFromObsServiceParams()\n.systemServiceId(\"ck74rk21wg5lz0786opdnzz5m\");\r\n WithTaskDisassociateSystemServiceFromObsServiceResult resp = observabilityApi.disassociateSystemServiceFromObsService(params);\r\n TaskUtil.WaitTask(resp.getTaskId(), client);\r\n }\r\n}" + }, "/create-task": { "exampleValue": [ { @@ -3941,15 +4089,6 @@ "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/virtual_private_cloud\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n virtual_private_cloud_api := client.VirtualPrivateCloud\r\n params := virtual_private_cloud.NewDeleteVirtualPrivateCloudParams()\r\n params.RequestBody = &models.VirtualPrivateCloudDeletionParams{\nWhere: &models.VirtualPrivateCloudWhereInput{\nID: pointy.String(\"VirtualPrivateCloud-id\"),\n},\n}\r\n rawResp, err := virtual_private_cloud_api.DeleteVirtualPrivateCloud(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n respTaskIds := funk.Filter(resp, func(withTaskObj *models.WithTaskDeleteVirtualPrivateCloud) bool {\r\n return withTaskObj.TaskID != nil\r\n }).([]*models.WithTaskDeleteVirtualPrivateCloud)\r\n if len(respTaskIds) == 0 {\r\n return\r\n }\r\n err = utils.WaitTasks(context.Background(), client, funk.Map(respTaskIds, func(withTaskObj *models.WithTaskDeleteVirtualPrivateCloud) string {\r\n\t\treturn *withTaskObj.TaskID\r\n\t}).([]string), 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.VirtualPrivateCloudApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n VirtualPrivateCloudApi virtualPrivateCloudApi = new VirtualPrivateCloudApi(client);\r\n VirtualPrivateCloudDeletionParams params = new VirtualPrivateCloudDeletionParams()\n.where(new VirtualPrivateCloudWhereInput()\n.id(\"VirtualPrivateCloud-id\"));\r\n List resp = virtualPrivateCloudApi.deleteVirtualPrivateCloud(params);\r\n List taskIds = resp.stream().map(withTaskObj -> withTaskObj.getTaskId()).filter(id -> Objects.nonNull(id)).collect(Collectors.toList());\r\n TaskUtil.WaitTasks(taskIds, client);\r\n }\r\n}" }, - "/disassociate-system-service-from-obs-service": { - "exampleValue": { - "system_service_id": "ck74rk21wg5lz0786opdnzz5m" - }, - "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/disassociate-system-service-from-obs-service \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"system_service_id\":\"ck74rk21wg5lz0786opdnzz5m\"}'", - "python": "from cloudtower import ApiClient, Configuration, ObservabilityApi\r\nfrom cloudtower.utils import login, wait_task\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n observability_api = ObservabilityApi(client)\r\n resp = observability_api.disassociate_system_service_from_obs_service({\"system_service_id\":\"ck74rk21wg5lz0786opdnzz5m\"})\r\n wait_task(resp.task_id, client)\r\n\r\n", - "go": "package main\r\n\r\nimport (\r\n \"context\"\r\n \"fmt\"\r\n \"time\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/observability\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/utils\"\r\n \"github.com/thoas/go-funk\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n observability_api := client.Observability\r\n params := observability.NewDisassociateSystemServiceFromObsServiceParams()\r\n params.RequestBody = &models.DisassociateSystemServiceFromObsServiceParams{\nSystemServiceID: pointy.String(\"ck74rk21wg5lz0786opdnzz5m\"),\n}\r\n rawResp, err := observability_api.DisassociateSystemServiceFromObsService(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n err = utils.WaitTask(context.Background(), client, resp.TaskID, 1*time.Second)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n}", - "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.TaskUtil;\r\nimport com.smartx.tower.api.ObservabilityApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ObservabilityApi observabilityApi = new ObservabilityApi(client);\r\n DisassociateSystemServiceFromObsServiceParams params = new DisassociateSystemServiceFromObsServiceParams()\n.systemServiceId(\"ck74rk21wg5lz0786opdnzz5m\");\r\n WithTaskDisassociateSystemServiceFromObsServiceResult resp = observabilityApi.disassociateSystemServiceFromObsService(params);\r\n TaskUtil.WaitTask(resp.getTaskId(), client);\r\n }\r\n}" - }, "/get-alert-notifiers": { "exampleValue": { "where": { @@ -4038,6 +4177,149 @@ "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/application\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n application_api := client.Application\r\n params := application.NewGetApplicationsConnectionParams()\r\n params.RequestBody = &models.GetApplicationsConnectionRequestBody{\nWhere: &models.ApplicationWhereInput{\nID: pointy.String(\"Application-id\"),\n},\n}\r\n rawResp, err := application_api.GetApplicationsConnection(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.ApplicationApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n ApplicationApi applicationApi = new ApplicationApi(client);\r\n GetApplicationsConnectionRequestBody params = new GetApplicationsConnectionRequestBody()\n.where(new ApplicationWhereInput()\n.id(\"Application-id\"));\r\n ApplicationConnection resp = applicationApi.getApplicationsConnection(params);\r\n }\r\n}" }, + "/get-backup-plan-executions": { + "exampleValue": { + "where": { + "id": "BackupPlanExecution-id" + } + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-backup-plan-executions \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"BackupPlanExecution-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, BackupPlanExecutionApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n backup_plan_execution_api = BackupPlanExecutionApi(client)\r\n resp = backup_plan_execution_api.get_backup_plan_executions({\"where\":{\"id\":\"BackupPlanExecution-id\"}})\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/backup_plan_execution\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n backup_plan_execution_api := client.BackupPlanExecution\r\n params := backup_plan_execution.NewGetBackupPlanExecutionsParams()\r\n params.RequestBody = &models.GetBackupPlanExecutionsRequestBody{\nWhere: &models.BackupPlanExecutionWhereInput{\nID: pointy.String(\"BackupPlanExecution-id\"),\n},\n}\r\n rawResp, err := backup_plan_execution_api.GetBackupPlanExecutions(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.BackupPlanExecutionApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n BackupPlanExecutionApi backupPlanExecutionApi = new BackupPlanExecutionApi(client);\r\n GetBackupPlanExecutionsRequestBody params = new GetBackupPlanExecutionsRequestBody()\n.where(new BackupPlanExecutionWhereInput()\n.id(\"BackupPlanExecution-id\"));\r\n List resp = backupPlanExecutionApi.getBackupPlanExecutions(params);\r\n }\r\n}" + }, + "/get-backup-plan-executions-connection": { + "exampleValue": { + "where": { + "id": "BackupPlanExecution-id" + } + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-backup-plan-executions-connection \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"BackupPlanExecution-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, BackupPlanExecutionApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n backup_plan_execution_api = BackupPlanExecutionApi(client)\r\n resp = backup_plan_execution_api.get_backup_plan_executions_connection({\"where\":{\"id\":\"BackupPlanExecution-id\"}})\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/backup_plan_execution\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n backup_plan_execution_api := client.BackupPlanExecution\r\n params := backup_plan_execution.NewGetBackupPlanExecutionsConnectionParams()\r\n params.RequestBody = &models.GetBackupPlanExecutionsConnectionRequestBody{\nWhere: &models.BackupPlanExecutionWhereInput{\nID: pointy.String(\"BackupPlanExecution-id\"),\n},\n}\r\n rawResp, err := backup_plan_execution_api.GetBackupPlanExecutionsConnection(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.BackupPlanExecutionApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n BackupPlanExecutionApi backupPlanExecutionApi = new BackupPlanExecutionApi(client);\r\n GetBackupPlanExecutionsConnectionRequestBody params = new GetBackupPlanExecutionsConnectionRequestBody()\n.where(new BackupPlanExecutionWhereInput()\n.id(\"BackupPlanExecution-id\"));\r\n BackupPlanExecutionConnection resp = backupPlanExecutionApi.getBackupPlanExecutionsConnection(params);\r\n }\r\n}" + }, + "/get-backup-plans": { + "exampleValue": { + "where": { + "id": "BackupPlan-id" + } + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-backup-plans \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"BackupPlan-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, BackupPlanApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n backup_plan_api = BackupPlanApi(client)\r\n resp = backup_plan_api.get_backup_plans({\"where\":{\"id\":\"BackupPlan-id\"}})\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/backup_plan\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n backup_plan_api := client.BackupPlan\r\n params := backup_plan.NewGetBackupPlansParams()\r\n params.RequestBody = &models.GetBackupPlansRequestBody{\nWhere: &models.BackupPlanWhereInput{\nID: pointy.String(\"BackupPlan-id\"),\n},\n}\r\n rawResp, err := backup_plan_api.GetBackupPlans(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.BackupPlanApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n BackupPlanApi backupPlanApi = new BackupPlanApi(client);\r\n GetBackupPlansRequestBody params = new GetBackupPlansRequestBody()\n.where(new BackupPlanWhereInput()\n.id(\"BackupPlan-id\"));\r\n List resp = backupPlanApi.getBackupPlans(params);\r\n }\r\n}" + }, + "/get-backup-restore-executions": { + "exampleValue": { + "where": { + "id": "BackupRestoreExecution-id" + } + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-backup-restore-executions \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"BackupRestoreExecution-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, BackupRestoreExecutionApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n backup_restore_execution_api = BackupRestoreExecutionApi(client)\r\n resp = backup_restore_execution_api.get_backup_restore_executions({\"where\":{\"id\":\"BackupRestoreExecution-id\"}})\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/backup_restore_execution\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n backup_restore_execution_api := client.BackupRestoreExecution\r\n params := backup_restore_execution.NewGetBackupRestoreExecutionsParams()\r\n params.RequestBody = &models.GetBackupRestoreExecutionsRequestBody{\nWhere: &models.BackupRestoreExecutionWhereInput{\nID: pointy.String(\"BackupRestoreExecution-id\"),\n},\n}\r\n rawResp, err := backup_restore_execution_api.GetBackupRestoreExecutions(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.BackupRestoreExecutionApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n BackupRestoreExecutionApi backupRestoreExecutionApi = new BackupRestoreExecutionApi(client);\r\n GetBackupRestoreExecutionsRequestBody params = new GetBackupRestoreExecutionsRequestBody()\n.where(new BackupRestoreExecutionWhereInput()\n.id(\"BackupRestoreExecution-id\"));\r\n List resp = backupRestoreExecutionApi.getBackupRestoreExecutions(params);\r\n }\r\n}" + }, + "/get-backup-restore-executions-connection": { + "exampleValue": { + "where": { + "id": "BackupRestoreExecution-id" + } + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-backup-restore-executions-connection \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"BackupRestoreExecution-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, BackupRestoreExecutionApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n backup_restore_execution_api = BackupRestoreExecutionApi(client)\r\n resp = backup_restore_execution_api.get_backup_restore_executions_connection({\"where\":{\"id\":\"BackupRestoreExecution-id\"}})\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/backup_restore_execution\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n backup_restore_execution_api := client.BackupRestoreExecution\r\n params := backup_restore_execution.NewGetBackupRestoreExecutionsConnectionParams()\r\n params.RequestBody = &models.GetBackupRestoreExecutionsConnectionRequestBody{\nWhere: &models.BackupRestoreExecutionWhereInput{\nID: pointy.String(\"BackupRestoreExecution-id\"),\n},\n}\r\n rawResp, err := backup_restore_execution_api.GetBackupRestoreExecutionsConnection(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.BackupRestoreExecutionApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n BackupRestoreExecutionApi backupRestoreExecutionApi = new BackupRestoreExecutionApi(client);\r\n GetBackupRestoreExecutionsConnectionRequestBody params = new GetBackupRestoreExecutionsConnectionRequestBody()\n.where(new BackupRestoreExecutionWhereInput()\n.id(\"BackupRestoreExecution-id\"));\r\n BackupRestoreExecutionConnection resp = backupRestoreExecutionApi.getBackupRestoreExecutionsConnection(params);\r\n }\r\n}" + }, + "/get-backup-restore-points": { + "exampleValue": { + "where": { + "id": "BackupRestorePoint-id" + } + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-backup-restore-points \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"BackupRestorePoint-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, BackupRestorePointApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n backup_restore_point_api = BackupRestorePointApi(client)\r\n resp = backup_restore_point_api.get_backup_restore_points({\"where\":{\"id\":\"BackupRestorePoint-id\"}})\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/backup_restore_point\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n backup_restore_point_api := client.BackupRestorePoint\r\n params := backup_restore_point.NewGetBackupRestorePointsParams()\r\n params.RequestBody = &models.GetBackupRestorePointsRequestBody{\nWhere: &models.BackupRestorePointWhereInput{\nID: pointy.String(\"BackupRestorePoint-id\"),\n},\n}\r\n rawResp, err := backup_restore_point_api.GetBackupRestorePoints(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.BackupRestorePointApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n BackupRestorePointApi backupRestorePointApi = new BackupRestorePointApi(client);\r\n GetBackupRestorePointsRequestBody params = new GetBackupRestorePointsRequestBody()\n.where(new BackupRestorePointWhereInput()\n.id(\"BackupRestorePoint-id\"));\r\n List resp = backupRestorePointApi.getBackupRestorePoints(params);\r\n }\r\n}" + }, + "/get-backup-restore-points-connection": { + "exampleValue": { + "where": { + "id": "BackupRestorePoint-id" + } + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-backup-restore-points-connection \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"BackupRestorePoint-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, BackupRestorePointApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n backup_restore_point_api = BackupRestorePointApi(client)\r\n resp = backup_restore_point_api.get_backup_restore_points_connection({\"where\":{\"id\":\"BackupRestorePoint-id\"}})\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/backup_restore_point\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n backup_restore_point_api := client.BackupRestorePoint\r\n params := backup_restore_point.NewGetBackupRestorePointsConnectionParams()\r\n params.RequestBody = &models.GetBackupRestorePointsConnectionRequestBody{\nWhere: &models.BackupRestorePointWhereInput{\nID: pointy.String(\"BackupRestorePoint-id\"),\n},\n}\r\n rawResp, err := backup_restore_point_api.GetBackupRestorePointsConnection(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.BackupRestorePointApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n BackupRestorePointApi backupRestorePointApi = new BackupRestorePointApi(client);\r\n GetBackupRestorePointsConnectionRequestBody params = new GetBackupRestorePointsConnectionRequestBody()\n.where(new BackupRestorePointWhereInput()\n.id(\"BackupRestorePoint-id\"));\r\n BackupRestorePointConnection resp = backupRestorePointApi.getBackupRestorePointsConnection(params);\r\n }\r\n}" + }, + "/get-backup-services": { + "exampleValue": { + "where": { + "id": "BackupService-id" + } + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-backup-services \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"BackupService-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, BackupServiceApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n backup_service_api = BackupServiceApi(client)\r\n resp = backup_service_api.get_backup_services({\"where\":{\"id\":\"BackupService-id\"}})\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/backup_service\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n backup_service_api := client.BackupService\r\n params := backup_service.NewGetBackupServicesParams()\r\n params.RequestBody = &models.GetBackupServicesRequestBody{\nWhere: &models.BackupServiceWhereInput{\nID: pointy.String(\"BackupService-id\"),\n},\n}\r\n rawResp, err := backup_service_api.GetBackupServices(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.BackupServiceApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n BackupServiceApi backupServiceApi = new BackupServiceApi(client);\r\n GetBackupServicesRequestBody params = new GetBackupServicesRequestBody()\n.where(new BackupServiceWhereInput()\n.id(\"BackupService-id\"));\r\n List resp = backupServiceApi.getBackupServices(params);\r\n }\r\n}" + }, + "/get-backup-services-connection": { + "exampleValue": { + "where": { + "id": "BackupService-id" + } + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-backup-services-connection \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"BackupService-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, BackupServiceApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n backup_service_api = BackupServiceApi(client)\r\n resp = backup_service_api.get_backup_services_connection({\"where\":{\"id\":\"BackupService-id\"}})\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/backup_service\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n backup_service_api := client.BackupService\r\n params := backup_service.NewGetBackupServicesConnectionParams()\r\n params.RequestBody = &models.GetBackupServicesConnectionRequestBody{\nWhere: &models.BackupServiceWhereInput{\nID: pointy.String(\"BackupService-id\"),\n},\n}\r\n rawResp, err := backup_service_api.GetBackupServicesConnection(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.BackupServiceApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n BackupServiceApi backupServiceApi = new BackupServiceApi(client);\r\n GetBackupServicesConnectionRequestBody params = new GetBackupServicesConnectionRequestBody()\n.where(new BackupServiceWhereInput()\n.id(\"BackupService-id\"));\r\n BackupServiceConnection resp = backupServiceApi.getBackupServicesConnection(params);\r\n }\r\n}" + }, + "/get-backup-store-repositories": { + "exampleValue": { + "where": { + "id": "BackupStoreRepository-id" + } + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-backup-store-repositories \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"BackupStoreRepository-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, BackupStoreRepositoryApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n backup_store_repository_api = BackupStoreRepositoryApi(client)\r\n resp = backup_store_repository_api.get_backup_store_repositories({\"where\":{\"id\":\"BackupStoreRepository-id\"}})\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/backup_store_repository\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n backup_store_repository_api := client.BackupStoreRepository\r\n params := backup_store_repository.NewGetBackupStoreRepositoriesParams()\r\n params.RequestBody = &models.GetBackupStoreRepositoriesRequestBody{\nWhere: &models.BackupStoreRepositoryWhereInput{\nID: pointy.String(\"BackupStoreRepository-id\"),\n},\n}\r\n rawResp, err := backup_store_repository_api.GetBackupStoreRepositories(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.BackupStoreRepositoryApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n BackupStoreRepositoryApi backupStoreRepositoryApi = new BackupStoreRepositoryApi(client);\r\n GetBackupStoreRepositoriesRequestBody params = new GetBackupStoreRepositoriesRequestBody()\n.where(new BackupStoreRepositoryWhereInput()\n.id(\"BackupStoreRepository-id\"));\r\n List resp = backupStoreRepositoryApi.getBackupStoreRepositories(params);\r\n }\r\n}" + }, + "/get-backup-store-repositories-connection": { + "exampleValue": { + "where": { + "id": "BackupStoreRepository-id" + } + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-backup-store-repositories-connection \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"BackupStoreRepository-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, BackupStoreRepositoryApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n backup_store_repository_api = BackupStoreRepositoryApi(client)\r\n resp = backup_store_repository_api.get_backup_store_repositories_connection({\"where\":{\"id\":\"BackupStoreRepository-id\"}})\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/backup_store_repository\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n backup_store_repository_api := client.BackupStoreRepository\r\n params := backup_store_repository.NewGetBackupStoreRepositoriesConnectionParams()\r\n params.RequestBody = &models.GetBackupStoreRepositoriesConnectionRequestBody{\nWhere: &models.BackupStoreRepositoryWhereInput{\nID: pointy.String(\"BackupStoreRepository-id\"),\n},\n}\r\n rawResp, err := backup_store_repository_api.GetBackupStoreRepositoriesConnection(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.BackupStoreRepositoryApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n BackupStoreRepositoryApi backupStoreRepositoryApi = new BackupStoreRepositoryApi(client);\r\n GetBackupStoreRepositoriesConnectionRequestBody params = new GetBackupStoreRepositoriesConnectionRequestBody()\n.where(new BackupStoreRepositoryWhereInput()\n.id(\"BackupStoreRepository-id\"));\r\n BackupStoreRepositoryConnection resp = backupStoreRepositoryApi.getBackupStoreRepositoriesConnection(params);\r\n }\r\n}" + }, + "/get-backup-target-executions": { + "exampleValue": { + "where": { + "id": "BackupTargetExecution-id" + } + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-backup-target-executions \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"BackupTargetExecution-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, BackupTargetExecutionApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n backup_target_execution_api = BackupTargetExecutionApi(client)\r\n resp = backup_target_execution_api.get_backup_target_executions({\"where\":{\"id\":\"BackupTargetExecution-id\"}})\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/backup_target_execution\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n backup_target_execution_api := client.BackupTargetExecution\r\n params := backup_target_execution.NewGetBackupTargetExecutionsParams()\r\n params.RequestBody = &models.GetBackupTargetExecutionsRequestBody{\nWhere: &models.BackupTargetExecutionWhereInput{\nID: pointy.String(\"BackupTargetExecution-id\"),\n},\n}\r\n rawResp, err := backup_target_execution_api.GetBackupTargetExecutions(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.BackupTargetExecutionApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n BackupTargetExecutionApi backupTargetExecutionApi = new BackupTargetExecutionApi(client);\r\n GetBackupTargetExecutionsRequestBody params = new GetBackupTargetExecutionsRequestBody()\n.where(new BackupTargetExecutionWhereInput()\n.id(\"BackupTargetExecution-id\"));\r\n List resp = backupTargetExecutionApi.getBackupTargetExecutions(params);\r\n }\r\n}" + }, + "/get-backup-target-executions-connection": { + "exampleValue": { + "where": { + "id": "BackupTargetExecution-id" + } + }, + "curl": "curl -X POST \\\n\thttp://your_tower_url/v2/api/get-backup-target-executions-connection \\\n\t-H 'Authorization: YOUR_TOKEN' \\\n\t-H 'Content-Language: en-US' \\\n\t-H 'Content-Type: application/json' \\\n\t-d '{\"where\":{\"id\":\"BackupTargetExecution-id\"}}'", + "python": "from cloudtower import ApiClient, Configuration, BackupTargetExecutionApi\r\nfrom cloudtower.utils import login\r\n\r\ndef main():\r\n username = \"username\"\r\n password = \"password\"\r\n\r\n endpoint = \"http://tower.smartx.com/v2/api\"\r\n\r\n configuration = Configuration(host=endpoint)\r\n client = ApiClient(configuration=configuration)\r\n login(client,username,password)\r\n backup_target_execution_api = BackupTargetExecutionApi(client)\r\n resp = backup_target_execution_api.get_backup_target_executions_connection({\"where\":{\"id\":\"BackupTargetExecution-id\"}})\r\n\r\n", + "go": "package main\r\n\r\nimport (\r\n \"fmt\"\r\n\r\n \"github.com/openlyinc/pointy\"\r\n apiclient \"github.com/smartxworks/cloudtower-go-sdk/v2/client\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/client/backup_target_execution\"\r\n \"github.com/smartxworks/cloudtower-go-sdk/v2/models\"\r\n)\r\n\r\nfunc main() {\r\n client, err := apiclient.NewWithUserConfig(apiclient.ClientConfig{\r\n Host: \"tower.smartx.com\",\r\n BasePath: \"v2/api\",\r\n Schemes: []string{\"http\"},\r\n }, apiclient.UserConfig{\r\n Name: \"Name\",\r\n Password: \"Password\",\r\n Source: models.UserSourceLOCAL,\r\n })\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n backup_target_execution_api := client.BackupTargetExecution\r\n params := backup_target_execution.NewGetBackupTargetExecutionsConnectionParams()\r\n params.RequestBody = &models.GetBackupTargetExecutionsConnectionRequestBody{\nWhere: &models.BackupTargetExecutionWhereInput{\nID: pointy.String(\"BackupTargetExecution-id\"),\n},\n}\r\n rawResp, err := backup_target_execution_api.GetBackupTargetExecutionsConnection(params)\r\n if err != nil {\r\n fmt.Println(err)\r\n return\r\n }\r\n resp := rawResp.Payload\r\n}", + "java": "package com.smartx.com;\r\n\r\nimport com.smartx.tower.ApiClient;\r\nimport com.smartx.tower.ApiException;\r\nimport com.smartx.tower.ClientUtil;\r\nimport com.smartx.tower.api.BackupTargetExecutionApi;\r\nimport com.smartx.tower.model.*;\r\nimport java.io.IOException;\r\n\r\npublic class App {\r\n public static void main(String[] args) throws ApiException, IOException {\r\n ApiClient client = new ApiClient();\r\n client.setBasePath(\"http://tower.smartx.com/v2/api\");\r\n ClientUtil.login(\"username\",\"root\", client);\r\n\r\n BackupTargetExecutionApi backupTargetExecutionApi = new BackupTargetExecutionApi(client);\r\n GetBackupTargetExecutionsConnectionRequestBody params = new GetBackupTargetExecutionsConnectionRequestBody()\n.where(new BackupTargetExecutionWhereInput()\n.id(\"BackupTargetExecution-id\"));\r\n BackupTargetExecutionConnection resp = backupTargetExecutionApi.getBackupTargetExecutionsConnection(params);\r\n }\r\n}" + }, "/get-brick-topoes": { "exampleValue": { "where": { diff --git a/cloudtower-api-doc/swagger/locales/en/4.4.0.json b/cloudtower-api-doc/swagger/locales/en/4.4.0.json index 58858b5..060daef 100644 --- a/cloudtower-api-doc/swagger/locales/en/4.4.0.json +++ b/cloudtower-api-doc/swagger/locales/en/4.4.0.json @@ -35,8 +35,8 @@ "cluster_id": "" }, "VmCreateVmFromContentLibraryTemplateBatchParams": { - "vms": "", - "template_id": "" + "vms": "VM config list", + "template_id": "Specify the content library template ID" }, "NestedTemplateVpcNic": { "vpc_local_id": "", @@ -1904,7 +1904,7 @@ ], "paths": { "/create-vm-from-content-library-template-batch": { - "summary": "batch create vm from content library vm template", + "summary": "Batch create VMs from content library template", "description": "create multiple vm from one content library vm template" }, "/disassociate-system-service-from-obs-service": { diff --git a/cloudtower-api-doc/swagger/locales/zh/4.4.0.json b/cloudtower-api-doc/swagger/locales/zh/4.4.0.json index 83cf8ff..43bdba2 100644 --- a/cloudtower-api-doc/swagger/locales/zh/4.4.0.json +++ b/cloudtower-api-doc/swagger/locales/zh/4.4.0.json @@ -5,38 +5,38 @@ "data": "资源" }, "VmCreateVmFromContentLibraryTemplateBatchVmParams": { - "owner": "", - "gpu_devices": "", + "owner": "所属用户", + "gpu_devices": "关联 GPU 设备", "cloud_init": "", - "is_full_copy": "", + "is_full_copy": "是否完全拷贝", "max_bandwidth_policy": "", "max_bandwidth_unit": "", - "max_bandwidth": "", + "max_bandwidth": "最大带宽", "max_iops_policy": "", - "max_iops": "", + "max_iops": "最大 IOPS", "io_policy": "", - "vcpu": "", + "vcpu": "新建虚拟机的cpu总核心数,置空则会根据 cpu_sockets 和 cpu_cores 的赋值情况以及原模板的值自动生成", "status": "", "firmware": "", - "ha": "", - "pci_nics": "", - "vm_placement_group": "", - "vm_nics": "", - "disk_operate": "", + "ha": "是否启用高可用,如果置空则是用原模板的设置", + "pci_nics": "关联 PCI 网卡", + "vm_placement_group": "指定虚拟机放置组", + "vm_nics": "配置新建虚拟机的网卡,如果置空则按照原模板创建,如果原模板中的网卡并不位于当前集群,则会使用当前集群的默认网卡", + "disk_operate": "填入虚拟盘信息", "memory_unit": "", - "memory": "", - "cpu_cores": "", - "cpu_sockets": "", + "memory": "新建虚拟机的内存大小,以 byte 为单位,置空则是用原模板的大小", + "cpu_cores": "新建虚拟机的 CPU 每插槽核心数,置空则会根据 cpu_sockets 和 vcpu 的赋值情况以及原模板的值自动生成", + "cpu_sockets": "新建虚拟机的 CPU 插槽数,置空则会根据 cpu_cores 和 vcpu 的赋值情况以及原模板的值自动生成", "guest_os_type": "", - "folder_id": "", - "description": "", - "name": "", - "host_id": "", - "cluster_id": "" + "folder_id": "新建虚拟机将会被创建至指定虚拟机组", + "description": "新建虚拟机的描述", + "name": "新建虚拟机的名称", + "host_id": "创建至指定主机,留空则表示自动调度", + "cluster_id": "创建至指定集群" }, "VmCreateVmFromContentLibraryTemplateBatchParams": { - "vms": "", - "template_id": "" + "vms": "虚拟机配置列表", + "template_id": "指定内容库模板 ID" }, "NestedTemplateVpcNic": { "vpc_local_id": "", @@ -2439,8 +2439,8 @@ ], "paths": { "/create-vm-from-content-library-template-batch": { - "summary": "通过模板批量创建虚拟机", - "description": "通过模板批量创建虚拟机" + "summary": "批量从内容库模版创建虚拟机", + "description": "批量从内容库模版创建虚拟机" }, "/disassociate-system-service-from-obs-service": { "summary": "从可观测性服务中移除系统服务",