Page tree
Skip to end of metadata
Go to start of metadata

To create an application server, use the following request:

POST /application_servers.xml
POST /application_servers.json

XML Request example

curl -i -X POST -H 'Accept: application/xml' -H 'Content-type: application/xml' -u user:userpass -d '<application_server><location_id>1</location_id><label>zaza xml</label><hostname>zaza</hostname><hypervisor_group_id>6</hypervisor_group_id><hypervisor_id>2</hypervisor_id><memory>384</memory><cpus>1</cpus><cpu_shares>1</cpu_shares><data_store_group_primary_id>1</data_store_group_primary_id><primary_disk_size>5</primary_disk_size><data_store_group_swap_id>1</data_store_group_swap_id><swap_disk_size>1</swap_disk_size><primary_network_group_id>16</primary_network_group_id><required_ip_address_assignment>1</required_ip_address_assignment><rate_limit>0</rate_limit><required_virtual_machine_build>1</required_virtual_machine_build></application_server>' --url http://onapp.test/application_servers.xml


JSON Request example

curl -i -X POST -H 'Accept: application/json' -H 'Content-type: application/json' -u user:userpass -d '{"application_server":{"location_id":"1", "label":"zaza JSON", "hostname":"zaza", "hypervisor_group_id":"6", "hypervisor_id":"2", "memory":"384", "cpus":"1", "cpu_shares":"1",  "data_store_group_primary_id":"1", "primary_disk_size":"5", "data_store_group_swap_id":"1", "swap_disk_size":"1", "primary_network_group_id":"16", "required_ip_address_assignment":"1", "rate_limit":"0", "required_virtual_machine_build":"1"}}' --url http://onapp.test/application_servers.json

XML Output example

<application_server>
  <add_to_marketplace nil="true"/>
  <admin_note nil="true"/>
  <allowed_hot_migrate type="boolean">true</allowed_hot_migrate>
  <allowed_swap type="boolean">true</allowed_swap>
  <booted type="boolean">false</booted>
  <built type="boolean">false</built>
  <cores_per_socket type="integer">0</cores_per_socket>
  <cpu_shares type="integer">1</cpu_shares>
  <cpu_sockets nil="true"/>
  <cpu_threads nil="true"/>
  <cpu_units type="integer">10</cpu_units>
  <cpus type="integer">1</cpus>
  <created_at type="datetime">2015-06-23T15:33:36+03:00</created_at>
  <customer_network_id nil="true"/>
  <deleted_at nil="true"/>
  <edge_server_type nil="true"/>
  <enable_autoscale nil="true"/>
  <enable_monitis nil="true"/>
  <firewall_notrack type="boolean">false</firewall_notrack>
  <hostname>zaza</hostname>
  <hot_add_cpu nil="true"/>
  <hot_add_memory nil="true"/>
  <hypervisor_id type="integer">2</hypervisor_id>
  <id type="integer">411</id>
  <identifier>tb6s00o85zqig2</identifier>
  <initial_root_password_encrypted type="boolean">false</initial_root_password_encrypted>
  <instance_package_id nil="true"/>
  <iso_id nil="true"/>
  <label>zaza xml</label>
  <local_remote_access_ip_address>10.0.24.32</local_remote_access_ip_address>
  <local_remote_access_port nil="true"/>
  <locked type="boolean">true</locked>
  <memory type="integer">384</memory>
  <min_disk_size type="integer">5</min_disk_size>
  <note nil="true"/>
  <operating_system>linux</operating_system>
  <operating_system_distro>rhel</operating_system_distro>
  <preferred_hvs type="array"/>
  <recovery_mode nil="true"/>
  <remote_access_password>ReO44gmSyF92</remote_access_password>
  <service_password nil="true"/>
  <state>building</state>
  <storage_server_type nil="true"/>
  <strict_virtual_machine_id nil="true"/>
  <suspended type="boolean">false</suspended>
  <template_id type="integer">155</template_id>
  <template_label>CentOS 6.6 x64 ApplicationServer</template_label>
  <time_zone nil="true"/>
  <updated_at type="datetime">2015-06-23T15:33:41+03:00</updated_at>
  <user_id type="integer">1</user_id>
  <vip nil="true"/>
  <xen_id nil="true"/>
  <ip_addresses type="array">
    <ip_address>
      <address>69.168.237.56</address>
      <broadcast>69.168.237.255</broadcast>
      <created_at type="datetime">2015-05-14T12:19:08+03:00</created_at>
      <customer_network_id nil="true"/>
      <disallowed_primary type="boolean">false</disallowed_primary>
      <gateway>69.168.237.1</gateway>
      <hypervisor_id nil="true"/>
      <id type="integer">340</id>
      <ip_address_pool_id nil="true"/>
      <network_address>69.168.237.0</network_address>
      <network_id type="integer">3</network_id>
      <pxe type="boolean">false</pxe>
      <updated_at type="datetime">2015-06-23T15:33:37+03:00</updated_at>
      <user_id nil="true"/>
      <free type="boolean">false</free>
      <netmask>255.255.255.0</netmask>
    </ip_address>
  </ip_addresses>
  <monthly_bandwidth_used>0</monthly_bandwidth_used>
  <total_disk_size type="integer">6</total_disk_size>
  <price_per_hour type="float">769.0</price_per_hour>
  <price_per_hour_powered_off type="float">384.01</price_per_hour_powered_off>
  <support_incremental_backups type="boolean">true</support_incremental_backups>
  <cpu_priority type="integer">1</cpu_priority>
</application_server>

Where:

add_to_marketplace – true,  if the server is added to marketplace. The default value is "false". This parameter is for CDN servers only.

admin_note - administrator comment for the VS

allowed_hot_migrate – true if hot migration is allowed, otherwise false

allowed_swap – true if swap is allowed, otherwise false

booted - true, if the VS is boothed, otherwise false

built - true, if the VS is built, otherwise false

cpu_shares - the percentage of allocated CPU priority resource

cpu_sockets  the amount of CPU sockets per core. This parameter can be set for KVM compute resources only by those users who have Enable CPU topology permission granted

cpu_threads  -  the amount of CPU threads per core. This parameter can be set for KVM compute resources only by those users who have Enable CPU topology permission granted

cpu_units - the amount of CPU units per core if the CPU priority is replaced with CPU units in user billing plan.

cpus - number of CPUs assigned to the VS

created_at – the date when the VS was created in the [YYYY][MM][DD]T[hh][mm][ss] format

updated_at – the date when the VS was updated in the [YYYY][MM][DD]T[hh][mm][ss] format

customer_network_id - ID of the customer network

edge_server_type -  type of the CDN edge server. This parameter is for CDN servers only.

enable_autoscale — true if autoscaling is allowed for this VS

enable_monitis - deprecated attribute

firewall notrack - parameter for adding firewall rules. It is true for edge servers only. 

hostname - VS hostname

hypervisor_id – the ID of the compute resource, on which the server is deployed

id – the VS ID in OnApp CP database

identifier – the VS identifier

instance_package_id -  ID of the instance package

iso_id - ID of the ISO you want to use

label - user-friendly VS description

local_remote_access_ip_address - IP address for remote connection

local_remote_access_port  - port for remote connection

locked - true if the VS is locked; otherwise false

memory - the RAM size allocated to this VS

min_disk_size — the minimum disk size required to build a VS from a specified template

note - optional note

operating_system — operating system used by the VS

operating_system_distro — the distribution of the OS from which this VS is built

preferred_hvs - the array of preferable compute resources based on compute zone that meet some VS configuration settings

rate_limit -  the port speed. The minimum recommended speed is 10Mbps (if allowed by your billing plan)

recovery_mode - true if recovery mode allowed, otherwise false

remote_access_password — the password for the remote access

service_password - password of a service user

state – application server state

storage_server_type - set http or streaming server type.

strict_virtual_machine_id - the ID of a virtual machine that will never reside on the same compute resource with this VS

suspended - true if VS is suspended, otherwise false

template_id - the ID of the template the VS is based on

template_label - the name of the template from which this VS is built

time_zone – the time zone of the user

user_id — the ID of a user assigned to this VS

vip — true if the VS has VIP status (gives migration priority)

xen_id — the VS ID set by the virtualization engine

 ip_addresses - an array of IP addresses with the following parameters:

  • address - IP address
  • broadcast - broadcast address
  • created_at - the date when the IP address was created in the [YYYY][MM][DD]T[hh][mm][ss]Z format
  • customer_network_id  - ID of the customer network which will be used for this blueprint
  • disallowed_primary - true if not allowed to be used as primary (for VS build), otherwise false
  • gateway - gateway address
  • hypervisor id  - the ID of the compute resource
  • id - the ID of the IP address
  • ip_address_pool_id - ID of the IP address pool to the IP address belongs to
  • network_address - the address of the network
  • network_id - the ID of the network
  • pxe - true, if this compute resource address can be used for cloudbooting a compute resource
  • updated_at - the date when the IP address was updated in the [YYYY][MM][DD]T[hh][mm][ss]Z format
  • user_id - the ID of a user associated with this IP address
  • free - true if free, otherwise false
  • netmask - netmask for the IP address

monthly_bandwidth_used - VS monthly bandwidth in KB

total_disk_size - total VS disk size

price_per_hour - server's price per hour

price_per_hour_powered_off - price per hour when server is powered off

support_incremental_backups - 1, if virtual server supports incremental backups, and 0 if it does not

cpu_priority  - this is a new parameter reserved for further use; currently will have the same value as cpu_shares


Page History

v.4.2

  • Removed initial_root_password and initial_root_password_encrypted parameters as they are not required and skipped when creating an application server

 

#trackbackRdf ($trackbackUtils.getContentIdentifier($page) $page.title $trackbackUtils.getPingUrl($page))
  • No labels