GET /api/compute_resources/:compute_resource_id/compute_profiles/:compute_profile_id/compute_attributes
List of compute attributes for provided compute profile and compute resource

GET /api/compute_profiles/:compute_profile_id/compute_resources/:compute_resource_id/compute_attributes
List of compute attributes for provided compute profile and compute resource

GET /api/compute_resources/:compute_resource_id/compute_attributes
List of compute attributes for compute resource

GET /api/compute_profiles/:compute_profile_id/compute_attributes
List of compute attributes for compute profile

GET /api/compute_attributes/:id
List of compute attributes

Примеры

GET /api/compute_attributes
200
{
  "total": 5,
  "subtotal": 5,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [
    {
      "created_at": "2019-09-11 14:54:14 UTC",
      "updated_at": "2019-09-11 14:54:14 UTC",
      "id": 980190962,
      "name": null,
      "compute_resource_id": 928692541,
      "compute_resource_name": "amazon123",
      "provider_friendly_name": "EC2",
      "compute_profile_id": 980190962,
      "compute_profile_name": "1-Small",
      "vm_attrs": {
        "flavor_id": "m1.small",
        "availability_zone": "eu-west-1a"
      },
      "attributes": {
        "flavor_id": "m1.small",
        "availability_zone": "eu-west-1a",
        "subnet_id": null,
        "image_id": null,
        "managed_ip": null,
        "flavor_name": "Small Instance",
        "subnet_name": null,
        "image_name": null,
        "security_groups": {}
      }
    },
    {
      "created_at": "2019-09-11 14:54:14 UTC",
      "updated_at": "2019-09-11 14:54:14 UTC",
      "id": 298486374,
      "name": null,
      "compute_resource_id": 980190962,
      "compute_resource_name": "bigcompute",
      "provider_friendly_name": "Libvirt",
      "compute_profile_id": 980190962,
      "compute_profile_name": "1-Small",
      "vm_attrs": {
        "cpus": 2,
        "memory": 536870912
      },
      "attributes": {
        "cpus": 2,
        "memory": 536870912,
        "image_id": null,
        "image_name": null,
        "volumes_attributes": {},
        "interfaces_attributes": {}
      }
    },
    {
      "created_at": "2019-09-11 14:54:14 UTC",
      "updated_at": "2019-09-11 14:54:14 UTC",
      "id": 113629430,
      "name": null,
      "compute_resource_id": 928692541,
      "compute_resource_name": "amazon123",
      "provider_friendly_name": "EC2",
      "compute_profile_id": 298486374,
      "compute_profile_name": "2-Medium",
      "vm_attrs": {
        "flavor_id": "m1.medium",
        "availability_zone": "eu-west-1a"
      },
      "attributes": {
        "flavor_id": "m1.medium",
        "availability_zone": "eu-west-1a",
        "subnet_id": null,
        "image_id": null,
        "managed_ip": null,
        "flavor_name": "Medium Instance",
        "subnet_name": null,
        "image_name": null,
        "security_groups": {}
      }
    },
    {
      "created_at": "2019-09-11 14:54:14 UTC",
      "updated_at": "2019-09-11 14:54:14 UTC",
      "id": 281110143,
      "name": null,
      "compute_resource_id": 980190962,
      "compute_resource_name": "bigcompute",
      "provider_friendly_name": "Libvirt",
      "compute_profile_id": 298486374,
      "compute_profile_name": "2-Medium",
      "vm_attrs": {
        "cpus": 4,
        "memory": 4294967296
      },
      "attributes": {
        "cpus": 4,
        "memory": 4294967296,
        "image_id": null,
        "image_name": null,
        "volumes_attributes": {},
        "interfaces_attributes": {}
      }
    },
    {
      "created_at": "2019-09-11 14:54:14 UTC",
      "updated_at": "2019-09-11 14:54:14 UTC",
      "id": 394428105,
      "name": null,
      "compute_resource_id": 980190962,
      "compute_resource_name": "bigcompute",
      "provider_friendly_name": "Libvirt",
      "compute_profile_id": 281110143,
      "compute_profile_name": "4-Networking",
      "vm_attrs": {
        "nics_attributes": {
          "1": {
            "attr": 1
          },
          "2": {
            "attr": 2
          }
        }
      },
      "attributes": {
        "cpus": null,
        "memory": null,
        "image_id": null,
        "image_name": null,
        "volumes_attributes": {},
        "interfaces_attributes": {
          "1": {
            "type": null,
            "model": null,
            "bridge": null
          },
          "2": {
            "type": null,
            "model": null,
            "bridge": null
          }
        }
      }
    }
  ]
}

Параметры

Имя параметра Описание
location_id
необязательно

Ограничить местоположением

Validations:

  • Must be a Integer

organization_id
необязательно

Ограничить организацией

Validations:

  • Must be a Integer

compute_profile_id
необязательно

ID of compute profile

Validations:

  • Must be a String

compute_resource_id
необязательно

ID of compute_resource

Validations:

  • Must be a String

search
необязательно

отфильтровать результаты

Validations:

  • Must be a String

order
необязательно

Sort field and order, eg. ‘id DESC’

Validations:

  • Must be a String

page
необязательно

Номер страницы, начиная с 1

Validations:

  • Must be a number.

per_page
необязательно

Число элементов на странице

Validations:

  • Must be a number.

Search fields

Field name Тип Possible values
compute_profile string
compute_resource string
name string

GET /api/compute_resources/:compute_resource_id/compute_profiles/:compute_profile_id/compute_attributes/:id
Show a compute attributes set

GET /api/compute_profiles/:compute_profile_id/compute_resources/:compute_resource_id/compute_attributes/:id
Show a compute attributes set

GET /api/compute_resources/:compute_resource_id/compute_attributes/:id
Show a compute attributes set

GET /api/compute_profiles/:compute_profile_id/compute_attributes/:id
Show a compute attributes set

GET /api/compute_attributes/:id
Show a compute attributes set

Примеры

GET /api/compute_attributes/298486374
200
{
  "created_at": "2019-09-11 14:54:14 UTC",
  "updated_at": "2019-09-11 14:54:14 UTC",
  "id": 298486374,
  "name": null,
  "compute_resource_id": 980190962,
  "compute_resource_name": "bigcompute",
  "provider_friendly_name": "Libvirt",
  "compute_profile_id": 980190962,
  "compute_profile_name": "1-Small",
  "vm_attrs": {
    "cpus": 2,
    "memory": 536870912
  },
  "attributes": {
    "cpus": 2,
    "memory": 536870912,
    "image_id": null,
    "image_name": null,
    "volumes_attributes": {},
    "interfaces_attributes": {}
  }
}

Параметры

Имя параметра Описание
location_id
необязательно

Ограничить местоположением

Validations:

  • Must be a Integer

organization_id
необязательно

Ограничить организацией

Validations:

  • Must be a Integer


POST /api/compute_resources/:compute_resource_id/compute_profiles/:compute_profile_id/compute_attributes
Создать набор вычислительных атрибутов

POST /api/compute_profiles/:compute_profile_id/compute_resources/:compute_resource_id/compute_attributes
Создать набор вычислительных атрибутов

POST /api/compute_resources/:compute_resource_id/compute_attributes
Создать набор вычислительных атрибутов

POST /api/compute_profiles/:compute_profile_id/compute_attributes
Создать набор вычислительных атрибутов

POST /api/compute_attributes
Создать набор вычислительных атрибутов

Примеры

POST /api/compute_profiles/113629430/compute_resources/980190962/compute_attributes
{
  "compute_attribute": {
    "vm_attrs": {
      "cpus": "2",
      "memory": "2147483648"
    }
  }
}
201
{
  "created_at": "2019-09-11 14:54:22 UTC",
  "updated_at": "2019-09-11 14:54:22 UTC",
  "id": 980190963,
  "name": null,
  "compute_resource_id": 980190962,
  "compute_resource_name": "bigcompute",
  "provider_friendly_name": "Libvirt",
  "compute_profile_id": 113629430,
  "compute_profile_name": "3-Large",
  "vm_attrs": {
    "cpus": "2",
    "memory": "2147483648"
  },
  "attributes": {
    "cpus": "2",
    "memory": "2147483648",
    "image_id": null,
    "image_name": null,
    "volumes_attributes": {},
    "interfaces_attributes": {}
  }
}

Параметры

Имя параметра Описание
location_id
необязательно

Ограничить местоположением

Validations:

  • Must be a Integer

organization_id
необязательно

Ограничить организацией

Validations:

  • Must be a Integer

compute_profile_id
обязательно

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

compute_resource_id
обязательно

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

compute_attribute
обязательно

Validations:

  • Must be a Hash

compute_attribute[vm_attrs]
обязательно

Validations:

  • Must be a Hash


PUT /api/compute_resources/:compute_resource_id/compute_profiles/:compute_profile_id/compute_attributes/:id
Изменить набор вычислительных атрибутов

PUT /api/compute_profiles/:compute_profile_id/compute_resources/:compute_resource_id/compute_attributes/:id
Изменить набор вычислительных атрибутов

PUT /api/compute_resources/:compute_resource_id/compute_attributes/:id
Изменить набор вычислительных атрибутов

PUT /api/compute_profiles/:compute_profile_id/compute_attributes/:id
Изменить набор вычислительных атрибутов

PUT /api/compute_attributes/:id
Изменить набор вычислительных атрибутов

Примеры

PUT /api/compute_profiles/980190962/compute_resources/980190962/compute_attributes/298486374
{
  "compute_attribute": {
    "vm_attrs": {
      "cpus": "4"
    }
  }
}
200
{
  "created_at": "2019-09-11 14:54:14 UTC",
  "updated_at": "2019-09-11 14:54:22 UTC",
  "id": 298486374,
  "name": null,
  "compute_resource_id": 980190962,
  "compute_resource_name": "bigcompute",
  "provider_friendly_name": "Libvirt",
  "compute_profile_id": 980190962,
  "compute_profile_name": "1-Small",
  "vm_attrs": {
    "cpus": "4"
  },
  "attributes": {
    "cpus": "4",
    "memory": null,
    "image_id": null,
    "image_name": null,
    "volumes_attributes": {},
    "interfaces_attributes": {}
  }
}

Параметры

Имя параметра Описание
location_id
необязательно

Ограничить местоположением

Validations:

  • Must be a Integer

organization_id
необязательно

Ограничить организацией

Validations:

  • Must be a Integer

compute_profile_id
необязательно

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

compute_resource_id
необязательно

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

id
обязательно

Validations:

  • Must be a String

compute_attribute
обязательно

Validations:

  • Must be a Hash

compute_attribute[vm_attrs]
необязательно

Validations:

  • Must be a Hash