github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/deh/v1/hosts/testing/fixtures.go (about)

     1  package testing
     2  
     3  const (
     4  	dehEndpoint = "/dedicated-hosts"
     5  	HostID      = "011d21e2-fbc3-4e4a-9993-9ea223f73264"
     6  )
     7  
     8  var allocateRequest = `{
     9       "availability_zone": "eu-de-02",
    10       "name": "Test-1",
    11       "auto_placement": "off",
    12       "host_type": "h1",
    13       "quantity": 2
    14  }`
    15  
    16  var allocateResponse = `{
    17      "dedicated_host_ids": [
    18          "fb4733fd-70a3-44e1-a1cb-0311f028d7e5",
    19          "7408f985-047d-4313-b3c8-8e12bef01d12"
    20      ]
    21  }`
    22  
    23  var updateRequest = `{
    24  "dedicated_host": 
    25       {
    26            "auto_placement": "off",
    27  		   "name": "Test-2"
    28      }
    29  }`
    30  
    31  var getResponse = `
    32  {
    33      "dedicated_host": {
    34          "allocated_at": "2018-06-13T07:44:55Z",
    35          "availability_zone": "eu-de-02",
    36          "csg_host": "pod01.eu-de-02",
    37          "name": "test-aj2",
    38          "available_memory": 270336,
    39          "released_at": "",
    40          "auto_placement": "off",
    41          "available_vcpus": 36,
    42          "dedicated_host_id": "66156a61-27c2-4169-936b-910dd9c73da3",
    43          "state": "available",
    44          "instance_total": 0,
    45          "host_properties": {           
    46              "host_type": "h1",
    47              "vcpus": 36,
    48              "memory": 270336,
    49              "cores": 12,
    50              "sockets": 2,
    51              "host_type_name": "High performance"
    52          },
    53          "csd_host": "fc-nova-compute010#8120665",
    54          "instance_uuids": [],
    55          "project_id": "17fbda95add24720a4038ba4b1c705ed"
    56      }
    57  }
    58  		`
    59  
    60  var listResponse = `
    61  {
    62      "dedicated_hosts": [ {
    63              "availability_zone": "eu-de-01",
    64              "name": "c2c-deh-test",
    65              "available_memory": 262144,
    66              "auto_placement": "off",
    67              "available_vcpus": 70,
    68              "dedicated_host_id": "671611d2-b45c-4648-9e78-06eb24522291",
    69              "state": "available",
    70              "instance_total": 2,
    71              "host_properties": {                
    72                  "host_type": "general",
    73                  "vcpus": 72,
    74                  "memory": 270336,
    75                  "cores": 12,
    76                  "sockets": 2,
    77                  "host_type_name": "General computing"
    78              },
    79              "instance_uuids": [
    80                  "3de1ce75-2550-4a46-a689-dd33ca2b62d6",
    81                  "885dc71d-905d-48b5-bae7-db66801dc175"
    82              ],
    83              "project_id": "17fbda95add24720a4038ba4b1c705ed"
    84          }]
    85  }
    86  			`
    87  
    88  var listserverResponse = `
    89  {
    90       "servers": [ {
    91              "status": "ACTIVE", 
    92              "flavor": {
    93                  "id": "normal1"
    94              },
    95   			"addresses": {
    96                  "0b98c646-617f-4d90-9ca5-385f0cd73ea7": [
    97                      {
    98                          "version": 4,
    99                          "addr": "192.168.3.133"
   100                      }
   101                  ]
   102              },
   103              "id": "3de1ce75-2550-4a46-a689-dd33ca2b62d6",
   104              "user_id": "6d78fa8550ae45d6932a1fadfb1fa552",
   105              "name": "c2c-ecs-test-2",
   106              "tenant_id": "17fbda95add24720a4038ba4b1c705ed",
   107              "metadata": {
   108                  "metering.image_id": "c0ea3ff1-432e-4650-8a1b-372a80b2d2be",
   109                  "metering.imagetype": "gold",
   110                  "metering.resourcespeccode": "deh.linux",
   111                  "metering.cloudServiceType": "sys.service.type.ec2",
   112                  "image_name": "Standard_CentOS_7_latest",
   113                  "metering.resourcetype": "1",
   114                  "os_bit": "64",
   115                  "vpc_id": "0b98c646-617f-4d90-9ca5-385f0cd73ea7",
   116                  "os_type": "Linux",
   117                  "charging_mode": "0"
   118              }
   119          }]
   120  }
   121  			`