Documentation ¶
Index ¶
Constants ¶
View Source
const AIClusterPowercycleResponse = `` /* 3826-byte string literal not displayed */
View Source
const AIClusterRebootResponse = `` /* 3826-byte string literal not displayed */
View Source
const AIInstancePowercycleResponse = `` /* 2873-byte string literal not displayed */
View Source
const AIInstanceRebootResponse = `` /* 2873-byte string literal not displayed */
View Source
const AssignSecurityGroupsRequest = `
{
"name": "Test"
}
`
View Source
const AttachInterfaceRequest = `
{
"type": "subnet",
"subnet_id": "9bc36cf6-407c-4a74-bc83-ce3aa3854c3d"
}
`
View Source
const ClusterInterfacesResponse = `` /* 2154-byte string literal not displayed */
View Source
const CreateRequest = `` /* 1427-byte string literal not displayed */
View Source
const CreateResponse = `
{
"tasks": [
"50f53a35-42ed-40c4-82b2-5a37fb3e00bc"
]
}
`
View Source
const DeleteResponse = `
{
"tasks": [
"50f53a35-42ed-40c4-82b2-5a37fb3e00bc"
]
}
`
View Source
const DetachInterfaceRequest = `
{
"ip_address": "192.168.0.23",
"port_id": "9bc36cf6-407c-4a74-bc83-ce3aa3854c3d"
}
`
View Source
const GetResponse = `` /* 7544-byte string literal not displayed */
View Source
const InstanceConsoleResponse = `` /* 220-byte string literal not displayed */
View Source
const ListResponse = `` /* 9323-byte string literal not displayed */
View Source
const MetadataCreateRequest = `
{
"test1": "test1",
"test2": "test2"
}
`
View Source
const MetadataListResponse = `` /* 215-byte string literal not displayed */
View Source
const MetadataResponse = `
{
"key": "cost-center",
"value": "Atlanta",
"read_only": false
}
`
View Source
const PortsListResponse = `` /* 335-byte string literal not displayed */
View Source
const ResizeRequest = `` /* 1406-byte string literal not displayed */
View Source
const UnAssignSecurityGroupsRequest = `
{
"name": "Test"
}
`
Variables ¶
View Source
var ( AICluster1 = ai.AICluster{ ClusterID: "e673bba0-fcef-44d9-904c-824546b608ec", ClusterName: "ivandts", ClusterStatus: "ACTIVE", TaskID: &taskID, TaskStatus: "FINISHED", CreatedAt: createdTime, ImageID: "06e62653-1f88-4d38-9aa6-62833e812b4f", ImageName: "ubuntu-20.04-x64-poplar-ironic-1.18.0-3.0.0", Flavor: "g2a-ai-fake-v1pod-8", Volumes: []volumes.Volume{ { CreatedAt: gcorecloud.JSONRFC3339Z{Time: volumeCreatedTime}, UpdatedAt: gcorecloud.JSONRFC3339Z{Time: volumeUpdatedTime}, VolumeType: "standard", ID: "459bf28d-df63-45d2-a462-6c216e571ddc", Name: "ivandts_bootvolume", RegionName: "ED-10 Preprod", Status: "in-use", Size: 20, Bootable: true, ProjectID: 516070, RegionID: 7, Attachments: []volumes.Attachment{ { ServerID: "a2ff6283-09f9-4c2a-a96f-0bedf7b3dd2d", AttachmentID: "a1f35e2b-afae-4caf-9f09-386c136cec45", AttachedAt: gcorecloud.JSONRFC3339Z{Time: volumeAttachedTime}, VolumeID: "459bf28d-df63-45d2-a462-6c216e571ddc", Device: "/dev/vda", }, }, Metadata: []metadata.Metadata{ { Key: "task_id", Value: "e673bba0-fcef-44d9-904c-824546b608ec", ReadOnly: true, }, }, CreatorTaskID: creatorTaskID, VolumeImageMetadata: volumes.VolumeImageMetadata{ ContainerFormat: "bare", MinRAM: "0", DiskFormat: "qcow2", ImageName: "ubuntu-20.04-x64-poplar-ironic-1.18.0-3.0.0", ImageID: "06e62653-1f88-4d38-9aa6-62833e812b4f", MinDisk: "0", Checksum: "dcb3767a59b4c1f0fbc09b439d8bc789", Size: "5703401472", }, }, }, SecurityGroups: []ai.PoplarInterfaceSecGrop{ { PortID: "d7136b4d-c5f3-4d3b-bd86-aeb01942cfc8", NetworkID: "bf572176-2d95-4fe0-9de0-f54a5307fbe6", SecurityGroups: []string{"4c74142d-9374-4aa6-b11b-43469b66f746"}, }, { PortID: "f3dcadf8-a4a5-4e5a-af7e-4c5902cd4142", NetworkID: "518ba531-496b-4676-8ea4-68e2ed3b2e4b", SecurityGroups: []string{"77ae0765-f262-493a-ba32-d9892436ddd0"}, }, }, Interfaces: []ai.AIClusterInterface{ { Type: "any_subnet", NetworkID: "518ba531-496b-4676-8ea4-68e2ed3b2e4b", }, }, UserData: "#cloud-config\nssh_pwauth: True\nusers:\n - name: kolya\n passwd: $6$rounds=4096$jB/jrhCWrbx65sHb$e5eLHfdJZ/IhiB06N0i/wPepo1fS3Y2o//D7C.jnw66mEqgPUWFuhGAOShC3lYF3eVGJOnEoWZ6N2fRCHj/4W.\n lock-passwd: False\n sudo: ALL=(ALL:ALL) ALL\n", PoplarServer: []instances.Instance{ { ID: "a2ff6283-09f9-4c2a-a96f-0bedf7b3dd2d", Name: "ivandts", CreatedAt: gcorecloud.JSONRFC3339ZZ{Time: instanceCreatedTime}, Status: "ACTIVE", VMState: "active", AvailabilityZone: "nova", Flavor: flavors.Flavor{ FlavorID: "g2a-ai-fake-v1pod-8", FlavorName: "g2a-ai-fake-v1pod-8", HardwareDescription: &flavors.HardwareDescription{ CPU: "1 vCPU", Network: "2x100G", RAM: "2GB RAM", IPU: "vPOD-8 (Classic)", }, RAM: 2048, VCPUS: 1, }, Metadata: map[string]interface{}{ "task_id": "e673bba0-fcef-44d9-904c-824546b608ec", "cluster_id": "e673bba0-fcef-44d9-904c-824546b608ec", "vipu_version": "1.18.0", "poplar_sdk_version": "3.0.0", "os_distro": "poplar-ubuntu", "os_type": "linux", "os_version": "20.04", "image_name": "ubuntu-20.04-x64-poplar-ironic-1.18.0-3.0.0", "image_id": "06e62653-1f88-4d38-9aa6-62833e812b4f", }, Volumes: []instances.InstanceVolume{ { ID: "459bf28d-df63-45d2-a462-6c216e571ddc", DeleteOnTermination: false, }, }, Addresses: map[string][]instances.InstanceAddress{ "qa-alex-network": { { Type: "fixed", Address: ip1, }, }, "ipu-cluster-rdma-network-e673bba0-fcef-44d9-904c-824546b608ec": { { Type: "fixed", Address: ip2, }, }, }, SecurityGroups: []gcorecloud.ItemName{ { Name: "default", }, { Name: "ivandts FE", }, }, CreatorTaskID: &creatorTaskID, ProjectID: 516070, RegionID: 7, Region: "ED-10 Preprod", }, }, ProjectID: 516070, RegionID: 7, Region: "ED-10 Preprod", } PortID = "f3dcadf8-a4a5-4e5a-af7e-4c5902cd4142" PortMac, _ = gcorecloud.ParseMacString("fa:16:3e:f5:f2:6b") PortIP1 = net.ParseIP("10.10.0.247") PortNetworkUpdatedAt, _ = time.Parse(gcorecloud.RFC3339Z, "2023-09-21T06:24:34+0000") PortNetworkCreatedAt, _ = time.Parse(gcorecloud.RFC3339Z, "2023-09-21T06:24:13+0000") PortNetworkSubnet1CreatedAt, _ = time.Parse(gcorecloud.RFC3339Z, "2023-09-21T06:24:34+0000") PortNetworkSubnet1UpdatedAt, _ = time.Parse(gcorecloud.RFC3339Z, "2023-09-21T06:24:34+0000") PortNetworkSubnet1Cidr, _ = gcorecloud.ParseCIDRString("10.10.0.0/24") SubnetCreatorTaskID = "58cb0400-13d9-4539-8e7c-bd5e66edde2c" NetworkDetailsCreatorTask = "5f4dd40a-158b-49f2-b1c3-8bf764318ab1" SecurityGroup1 = gcorecloud.ItemIDName{ ID: "77ae0765-f262-493a-ba32-d9892436ddd0", Name: "ivandts FE", } AIClusterPort1 = ai.AIClusterPort{ ID: "f3dcadf8-a4a5-4e5a-af7e-4c5902cd4142", Name: "port for instance ivandts", SecurityGroups: ExpectedSecurityGroupsSlice, } AIClusterInterface1 = ai.Interface{ PortID: PortID, MacAddress: *PortMac, PortSecurityEnabled: true, NetworkID: "518ba531-496b-4676-8ea4-68e2ed3b2e4b", IPAssignments: []instances.PortIP{ { IPAddress: PortIP1, SubnetID: "8a5d4b01-4d80-4c7e-ba88-96162e3781a4", }, }, NetworkDetails: instances.NetworkDetail{ Mtu: 1500, UpdatedAt: &gcorecloud.JSONRFC3339Z{Time: PortNetworkUpdatedAt}, CreatedAt: gcorecloud.JSONRFC3339Z{Time: PortNetworkCreatedAt}, ID: "518ba531-496b-4676-8ea4-68e2ed3b2e4b", External: false, Default: false, Shared: false, Name: "qa-alex-network", CreatorTaskID: &NetworkDetailsCreatorTask, Subnets: []instances.Subnet{ { ID: "8a5d4b01-4d80-4c7e-ba88-96162e3781a4", Name: "qa-alex-subnet", IPVersion: gcorecloud.IPv4, EnableDHCP: true, Cidr: *PortNetworkSubnet1Cidr, CreatedAt: gcorecloud.JSONRFC3339Z{Time: PortNetworkSubnet1CreatedAt}, UpdatedAt: &gcorecloud.JSONRFC3339Z{Time: PortNetworkSubnet1UpdatedAt}, NetworkID: "518ba531-496b-4676-8ea4-68e2ed3b2e4b", CreatorTaskID: &SubnetCreatorTaskID, }, }, }, FloatingIPDetails: []instances.FloatingIP{}, } ExpectedAIClusterSlice = []ai.AICluster{AICluster1} ExpectedAIClusterInterfacesSlice = []ai.Interface{AIClusterInterface1} ExpectedSecurityGroupsSlice = []gcorecloud.ItemIDName{SecurityGroup1} ExpectedPortsSlice = []ai.AIClusterPort{AIClusterPort1} Tasks1 = tasks.TaskResults{ Tasks: []tasks.TaskID{"50f53a35-42ed-40c4-82b2-5a37fb3e00bc"}, } Metadata1 = metadata.Metadata{ Key: "cost-center", Value: "Atlanta", ReadOnly: false, } Metadata2 = metadata.Metadata{ Key: "data-center", Value: "A", ReadOnly: false, } ExpectedMetadataList = []metadata.Metadata{Metadata1, Metadata2} Console = ai.RemoteConsole{ URL: "https://console-novnc-ed10.cloud.gcorelabs.com/vnc_auto.html?path=token%3Ddf5d4b4f-f78c-421f-9131-b6be2facf9bd", Type: "novnc", Protocol: "vnc", } )
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.