54 Infrastructure as a Service REST APIs

This chapter describes the resource models for Infrastructure as a Service (IaaS) REST APIs and their responses.

The first section provides a summary of all the REST APIs covered in this chapter whereas the following sections provide the IaaS resource models and other details.

54.1 Summary of Infrastructure as a Service REST APIs

The table below shows a summary of all the IaaS REST APIs covered in this chapter.

Table 54-1 Summary of IaaS REST APIs

Resource Data Model GET POST PUT DELETE

Service Instance - VM

Table 54-6

Section 54.3.1.2

Section 54.3.1.1

Section 54.3.2

Section 54.3.3

Service Instance - Assembly Instance

Table 54-4

Section 54.3.1.3

Section 54.3.1.3

Supported

Supported

Support for version 10000

Not applicable

Section 54.4

Supported

Supported

Supported

Service Templates

Table 54-37

Table 54-37

Supported

Supported


Note:

In the table above, ”supported” indicates that the operation is supported on the resource. However, there is no example in the chapter for this operation.

54.2 Infrastructure as a Service Resource Model

Infrastructure as a Service supports the compute, network, and storage resources that form the basics of IT components. The IaaS resource model supports common cloud interactions on these resources.The following diagram illustrates the high level resource relationships and how they are related to the common resources:

Figure 54-1 IaaS Resource Model

iaas resource model

The following describes the resource models that are supported by the IaaS family type.

54.2.1 Changes for Infrastructure as a Service

The following describes the high level updates to the resources for Infrastructure as a Service:

Table 54-2 Cloud Service Portal 12.1.0.5

Abstract Description

Supports VMTemplate and AssemblyTemplate in ServiceTemplateFinds

Infrastructure as a service provides implementation for the filtering and searching of VMTemplate and AssemblyTemplate resources.

Supports cloning a VM

An VM resource can be created from another VM directly.

Supports saving a VM as a template

An VMTemplate resource can be created from a VM resource.

Supports Infrastructure Quota

Provides quota information and quota usage for Infrastructure as a service resources.


54.2.2 IaaS Zone [application/oracle.com.cloud.iaas.Zone]

This extends application/oracle.com.cloud.common.Zone. This resource represents the view of an IaaS Zone that supports IaaS resources.

Table 54-3 IaaS Zone Data Model

Field Type Description Occurs Supported since release

uri

URI

A GET against this URI refreshes the client representation of the Zone definition to this user.

1

12.1.0.4

name

String

Name of the Zone. SHALL be a UNICODE string to support different languages

1

12.1.0.4

description

String

Human readable description of the Zone. SHALL be a UNICODE string to support different languages.

The media type of the resource. "application/oracle.com.cloud.iaas.Zone"

0..1

12.1.0.4

resource_state

ResourceState

The resource state of the resource.

0..1

12.1.0.4

service_family_type

String

The name of the service family type that this zone is associated with.

It is "iaas" for this.

0..1

12.1.0.4

service_templates

Collection <ServiceTemplate>

Collection of the service templates that this zone supports and can be deployed into. Currently, VMTemplate and AssemblyTemplate are types of the members.

0..1

12.1.0.4

service_instances

Collection <ServiceInstance>

Collection of the service instances that are in this zone.

0..1

12.1.0.4

vnets

Collection <VNet>

Collection of the virtual networks that are associated with this zone.

0..1

12.1.0.4

backends

Collection <Physical Net>

Physical network available for the users that are associated with this zone.

0..1

12.1.0.6

media_type

String

The media type of the resource. "application/oracle.com.cloud.iaas.Zone"

1

12.1.0.4


54.2.3 AssemblyInstance [application/oracle.com.cloud.common.AssemblyInstance+json]

Extends: application/oracle.com.cloud.common.ServiceInstance

An AssemblyInstance is a logical grouping of resources from a deployment request of an Assembly template. The lifecycle of the resources in an AssemblyInstance can be managed centrally through the assembly instance.

Note:

A service template of Assembly type is deployed into an AssemblyInstance.

The following table describes the AssemblyInstance Data Model.

Table 54-4 AssemblyInstance Data Model

Field Type Description Occurs Supported since release

uri

URI

GET against this URI refreshes the client representation of the Assembly Instance definition.

1

12.1.0.2

name

String

Name of the Assembly Instance as given by the user. It is a UNICODE string to support different languages.

1

12.1.0.2

description

String

Human readable description of the Assembly Instance given by the user. It is a UNICODE string to support different languages.

0..1

12.1.0.2

based_on

URI

URI of the service template of which this AssemblyInstance is based on.

0..1

12.1.0.2

scalability_groups

Collection<ScalabilityGroup>

List of scalability groups that are included in this Assembly Instance.

0..1

12.1.0.2

servers

Collection<VM>

List of VMs that are directly included in this Assembly Instance.

0..1

12.1.0.2

status

String

Indicates the status of the Assembly Instance. This field contains the semantics that the service provider implements. For example, a service provider may implement an ONLINE status to indicate that all the entities, recursively, are in an ONLINE status. Or a service provider may implement an ONLINE status to indicate that critical entities are in an ONLINE status.

0..1

12.1.0.2

resource_state

ResourceState

Validity of the other Assembly Instance fields on a GET should be guaranteed only when the resource state is READY.

Otherwise, the client should not assume the validity of the fields.

1

12.1.0.1

created

Timestamp

Date and time, in ISO 8601 format, when the Assembly Instance was created.

0..1

12.1.0.2

expiry

Timestamp

Date and time, in ISO 8601 format, when the Assembly Instance should expire. If not specified, the Assembly Instance never expires.

0..1

12.1.0.2

params

{}

Vendor specific configuration parameters for this deployment.

0..1

12.1.0.2

deployment_plan

String

Vendor specific configuration parameters for this deployment in the prescribed XML format from the corresponding AssemblyTemplate that this AssemblyInstance is based on. When this is specified in the POST request, the content of this attribute will be processed to substitute the parameters for deploying an AssemblyInstance.

0..1

12.1.0.2

media_type

String

The media type of the resource.

1

12.1.0.4


54.2.4 Scalability Group [application/oracle.com.cloud.common.ScalabilityGroup+json]

Extends: application/oracle.com.cloud.common.ServiceInstance

The Scalability Group is a collection of servers and corresponding virtual networks. Scalability Group contains a collection of homogenous entities. The cloud service provider should enforce the semantics of ”sameness”. Operations such as scale_out and scale_in of the scalability group may be supported by the provider in the homogenous scalability group.

The following table describes the ScalabilityGroup Data Model.

Table 54-5 ScalabilityGroup Data Model

Field Type Description Occurs Supported since release

uri

URI

GET against this URI refreshes the client representation of the scalability group definition.

1

12.1.0.2

name

String

Name of the scalability group as given by the user. It is a UNICODE string to support different languages.

1

12.1.0.2

description

String

Human readable description of the scalability group given by the user. It is a UNICODE string to support different languages.

0..1

12.1.0.2

nodes

Collection<URI>

List of URIs that represent the entities making up this scalability group.

1

12.1.0.2

count

Integer

Count of the nodes that are in the scalability group.

1

12.1.0.2

status

String

Indicates the status of the scalability group. This field contains the vendor dependent semantics that the service provider implements. For example, a service provider may implement an ONLINE status to indicate that all the entities, recursively, are in an ONLINE status. Or a service provider may implement an ONLINE status to indicate that at least one entity is in an ONLINE status.

0..1

12.1.0.2

resource_state

ResourceState

Validity of the other scalability group fields is guaranteed only when the resource state is READY.

Otherwise, the client shall not assume the validity of the fields.

1

12.1.0.2

created

Timestamp

Date and time, in ISO 8601 format, when the scalability group is created.

1

12.1.0.2

max

Signed Integer

Maximum number of nodes this scalability group can hold. If not provided, the client should assume it is unlimited, which is the specified with as the value ”-1”.

0..1

12.1.0.2

min

Integer

Minimal number of nodes this scalability group should hold to be considered a functional scalability group. If not specified, the client should assume it is 1.

0..1

12.1.0.2

homogenous

Boolean

TRUE when the scalability group contains homogenous entities and FALSE otherwise.

1

12.1.0.2


54.2.5 VM [application/oracle.com.cloud.common.VM+json]

Extends: application/oracle.com.cloud.common.ServiceInstance

A VM is a computing container providing a complete system platform that supports the execution of a complete OS stack. The following table describes the VM Data Model.

Table 54-6 VM Data Model

Field Type Description Occurs Supported since release

uri

URI

GET against this URI refreshes the client representation of the VM definition.

1

12.1.0.1

name

String

Name of the VM as given by the user or generated by the platform.

1

12.1.0.1

description

String

Human readable description of the Server given by the user or generated by the platform. It is a UNICODE string to support different languages.

0..1

12.1.0.1

status

String

Current running status of this Server. The service provider can overwrite the valid values for this field and may implement status operations.

1

12.1.0.1

based_on

URI

URI of the service template on which this Server is based.

0..1

12.1.0.1

hostname

String

Qualified host name of this Server when available.

0..1

12.1.0.2

cpu

[Number,Number]

Numeric sizing of the CPU where the first number indicates the count of the CPU cores and the second number indicates the CPU speed in MHz per core.

1

12.1.0.1

memory

Number

Numeric sizing of the RAM in MByte.

1

12.1.0.1

disks

{String,Number}[]

Name and size in GB of local disks.

0..1

12.1.0.2

interfaces

Collection<NetworkInterface>

Network interfaces associated with this Server.

1

12.1.0.2

params

{ }

Vendor specific configuration parameters for this Server.

0..1

12.1.0.1

resource_state

ResourceState

Validity of the other Server fields is guaranteed only when the resource state is READY.

Otherwise, the client should not assume the validity of the fields.

1

12.1.0.1

created

Timestamp

Date and time, in ISO 8601 format, when the Server was created.

1

12.1.0.1

type

String

Type of server that represents this computational container (PHYSICAL, VIRTUAL).

1

12.1.0.1

os

String

OS information of the Server where appropriate.

0..1

12.1.0.1

media_type

String

The media type of the resource.

1

12.1.0.4

saved_templates

Collection <VMTemplate>

The collection of VMTemplate that were created based on this VM resource.

0..1

12.1.0.5


The status field of the VM Data Model should contain the running status of the VM. It is expected that the service provider implements at least the following valid values:

  • STOPPED

  • STOPPING

  • STARTING

  • STARTED

  • SUSPENDED

  • SUSPENDING

  • RESUMING

  • RESTARTING

  • DELETED

54.2.6 VNet [application/oracle.com.cloud.common.VNet+json]

A VNet is a service that is capable of providing network addresses, routing rules, security constraints, and access limits.

The following table describes the VNet Data Model.

Table 54-7 VNet Data Model

Field Type Description Occurs Supported since release

uri

URI

GET against this URI refreshes the client representation of the VNet definition.

1

12.1.0.2

name

String

Name of the VNet as given by the user or generated by the platform. It is a UNICODE string to support different languages.

1

12.1.0.2

description

String

Human readable description of the VNet given by the user or generated by the platform. It is a UNICODE string to support different languages.

0..1

12.1.0.2

created

Timestamp

Date and time, in ISO 8601 format, when this VNet was created.

1

12.1.0.2

interfaces

Collection<NetworkInterface>

List of NetworkInterface resources that are part of the VNet.

0..1

12.1.0.2


54.2.7 NetworkInterface [application/oracle.com.cloud.common.NetworkInterface+json]

An instance of the network interface is identified by a network end point and consists of a complete address that can be interpreted by the underlying network infrastructure.

The following table describes the NetworkInterface Data Model.

Table 54-8 NetworkInterface Data Model

Field Type Description Occurs Supported since release

uri

URI

GET against this URI refreshes the client representation of the NetworkInterface definition.

1

12.1.0.2

name

String

Name of the NetworkInterface as given by the user or generated by the platform. It is a UNICODE string to support different languages.

1

12.1.0.2

description

String

Human readable description of the NetworkInterface given by the user or generated by the platform. It is a UNICODE string to support different languages.

0..1

12.1.0.2

address

String

Address of this interface. If an IP based protocol, specified as a dotted notation IPv4 or IPv6 address.

1

12.1.0.2

resource_state

ResourceState

The validity of the other NetworkInterface fields is guaranteed only when the resource state is READY. Otherwise, the client should not assume the validity of the fields.

0..1

12.1.0.2

mac

String

The MAC address of the network interface where appropriate.

0..1

12.1.0.2


54.2.8 VMTemplate [application/oracle.com.cloud.common.VMTemplate+json]

Extends: application/oracle.com.cloud.common.ServiceTemplate

VMTemplate is a class of ServiceTemplate. It is permissible to accept the ServiceTemplate media type on an instance of VMTemplate. VMTemplate is a preconfigured deployable entity that realizes a VM resource. The following table describes the VMTemplate Data Model.

Table 54-9 VMTemplate Data Model

Field Type Description Occurs Supported since release

uri

URI

A GET against this URI refreshes the client representation of the VMTemplate definition to this user.

1

12.1.0.1

name

String

A human readable name, given to the VMTemplate.

1

12.1.0.1

description

String

A brief description, given to the ServiceTemplate. SHALL be a UNICODE string to support different languages.

0..1

12.1.0.1

type

String

The String that describes the type of the VM Template.

This has value "Template".

1

12.1.0.1

created

Timestamp

Date and time, in ISO 8601 format, when the VMTemplate was created.

1

12.1.0.1

service_family_type

String

The name of the service family type that this service template is categorized under.

This has value "iaas".

0..1

12.1.0.4

default_instance_media_type

String

The default media type of the service instance that can be created using this template.

This has value "application/oracle.com.cloud.common.VM".

0..1

12.1.0.4

resource_state

ResourceState

Only a service template with READY state can be deployed.

0..1

12.1.0.1

deployment_params

List of Deployment Parameters

Contains the list of data structure of Deployment Parameters to indicate the parameters that may be specified during the service instance deployment using this template.

0..1

12.1.0.4

zones

List of Zones

Contains the list of Zone resources that this service template can be used to create service instances with.

0..1

12.1.0.2

service_instances

Collection<?>

Contains the list of service instances that are created with this template.

0..1

12.1.0.4


54.2.9 AssemblyTemplate [application/oracle.com.cloud.common.AssemblyTemplate+json]

Extends: application/oracle.com.cloud.common.ServiceTemplate+json

AssemblyTemplate is a class of ServiceTemplate. It is permissible to accept the ServiceTemplate media type on an instance of AssemblyTemplate.

AssemblyTemplate is a deployable entity that realizes an AssemblyInstance resource that may contain multiple resources that are interconnected. The following table describes the AssemblyTemplate Data Model.

Table 54-10 AssemblyTemplate Data Model

Field Type Description Occurs Supported since release

uri

URI

A GET against this URI refreshes the client representation of the AssemblyTemplate definition to this user.

1

12.1.0.2

name

String

A human readable name, given to the AssemblyTemplate.

1

12.1.0.2

description

String

A brief description, given to the AssemblyTemplate. SHALL be a UNICODE string to support different languages.

0..1

12.1.0.2

type

String

The String that describes the type of the Assembly Template.

This has value "Assembly".

1

12.1.0.2

created

Timestamp

Date and time, in ISO 8601 format, when the AssemblyTemplate was created.

1

12.1.0.2

service_family_type

String

The name of the service family type that this service template is categorized under.

This has value "iaas".

0..1

12.1.0.4

default_instance_media_type

String

The default media type of the service instance that can be created using this template.

This has value "application/oracle.com.cloud.common.AssemblyInstance".

0..1

12.1.0.4

resource_state

ResourceState

Only a service template with READY state can be deployed.

0..1

12.1.0.1

deployment_params

List of Deployment Parameters

Contains the list of data structure of Deployment Parameters to indicate the parameters that may be specified during the service instance deployment using this template.

0..1

12.1.0.4

zones

List of Zones

Contains the list of Zone resources that this service template can be used to create service instances with.

0..1

12.1.0.2

service_instances

Collection<?>

Contains the list of service instances that are created with this template.

0..1

12.1.0.4

definition

String

Contains the definition of the assembly template. This would be the OVF xml metadata representing the assembly template.

0..1

12.1.0.1

ovfdescriptor

String

Same as definition.

0..1

12.1.0.1

deploy_plans

List of Deployment Plans

Contains the list of Deployment Plans that are associated with the assembly instance. The deployment plans are pre-filled configuration metadata.

0..1

12.1.0.2


The following table describes the structure of the Deployment Plan.

Table 54-11 Deployment Plan Structure

Field Type Description Occurs

name

String

The name of the deployment plan.

1

description

String

The description of the deployment plan.

0..1

xml

String

The deployment plan XML.

1


54.2.10 IaasServiceFamilyType [application/oracle.com.cloud.iaas.IaasServiceFamilyType+json]

Extends: application/oracle.com.cloud.common.ServiceFamilyType+json

The Infrastructure service family type describes the common service family type attributes and also the infrastructure specific attributes. The following table describes the IaaS Service Family Type Data Model.

Table 54-12 AssemblyTemplate Data Model

Field Type Description Occurs Supported since release

uri

URI

A GET against this URI refreshes the client representation of the ServiceFamilyType definition to this user.

1

12.1.0.4

name

String

A human readable name, given to the ServiceFamilyType.

1

12.1.0.4

description

String

A human readable description of the Service Family Type. SHALL be a UNICODE string to support different languages.

0..1

12.1.0.4

resource_state

ResourceState

The resource state of the resource.

0..1

12.1.0.4

media_type

String

The media type of the resource.

1

12.1.0.4

service_templates

Collection <ServiceTemplate>

The collection of service templates that are of this service family type.

0..1

12.1.0.4

zones

Collection <Zone>

The collection of zones that support service instances of this service family type.

0..1

12.1.0.4

instance_types

Collection <InstanceType>

The collection of instance types that are supported by this service family type.

0..1

12.1.0.4

quota_usages

Collection <QuotaUsage>

The collection of quota usages of the perspective family type of the authenticated user.

0..1

12.1.0.5

quota_def

Json Object

The family type specific quota metadata information, this may include some permission information.

The structure of this object would be documented in the perspective family type resource model.

0..1

12.1.0.5

instance_options

List of VM Size Options

The list of VM size options that may be available to the authenticated user.

0..1

12.1.0.4


The following table describes the structure of the VM Size option:

Table 54-13 VM Size Option Structure

Field Type Description Occurs Supported since release

name

String

The name of the VM Size. This may be used as the parameter for VM resource creations.

1

12.1.0.4

id

String

The ID of the VM Size.

1

12.1.0.4

cpu

Number

The amount of CPU.

1

12.1.0.4

memory

Number

The amount of Memory in MB.

1

12.1.0.4

local_storage

Number

The amount of local storage in GB.

1

12.1.0.4


The IaaS supports the following Quota Usage.

Table 54-14 Quota Usage for IaaS

Quota Description Supported since release

CPU

The number of CPUs in discrete units.

12.1.0.5

RAM

Memory size in MB.

12.1.0.5

Local Storage

The amount of storage local to the server in GB.

12.1.0.5

Extra Storage

The amount of storage external to the server in GB.

12.1.0.5

SWLIB Storage

The amount of storage in the Enterprise Manager Software Library.

12.1.0.5

Server

The number of servers in discrete units.

12.1.0.5


The IaaS Quota definition is described in the media type application/oracle.com.cloud.iaas.Quota.

54.2.11 Iaas Quota Definition [application/oracle.com.cloud.iaas.Quota+json]

This resource describes the definition for the Iaas quota. The following table describes the IaaS Quota Definition Data Model

Table 54-15 IaaS Quota Definition Data Model

Field Type Description Occurs Supported since release

uri

URI

A GET against this URI refreshes the client representation of the Iaas Quota definition to this user.

1

12.1.0.5

allowedSaveAsTemplate

Boolean

Indicates whether the authenticated user has permission to save a VM as a template.

1

12.1.0.5

allowedSaveToSwlib

Boolean

Indicates whether the authenticated user has permission to save entities to the Enterprise Manager software library.

1

12.1.0.5

allowedSaveToSwlibOnExpiry

Boolean

Indicates whether the authenticated user has permission to save VM as a template into the Enterprise Manager software library when the VM expires.

1

12.1.0.5

resourceQuotas

Collection <ResourceQuota>

The quotas of resources defined for the authenticated user.

1

12.1.0.5


The following describes the structure of the Resource Quota

Table 54-16 Structure of the Resource Quota

Field Type Description Occurs Supported since release

name

String

The name of the resource.

1

12.1.0.5

description

String

The description of the resource.

0..1

12.1.0.5

maxAllowed

Number

The maximum number of units that the authenticated resource is allocated. If this value is negative or not defined, the user does not have any limit on the amount that can be used.

0..1

12.1.0.5

unit

String

The measurement unit of the resource.

1

12.1.0.5


54.3 Infrastructure as a Service REST API Examples

The following sections provide examples of the different operations supported by the IaaS REST APIs:

54.3.1 Creating a Service Instance

This section describes how to create a service instance using the Cloud resources.

54.3.1.1 Creating a VM

As VM is a service instance in the service family type "iaas", you need to identify the zone of the same family type in which to create the VM. There are two approaches to creating a VM:

  1. POST to the IaaS Zone on which the VM is to reside

  2. POST to the VM Template on Which the VM is to be Based on

Note the attributes in the submitted body for the POST. The pattern is the same for other service instance creations. Because the intention is clear, the "zone" attribute is not required while POSTing to the "iaas" Zone. Similarly, the "based_on" attribute is not needed when POSTing to the VMTemplate.

54.3.1.1.1 POST to the IaaS Zone on which the VM is to reside

The following shows the configuration for POSTing to Iaas Zone:

Table 54-17 POST Request Configuration for Creating a VM by Passing a Request on the IaaS Zone

Feature Description

URI

/em/cloud/iaas/servicetemplate/vm/oracle%3AdefaultService%3Aem%3Aprovisioning%3A1%3Acmp%3AVirtualization%3ATemplate%3AC76CEB5563EA5E13E040578CDA817FAF%3A0.1

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Content-Type: application/oracle.com.cloud.common.VM+json

Body

{
  "based_on":"/em/cloud/iaas/servicetemplate/vm/oracle%3AdefaultService%3Aem%3Aprovisioning%3A1%3Acmp%3AVirtualization%3ATemplate%3AC76CEB5563EA5E13E040578CDA817FAF%3A0.1",
  "cpu" : [2,0],
  "memory" : "512",
  "params":{
    "server_prefix":"ZONEPOST",
    "vnc_password":"welcome1",
    "root_password":"welcome1"
  }
}

Request method

POST

Supported since release

12.1.0.1 Cloud Service Portal plug-in


A sample of the response received from the above interaction is shown below.

{
  "uri" : "/em/cloud/iaas/server/byrequest/102" ,
  "name" : "VDOSI VM Creation 1345392541850" ,
  "resource_state" :     {
      "state" : "INITIATED" ,
      "messages" : 
      [
          {
            "text" : "The Request with ID '102' is scheduled with Job Id 'C79997609390CB9BE040578CDA817D96'" ,
            "date" : "2012-08-19T16:09:02+0000"
          }
      ]
    } ,
  "context_id" : "102" ,
  "media_type" : "application/oracle.com.cloud.common.VM+json" ,
  "service_family_type" : "iaas" ,
  "created" : "2012-08-19T16:09:02+0000"
}
54.3.1.1.2 POST to the VM Template on Which the VM is to be Based on

The following describes the configurations for POSTing to the VMTemplate:

Table 54-18 POST Request Configuration for Creating a VM by Passing a Request on the VM Template

Feature Description

URI

/em/cloud/iaas/servicetemplate/vm/oracle%3AdefaultService%3Aem%3Aprovisioning%3A1%3Acmp%3AVirtualization%3ATemplate%3AC76CEB5563EA5E13E040578CDA817FAF%3A0.1

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=Content-Type: application/oracle.com.cloud.common.VM+json

Body

{  
"zone":"/em/cloud/iaas/zone/D73AF0D42C8459E11419862797D1F37D",  "cpu" : [2,0],  "memory" : "512",  "params":{    "server_prefix":"STPOST",    "vnc_password":"welcome1",    "root_password":"welcome1"  }}

Request method

POST

Supported since release

12.1.0.4 Cloud Service Portal plug-in


A sample of the response received from the above interaction is shown below.

{
  "uri" : "/em/cloud/iaas/server/byrequest/101" ,
  "name" : "VDOSI VM Creation 1345391921407" ,
  "resource_state" :     {
      "state" : "INITIATED" ,
      "messages" : 
      [
          {
            "text" : "The Request with ID '101' is scheduled with Job Id 'C7999760937CCB9BE040578CDA817D96'" ,
            "date" : "2012-08-19T15:58:47+0000"
          }
      ]
    } ,
  "context_id" : "101" ,
  "media_type" : "application/oracle.com.cloud.common.VM+json" ,
  "service_family_type" : "iaas" ,
  "created" : "2012-08-19T15:58:42+0000"
}

This response is the same as the previous version.

If the zone is not specified, then it is not possible for the Web service to determine where the VM should be deployed. The following interaction illustrates this:

Table 54-19 POST Request Configuration for Creating a VM by Passing a Request on the VM Template without mentioning the Zone

Feature Description

URL

https://example.com/em/cloud/iaas/servicetemplate/vm/oracle%3AdefaultService%3Aem%3Aprovisioning%3A1%3Acmp%3AVirtualization%3ATemplate%3AC76CEB5563EA5E13E040578CDA817FAF%3A0.1

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=Content-Type: application/oracle.com.cloud.common.VM+json

Body

{
  "cpu" : [2,0],
  "memory" : "512",
  "params":{
    "server_prefix":"STPOST",
    "vnc_password":"welcome1",
    "root_password":"welcome1"
  }
}

Request method

POST


The following is the response from the Web service:

{
  "messages" : 
  [
      {
        "hint" : "'zone' attribute needs to be specified to complete 'POST' request for 'application/oracle.com.cloud.common.VM' resource" ,
        "stack_trace" : "oracle.sysman.emInternalSDK.ssa.cloudapi.rest.RestServletException: 'zone' attribute needs to be specified to complete 'POST' request for 'application/oracle.com.cloud.common.VM' resource\n\tat oracle.sysman.ssa.cloudapi.iaas.VMRequest.GenerateVMFromDeployment(VMRequest.java:149)\n\tat oracle.sysman.ssa.cloudapi.iaas.VMTemplate.processRequest(VMTemplate.java:93)\n\tat oracle.sysman.ssa.cloudapi.iaas.IaasServiceProvider.processRequest(IaasServiceProvider.java:582)\n\tat oracle.sysman.emInternalSDK.ssa.cloudapi.EMCloudServlet.perform(EMCloudServlet.java:236)\n\tat oracle.sysman.emInternalSDK.ssa.cloudapi.EMCloudServlet.performPost(EMCloudServlet.java:385)\n\tat oracle.sysman.emInternalSDK.ssa.cloudapi.rest.AbstractRestServlet.doPost(AbstractRestServlet.java:137)\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:727)\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:820)\n\tat weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)\n\tat webl" ,
        "text" : "Did not successfully execute 'POST' resource operation on 'application/oracle.com.cloud.common.Cloud' identified by '/em/cloud/iaas/servicetemplate/vm/oracle:defaultService:em:provisioning:1:cmp:Virtualization:Template:C76CEB5563EA5E13E040578CDA817FAF:0.1'" ,
        "date" : "2012-08-19T16:02:51+0000"
      }
  ]
}

54.3.1.2 Viewing Details of the VM Creation Status

After passing the POST request to create the VM, you can issue the GET request on the resource identified by the return URI to keep track of the VM creation status. See the table below for a sample GET request configuration for viewing the VM creation details.

Table 54-20 GET Request Configuration for Viewing Details of the VM Creation Status

Feature Description

URI

/em/cloud/iaas/server/byrequest/101

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Body

None

Method

GET


A sample of the response received is shown below.

{
  "uri" : "/em/cloud/iaas/server/byrequest/101" ,
  "name" : "VDOSI VM Creation 1345391921407" ,
  "resource_state" :     {
      "state" : "CREATING" ,
      "messages" : 
      [
          {
            "text" : "The Request with ID '101' is being processed, and has Job Id 'C7999760937CCB9BE040578CDA817D96'" ,
            "date" : "2012-08-19T16:14:11+0000"
          }
      ]
    } ,
  "context_id" : "101" ,
  "media_type" : "application/oracle.com.cloud.common.VM+json" ,
  "service_family_type" : "iaas" ,
  "created" : "2012-08-19T15:58:42+0000"
}

Note that the resource_state attribute is showing CREATING state to indicate the VM is still being created. Once the VM is created, the same GET will return the VM resource with "READY" state, as shown below:

{
  "uri" : "/em/cloud/iaas/server/vm/C5CA59AF9386975E8AEA45B0F040F095" ,
  "name" : "STPOST" ,
  "resource_state" :     {
      "state" : "READY"
    } ,
  "context_id" : "C5CA59AF9386975E8AEA45B0F040F095" ,
  "media_type" : "application/oracle.com.cloud.common.VM+json" ,
  "metrics" :     {
      "media_type" : "application/oracle.com.cloud.common.Metric+json" ,
      "total" : "4" ,
      "elements" : 
      [
          {
            "uri" : "/em/cloud/metric/iaas%3Avm%3ACPU_Utilization%3AC5CA59AF9386975E8AEA45B0F040F095" ,
            "name" : "CPU_Utilization" ,
            "media_type" : "application/oracle.com.cloud.common.Metric+json" ,
            "type" : "NUMBER" ,
            "current_value" : "" ,
            "current_time" : "2012-08-19T16:17:02+0000"
          } ,
          {
            "uri" : "/em/cloud/metric/iaas%3Avm%3ATotal_Network_Throughput%3AC5CA59AF9386975E8AEA45B0F040F095" ,
            "name" : "Total_Network_Throughput" ,
            "media_type" : "application/oracle.com.cloud.common.Metric+json" ,
            "type" : "NUMBER" ,
            "current_value" : "" ,
            "current_time" : "2012-08-19T16:17:02+0000"
          } ,
          {
            "uri" : "/em/cloud/metric/iaas%3Avm%3ATotal_Disk_Throughput%3AC5CA59AF9386975E8AEA45B0F040F095" ,
            "name" : "Total_Disk_Throughput" ,
            "media_type" : "application/oracle.com.cloud.common.Metric+json" ,
            "type" : "NUMBER" ,
            "current_value" : "" ,
            "current_time" : "2012-08-19T16:17:02+0000"
          } ,
          {
            "uri" : "/em/cloud/metric/iaas%3Avm%3AFilesystem_Total_Used%3AC5CA59AF9386975E8AEA45B0F040F095" ,
            "name" : "Filesystem_Total_Used" ,
            "media_type" : "application/oracle.com.cloud.common.Metric+json" ,
            "type" : "NUMBER" ,
            "current_value" : "" ,
            "current_time" : "2012-08-19T16:17:02+0000"
          }
      ]
    } ,
  "service_family_type" : "iaas" ,
  "status" : "STARTED" ,
  "created" : "2012-08-19T16:15:21+0000" ,
  "hostname" : "dadvfm0052.xyxy.example.com" ,
  "cpu" : 
  [
    "2" ,
    "0"
  ] ,
  "memory" : "512" ,
  "disks" : 
  [
    [
      "default_disk" ,
      "10240"
    ] ,
    [
      "7e8a5d25-7995-40c9-9b16-9274cc2d64f3.img (2)" ,
      "6918"
    ] ,
    [
      "fcaf377c-ed3e-4823-a9b3-6b4d2289e215.img (2)" ,
      "192"
    ] ,
    [
      "f5dba62c-eb49-40c6-af0b-06187b2b9856.img (2)" ,
      "5120"
    ]
  ] ,
  "interfaces" :     {
      "media_type" : "application/oracle.com.cloud.common.NetworkInterface+json" ,
      "total" : "1" ,
      "elements" : 
      [
          {
            "name" : "cloud_network" ,
            "address" : "10.229.136.185" ,
            "mac" : "00:21:f6:5f:73:33"
          }
      ]
    } ,
  "os" : "None" ,
  "type" : "VIRTUAL"
}

54.3.1.3 Creating an Assembly Instance

Similar to VM creation, assembly instance creation can also be POSTed to both a Zone and an AssemblyTemplate.

The GET request configuration to view the Assembly instance resource details is shown below.

Table 54-21 GET Request Configuration for Viewing Details of the Assembly Instance Resource

Feature Description

URI

/em/cloud/iaas/servicetemplate/assembly/oracle%3AdefaultService%3Aem%3Aprovisioning%3A1%3Acmp%3AVirtualization%3AAssembly%3AC75E88B04D7FEDEDE040578CDA810E49%3A0.1

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Body

None

Request method

GET

Supported since release

12.1.0.4 Cloud Service Portal plug-in


A sample of the response received is shown below.

{
  "uri" : "/em/cloud/iaas/servicetemplate/assembly/oracle%3AdefaultService%3Aem%3Aprovisioning%3A1%3Acmp%3AVirtualization%3AAssembly%3AC75E88B04D7FEDEDE040578CDA810E49%3A0.1" ,
  "name" : "sidb_assembly" ,
  "resource_state" :     {
      "state" : "READY"
    } ,
  "context_id" : "oracle:defaultService:em:provisioning:1:cmp:Virtualization:Assembly:C75E88B04D7FEDEDE040578CDA810E49:0.1" ,
  "media_type" : "application/oracle.com.cloud.common.AssemblyTemplate+json" ,
  "type" : "Assembly" ,
  "created" : "2012-08-16T11:02:38+0000" ,
  "default_instance_media_type" : "application/oracle.com.cloud.common.AssemblyInstance+json" ,
  "zones" :     {
      "media_type" : "application/oracle.com.cloud.iaas.Zone+json" ,
      "total" : "1" ,
      "elements" : 
      [
          {
            "uri" : "/em/cloud/iaas/zone/D73AF0D42C8459E11419862797D1F37D" ,
            "name" : "cloud_zone" ,
            "media_type" : "application/oracle.com.cloud.iaas.Zone+json" ,
            "service_family_type" : "iaas" ,
            "type" : "VM_ZONE"
          }
      ]
    } ,
  "service_instances" :     {
      "media_type" : "application/oracle.com.cloud.common.ServiceInstance+json" ,
      "total" : "0" ,
      "elements" : 
      [      ]
    } ,
  "deployment_params" : 
  [
      {
        "name" : "zone" ,
        "description" : "'zone' attribute is the URI of the zone that the 'application/oracle.com.cloud.common.AssemblyInstance' resource is to be created in" ,
        "type" : "STRING" ,
        "require" : "false" ,
        "sensitive" : "false"
      } ,
      {
        "name" : "based_on" ,
        "description" : "'based_on' attribute is the URI of the service template or format String of the originated source which the deployed 'application/oracle.com.cloud.common.AssemblyInstance' resource is to be followed" ,
        "type" : "STRING" ,
        "require" : "false" ,
        "sensitive" : "false"
      } ,
      {
        "name" : "deployment_plan" ,
        "description" : "'deployment_plan' attribute describes the configuration of which the deployed 'application/oracle.com.cloud.common.AssemblyInstance' resource is to be used in the XML deployment plan format" ,
        "type" : "STRING" ,
        "require" : "false" ,
        "sensitive" : "false"
      }
  ] ,
  "directory" : "COMP_Components" ,
  "updated" : "2012-08-16T11:02:38+0000" ,
  "creator" : "DMBHAT1" ,
  "last_modified_by" : "DMBHAT1" ,
  "componenttype" : "Virtualization" ,
  "oracle_owned" : "false" ,
  "deploy_plans" : 
  [
      {
        "name" : "cloud_zone" ,
        "description" : "Default Assembly Deployment Plan for Service Template 'sidb_assembly' on Zone 'cloud_zone'" ,
        "context_id" : "D73AF0D42C8459E11419862797D1F37D" ,
        "xml" : "<?xml version=\"1.0\" encoding=\"UTF-8\"
standalone=\"yes\"?>\n<ns2:ConfigurationData
xmlns:ns2=\"http://www.oracle.com/sysman/vt/RequestConfigData\/">\n
<AssemblyDeployment assemblyInstanceName=\"DEFAULT_PLEASE_CHANGE\">\n
<SourceBinary type=\"TYPE_SWLIB\"
name=\"oracle:defaultService:em:provisioning:1:cmp:Virtualization:Assembly:C75E88B04D7FEDEDE040578CDA810E49:0.1\"/>\n
<DeploymentTarget type=\"oracle_vm_zone\"
name=\"D73AF0D42C8459E11419862797D1F37D\"/>\n
<AcceptedAllEULAs>false</AcceptedAllEULAs>\n
<InstallEMAgent>false</InstallEMAgent>\n  
<DisableCleanup>false</DisableCleanup>\n
<EMAgentConfig installUserPassword=\"  \" installUserName=\"oracle\"/>\n
<AssemblyNetworkConfig>\n
<AssemblyNetwork name=\"network-1\"/>\n
</AssemblyNetworkConfig>\n
<VirtualSystemCollectionConfig id=\"sidbasmA_linuxx64_11203psu1\">\n
<ProductConfiguration>\n
<Product>\n
<Properties/>\n
<EMAgent>false</EMAgent>\n<
/Product>\n
</ProductConfiguration>\n
<VirtualSystemConfig agentPushInstallationEnabled=\"true\"agentInstallationType=\"Push Agent Installation\" vmInstance=\"true\" targetName=\"sidbasmA_linuxx64_11203psu1/sidbasm:%assembly_instance_name%\" id=\"sidbasmA_linuxx64_11203psu1/sidbasm\">\n
<ProductConfiguration>\n
<Product>\n
<Properties>\n
<Property id=\"ocm.runConfiguration\">\n<Name>ocm.runConfiguration</Name>\n<Required>false</Required>\n<Value>false</Value>\n<Secret>false</Secret>\n
</Property>\n
<Property id=\"ocm.metalinkCsiRegistration.CSI\">\n<Name>ocm.metalinkCsiRegistration.CSI</Name>\n<Required>false</Required>\n<Value></Value>\n<Secret>false</Secret>\n                            </Property>\n
<Property id=\"ocm.metalinkCsiRegistration.metalinkId\">\n<Name>ocm.metalinkCsiRegistration.metalinkId</Name>\n<Required>false</Required>\n<Value></Value>\n<Secret>false</Secret>\n                            </Property>\n<
Property id=\"ocm.proxyPassword\">\n<Name>ocm.proxyPassword</Name>\n<Required>false</Required>\n<Value>  </Value>\n<Secret>true</Secret>\n
</Property>\n  <Property id=\"ocm.metalinkCsiRegistration.countryCode\">\n<Name>ocm.metalinkCsiRegistration.countryCode</Name>\n<Required>false</Required>\n<Value></Value>\n<Secret>false</Secret>\n
</Property>\n                            <Property id=\"system-fileset|db_asm_disk_7|size-units\">\n<Name>system-fileset|db_asm_disk_7|size-units</Name>\n<Required>false</Required>\n<Value>MB</Value>\n<Secret>false</Secret>\n
</Property>\n                            <Property id=\"system-fileset|db_asm_disk_1|size-units\">\n<Name>system-fileset|db_asm_disk_1|size-units</Name>\n<Required>false</Required>\n<Value>MB</Value>\n<Secret>false</Secret>\n
</Property>\n                            <Property id=\"system-fileset|db_asm_disk_3|size-units\">\n<Name>system-fileset|db_asm_disk_3|size-units</Name>\n<Required>false</Required>\n<Value>MB</Value>\n<Secret>false</Secret>\n
</Property>\n                            <Property id=\"system-fileset|db_asm_disk_0|size\">\n<Name>system-fileset|db_asm_disk_0|size</Name>\n<Required>false</Required>\n<Value>2836</Value>\n<Secret>false</Secret>\n
</Property>\n                            <Property id=\"system-fileset|db_asm_disk_1|size\">\n<Name>system-fileset|db_asm_disk_1|size</Name>\n<Required>false</Required>\n<Value>2836</Value>\n<Secret>false</Secret>\n
</Property>\n                            <Property id=\"asm-password\">\n<Name>asm-password</Name>\n<Required>true</Required>\n<Value>  </Value>\n<Secret>true</Secret>\n
</Property>\n                            <Property id=\"system-fileset|db_asm_disk_7|size\">\n<Name>system-fileset|db_asm_disk_7|size</Name>\n<Required>false</Required>\n<Value>2836</Value>\n<Secret>false</Secret>\n
</Property>\n                            <Property id=\"ocm.metalinkEmailRegistration.metalinkEmailId\">\n<Name>ocm.metalinkEmailRegistration.metalinkEmailId</Name>\n<Required>false</Required>\n<Value></Value>\n<Secret>false</Secret>\n
</Property>\n                            <Property id=\"input|listener-1|global-db-name\">\n<Name>input|listener-1|global-db-name</Name>\n<Required>false</Required>\n<Value>orcl.us.example.com</Value>\n<Secret>false</Secret>\n
</Property>\n                            <Property id=\"system-fileset|db_asm_disk_4|size-units\">\n<Name>system-fileset|db_asm_disk_4|size-units</Name>\n<Required>false</Required>\n<Value>MB</Value>\n<Secret>false</Secret>\n
</Property>\n                            <Property id=\"ocm.proxyHost\">\n<Name>ocm.proxyHost</Name>\n<Required>false</Required>\n<Value></Value>\n<Secret>false</Secret>\n
</Property>\n                            <Property id=\"ocm.repeaterURI\">\n<Name>ocm.repeaterURI</Name>\n<Required>false</Required>\n<Value></Value>\n<Secret>false</Secret>\n
</Property>\n                            <Property id=\"system-fileset|db_asm_disk_2|size-units\">\n<Name>system-fileset|db_asm_disk_2|size-units</Name>\n<Required>false</Required>\n<Value>MB</Value>\n<Secret>false</Secret>\n
</Property>\n                            <Property id=\"input|listener-1|port\">\n<Name>input|listener-1|port</Name>\n<Required>false</Required>\n<Value>1521</Value>\n<Secret>false</Secret>\n 
</Property>\n                            <Property id=\"ocm.anonymousEmailRegistration.emailId\">\n<Name>ocm.anonymousEmailRegistration.emailId</Name>\n<Required>false</Required>\n<Value></Value>\n<Secret>false</Secret>\n
</Property>\n                            <Property id=\"db-account-password\">\n<Name>db-account-password</Name>\n<Required>true</Required>\n<Value>  </Value>\n<Secret>true</Secret>\n
</Property>\n                            <Property id=\"system-fileset|db_asm_disk_3|size\">\n<Name>system-fileset|db_asm_disk_3|size</Name>\n<Required>false</Required>\n<Value>2836</Value>\n<Secret>false</Secret>\n
</Property>\n                            <Property id=\"system-fileset|db_asm_disk_2|size\">\n<Name>system-fileset|db_asm_disk_2|size</Name>\n<Required>false</Required>\n<Value>2836</Value>\n<Secret>false</Secret>\n
</Property>\n                            <Property id=\"ocm.proxyPort\">\n<Name>ocm.proxyPort</Name>\n<Required>false</Required>\n<Value></Value>\n<Secret>false</Secret>\n
</Property>\n                            <Property id=\"ocm.proxyUsername\">\n<Name>ocm.proxyUsername</Name>\n<Required>false</Required>\n<Value></Value>\n<Secret>false</Secret>\n
</Property>\n                            <Property id=\"system-fileset|db_asm_disk_6|size\">\n<Name>system-fileset|db_asm_disk_6|size</Name>\n<Required>false</Required>\n<Value>2836</Value>\n<Secret>false</Secret>\n
</Property>\n                            <Property id=\"system-fileset|db_asm_disk_5|size\">\n<Name>system-fileset|db_asm_disk_5|size</Name>\n<Required>false</Required>\n<Value>2836</Value>\n<Secret>false</Secret>\n
</Property>\n                            <Property id=\"system-fileset|db_asm_disk_4|size\">\n<Name>system-fileset|db_asm_disk_4|size</Name>\n<Required>false</Required>\n<Value>2836</Value>\n<Secret>false</Secret>\n
</Property>\n                            <Property id=\"ocm.metalinkEmailRegistration.metalinkPassword\">\n<Name>ocm.metalinkEmailRegistration.metalinkPassword</Name>\n<Required>false</Required>\n<Value>  </Value>\n<Secret>true</Secret>\n
</Property>\n                            <Property id=\"system-fileset|db_asm_disk_6|size-units\">\n<Name>system-fileset|db_asm_disk_6|size-units</Name>\n<Required>false</Required>\n<Value>MB</Value>\n<Secret>false</Secret>\n
</Property>\n                            <Property id=\"system-fileset|db_asm_disk_5|size-units\">\n<Name>system-fileset|db_asm_disk_5|size-units</Name>\n<Required>false</Required>\n<Value>MB</Value>\n<Secret>false</Secret>\n
</Property>\n                            <Property id=\"system-fileset|db_asm_disk_0|size-units\">\n<Name>system-fileset|db_asm_disk_0|size-units</Name>\n<Required>false</Required>\n<Value>MB</Value>\n<Secret>false</Secret>\n
</Property>\n
</Properties>\n <EMAgent>false</EMAgent>\n
</Product>\n                </ProductConfiguration>\n                <HardwareConfiguration>\n
<Memory>2048</Memory>\n
<VCPUs>1</VCPUs>\n
<HaEnabled>false</HaEnabled>\n
<StartAfterCreation>true</StartAfterCreation>\n
<CPUSchedulingPriority>50</CPUSchedulingPriority>\n
<CPUCap>100</CPUCap>\n                    <LocalDisks>\n
<disk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_System\">\n
<Size>5122</Size>\n
<Mode>Read-Write</Mode>\n
<CreatedByVmSize>false</CreatedByVmSize>\n   
</disk>\n                        <disk fromDefinition=\"true\" name=\"AB\">\n
<Size>0</Size>\n                            <Mode>Read-Write</Mode>\n
<CreatedByVmSize>false</CreatedByVmSize>\n                        </disk>\n
<disk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_sys-asm_base\">\n
<Size>502</Size>\n                            <Mode>Read-Write</Mode>\n
<CreatedByVmSize>false</CreatedByVmSize>\n                        </disk>\n
<disk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_sys-asm_home\">\n
<Size>10307</Size>\n                            <Mode>Read-Write</Mode>\n
<CreatedByVmSize>false</CreatedByVmSize>\n                        </disk>\n
<disk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_sys-db_base\">\n
<Size>502</Size>\n                            <Mode>Read-Write</Mode>\n
<CreatedByVmSize>false</CreatedByVmSize>\n                        </disk>\n
<disk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_sys-db_home\">\n
<Size>9068</Size>\n                            <Mode>Read-Write</Mode>\n
<CreatedByVmSize>false</CreatedByVmSize>\n                        </disk>\n
</LocalDisks>\n                    <SharedDisks>\n
<SharedDisk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_db_asm_disk_0\"/>\n
<SharedDisk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_db_asm_disk_1\"/>\n
<SharedDisk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_db_asm_disk_2\"/>\n
<SharedDisk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_db_asm_disk_3\"/>\n
<SharedDisk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_db_asm_disk_4\"/>\n
<SharedDisk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_db_asm_disk_5\"/>\n
<SharedDisk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_db_asm_disk_6\"/>\n
<SharedDisk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_db_asm_disk_7\"/>\n
</SharedDisks>\n                    <Nics>\n
<NetworkInterface fromDefinition=\"true\" name=\"eth0\">\n
<IPAssignmentMode>Dhcp</IPAssignmentMode>\n
<QoS>Any_Network_QoS_Type</QoS>\n
<AssemblyNetwork name=\"network-1\"/>\n
</NetworkInterface>\n                    </Nics>\n
<RootPassword>  </RootPassword>\n
<LogLocation>/assemblybuilder/logs</LogLocation>\n
<VmSize>Custom</VmSize>\n
<NetworkConfigurationTimeout>60</NetworkConfigurationTimeout>\n
<ProductConfigurationTimeout>60</ProductConfigurationTimeout>\n
</HardwareConfiguration>\n            </VirtualSystemConfig>\n
</VirtualSystemCollectionConfig>\n
</AssemblyDeployment>\n</ns2:ConfigurationData>\n"
      } ,
      {
        "uri" : "/em/cloud/iaas/servicetemplate/deploymentplan/oracle%3AdefaultService%3Aem%3Aprovisioning%3A1%3Acmp%3AVirtualization%3ADeployment+Plan%3AC7790791F0831736E040578CDA815673%3A0.1" ,
        "name" : "sidb_deployplan" ,
        "media_type" : "application/oracle.com.cloud.iaas.DeploymentPlan+json" ,
        "type" : "Deployment Plan"
      }
  ]
}

The "deploy_plans" attribute contains both the default deployment plan for each zone and the preconfigured deployment plans that are accessible by the user for this service template. To create an assembly instance, the deployment plan should be used.

The configuration specified in the "params" is the primary configuration. In addition, deployment plans can be used to describe detailed product and resource configurations. There are some product configurations where "<Required>true</Required>", and they should also be updated to capture the product configuration values.

The following table shows an example of a POST request to create an assembly instance:

Table 54-22 POST Request Configuration for Creating an Assembly Instance

Feature Description

URL

/em/cloud/iaas/servicetemplate/assembly/oracle%3AdefaultService%3Aem%3Aprovisioning%3A1%3Acmp%3AVirtualization%3AAssembly%3AC75E88B04D7FEDEDE040578CDA810E49%3A0.1

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=Content-Type: application/oracle.com.cloud.common.AssemblyInstance+json

Body

{
  "zone":"/em/cloud/iaas/zone/D73AF0D42C8459E11419862797D1F37D",
  "params":{
    "vnc_password":"welcome1",
    "root_password":"welcome1",
    "assembly_instance_name": "AITEST"
  },
  "deployment_plan":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<ns2:ConfigurationData xmlns:ns2\"http://www.oracle.com/sysman/vt/RequestConfigData\/">\n    
<AssemblyDeployment assemblyInstanceName=\"DEFAULT_PLEASE_CHANGE\">\n        
<SourceBinary type=\"TYPE_SWLIB\" name=\"oracle:defaultService:em:provisioning:1:cmp:Virtualization:Assembly:C75E88B04D7FEDEDE040578CDA810E49:0.1\"/>\n       <DeploymentTarget type=\"oracle_vm_zone\" name=\"D73AF0D42C8459E11419862797D1F37D\"/>\n        
<AcceptedAllEULAs>false</AcceptedAllEULAs>\n        
<InstallEMAgent>false</InstallEMAgent>\n        
<DisableCleanup>false</DisableCleanup>\n        
<EMAgentConfig installUserPassword=\"  \" installUserName=\"oracle\"/>\n        
<AssemblyNetworkConfig>\n            
<AssemblyNetwork name=\"network-1\"/>\n        
</AssemblyNetworkConfig>\n        
<VirtualSystemCollectionConfig id=\"sidbasmA_linuxx64_11203psu1\">\n            
<ProductConfiguration>\n                
<Product>\n                    
<Properties/>\n                    
<EMAgent>false</EMAgent>\n                
</Product>\n            
</ProductConfiguration>\n            
<VirtualSystemConfig agentPushInstallationEnabled=\"true\" agentInstallationType=\"Push Agent Installation\" vmInstance=\"true\" targetName=\"sidbasmA_linuxx64_11203psu1/sidbasm:%assembly_instance_name%\" id=\"sidbasmA_linuxx64_11203psu1/sidbasm\">\n                
<ProductConfiguration>\n                    
<Product>\n                        
<Properties>\n                            
<Property id=\"ocm.runConfiguration\">\n<Name>ocm.runConfiguration</Name>\n<Required>false</Required>\n<Value>false</Value>\n<Secret>false</Secret>\n         </Property>\n                            
<Property id=\"ocm.metalinkCsiRegistration.CSI\">\n<Name>ocm.metalinkCsiRegistration.CSI</Name>\n<Required>false</Required>\n<Value></Value>\n<Secret>false</Secret>\n                            
</Property>\n                            
<Property id=\"ocm.metalinkCsiRegistration.metalinkId\">\n<Name>ocm.metalinkCsiRegistration.metalinkId</Name>\n<Required>false</Required>\n<Value></Value>\n<Secret>false</Secret>\n                            
</Property>\n                            
<Property id=\"ocm.proxyPassword\">\n<Name>ocm.proxyPassword</Name>\n<Required>false</Required>\n<Value>  
</Value>\n<Secret>true</Secret>\n                            
</Property>\n                            
<Property id=\"ocm.metalinkCsiRegistration.countryCode\">\n<Name>ocm.metalinkCsiRegistration.countryCode</Name>\n<Required>false</Required>\n<Value></Value>\n<Secret>false</Secret>\n                            
</Property>\n                            
<Property id=\"system-fileset|db_asm_disk_7|size-units\">\n<Name>system-fileset|db_asm_disk_7|size-units</Name>\n<Required>false</Required>\n<Value>MB</Value>\n<Secret>false</Secret>\n                            
</Property>\n                            
<Property id=\"system-fileset|db_asm_disk_1|size-units\">\n<Name>system-fileset|db_asm_disk_1|size-units</Name>\n<Required>false</Required>\n<Value>MB</Value>\n<Secret>false</Secret>\n                            
</Property>\n                            
<Property id=\"system-fileset|db_asm_disk_3|size-units\">\n<Name>system-fileset|db_asm_disk_3|size-units</Name>\n<Required>false</Required>\n<Value>MB</Value>\n<Secret>false</Secret>\n                            
</Property>\n                            
<Property id=\"system-fileset|db_asm_disk_0|size\">\n<Name>system-fileset|db_asm_disk_0|size</Name>\n<Required>false</Required>\n<Value>2836</Value>\n<Secret>false</Secret>\n                            
</Property>\n                            
<Property id=\"system-fileset|db_asm_disk_1|size\">\n<Name>system-fileset|db_asm_disk_1|size</Name>\n<Required>false</Required>\n<Value>2836</Value>\n<Secret>false</Secret>\n                            
</Property>\n                            
<Property id=\"asm-password\">\n<Name>asm-password</Name>\n<Required>true</Required>\n<Value>welcome1</Value>\n<Secret>true</Secret>\n                        </Property>\n                            
<Property id=\"system-fileset|db_asm_disk_7|size\">\n<Name>system-fileset|db_asm_disk_7|size</Name>\n<Required>false</Required>\n<Value>2836</Value>\n<Secret>false</Secret>\n                            
</Property>\n                            
<Property id=\"ocm.metalinkEmailRegistration.metalinkEmailId\">\n<Name>ocm.metalinkEmailRegistration.metalinkEmailId</Name>\n<Required>false</Required>\n<Value></Value>\n<Secret>false</Secret>\n                            
</Property>\n                            
<Property id=\"input|listener-1|global-db-name\">\n<Name>input|listener-1|global-db-name</Name>\n<Required>false</Required>\n<Value>orcl.us.example.com</Value>\n<Secret>false</Secret>\n  
</Property>\n                            
<Property id=\"system-fileset|db_asm_disk_4|size-units\">\n<Name>system-fileset|db_asm_disk_4|size-units</Name>\n<Required>false</Required>\n<Value>MB</Value>\n<Secret>false</Secret>\n                            
</Property>\n                            
<Property id=\"ocm.proxyHost\">\n<Name>ocm.proxyHost</Name>\n<Required>false</Required>\n<Value></Value>\n<Secret>false</Secret>\n                            </Property>\n                            
<Property id=\"ocm.repeaterURI\">\n<Name>ocm.repeaterURI</Name>\n<Required>false</Required>\n<Value></Value>\n<Secret>false</Secret>\n                        </Property>\n                            
<Property id=\"system-fileset|db_asm_disk_2|size-units\">\n<Name>system-fileset|db_asm_disk_2|size-units</Name>\n<Required>false</Required>\n<Value>MB</Value>\n<Secret>false</Secret>\n                            
</Property>\n                            
<Property id=\"input|listener-1|port\">\n<Name>input|listener-1|port</Name>\n<Required>false</Required>\n<Value>1521</Value>\n<Secret>false</Secret>\n        </Property>\n                            
<Property id=\"ocm.anonymousEmailRegistration.emailId\">\n<Name>ocm.anonymousEmailRegistration.emailId</Name>\n<Required>false</Required>\n<Value></Value>\n<Secret>false</Secret>\n                            
</Property>\n                            
<Property id=\"db-account-password\">\n<Name>db-account-password</Name>\n<Required>true</Required>\n<Value>welcome1</Value>\n<Secret>true</Secret>\n          </Property>\n                            
<Property id=\"system-fileset|db_asm_disk_3|size\">\n<Name>system-fileset|db_asm_disk_3|size</Name>\n<Required>false</Required>\n<Value>2836</Value>\n<Secret>false</Secret>\n                            
</Property>\n                            
<Property id=\"system-fileset|db_asm_disk_2|size\">\n<Name>system-fileset|db_asm_disk_2|size</Name>\n<Required>false</Required>\n<Value>2836</Value>\n<Secret>false</Secret>\n                            
</Property>\n                            
<Property id=\"ocm.proxyPort\">\n<Name>ocm.proxyPort</Name>\n<Required>false</Required>\n<Value></Value>\n<Secret>false</Secret>\n                            </Property>\n                            
<Property id=\"ocm.proxyUsername\">\n<Name>ocm.proxyUsername</Name>\n<Required>false</Required>\n<Value></Value>\n<Secret>false</Secret>\n                    </Property>\n                            
<Property id=\"system-fileset|db_asm_disk_6|size\">\n<Name>system-fileset|db_asm_disk_6|size</Name>\n<Required>false</Required>\n<Value>2836</Value>\n<Secret>false</Secret>\n                            
</Property>\n                           
<Property id=\"system-fileset|db_asm_disk_5|size\">\n<Name>system-fileset|db_asm_disk_5|size</Name>\n<Required>false</Required>\n<Value>2836</Value>\n<Secret>false</Secret>\n                            
</Property>\n                            
<Property id=\"system-fileset|db_asm_disk_4|size\">\n<Name>system-fileset|db_asm_disk_4|size</Name>\n<Required>false</Required>\n<Value>2836</Value>\n<Secret>false</Secret>\n                            
</Property>\n                            
<Property id=\"ocm.metalinkEmailRegistration.metalinkPassword\">\n<Name>ocm.metalinkEmailRegistration.metalinkPassword</Name>\n<Required>false</Required>\n<Value> 
</Value>\n<Secret>true</Secret>\n                            
</Property>\n                            
<Property id=\"system-fileset|db_asm_disk_6|size-units\">\n<Name>system-fileset|db_asm_disk_6|size-units</Name>\n<Required>false</Required>\n<Value>MB</Value>\n<Secret>false</Secret>\n                            
</Property>\n                            
<Property id=\"system-fileset|db_asm_disk_5|size-units\">\n<Name>system-fileset|db_asm_disk_5|size-units</Name>\n<Required>false</Required>\n<Value>MB</Value>\n<Secret>false</Secret>\n                            
</Property>\n                            
<Property id=\"system-fileset|db_asm_disk_0|size-units\">\n<Name>system-fileset|db_asm_disk_0|size-units</Name>\n<Required>false</Required>\n<Value>MB</Value>\n<Secret>false</Secret>\n                            
</Property>\n                        
</Properties>\n                        
<EMAgent>false</EMAgent>\n                    
</Product>\n                
</ProductConfiguration>\n                
<HardwareConfiguration>\n                    
<Memory>2048</Memory>\n                    
<VCPUs>1</VCPUs>\n                    
<HaEnabled>false</HaEnabled>\n                    
<StartAfterCreation>true</StartAfterCreation>\n                    
<CPUSchedulingPriority>50</CPUSchedulingPriority>\n                    
<CPUCap>100</CPUCap>\n                    
<LocalDisks>\n                        
<disk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_System\">\n                            
<Size>5122</Size>\n                            
<Mode>Read-Write</Mode>\n                            
<CreatedByVmSize>false</CreatedByVmSize>\n   
</disk>\n                        
<disk fromDefinition=\"true\" name=\"AB\">\n <Size>0</Size>\n                            
<Mode>Read-Write</Mode>\n <CreatedByVmSize>false</CreatedByVmSize>\n                        
</disk>\n <disk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_sys-asm_base\">\n <Size>502</Size>\n                            
<Mode>Read-Write</Mode>\n <CreatedByVmSize>false</CreatedByVmSize>\n                        
</disk>\n <disk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_sys-asm_home\">\n <Size>10307</Size>\n                            
<Mode>Read-Write</Mode>\n <CreatedByVmSize>false</CreatedByVmSize>\n                        
</disk>\n <disk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_sys-db_base\">\n <Size>502</Size>\n                            
<Mode>Read-Write</Mode>\n <CreatedByVmSize>false</CreatedByVmSize>\n                        
</disk>\n <disk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_sys-db_home\">\n <Size>9068</Size>\n                            
<Mode>Read-Write</Mode>\n <CreatedByVmSize>false</CreatedByVmSize>\n                        
</disk>\n </LocalDisks>\n                    
<SharedDisks>\n                        
<SharedDisk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_db_asm_disk_0\"/>\n                        
<SharedDisk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_db_asm_disk_1\"/>\n                        
<SharedDisk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_db_asm_disk_2\"/>\n                        
<SharedDisk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_db_asm_disk_3\"/>\n                        
<SharedDisk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_db_asm_disk_4\"/>\n                        
<SharedDisk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_db_asm_disk_5\"/>\n                        
<SharedDisk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_db_asm_disk_6\"/>\n                        
<SharedDisk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_db_asm_disk_7\"/>\n                    
</SharedDisks>\n                    
<Nics>\n                        
<NetworkInterface fromDefinition=\"true\" name=\"eth0\">\n                            
<IPAssignmentMode>Dhcp</IPAssignmentMode>\n                            
<QoS>Any_Network_QoS_Type</QoS>\n                            
<AssemblyNetwork name=\"network-1\"/>\n                        
</NetworkInterface>\n                    
</Nics>\n                    
<RootPassword>  
</RootPassword>\n                    
<LogLocation>/assemblybuilder/logs</LogLocation>\n                    
<VmSize>Custom</VmSize>\n                    
<NetworkConfigurationTimeout>60</NetworkConfigurationTimeout>\n                    
<ProductConfigurationTimeout>60</ProductConfigurationTimeout>\n                
</HardwareConfiguration>\n            
</VirtualSystemConfig>\n        
</VirtualSystemCollectionConfig>\n    
</AssemblyDeployment>\n</ns2:ConfigurationData>\n"
}

Request method

POST


A sample of the response received is shown below.

{
  "uri" : "/em/cloud/iaas/assemblyrequest/223" ,
  "name" : "VDOSI Assembly Creation 1345575147280" ,
  "resource_state" :     {
      "state" : "INITIATED" ,
      "messages" : 
      [
          {
            "text" : "The Request with ID '223' is scheduled with Job Id 'C7CB0EBE83C22D70E040578CDA812E66'" ,
            "date" : "2012-08-21T18:52:31+0000"
          }
      ]
    } ,
  "context_id" : "223" ,
  "media_type" : "application/oracle.com.cloud.common.AssemblyInstance+json" ,
  "service_family_type" : "iaas" ,
  "status" : "SCHEDULED" ,
  "created" : "2012-08-21T18:52:28+0000"
}

To track the status of the Assembly Instance creation issue a GET request on the returned URI. See the table below for details.

Table 54-23 GET Request Configuration for Viewing Details of the Assembly Instance Creation Status

Feature Description

URL

/em/cloud/iaas/assemblyrequest/223

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Body

None

Request method

GET

Supported since release

12.1.0.4 Cloud Service Portal plug-in


A sample of the response received is shown below.

{
  "uri" : "/em/cloud/iaas/assemblyrequest/223" ,
  "name" : "VDOSI Assembly Creation 1345575147280" ,
  "resource_state" :     {
      "state" : "CREATING" ,
      "messages" : 
      [
          {
            "text" : "The Request with ID '223' is being processed, and has Job Id 'C7CB0EBE83C22D70E040578CDA812E66'" ,
            "date" : "2012-08-21T18:54:25+0000"
          }
      ]
    } ,
  "context_id" : "223" ,
  "media_type" : "application/oracle.com.cloud.common.AssemblyInstance+json" ,
  "service_family_type" : "iaas" ,
  "status" : "EXECUTING" ,
  "created" : "2012-08-21T18:52:28+0000"
}

The status indicates that the process is being executed. After the assembly instance is created successfully, the response received is similar to what is shown below.

{
  "uri" : "/em/cloud/iaas/assembly/C0AACCD8234BBAFBA7AF6CD3865B1FD3" ,
  "name" : "AITEST" ,
  "resource_state" :     {
      "state" : "READY"
    } ,
  "context_id" : "223" ,
  "media_type" : "application/oracle.com.cloud.common.AssemblyInstance+json" ,
  "service_family_type" : "iaas" ,
  "based_on" : "/em/cloud/iaas/servicetemplate/assembly/oracle%3AdefaultService%3Aem%3Aprovisioning%3A1%3Acmp%3AVirtualization%3AAssembly%3AC75E88B04D7FEDEDE040578CDA810E49%3A0.1" ,
  "reference" :     {
      "ovf:id" : "sidbasmA_linuxx64_11203psu1"
    } ,
  "scalability_groups" :     {
      "media_type" : "application/oracle.com.cloud.common.ScalabilityGroup+json" ,
      "total" : "0" ,
      "elements" : 
      [      ]
    } ,
  "servers" :     {
      "media_type" : "application/oracle.com.cloud.common.VM+json" ,
      "total" : "1" ,
      "elements" : 
      [
          {
            "uri" : "/em/cloud/iaas/server/vm/B28680F24303A42D6909FFC0F79F306C" ,
            "name" : "sidbasmA_linuxx64_11203psu1/sidbasm:DEPPLAN_1345575147280" ,
            "media_type" : "application/oracle.com.cloud.common.VM+json" ,
            "status" : "STARTED"
          }
      ]
    } ,
  "deployment_plan" : "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<ns2:ConfigurationData xmlns:ns2=\"http://www.oracle.com/sysman/vt/RequestConfigData\/">\n    <AssemblyDeployment assemblyInstanceName=\"AITEST\">\n        <SourceBinary type=\"TYPE_SWLIB\" name=\"oracle:defaultService:em:provisioning:1:cmp:Virtualization:Assembly:C75E88B04D7FEDEDE040578CDA810E49:0.1\"/>\n        <DeploymentTarget type=\"oracle_vm_zone\" name=\"D73AF0D42C8459E11419862797D1F37D\"/>\n        <AcceptedAllEULAs>false</AcceptedAllEULAs>\n        <InstallEMAgent>false</InstallEMAgent>\n        <DisableCleanup>false</DisableCleanup>\n        <EMAgentConfig installUserPassword=\"  \" installUserName=\"oracle\"/>\n        <AssemblyNetworkConfig>\n            <AssemblyNetwork name=\"network-1\"/>\n        </AssemblyNetworkConfig>\n        <VirtualSystemCollectionConfig id=\"sidbasmA_linuxx64_11203psu1\">\n            <ProductConfiguration>\n                <Product>\n                    <Properties/>\n                    <EMAgent>false</EMAgent>\n                </Product>\n            </ProductConfiguration>\n            <VirtualSystemConfig agentPushInstallationEnabled=\"true\" agentInstallationType=\"Push Agent Installation\" vmInstance=\"true\" targetName=\"sidbasmA_linuxx64_11203psu1/sidbasm:%assembly_instance_name%\" id=\"sidbasmA_linuxx64_11203psu1/sidbasm\">\n                <ProductConfiguration>\n                    <Product>\n                        <Properties>\n                            <Property id=\"ocm.runConfiguration\">\n<Name>ocm.runConfiguration</Name>\n<Required>false</Required>\n<Value>false</Value>\n<Secret>false</Secret>\n                            </Property>\n                            <Property id=\"ocm.metalinkCsiRegistration.CSI\">\n<Name>ocm.metalinkCsiRegistration.CSI</Name>\n<Required>false</Required>\n<Value></Value>\n<Secret>false</Secret>\n                            </Property>\n                            <Property id=\"ocm.metalinkCsiRegistration.metalinkId\">\n<Name>ocm.metalinkCsiRegistration.metalinkId</Name>\n<Required>false</Required>\n<Value></Value>\n<Secret>false</Secret>\n                            </Property>\n                            <Property id=\"ocm.proxyPassword\">\n<Name>ocm.proxyPassword</Name>\n<Required>false</Required>\n<Value>  </Value>\n<Secret>true</Secret>\n                            </Property>\n                            <Property id=\"ocm.metalinkCsiRegistration.countryCode\">\n<Name>ocm.metalinkCsiRegistration.countryCode</Name>\n<Required>false</Required>\n<Value></Value>\n<Secret>false</Secret>\n                            </Property>\n                            <Property id=\"system-fileset|db_asm_disk_7|size-units\">\n<Name>system-fileset|db_asm_disk_7|size-units</Name>\n<Required>false</Required>\n<Value>MB</Value>\n<Secret>false</Secret>\n                            </Property>\n                            <Property id=\"system-fileset|db_asm_disk_1|size-units\">\n<Name>system-fileset|db_asm_disk_1|size-units</Name>\n<Required>false</Required>\n<Value>MB</Value>\n<Secret>false</Secret>\n                            </Property>\n                            <Property id=\"system-fileset|db_asm_disk_3|size-units\">\n<Name>system-fileset|db_asm_disk_3|size-units</Name>\n<Required>false</Required>\n<Value>MB</Value>\n<Secret>false</Secret>\n                            </Property>\n                            <Property id=\"system-fileset|db_asm_disk_0|size\">\n<Name>system-fileset|db_asm_disk_0|size</Name>\n<Required>false</Required>\n<Value>2836</Value>\n<Secret>false</Secret>\n                            </Property>\n                            <Property id=\"system-fileset|db_asm_disk_1|size\">\n<Name>system-fileset|db_asm_disk_1|size</Name>\n<Required>false</Required>\n<Value>2836</Value>\n<Secret>false</Secret>\n                            </Property>\n                            <Property id=\"asm-password\">\n<Name>asm-password</Name>\n<Required>true</Required>\n<Value>  </Value>\n<ValueGuid>C7CC61AC07DC6E58E040578CDA8145F9</ValueGuid>\n<Secret>true</Secret>\n                            </Property>\n                            <Property id=\"system-fileset|db_asm_disk_7|size\">\n<Name>system-fileset|db_asm_disk_7|size</Name>\n<Required>false</Required>\n<Value>2836</Value>\n<Secret>false</Secret>\n                            </Property>\n                            <Property id=\"ocm.metalinkEmailRegistration.metalinkEmailId\">\n<Name>ocm.metalinkEmailRegistration.metalinkEmailId</Name>\n<Required>false</Required>\n<Value></Value>\n<Secret>false</Secret>\n                            </Property>\n                            <Property id=\"input|listener-1|global-db-name\">\n<Name>input|listener-1|global-db-name</Name>\n<Required>false</Required>\n<Value>orcl.us.example.com</Value>\n<Secret>false</Secret>\n                            </Property>\n                            <Property id=\"system-fileset|db_asm_disk_4|size-units\">\n<Name>system-fileset|db_asm_disk_4|size-units</Name>\n<Required>false</Required>\n<Value>MB</Value>\n<Secret>false</Secret>\n                            </Property>\n                            <Property id=\"ocm.proxyHost\">\n<Name>ocm.proxyHost</Name>\n<Required>false</Required>\n<Value></Value>\n<Secret>false</Secret>\n                            </Property>\n                            <Property id=\"ocm.repeaterURI\">\n<Name>ocm.repeaterURI</Name>\n<Required>false</Required>\n<Value></Value>\n<Secret>false</Secret>\n                            </Property>\n                            <Property id=\"system-fileset|db_asm_disk_2|size-units\">\n<Name>system-fileset|db_asm_disk_2|size-units</Name>\n<Required>false</Required>\n<Value>MB</Value>\n<Secret>false</Secret>\n                            </Property>\n                            <Property id=\"input|listener-1|port\">\n<Name>input|listener-1|port</Name>\n<Required>false</Required>\n<Value>1521</Value>\n<Secret>false</Secret>\n                            </Property>\n                            <Property id=\"ocm.anonymousEmailRegistration.emailId\">\n<Name>ocm.anonymousEmailRegistration.emailId</Name>\n<Required>false</Required>\n<Value></Value>\n<Secret>false</Secret>\n                            </Property>\n                            <Property id=\"db-account-password\">\n<Name>db-account-password</Name>\n<Required>true</Required>\n<Value>  </Value>\n<ValueGuid>C7CC61AC07DF6E58E040578CDA8145F9</ValueGuid>\n<Secret>true</Secret>\n                            </Property>\n                            <Property id=\"system-fileset|db_asm_disk_3|size\">\n<Name>system-fileset|db_asm_disk_3|size</Name>\n<Required>false</Required>\n<Value>2836</Value>\n<Secret>false</Secret>\n                            </Property>\n                            <Property id=\"system-fileset|db_asm_disk_2|size\">\n<Name>system-fileset|db_asm_disk_2|size</Name>\n<Required>false</Required>\n<Value>2836</Value>\n<Secret>false</Secret>\n                            </Property>\n                            <Property id=\"ocm.proxyPort\">\n<Name>ocm.proxyPort</Name>\n<Required>false</Required>\n<Value></Value>\n<Secret>false</Secret>\n                            </Property>\n                            <Property id=\"ocm.proxyUsername\">\n<Name>ocm.proxyUsername</Name>\n<Required>false</Required>\n<Value></Value>\n<Secret>false</Secret>\n                            </Property>\n                            <Property id=\"system-fileset|db_asm_disk_6|size\">\n<Name>system-fileset|db_asm_disk_6|size</Name>\n<Required>false</Required>\n<Value>2836</Value>\n<Secret>false</Secret>\n                            </Property>\n                            <Property id=\"system-fileset|db_asm_disk_5|size\">\n<Name>system-fileset|db_asm_disk_5|size</Name>\n<Required>false</Required>\n<Value>2836</Value>\n<Secret>false</Secret>\n                            </Property>\n                            <Property id=\"system-fileset|db_asm_disk_4|size\">\n<Name>system-fileset|db_asm_disk_4|size</Name>\n<Required>false</Required>\n<Value>2836</Value>\n<Secret>false</Secret>\n                            </Property>\n                            <Property id=\"ocm.metalinkEmailRegistration.metalinkPassword\">\n<Name>ocm.metalinkEmailRegistration.metalinkPassword</Name>\n<Required>false</Required>\n<Value> </Value>\n<Secret>true</Secret>\n                            </Property>\n                            <Property id=\"system-fileset|db_asm_disk_6|size-units\">\n<Name>system-fileset|db_asm_disk_6|size-units</Name>\n<Required>false</Required>\n<Value>MB</Value>\n<Secret>false</Secret>\n                            </Property>\n                            <Property id=\"system-fileset|db_asm_disk_5|size-units\">\n<Name>system-fileset|db_asm_disk_5|size-units</Name>\n<Required>false</Required>\n<Value>MB</Value>\n<Secret>false</Secret>\n                            </Property>\n                            <Property id=\"system-fileset|db_asm_disk_0|size-units\">\n<Name>system-fileset|db_asm_disk_0|size-units</Name>\n<Required>false</Required>\n<Value>MB</Value>\n<Secret>false</Secret>\n                            </Property>\n                        </Properties>\n                        <EMAgent>false</EMAgent>\n                    </Product>\n                </ProductConfiguration>\n                <HardwareConfiguration>\n                    <Memory>2048</Memory>\n                    <VCPUs>1</VCPUs>\n                    <HaEnabled>false</HaEnabled>\n                    <StartAfterCreation>true</StartAfterCreation>\n                    <CPUSchedulingPriority>50</CPUSchedulingPriority>\n                    <CPUCap>100</CPUCap>\n                    <LocalDisks>\n                        <disk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_System\">\n                            <Size>5122</Size>\n      
                      <Mode>Read-Write</Mode>\n                            <CreatedByVmSize>false</CreatedByVmSize>\n                        </disk>\n                        <disk fromDefinition=\"true\" name=\"AB\">\n                            <Size>0</Size>\n                            <Mode>Read-Write</Mode>\n                            <CreatedByVmSize>false</CreatedByVmSize>\n                        </disk>\n                        <disk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_sys-asm_base\">\n                            <Size>502</Size>\n                            <Mode>Read-Write</Mode>\n                            <CreatedByVmSize>false</CreatedByVmSize>\n                        </disk>\n                        <disk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_sys-asm_home\">\n                            <Size>10307</Size>\n                            <Mode>Read-Write</Mode>\n                            <CreatedByVmSize>false</CreatedByVmSize>\n                        </disk>\n                        <disk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_sys-db_base\">\n                            <Size>502</Size>\n                            <Mode>Read-Write</Mode>\n                            <CreatedByVmSize>false</CreatedByVmSize>\n                        </disk>\n                        <disk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_sys-db_home\">\n                            <Size>9068</Size>\n                            <Mode>Read-Write</Mode>\n                            <CreatedByVmSize>false</CreatedByVmSize>\n                        </disk>\n                    </LocalDisks>\n                    <SharedDisks>\n                        <SharedDisk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_db_asm_disk_0\"/>\n                        <SharedDisk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_db_asm_disk_1\"/>\n                        <SharedDisk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_db_asm_disk_2\"/>\n                        <SharedDisk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_db_asm_disk_3\"/>\n                        <SharedDisk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_db_asm_disk_4\"/>\n                        <SharedDisk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_db_asm_disk_5\"/>\n                        <SharedDisk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_db_asm_disk_6\"/>\n                        <SharedDisk fromDefinition=\"true\" name=\"2xZNMmSH5oZYW_db_asm_disk_7\"/>\n                    </SharedDisks>\n                    <Nics>\n                        <NetworkInterface fromDefinition=\"true\" name=\"eth0\">\n                            <IPAssignmentMode>Dhcp</IPAssignmentMode>\n                            <QoS>Any_Network_QoS_Type</QoS>\n                            <AssemblyNetwork name=\"network-1\"/>\n                        </NetworkInterface>\n                    </Nics>\n                    <RootPassword>  </RootPassword>\n                    <RootPasswordGuid>C7CC61AC07D96E58E040578CDA8145F9</RootPasswordGuid>\n                    <LogLocation>/assemblybuilder/logs</LogLocation>\n                    <VmSize>Custom</VmSize>\n                    <NetworkConfigurationTimeout>60</NetworkConfigurationTimeout>\n                    <ProductConfigurationTimeout>60</ProductConfigurationTimeout>\n                </HardwareConfiguration>\n            </VirtualSystemConfig>\n        </VirtualSystemCollectionConfig>\n    </AssemblyDeployment>\n</ns2:ConfigurationData>\n"
}

54.3.2 Updating a VM Service Instance

A service instance may be resized, its status updated, or additional resources added.

The VM resource supports the following changes:

  • The "status" can be updated (for example, from STARTED to STOPPED or from STOPPED to STARTED). See, Section 54.3.2.1, "Changing the VM Status".

  • The "cpu" and "memory" can be updated (for example to resize the VM). See, Section 54.3.2.2, "Changing the VM Size".

    Note:

    For the 12.1.0.4 Cloud Self Service Portal release, VM is no longer required to be STOPPED before modifying the "cpu" and "memory".
  • Additional resources, for example a VM disk can be added. See, Section 54.3.2.3, "Adding a VM Disk".

  • Any updates supported on the VM resource from 10000 version are also supported on the 10001 version of the resource.

54.3.2.1 Changing the VM Status

The following shows the GET of the VM's status:

Table 54-24 GET Request Configuration for Viewing the Current Status of the VM

Feature Description

URI

/em/cloud/iaas/server/byrequest/101?status,uri

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Body

None

Request method

GET

Supported since release

12.1.0.1 Cloud Service Portal plug-in


A sample of the response received is shown below.

{
  "uri" : "/em/cloud/iaas/server/vm/C5CA59AF9386975E8AEA45B0F040F095" ,
  "status" : "STARTED"
}

To update the status, use the PUT method to the resource "uri". Note that the "uri" attribute is the one that directly references to the resource.

Table 54-25 PUT Request Configuration for Stopping the VM

Feature Description

URI

/em/cloud/iaas/server/vm/C5CA59AF9386975E8AEA45B0F040F095

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=Content-Type: application/oracle.com.cloud.common.VM+json

Body

{
  "status" : "STOPPED"
}

Request method

PUT

Supported since release

12.1.0.1 Cloud Service Portal plug-in


The Web service response displays the 200 response code, along with the current VM attributes.

To confirm the status of the VM issue the following GET request on the VM:

Table 54-26 GET Request Configuration for Confirming the Status Change of the VM

Feature Description

URI

/em/cloud/iaas/server/byrequest/101?status,uri

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Body

None

Request method

GET

Supported since release

12.1.0.1 Cloud Service Portal plug-in


The Web service returns the following:

{
  "uri" : "/em/cloud/iaas/server/vm/C5CA59AF9386975E8AEA45B0F040F095" ,
  "status" : "STOPPED"
}

Attempting to submit a PUT transient status value would result in the following:

Table 54-27 PUT Request Configuration for Attempting a Transient Status Value

Feature Description

URI

/em/cloud/iaas/server/vm/C5CA59AF9386975E8AEA45B0F040F095

Request header

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=Content-Type: application/oracle.com.cloud.common.VM+json

Body

{
  "status" : "STOPPING"
}

Request method

PUT

Supported since release

12.1.0.1 Cloud Service Portal plug-in


The following shows the Web service response:

{
  "messages" : 
  [
      {
        "date" : "2012-08-19T17:22:04+0000" ,
        "stack_trace" : "oracle.sysman.emInternalSDK.ssa.cloudapi.rest.RestServletException: Status 'STOPPING' specified by the PUT request is transient, and is not a valid status\n\tat oracle.sysman.ssa.cloudapi.iaas.VM.processVMStatusChange(VM.java:331)\n\tat oracle.sysman.ssa.cloudapi.iaas.VM.processVMChanges(VM.java:253)\n\tat oracle.sysman.ssa.cloudapi.iaas.VM.processRequest(VM.java:227)\n\tat oracle.sysman.ssa.cloudapi.iaas.IaasServiceProvider.processRequest(IaasServiceProvider.java:582)\n\tat oracle.sysman.emInternalSDK.ssa.cloudapi.EMCloudServlet.perform(EMCloudServlet.java:236)\n\tat oracle.sysman.emInternalSDK.ssa.cloudapi.EMCloudServlet.performPut(EMCloudServlet.java:351)\n\tat oracle.sysman.emInternalSDK.ssa.cloudapi.rest.AbstractRestServlet.doPut(AbstractRestServlet.java:163)\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:730)\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:820)\n\tat weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)\n\tat we" ,
        "hint" : "Status 'STOPPING' specified by the PUT request is transient, and is not a valid status" ,
        "text" : "Did not successfully execute 'PUT' resource operation on 'application/oracle.com.cloud.common.Cloud' identified by '/em/cloud/iaas/server/vm/C5CA59AF9386975E8AEA45B0F040F095'"
      }
  ]
}

Attempting to submit the existing status to the VM will result in the following interaction:

Table 54-28 PUT Request Configuration for Changing the VM Status to the Current Status

Feature Description

URI

/em/cloud/iaas/server/vm/C5CA59AF9386975E8AEA45B0F040F095?resource_state

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=Content-Type: application/oracle.com.cloud.common.VM+json

Body

{
  "status" : "STOPPED"
}

Request method

PUT

Supported since release

12.1.0.1 Cloud Service Portal plug-in


The web service responds with the following:

{
  "resource_state" :     {
      "state" : "READY" ,
      "messages" : 
      [
          {
            "date" : "2012-08-19T17:23:49+0000" ,
            "text" : "Current Virtual Machine Status 'STOPPED' is the same as the requested status. Status change is not needed"
          }
      ]
    }
}

When modifying a service instance, the messages communicated will be encapsulated in the resource_state attribute. For example, to START the VM again, the following PUT request can be issued:

Table 54-29 PUT Request Configuration for Starting the VM

Feature Description

URL

https://example.com/em/cloud/iaas/server/vm/C5CA59AF9386975E8AEA45B0F040F095?resource_state

Headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=Content-Type: application/oracle.com.cloud.common.VM+json

Body

{
  "status" : "STARTED"
}

Method

PUT

Supported since release

12.1.0.1 Cloud Service Portal plug-in


The web service will respond with the following:

{
  "resource_state" :     {
      "state" : "READY" ,
      "messages" : 
      [
          {
            "date" : "2012-08-19T17:25:29+0000" ,
            "text" : "'START' resource operation on 'application/oracle.com.cloud.common.VM' identified by 'C5CA59AF9386975E8AEA45B0F040F095' is successfully submitted with reference 'C7A2713B9A4D29C1E040578CDA817561'"
          }
      ]
    }
}

54.3.2.2 Changing the VM Size

The CPU and Memory of a VM can be adjusted to increase or decrease the capacity. For example, to adjust the VM's CPU to 1 vCPU and increase the memory from 512 to 1024, the following PUT request can be issued:

Table 54-30 PUT Request Configuration for Changing the Size of the VM

Feature Description

URI

/em/cloud/iaas/server/vm/C5CA59AF9386975E8AEA45B0F040F095?resource_state

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=Content-Type: application/oracle.com.cloud.common.VM+json

Body

{
  "cpu":[1,0],  "memory":"1024" 
}

Request method

PUT

Supported since release

12.1.0.1 Cloud Service Portal plug-in


A sample of the response received is shown below.

{
  "resource_state" :     {
      "state" : "READY" ,
      "messages" : 
      [
          {
            "text" : "'PUT' resource operation on 'application/oracle.com.cloud.common.VM' identified by 'C5CA59AF9386975E8AEA45B0F040F095' is successfully submitted with reference '106'" ,
            "date" : "2012-08-20T01:15:28+0000"
          }
      ]
    }
}

After some time, the new capacity is reflected in the VM resource through the GET request:

Table 54-31 GET Request Configuration for Viewing the Current Size of the VM

Feature Description

URI

/em/cloud/iaas/server/vm/C5CA59AF9386975E8AEA45B0F040F095?resource_state,cpu,memory,status

Request header

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Body

None

Request method

GET


A sample of the response received is shown below.

{
  "resource_state" :     {
      "state" : "READY"
    } ,
  "status" : "STARTED" ,
  "cpu" : 
  [
    "1" ,
    "0"
  ] ,
  "memory" : "1024"
}

54.3.2.3 Adding a VM Disk

An additional disk may be added to the VM resource. For example, to add two additional disks, the following PUT request can be issued:

Table 54-32 PUT Request Configuration for Adding a VM Disk

Feature Description

URI

/em/cloud/iaas/server/vm/C5CA59AF9386975E8AEA45B0F040F095?resource_state

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=Content-Type: application/oracle.com.cloud.common.VM+json

Body

{
"disks": [
  ["additional_1", "5120"],
  ["additional_2", "10240"]
]
}

Parameters/Constraints

If an entry in the "disks" attribute is new, then a new disk would be added. If an entry in the "disks" attribute exists already, then, it would be ignored.

Request method

PUT

Supported since release

12.1.0.5 Cloud Service Portal plug-in


A sample of the response received is shown below.

  "resource_state" :     {
      "state" : "READY" ,
      "messages" : 
      [
          {
            "text" : "'PUT' resource operation on 'application/oracle.com.cloud.common.VM' identified by ' C5CA59AF9386975E8AEA45B0F040F095' is successfully submitted with reference '2'" ,
            "date" : "2013-02-26T19:53:15+0000"
          }
      ]
    }
}

After some time, the new disks are reflected in the VM resource using the GET request.

Table 54-33 GET Request Configuration for Verifying Addition of New Disks in the VM Resource

Feature Description

URI

/em/cloud/iaas/server/vm/C5CA59AF9386975E8AEA45B0F040F095?resource_state,disks

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Body

None

Request method

GET


A sample of the Web service response is shown below.

{
  "resource_state" :     {
      "state" : "READY"
    } ,
  "disks" : 
  [
    [
      "system.img (2)" ,
      "1400"
    ] ,
    [
      "default_disk" ,
      "10240"
    ] ,
    [
      "additional_1" ,
      "5120"
    ] ,
    [
      "additional_2" ,
      "10240"
    ]
  ]
}

54.3.3 Deleting a Service Instance

The DELETE request on the URI of the resource can be issued to delete a Service Instance. For example, the following DELETE request is issued:

Table 54-34 Delete Request Configuration for Deleting a Service Instance

Feature Description

URI

/em/cloud/iaas/server/vm/C5CA59AF9386975E8AEA45B0F040F095

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Body

None

Request method

DELETE

Supported since release

12.1.0.1 Cloud Service Portal plug-in


A sample of the response received is shown below.

{
  "uri" : "/em/cloud/iaas/server/vm/C5CA59AF9386975E8AEA45B0F040F095" ,
  "resource_state" :     {
      "state" : "READY" ,
      "messages" : 
      [
          {
            "text" : "'DELETE' resource operation on 'application/oracle.com.cloud.common.VM' identified by 'C5CA59AF9386975E8AEA45B0F040F095' is successfully submitted with reference 'C7A83335CB63DA7BE040578CDA814DDC'" ,
            "date" : "2012-08-20T01:24:38+0000"
          }
      ]
    } ,
  "context_id" : "C5CA59AF9386975E8AEA45B0F040F095" ,
  "media_type" : "application/oracle.com.cloud.common.VM+json" ,
  "service_family_type" : "iaas"
}

After some time, the GET request on the VM URI will result in the following interaction:

Table 54-35 GET Request Configuration for Verifying the Status of the VM

Feature Description

URI

/em/cloud/iaas/server/vm/C5CA59AF9386975E8AEA45B0F040F095

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Body

None

Request method

GET


A sample of the web service returned response is shown below.

{
  "uri" : "/em/cloud/iaas/server/vm/C5CA59AF9386975E8AEA45B0F040F095" ,
  "resource_state" :     {
      "state" : "READY"
    } ,
  "context_id" : "C5CA59AF9386975E8AEA45B0F040F095" ,
  "media_type" : "application/oracle.com.cloud.common.VM+json" ,
  "service_family_type" : "iaas" ,
  "status" : "DELETED"
}

Note the "status" of the VM has the "DELETED" value.

54.3.4 Listing Service Instances

There are various references to service instances in the resource model, and they are all in context of the resource themselves. For example, "service_instances" in the Zone resource would list the elements that are in that Zone, while "service_instances" in the ServiceTemplate resource would list the elements that are based on that service template.

For example, the following list the service instances in a zone.

Table 54-36 GET Request Configuration for Viewing Service Instances in a Zone

Feature Description

URI

/em/cloud/iaas/zone/D73AF0D42C8459E11419862797D1F37D?service_instances

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Request method

GET

Supported since release

12.1.0.4 Cloud Service Portal plug-in


The following response is received:

{
  "service_instances" :     {
      "media_type" : "application/oracle.com.cloud.common.ServiceInstance+json" ,
      "total" : "2" ,
      "elements" : 
      [
          {
            "uri" : "/em/cloud/iaas/server/vm/523CAE80A305928C9C5BE8A67A4181FD" ,
            "name" : "ZONEPOST" ,
            "media_type" : "application/oracle.com.cloud.common.VM+json" ,
            "status" : "STARTED"
          } ,
          {
            "uri" : "/em/cloud/iaas/server/vm/C5CA59AF9386975E8AEA45B0F040F095" ,
            "name" : "STPOST" ,
            "media_type" : "application/oracle.com.cloud.common.VM+json" ,
            "status" : "STARTED"
          }
      ]
    }
}

Similarly, you can list the service instances from the service templates:

Table 54-37 GET Request Configuration for Viewing Service Instances Under a Service Template

Feature Description

URL

/em/cloud/iaas/servicetemplate/vm/oracle%3AdefaultService%3Aem%3Aprovisioning%3A1%3Acmp%3AVirtualization%3ATemplate%3AC76CEB5563EA5E13E040578CDA817FAF%3A0.1?service_instances

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Body

None

Request method

GET

Supported since release

12.1.0.4 Cloud Service Portal plug-in


A sample of the response received is shown below.

{
  "service_instances" :     {
      "media_type" : "application/oracle.com.cloud.common.ServiceInstance+json" ,
      "total" : "2" ,
      "elements" : 
      [
          {
            "uri" : "/em/cloud/iaas/server/vm/C5CA59AF9386975E8AEA45B0F040F095" ,
            "name" : "STPOST" ,
            "media_type" : "application/oracle.com.cloud.common.VM+json" ,
            "status" : "STARTED"
          } ,
          {
            "uri" : "/em/cloud/iaas/server/vm/523CAE80A305928C9C5BE8A67A4181FD" ,
            "name" : "ZONEPOST" ,
            "media_type" : "application/oracle.com.cloud.common.VM+json" ,
            "status" : "STARTED"
          }
      ]
    }
}

54.3.5 Searching Service Templates

Searching for a service template through cloud can be performed by constructing ServiceTemplateFinds resource. ServiceTemplateFinds is synonymous to a "report" that contains elements satisfying the condition specified.

For example, the following will return service template with the name OEL in it

Table 54-38 POST Request Configuration for Filtering Service Templates

Feature Description

URI

/em/cloud

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=Content-Type: application/oracle.com.cloud.common.ServiceTemplateFinds+jsonAccept : application/oracle.com.cloud.common.ServiceTemplateFinds+json

Body

{
  "filters":{
    "name":"OEL"
  }
}

Request method

POST

Supported since release

12.1.0.5 Cloud Service Portal plug-in


A sample of the response received is shown below.

{
  "uri" : "/em/cloud/finds/service_template/bWVkaWFfdHlwZSUyNTNEYXBwbGljYXRpb24lMjUyRm9yYWNsZS5jb20uY2xvdWQuY29tbW9uLlNl%0AcnZpY2VUZW1wbGF0ZSUyRm5hbWUlMjUzRE9FTA%3D%3D" ,
  "name" : "Service Template Finds" ,
  "media_type" : "application/oracle.com.cloud.common.ServiceTemplateFinds+json" ,
  "description" : "This is a Resource Finds for 'Service Template Finds' with media type 'application/oracle.com.cloud.common.ServiceTemplateFinds+json'" ,
  "resource_state" :     {
      "state" : "READY"
    } ,
  "filters" :     {
      "media_type" : "application/oracle.com.cloud.common.ServiceTemplate" ,
      "name" : "OEL"
    } ,
  "finds" :     {
      "media_type" : "application/oracle.com.cloud.common.ServiceTemplate" ,
      "total" : "1" ,
      "elements" : 
      [
          {
            "uri" : "/em/cloud/iaas/servicetemplate/vm/oracle%3AdefaultService%3Aem%3Aprovisioning%3A1%3Acmp%3AVirtualization%3ATemplate%3AD6A66B2DCAEAE177E040F20AB0527449%3A0.1" ,
            "name" : "OEL4.0 For Testing" ,
            "media_type" : "application/oracle.com.cloud.common.VMTemplate+json" ,
            "type" : "Template"
          }
      ]
    }
}

Currently, the following attributes are supported by the "filters":

Table 54-39 Filters

Attributes Description Since

media_type

The specific service template media to search for. This would be an exact match of the media type.

12.1.0.5 Cloud Service Portal Plugin (IaaS service family type only)

name

A service template would be returned if the name contains the specified string, case insensitive (so, OEL and oel in the example above would return the same result).

12.1.0.5 Cloud Service Portal Plugin (IaaS service family type only)


If an attribute specified is not recognized by the system, it will be ignored. For example, the following will return service templates containing the name DUMMY:

Table 54-40 POST Request Configuration for an Unrecognized Attribute

Feature Description

URI

/em/cloud

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=Content-Type: application/oracle.com.cloud.common.ServiceTemplateFinds+jsonAccept : application/oracle.com.cloud.common.ServiceTemplateFinds+json

Body

{
  "filters":{
    "name":"DUMMY"
  }
}

Request method

POST

Supported since release

12.1.0.5 Cloud Service Portal plug-in


The response received is shown below.

{
  "uri" : "/em/cloud/finds/service_template/bWVkaWFfdHlwZSUyNTNEYXBwbGljYXRpb24lMjUyRm9yYWNsZS5jb20uY2xvdWQuY29tbW9uLlNl%0AcnZpY2VUZW1wbGF0ZSUyRm5hbWUlMjUzRERVTU1Z" ,
  "name" : "Service Template Finds" ,
  "media_type" : "application/oracle.com.cloud.common.ServiceTemplateFinds+json" ,
  "description" : "This is a Resource Finds for 'Service Template Finds' with media type 'application/oracle.com.cloud.common.ServiceTemplateFinds+json'" ,
  "resource_state" :     {
      "state" : "READY"
    } ,
  "filters" :     {
      "media_type" : "application/oracle.com.cloud.common.ServiceTemplate" ,
      "name" : "DUMMY"
    } ,
  "finds" :     {
      "media_type" : "application/oracle.com.cloud.common.ServiceTemplate" ,
      "total" : "0" ,
      "elements" : 
      [      ]
    }
}

Since there were no service templates with "DUMMY" as part of its name, no service templates are returned.

Please note, once the resource ServiceTemplateFinds is created, its URI can be used for performing the same query by issuing a GET request. If new templates were added that also satisfy the conditions, it would be returned as well.

For example, let's use the DUMMY example's URI, and this time, a service template with "DUMMY" in its name was created.

Table 54-41 GET Request Configuration for FIltering Service Templates Using the URI of a Preset POST Filter

Feature Description

URI

/em/cloud/finds/service_template/bWVkaWFfdHlwZSUyNTNEYXBwbGljYXRpb24lMjUyRm9yYWNsZS5jb20uY2xvdWQuY29tbW9uLlNl%0AcnZpY2VUZW1wbGF0ZSUyRm5hbWUlMjUzRERVTU1Z

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Body

None

Request method

GET

Supported since release

12.1.0.5 Cloud Service Portal plug-in


Shown below is the response of the GET request after the service template was created and published by the administrator:

{
  "uri" : "/em/cloud/finds/service_template/bWVkaWFfdHlwZSUyNTNEYXBwbGljYXRpb24lMjUyRm9yYWNsZS5jb20uY2xvdWQuY29tbW9uLlNl%0AcnZpY2VUZW1wbGF0ZSUyRm5hbWUlMjUzRERVTU1Z" ,
  "name" : "Service Template Finds" ,
  "media_type" : "application/oracle.com.cloud.common.ServiceTemplateFinds+json" ,
  "description" : "This is a Resource Finds for 'Service Template Finds' with media type 'application/oracle.com.cloud.common.ServiceTemplateFinds+json'" ,
  "resource_state" :     {
      "state" : "READY"
    } ,
  "filters" :     {
      "media_type" : "application/oracle.com.cloud.common.ServiceTemplate" ,
      "name" : "DUMMY"
    } ,
  "finds" :     {
      "media_type" : "application/oracle.com.cloud.common.ServiceTemplate" ,
      "total" : "1" ,
      "elements" : 
      [
          {
            "uri" : "/em/cloud/iaas/servicetemplate/assembly/oracle%3AdefaultService%3Aem%3Aprovisioning%3A1%3Acmp%3AVirtualization%3AAssembly%3AD6A7D3D84B605D11E040F20AB0524E1C%3A0.1" ,
            "name" : "Dummy OEL Assembly" ,
            "media_type" : "application/oracle.com.cloud.common.AssemblyTemplate+json" ,
            "type" : "Assembly"
          }
      ]
    }
}

54.4 Support for Version 1000

As the document previous noted, this 12.1.0.4 Cloud Service Portal Plugin supports the specification version 10000. To start, issue the following HTTP request on the Enterprise Manager:

Table 54-42 GET Request Configuration for Viewing Details of the Cloud Resource for Version 10000

Feature Description

URI

/em/cloud

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=X-Specification-Version: 10000Accept: application/oracle.com.cloud.common.Cloud+json

Body

None

Request method

GET


A sample of the response received is shown below.

{
  "uri" : "/em/cloud" ,
  "name" : "Infrastructure Cloud" ,
  "description" : "Infrastructure Cloud with Self Service Portal and Virtualization Managements" , "service_templates" :     {
      "uri" : "/em/cloud/collection/servicetemplates" ,
      "type" : "application/oracle.com.cloud.common.ServiceTemplate+json" ,
      "total" : "7" ,
      "elements" : 
      [
          {
            "uri" : "/em/cloud/servicetemplate/oracle:defaultService:em:provisioning:1:cmp:Virtualization:Assembly:C75E88B04D7FEDEDE040578CDA810E49:0.1" ,
            "name" : "sidb_assembly" ,
            "type" : "Assembly" ,
            "version" : "0.1"
          } ,
          {
            "uri" : "/em/cloud/servicetemplate/oracle:defaultService:em:provisioning:1:cmp:Virtualization:Assembly:C769B1F361529309E040578CDA813D57:0.1" ,
            "name" : "wls_assembly" ,
            "type" : "Assembly" ,
            "version" : "0.1"
          } ,
          {
            "uri" : "/em/cloud/servicetemplate/oracle:defaultService:em:provisioning:1:cmp:Virtualization:Template:C76CEB5563EA5E13E040578CDA817FAF:0.1" ,
            "name" : "template_sanity" ,
            "type" : "Template" ,
            "version" : "0.1"
          } ,
          {
            "uri" : "/em/cloud/servicetemplate/oracle:defaultService:em:provisioning:1:cmp:Virtualization:Assembly:C76F733BC7A41AF7E040578CDA812CDC:0.1" ,
            "name" : "fmw_venkat" ,
            "type" : "Assembly" ,
            "version" : "0.1"
          } ,
          {
            "uri" : "/em/cloud/servicetemplate/oracle:defaultService:em:provisioning:1:cmp:Virtualization:Assembly:C76C144A4A245B62E040578CDA8163B9:0.1" ,
            "name" : "fmw_abby" ,
            "type" : "Assembly" ,
            "version" : "0.1"
          } ,
          {
            "uri" : "/em/cloud/servicetemplate/oracle:defaultService:em:provisioning:1:cmp:Virtualization:Assembly:C77122B0A916D95CE040578CDA814854:0.1" ,
            "name" : "sidbasmA_abby" ,
            "type" : "Assembly" ,
            "version" : "0.1"
          } ,
          {
            "uri" : "/em/cloud/servicetemplate/oracle:defaultService:em:provisioning:1:cmp:Virtualization:Assembly:C76C8792DE2A0937E040578CDA81795E:0.1" ,
            "name" : "WLS_abby" ,
            "type" : "Assembly" ,
            "version" : "0.1"
          }
      ]
    } ,
  "zones" :     {
      "uri" : "/em/cloud/collection/zones" ,
      "type" : "application/oracle.com.cloud.common.Zone+json" ,
      "total" : "1" ,
      "elements" : 
      [
          {
            "uri" : "/em/cloud/zone/D73AF0D42C8459E11419862797D1F37D" ,
            "name" : "cloud_zone" ,
            "type" : "oracle_vm_zone"
          }
      ]
    } ,
  "vdcs" :     {
      "uri" : "/em/cloud/collection/vdcs" ,
      "type" : "application/oracle.com.cloud.common.VDC+json" ,
      "total" : "1" ,
      "elements" : 
      [
          {
            "uri" : "/em/cloud/vdc/default/D73AF0D42C8459E11419862797D1F37D" ,
            "name" : "Oracle Enterprise Manager Virtual Data Center on Zone  cloud_zone"
          }
      ]
    } ,
  "instance_options" :     {
      "uri" : "/em/cloud/collection/instanceoptions" ,
      "type" : "application/oracle.com.cloud.common.InstanceOption+json" ,
      "total" : "3" ,
      "elements" : 
      [
          {
            "uri" : "/em/cloud/instanceoption/virtual_machine_size/2" ,
            "name" : "Medium" ,
            "type" : "virtual_machine_size" ,
            "memory" : "8192" ,
            "cpu" : "4" ,
            "local_storage" : "512000"
          } ,
          {
            "uri" : "/em/cloud/instanceoption/virtual_machine_size/3" ,
            "name" : "Large" ,
            "type" : "virtual_machine_size" ,
            "memory" : "15360" ,
            "cpu" : "8" ,
            "local_storage" : "1024000"
          } ,
          {
            "uri" : "/em/cloud/instanceoption/virtual_machine_size/1" ,
            "name" : "Small" ,
            "type" : "virtual_machine_size" ,
            "memory" : "4096" ,
            "cpu" : "2" ,
            "local_storage" : "256000"
          }
      ]
    } ,
  "resource_state" :     {
      "state" : "READY"
    }
}

Similarly, to return the list of resources in the VDC, the following can be issued (note that X-specification-version must be included in the header whenever working with 10000 version resources):

Table 54-43 GET Request Configuration for Viewing Details of the VDC Resources

Feature Description

URI

/em/cloud/vdc/default/D73AF0D42C8459E11419862797D1F37D

Request headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=X-Specification-Version: 10000Accept: application/oracle.com.cloud.common.VDC+json

Body

None

Request method

GET


A sample of the response received is shown below.

{
  "uri" : "/em/cloud/vdc/default/D73AF0D42C8459E11419862797D1F37D" ,
  "name" : "Oracle Enterprise Manager Virtual Data Center on Zone  cloud_zone" ,
  "description" : "Virtual Data Center is a logical grouping of virtualized assets in a particular zone" ,
  "scalability_groups" :     {
      "uri" : "/em/cloud/vdc/default/D73AF0D42C8459E11419862797D1F37D?scalability_groups" ,
      "type" : "application/oracle.com.cloud.common.ScalabilityGroup+json" ,
      "total" : "0" ,
      "elements" : 
      [      ]
    } ,
  "servers" :     {
      "uri" : "/em/cloud/vdc/default/D73AF0D42C8459E11419862797D1F37D?servers" ,
      "type" : "application/oracle.com.cloud.common.Server+json" ,
      "total" : "0" ,
      "elements" : 
      [      ]
    } ,
  "vnets" :     {
      "uri" : "/em/cloud/vdc/default/D73AF0D42C8459E11419862797D1F37D?vnets" ,
      "type" : "application/oracle.com.cloud.common.VNet+json" ,
      "total" : "3" ,
      "elements" : 
      [
          {
            "uri" : "/em/cloud/vnet/D73AF0D42C8459E11419862797D1F37D/oracle:defaultService:em:provisioning:1:netConfig:C76CEADBBBE6B23FE040578CDA817FB1" ,
            "name" : "venkat_profile" ,
            "id" : "oracle:defaultService:em:provisioning:1:netConfig:C76CEADBBBE6B23FE040578CDA817FB1"
          } ,
          {
            "uri" : "/em/cloud/vnet/D73AF0D42C8459E11419862797D1F37D/oracle:defaultService:em:provisioning:1:netConfig:C77076C8FDEC6BD7E040578CDA813B2B" ,
            "name" : "nwprofile_abby" ,
            "id" : "oracle:defaultService:em:provisioning:1:netConfig:C77076C8FDEC6BD7E040578CDA813B2B"
          } ,
          {
            "uri" : "/em/cloud/vnet/D73AF0D42C8459E11419862797D1F37D/oracle:defaultService:em:provisioning:1:netConfig:C76F741AFD7EB760E040578CDA812CD8" ,
            "name" : "bmp_profile" ,
            "id" : "oracle:defaultService:em:provisioning:1:netConfig:C76F741AFD7EB760E040578CDA812CD8"
          }
      ]
    } ,
  "zone" : "/em/cloud/zone/D73AF0D42C8459E11419862797D1F37D" ,
  "resource_state" :     {
      "state" : "READY"
    } ,
  "assembly_instances" :     {
      "uri" : "/em/cloud/vdc/default/D73AF0D42C8459E11419862797D1F37D?assemblies" ,
      "type" : "application/oracle.com.cloud.common.AssemblyInstance+json" ,
      "total" : "11" ,
      "elements" : 
      [
          {
            "uri" : "/em/cloud/assembly/byrequest/64" ,
            "name" : "WLS_abby" ,
            "contained_in" : "/em/cloud/vdc/default/D73AF0D42C8459E11419862797D1F37D" ,
            "guid" : "FD4F3945CDD6BD6EEEFFAB064735ECDD"
          } ,
          {
            "uri" : "/em/cloud/assembly/byrequest/81" ,
            "name" : "WLS_abby_0" ,
            "contained_in" : "/em/cloud/vdc/default/D73AF0D42C8459E11419862797D1F37D" ,
            "guid" : "79006B5C36F6ED90FC82EB58BB9580F2"
          } ,
          {
            "uri" : "/em/cloud/assembly/byrequest/82" ,
            "name" : "fmw_abby" ,
            "contained_in" : "/em/cloud/vdc/default/D73AF0D42C8459E11419862797D1F37D" ,
            "guid" : "C7852B2D7740F4FAE040578CDA811EF3"
          } ,
          {
            "uri" : "/em/cloud/assembly/byrequest/26" ,
            "name" : "latest_attempt_wls_withagent_dinesh" ,
            "contained_in" : "/em/cloud/vdc/default/D73AF0D42C8459E11419862797D1F37D" ,
            "guid" : "4DE0D2D8C81D0C09E665484BA9DBE668"
          } ,
          {
            "uri" : "/em/cloud/assembly/byrequest/61" ,
            "name" : "sidb_assembly" ,
            "contained_in" : "/em/cloud/vdc/default/D73AF0D42C8459E11419862797D1F37D" ,
            "guid" : "235D95A93ABA2B50AFF5486540F48690"
          } ,
          {
            "uri" : "/em/cloud/assembly/byrequest/62" ,
            "name" : "sidb_assembly_0" ,
            "contained_in" : "/em/cloud/vdc/default/D73AF0D42C8459E11419862797D1F37D" ,
            "guid" : "BFA65EC9A5FB97AD2B971EE8FB5E91AC"
          } ,
          {
            "uri" : "/em/cloud/assembly/byrequest/27" ,
            "name" : "venkat_fmw" ,
            "contained_in" : "/em/cloud/vdc/default/D73AF0D42C8459E11419862797D1F37D" ,
            "guid" : "3DBE707B981DEDA5380ED6DBD8BF399C"
          } ,
          {
            "uri" : "/em/cloud/assembly/byrequest/23" ,
            "name" : "venkat_nw_profile" ,
            "contained_in" : "/em/cloud/vdc/default/D73AF0D42C8459E11419862797D1F37D" ,
            "guid" : "05C1F96EE6FBD049BFE1D57AA89CB0D0"
          } ,
          {
            "uri" : "/em/cloud/assembly/byrequest/1" ,
            "name" : "venkat_sidb" ,
            "contained_in" : "/em/cloud/vdc/default/D73AF0D42C8459E11419862797D1F37D" ,
            "guid" : "3A5C3917D18E276BDC7D08949F1851D1"
          } ,
          {
            "uri" : "/em/cloud/assembly/byrequest/22" ,
            "name" : "wls_dinesh_32bit_agent" ,
            "contained_in" : "/em/cloud/vdc/default/D73AF0D42C8459E11419862797D1F37D" ,
            "guid" : "896B27C0963AF3B5C5C69D62614D63ED"
          } ,
          {
            "uri" : "/em/cloud/assembly/byrequest/21" ,
            "name" : "wls_vt_dinesh" ,
            "contained_in" : "/em/cloud/vdc/default/D73AF0D42C8459E11419862797D1F37D" ,
            "guid" : "E54B51C4FCFF6C56AE393C3B1EEA8464"
          }
      ]
    } ,
  "dbplatform_instances" :     {
      "uri" : "/em/cloud/vdc/default/D73AF0D42C8459E11419862797D1F37D?dbplatform_instances" ,
      "type" : "application/oracle.com.cloud.common.DbPlatformInstance+json" ,
      "total" : "0" ,
      "elements" : 
      [      ]
    }
}

If the X-Specification-Version header was not specified, the response received would be similar to the following:

{
  "messages" : 
  [
      {
        "text" : "Media Type 'application/oracle.com.cloud.common.VDC' specified in the request cannot be supported by the Cloud Resource. Cloud Resource supports Media Type 'application/oracle.com.cloud.common.Cloud+json'" ,
        "date" : "2012-08-19T15:17:08+0000"
      }
  ]
}

Note:

Only Infrastructure Service resources are supported on 10000 version. Features supported are the same as the previous version.