Skip Headers
Oracle® Enterprise Manager Cloud Administration Guide
12c Release 4 (12.1.0.4)

E28814-13
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

31 Infrastructure as a Service APIs

This chapter describes the resource models for Infrastructure as a Service (IaaS) API and the REST request/response interactions.The following topics are covered:

31.1 Resource Models for Infrastructure as a Service

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 31-1 IaaS Resource Model

iaas resource model

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

31.1.1 Changes for the Infrastructure as a Service

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

Table 31-1 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.


31.1.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 31-2 IaaS Zone Data Model

Field Type Occurs Description Since

uri

URI

1

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

12.1.0.4

name

String

1

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

12.1.0.4

description

String

0..1

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"

12.1.0.4

resource_state

ResourceState

0..1

The resource state of the resource.

12.1.0.4

service_family_type

String

0..1

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

It is "iaas" for this.

12.1.0.4

service_templates

Collection <ServiceTemplate>

0..1

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

12.1.0.4

service_instances

Collection <ServiceInstance>

0..1

Collection of the service instances that are in this zone.

12.1.0.4

vnets

Collection <VNet>

0..1

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

12.1.0.4

backends

Collection <Physical Net>

0..1

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

12.1.0.6

media_type

String

1

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

12.1.0.4


31.1.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 31-3 AssemblyInstance Data Model

Field Type Occurs Description Since

uri

URI

1

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

12.1.0.2

name

String

1

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

12.1.0.2

description

String

0..1

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

12.1.0.2

based_on

URI

0..1

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

12.1.0.2

scalability_groups

Collection<ScalabilityGroup>

0..1

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

12.1.0.2

servers

Collection<VM>

0..1

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

12.1.0.2

status

String

0..1

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.

12.1.0.2

resource_state

ResourceState

1

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.

12.1.0.1

created

Timestamp

0..1

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

12.1.0.2

expiry

Timestamp

0..1

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

12.1.0.2

params

{}

0..1

Vendor specific configuration parameters for this deployment.

12.1.0.2

deployment_plan

String

0..1

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.

12.1.0.2

media_type

String

1

The media type of the resource.

12.1.0.4


31.1.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 31-4 ScalabilityGroup Data Model

Field Type Occurs Description Since

uri

URI

1

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

12.1.0.2

name

String

1

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

12.1.0.2

description

String

0..1

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

12.1.0.2

nodes

Collection<URI>

1

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

12.1.0.2

count

Integer

1

Count of the nodes that are in the scalability group.

12.1.0.2

status

String

0..1

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.

12.1.0.2

resource_state

ResourceState

1

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.

12.1.0.2

created

Timestamp

1

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

12.1.0.2

max

Signed Integer

0..1

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”.

12.1.0.2

min

Integer

0..1

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.

12.1.0.2

homogenous

Boolean

1

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

12.1.0.2


31.1.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 31-5 VM Data Model

Field Type Occurs Description Since

uri

URI

1

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

12.1.0.1

name

String

1

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

12.1.0.1

description

String

0..1

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

12.1.0.1

status

String

1

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

12.1.0.1

based_on

URI

0..1

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

12.1.0.1

hostname

String

0..1

Qualified host name of this Server when available.

12.1.0.2

cpu

[Number,Number]

1

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.

12.1.0.1

memory

Number

1

Numeric sizing of the RAM in MByte.

12.1.0.1

disks

{String,Number}[]

0..1

Name and size in GB of local disks.

12.1.0.2

interfaces

Collection<NetworkInterface>

1

Network interfaces associated with this Server.

12.1.0.2

params

{ }

0..1

Vendor specific configuration parameters for this Server.

12.1.0.1

resource_state

ResourceState

1

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.

12.1.0.1

created

Timestamp

1

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

12.1.0.1

type

String

1

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

12.1.0.1

os

String

0..1

OS information of the Server where appropriate.

12.1.0.1

media_type

String

1

The media type of the resource.

12.1.0.4

saved_templates

Collection <VMTemplate>

0..1

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

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

31.1.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 31-6 VNet Data Model

Field Type Occurs Description Since

uri

URI

1

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

12.1.0.2

name

String

1

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

12.1.0.2

description

String

0..1

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

12.1.0.2

created

Timestamp

1

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

12.1.0.2

interfaces

Collection<NetworkInterface>

0..1

List of NetworkInterface resources that are part of the VNet.

12.1.0.2


31.1.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 31-7 NetworkInterface Data Model

Field Type Occurs Description Since

uri

URI

1

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

12.1.0.2

name

String

1

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

12.1.0.2

description

String

0..1

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

12.1.0.2

address

String

1

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

12.1.0.2

resource_state

ResourceState

0..1

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.

12.1.0.2

mac

String

0..1

The MAC address of the network interface where appropriate.

12.1.0.2


31.1.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 31-8 VMTemplate Data Model

Field Type Occurs Description Since

uri

URI

1

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

12.1.0.1

name

String

1

A human readable name, given to the VMTemplate.

12.1.0.1

description

String

0..1

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

12.1.0.1

type

String

1

The String that describes the type of the VM Template.

This has value "Template".

12.1.0.1

created

Timestamp

1

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

12.1.0.1

service_family_type

String

0..1

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

This has value "iaas".

12.1.0.4

default_instance_media_type

String

0..1

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

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

12.1.0.4

resource_state

ResourceState

0..1

Only a service template with READY state can be deployed.

12.1.0.1

deployment_params

List of Deployment Parameters

0..1

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.

12.1.0.4

zones

List of Zones

0..1

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

12.1.0.2

service_instances

Collection<?>

0..1

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

12.1.0.4


31.1.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 31-9 AssemblyTemplate Data Model

Field Type Occurs Description Since

uri

URI

1

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

12.1.0.2

name

String

1

A human readable name, given to the AssemblyTemplate.

12.1.0.2

description

String

0..1

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

12.1.0.2

type

String

1

The String that describes the type of the Assembly Template.

This has value "Assembly".

12.1.0.2

created

Timestamp

1

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

12.1.0.2

service_family_type

String

0..1

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

This has value "iaas".

12.1.0.4

default_instance_media_type

String

0..1

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

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

12.1.0.4

resource_state

ResourceState

0..1

Only a service template with READY state can be deployed.

12.1.0.1

deployment_params

List of Deployment Parameters

0..1

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.

12.1.0.4

zones

List of Zones

0..1

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

12.1.0.2

service_instances

Collection<?>

0..1

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

12.1.0.4

definition

String

0..1

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

12.1.0.1

ovfdescriptor

String

0..1

Same as definition.

12.1.0.1

deploy_plans

List of Deployment Plans

0..1

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

12.1.0.2


The following table describes the structure of the Deployment Plan.

Table 31-10 Deployment Plan Structure

Field Type Occurs Description

name

String

1

The name of the deployment plan.

description

String

0..1

The description of the deployment plan.

xml

String

1

The deployment plan XML.


31.1.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 31-11 AssemblyTemplate Data Model

Field Type Occurs Description Since

uri

URI

1

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

12.1.0.4

name

String

1

A human readable name, given to the ServiceFamilyType.

12.1.0.4

description

String

0..1

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

12.1.0.4

resource_state

ResourceState

0..1

The resource state of the resource.

12.1.0.4

media_type

String

1

The media type of the resource.

12.1.0.4

service_templates

Collection <ServiceTemplate>

0..1

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

12.1.0.4

zones

Collection <Zone>

0..1

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

12.1.0.4

instance_types

Collection <InstanceType>

0..1

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

12.1.0.4

quota_usages

Collection <QuotaUsage>

0..1

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

12.1.0.5

quota_def

Json Object

0..1

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.

12.1.0.5

instance_options

List of VM Size Options

0..1

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

12.1.0.4


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

Table 31-12 VM Size Option Structure

Field Type Occurs Description Since

name

String

1

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

12.1.0.4

id

String

1

The ID of the VM Size.

12.1.0.4

cpu

Number

1

The amount of CPU.

12.1.0.4

memory

Number

1

The amount of Memory in MB.

12.1.0.4

local_storage

Number

1

The amount of local storage in GB.

12.1.0.4


The IaaS supports the following Quota Usage.

Table 31-13 Quota Usage for IaaS

Quota Description Since

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.

31.1.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 31-14 IaaS Quota Definition Data Model

Field Type Occurs Description Since

uri

URI

1

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

12.1.0.5

allowedSaveAsTemplate

Boolean

1

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

12.1.0.5

allowedSaveToSwlib

Boolean

1

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

12.1.0.5

allowedSaveToSwlibOnExpiry

Boolean

1

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

12.1.0.5

resourceQuotas

Collection <ResourceQuota>

1

The quotas of resources defined for the authenticated user.

12.1.0.5


The following describes the structure of the Resource Quota

Table 31-15 Structure of the Resource Quota

Field Type Occurs Description Since

name

String

1

The name of the resource.

12.1.0.5

description

String

0..1

The description of the resource.

12.1.0.5

maxAllowed

Number

0..1

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.

12.1.0.5

unit

String

1

The measurement unit of the resource.

12.1.0.5


31.2 Supported Operations Examples

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

31.2.1 Creating a Service Instance

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

31.2.1.1 VM Creation

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 of which VM is to reside

  2. POST to the VMTemplate of 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.

Post to the "iaas" Zone

The following shows the configuration for POSTing to "iaas" Zone:

Table 31-16 POST Request

Feature Description

URL

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

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"
  }
}

Method

POST

Since

12.1.0.1 Cloud Service Portal plug-in


The following is the response from the above interaction:

{
  "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"
}

Post to the VMTemplate

The following describes the configurations for POSTing to the VMTemplate:

Table 31-17 POST to VMTemplate

Feature Description

URL

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

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"  }}

Method

POST

Since

12.1.0.4 Cloud Service Portal plug-in


The following is the response from the above interaction:

{
  "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 31-18 POST Request

Feature Description

URL

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

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"
  }
}

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"
      }
  ]
}

Polling the VM Creation

Once the VM creation has been POSTed, you can GET the resource identified by the return URI to keep track of the status.

Table 31-19 Polling the VM Creation

Feature Description

URL

https://example.oracle.com/em/cloud/iaas/server/byrequest/101

Headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Method

GET


The following is the response:

{
  "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.us.oracle.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"
}

31.2.1.2 Assembly Instance Creation

Similar to VM creation, assembly instance creation can also be POSTed to both a Zone and an AssemblyTemplate. The following shows the service template details:

Table 31-20 Assembly Instance Creation

Feature Description

URL

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

Headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Method

GET

Since

12.1.0.4 Cloud Service Portal plug-in


The following is the response from the Web service:

{
  "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.oracle.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 shows an example of how to create an assembly instance:

Table 31-21 POST Request for Assembly Instance Creation

Feature Description

URL

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

Headers

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

Method

POST


The following shows the 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.oracle.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"
}

The following is the Web service response after the request was successfully submitted:

{
  "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"
}

Similarly, tracking the process by getting the URI returns:

Table 31-22 GET Request

Feature Description

URL

https://example.oracle.com/em/cloud/iaas/assemblyrequest/223

Headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Method

GET

Since

12.1.0.4 Cloud Service Portal plug-in


The following is the response of the Web service response:

{
  "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"
}

Soon after the assembly instance is created successfully.

Table 31-23 GET Request

Feature Description

URL

https://example.oracle.com/em/cloud/iaas/assemblyrequest/223

Headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Method

GET

Since

12.1.0.4 Cloud Service Portal plug-in


The following is the response of the Web service response:

{
  "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.oracle.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"
}

31.2.2 Updating a Service Instance

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

31.2.2.1 Updating a VM Resource

The VM resource supports the following changes:

  • The "status" can be updated (for example, from STARTED to STOPPED or from STOPPED to STARTED).

  • The "cpu" and "memory" can be updated (for example to resize the VM).

    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".

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

Change VM Status

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

Table 31-24 GET Request for VM Status

Feature Description

URL

https://example.oracle.com/em/cloud/iaas/server/byrequest/101?status,uri

Headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Method

GET

Since

12.1.0.1 Cloud Service Portal plug-in


The following is the response:

{
  "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 31-25 PUT Request for VM Status

Feature Description

URL

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

Headers

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

Body

{
  "status" : "STOPPED"
}

Method

PUT

Since

12.1.0.1 Cloud Service Portal plug-in


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

The following shows the GET request on the VM:

Table 31-26 GET Request on VM

Feature Description

URL

https://example.oracle.com/em/cloud/iaas/server/byrequest/101?status,uri

Headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Method

GET

Since

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 31-27 PUT Transient Status Value

Feature Description

URL

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

Headers

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

Body

{
  "status" : "STOPPING"
}

Method

PUT

Since

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 same PUT status to the VM will result in the following interaction:

Table 31-28 PUT Status to the VM

Feature Description

URL

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

Headers

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

Body

{
  "status" : "STOPPED"
}

Method

PUT

Since

12.1.0.1 Cloud Service Portal plug-in


The web service will response with:

{
  "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 31-29 PUT Request

Feature Description

URL

https://example.oracle.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

Since

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'"
          }
      ]
    }
}

Changing VM Sizes

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 31-30 Changing VM Sizes

Feature Description

URL

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

Headers

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

Body

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

Method

PUT

Since

12.1.0.1 Cloud Service Portal plug-in


The following is returned by the Web service:

{
  "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 period of time, the new capacity is reflected in the VM resource through the GET request:

Table 31-31 GET Request

Feature Description

URL

https://example.oracle.com/em/cloud/iaas/server/vm/C5CA59AF9386975E8AEA45B0F040F095?resource_state,cpu,memory,status

Headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Method

GET


The Web service returns the following:

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

31.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 31-32 Add VM Disk

Feature Description

URL

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

Headers

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

Body

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

Method

PUT

Since

12.1.0.5 Cloud Service Portal plug-in


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. Here is the web service response:

{
  "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 periods of time, the new disks are reflected in the VM resource using the GET request.

Table 31-33 GET Request

Feature Description

URL

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

Headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Method

GET


Here is the Web service response:

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

31.2.4 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 31-34 Delete Request

Feature Description

URL

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

Headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Method

DELETE

Since

12.1.0.1 Cloud Service Portal plug-in


The following Web service response with code 200 is returned:

{
  "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 31-35 GET Request on the VM URI

Feature Description

URL

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

Headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Method

GET


The Web service returns the following:

{
  "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.

31.2.5 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 31-36 GET Request

Feature Description

URL

https://example.oracle.com/em/cloud/iaas/zone/D73AF0D42C8459E11419862797D1F37D?service_instances

Headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Method

GET

Since

12.1.0.4 Cloud Service Portal plug-in


The following response is returned:

{
  "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 31-37 GET Request

Feature Description

URL

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

Headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Method

GET

Since

12.1.0.4 Cloud Service Portal plug-in


The following response is returned:

{
  "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"
          }
      ]
    }
}

31.2.6 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 31-38 POST Request

Feature Description

URL

https://example.oracle.com/em/cloud

Headers

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

Body

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

Method

POST

Since

12.1.0.5 Cloud Service Portal plug-in


Here is the response:

{
  "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 31-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 31-40 Unrecognized Attribute

Feature Description

URL

https://example.oracle.com/em/cloud

Headers

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

Body

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

Method

POST

Since

12.1.0.5 Cloud Service Portal plug-in


Here is the response:

{
  "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 31-41 Unrecognized Attribute

Feature Description

URL

https://slc03rqn.us.oracle.com:4473/em/cloud/finds/service_template/bWVkaWFfdHlwZSUyNTNEYXBwbGljYXRpb24lMjUyRm9yYWNsZS5jb20uY2xvdWQuY29tbW9uLlNl%0AcnZpY2VUZW1wbGF0ZSUyRm5hbWUlMjUzRERVTU1Z

Headers

Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=

Method

GET

Since

12.1.0.5 Cloud Service Portal plug-in


Here is the response of the GET request after the service template was created and published by administrators:

{
  "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"
          }
      ]
    }
}

31.3 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 31-42 HTTP Request

Feature Description

URL

https://example.oracle.com/em/cloud

Headers

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

Method

GET


The following returns the resource as in 10000 version:

{
  "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 31-43 Request to Return VDC Resources

Feature Description

URL

https://example.oracle.com/em/cloud/vdc/default/D73AF0D42C8459E11419862797D1F37D

Headers

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

Method

GET


The following VDC resource is returned:

{
  "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 following would be returned:

{
  "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.