api.dc.base

/dc

api.dc.base.views.dc_list(*args, **kwargs)

List (GET) available Datacenters.

GET /dc
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • data.full (boolean) – Return list of objects with all DC details (default: false)
  • data.extended (boolean) – Return list of objects with extended DC details (default: false, requires SuperAdmin permission)
  • data.order_by (string) – Available fields for sorting: name, created (default: name)
Status Codes:

es example:

es get /dc
{
    "url": "https://my.erigones.com/api/dc/",
    "status": 200,
    "method": "GET",
    "text": {
        "status": "SUCCESS",
        "result": [
            "admin",
            "cloud1",
            "main"
        ],
        "task_id": "1e1d1-6f75849b-0fbe-4295-9df3"
    }
}

/dc/(dc)

api.dc.base.views.dc_manage(*args, **kwargs)

Show (GET), create (POST), change (PUT) or delete (DELETE) a virtual datacenter.

GET /dc/(dc)
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • dc (string) – required - Datacenter name
  • data.extended (boolean) – Display extended DC details (default: false, requires SuperAdmin permission)
Status Codes:
POST /dc/(dc)
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • dc (string) – required - Datacenter name
  • data.site (string) – required - Hostname part of the browsing URL that determines the current working datacenter for an anonymous user; You will need a working DNS record with the same hostname pointing to your Danube Cloud management portal
  • data.alias (string) – Short datacenter name (default: name)
  • data.access (integer) – Access type (1 - Public, 3 - Private) (default: 3)
  • data.owner (string) – User that owns the Datacenter (default: logged in user)
  • data.groups (array) – List of user groups (default: [])
  • data.desc (string) – Datacenter description
Status Codes:
PUT /dc/(dc)
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • dc (string) – required - Datacenter name
  • data.site (string) – Hostname part of the browsing URL that determines the current working datacenter for an anonymous user; You will need a working DNS record with the same hostname pointing to your Danube Cloud management portal
  • data.alias (string) – Short datacenter name
  • data.access (integer) – Access type (1 - Public, 3 - Private)
  • data.owner (string) – User that owns the Datacenter
  • data.groups (array) – List of user groups
  • data.desc (string) – Datacenter description
Status Codes:
DELETE /dc/(dc)
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • dc (string) – required - Datacenter name
Status Codes:

es example:

es create /dc/cloud1 -site cloud.example.com
{
    "url": "https://my.erigones.com/api/dc/cloud1/",
    "status": 200,
    "method": "POST",
    "text": {
        "status": "SUCCESS",
        "result": {
            "site": "cloud.example.com",
            "name": "cloud1",
            "access": 3,
            "alias": "cloud1",
            "owner": "admin",
            "groups": [],
            "desc": ""
        },
        "task_id": "1e1d23-6f75849b-2018-4919-8164"
    }
}

/dc/(dc)/settings

api.dc.base.views.dc_settings(*args, **kwargs)

Show (GET) or update (PUT) settings of a virtual datacenter.

Note

Global settings can only be changed from the main data center.

GET /dc/(dc)/settings
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • dc (string) – required - Datacenter name
Status Codes:
PUT /dc/(dc)/settings
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • dc (string) – required - Datacenter name
  • data.<setting_name> – See example below for current list of settings and consult the user guide for more information
Status Codes:

es example:

es get /dc/main/settings
{
    "url": "https://my.erigones.com/api/dc/main/settings/",
    "status": 200,
    "method": "POST",
    "text": {
        "status": "SUCCESS",
        "result": {
            "ACL_ENABLED": true,
            "API_ENABLED": true,
            "API_LOG_USER_CALLBACK": true,
            "COMPANY_NAME": "Erigones, s. r. o.",
            "DEFAULT_FROM_EMAIL": "noreply@example.com",
            "DNS_ENABLED": true,
            "DNS_DOMAIN_TYPE_DEFAULT": "MASTER",
            "DNS_HOSTMASTER": "hostmaster@example.com",
            "DNS_NAMESERVERS": [
                "ns1.local"
            ],
            "DNS_PTR_DEFAULT": "ptr-%(ipaddr)s.example.com",
            "DNS_SOA_DEFAULT": "%(nameserver)s %(hostmaster)s 2013010100 28800 7200 604800 86400",
            "EMAIL_ENABLED": true,
            "EMAIL_HOST": "127.0.0.1",
            "EMAIL_HOST_PASSWORD": "***",
            "EMAIL_HOST_USER": "",
            "EMAIL_PORT": 25,
            "EMAIL_USE_SSL": false,
            "EMAIL_USE_TLS": false,
            "FAQ_ENABLED": true,
            "MON_ZABBIX_ENABLED": true,
            "MON_ZABBIX_HOSTGROUPS_NODE": [],
            "MON_ZABBIX_HOSTGROUPS_VM": [],
            "MON_ZABBIX_HOSTGROUPS_VM_ALLOWED": [],
            "MON_ZABBIX_HOSTGROUPS_VM_RESTRICT": true,
            "MON_ZABBIX_HOSTGROUP_NODE": "Compute nodes",
            "MON_ZABBIX_HOSTGROUP_VM": "Virtual machines",
            "MON_ZABBIX_HTTP_PASSWORD": "***",
            "MON_ZABBIX_HTTP_USERNAME": "username",
            "MON_ZABBIX_NODE_SLA": true,
            "MON_ZABBIX_NODE_SYNC": true,
            "MON_ZABBIX_PASSWORD": "***",
            "MON_ZABBIX_SERVER_EXTERNAL_URL": "",
            "MON_ZABBIX_SERVER": "https://zabbix.example.com/",
            "MON_ZABBIX_SERVER_SSL_VERIFY": true,
            "MON_ZABBIX_TEMPLATES_NODE": [],
            "MON_ZABBIX_TEMPLATES_VM": [],
            "MON_ZABBIX_TEMPLATES_VM_ALLOWED": [],
            "MON_ZABBIX_TEMPLATES_VM_DISK": [],
            "MON_ZABBIX_TEMPLATES_VM_MAP_TO_TAGS": false,
            "MON_ZABBIX_TEMPLATES_VM_NIC": [],
            "MON_ZABBIX_TEMPLATES_VM_RESTRICT": true,
            "MON_ZABBIX_TIMEOUT": 10,
            "MON_ZABBIX_USERNAME": "superadmin",
            "MON_ZABBIX_VM_SLA": true,
            "MON_ZABBIX_VM_SYNC": true,
            "PAYMENTS_EMAIL": "payments@example.com",
            "PAYMENTS_ENABLED": true,
            "PAYMENTS_NOTIFICATION_EMAIL": "payments@example.com",
            "PROFILE_COUNTRY_CODE_DEFAULT": "SK",
            "PROFILE_PHONE_PREFIX_DEFAULT": "+421",
            "PROFILE_SSH_KEY_LIMIT": 10,
            "PROFILE_TIME_ZONE_DEFAULT": "Europe/Bratislava",
            "REGISTRATION_ENABLED": true,
            "SHADOW_EMAIL": "",
            "SITE_LINK": "https://danubecloud.example.com",
            "SITE_NAME": "Erigones",
            "SITE_SIGNATURE": "Erigones\r\nhttps://danubecloud.example.com",
            "SITE_LOGO": "",
            "SITE_ICON": "",
            "SMS_ENABLED": true,
            "SMS_FROM_NUMBER": "Erigones",
            "SMS_SERVICE_PASSWORD": "***",
            "SMS_SERVICE_USERNAME": "example",
            "SMS_PREFERRED_SERVICE": "smsapi",
            "SMS_REGISTRATION_ENABLED": true,
            "SUPPORT_EMAIL": "support@example.com",
            "SUPPORT_ENABLED": true,
            "SUPPORT_PHONE": "",
            "SUPPORT_USER_CONFIRMATION": true,
            "VMS_DC_ENABLED": true,
            "VMS_DISK_COMPRESSION_DEFAULT": "lz4",
            "VMS_DISK_IMAGE_DEFAULT": "",
            "VMS_DISK_IMAGE_ZONE_DEFAULT": "base64",
            "VMS_DISK_IMAGE_LX_ZONE_DEFAULT": "alpine-3",
            "VMS_DISK_MODEL_DEFAULT": "virtio",
            "VMS_NET_DEFAULT": "lan",
            "VMS_NET_VLAN_ALLOWED": [],
            "VMS_NET_VLAN_RESTRICT": true,
            "VMS_NET_VXLAN_ALLOWED": [],
            "VMS_NET_VXLAN_RESTRICT": true,
            "VMS_NET_LIMIT": null,
            "VMS_ISO_LIMIT": null,
            "VMS_IMAGE_LIMIT": null,
            "VMS_IMAGE_REPOSITORIES": {
                "danubecloud": "https://images.danube.cloud"
            },
            "VMS_IMAGE_SOURCES": [],
            "VMS_IMAGE_VM": "15bc0839-c49d-4489-a01b-4570d518fc9f",
            "VMS_IMAGE_VM_NIC": 1,
            "VMS_NIC_MONITORING_DEFAULT": 1,
            "VMS_NIC_MODEL_DEFAULT": "virtio",
            "VMS_NODE_SSH_KEYS_SYNC": true,
            "VMS_NODE_SSH_KEYS_DEFAULT": [],
            "VMS_STORAGE_DEFAULT": "zones",
            "VMS_VGA_MODEL_DEFAULT": "std",
            "VMS_VM_BACKUP_COMPRESSION_DEFAULT": 0,
            "VMS_VM_BACKUP_DC_SIZE_LIMIT": null,
            "VMS_VM_BACKUP_DEFINE_LIMIT": null,
            "VMS_VM_BACKUP_ENABLED": true,
            "VMS_VM_BACKUP_LIMIT": null,
            "VMS_VM_CPU_SHARES_DEFAULT": 100,
            "VMS_VM_DEFINE_LIMIT": null,
            "VMS_VM_DOMAIN_DEFAULT": "lan",
            "VMS_VM_MDATA_DEFAULT": {},
            "VMS_VM_MONITORED_DEFAULT": true,
            "VMS_VM_OSTYPE_DEFAULT": 1,
            "VMS_VM_REPLICATION_ENABLED": true,
            "VMS_VM_REPLICA_RESERVATION_DEFAULT": true,
            "VMS_VM_RESOLVERS_DEFAULT": [
                "192.168.155.25"
            ],
            "VMS_VM_SNAPSHOT_DC_SIZE_LIMIT": null,
            "VMS_VM_SNAPSHOT_DEFINE_LIMIT": null,
            "VMS_VM_SNAPSHOT_ENABLED": true,
            "VMS_VM_SNAPSHOT_LIMIT_AUTO": null,
            "VMS_VM_SNAPSHOT_LIMIT_MANUAL": null,
            "VMS_VM_SNAPSHOT_LIMIT_MANUAL_DEFAULT": null,
            "VMS_VM_SNAPSHOT_SIZE_LIMIT": null,
            "VMS_VM_SNAPSHOT_SIZE_LIMIT_DEFAULT": null,
            "VMS_VM_STOP_TIMEOUT_DEFAULT": 180,
            "VMS_VM_STOP_WIN_TIMEOUT_DEFAULT": 300,
            "VMS_VM_SSH_KEYS_DEFAULT": [],
            "VMS_VM_ZFS_IO_PRIORITY_DEFAULT": 100,
            "VMS_ZONE_ENABLED": false,
            "dc": "main"
        },
        "task_id": "1e1d23-6f75849b-2018-4919-8165"
    }
}

Note

Zabbix is a registered trademark of Zabbix LLC.