Determine the required parameters in a VM/AssemblyInstance creation... - Cloud Resource Model API(Archived)

Oracle Enterprise Manager Cloud Control's Cloud API documentation [12.1.0.2 EM with 12.1.0.4 Cloud Service Portal Plugin|http://docs.oracle.com/cd/E24628_01/doc.121/e28814/cloud_part5.htm#sthref1171] illustrates some examples on creating VM and Assembly service instances via POSTing to either a Zone or a ServiceTemplate resource.
However, the documentation doesn't exactly specify nor indicate what are the attributes and/or "params" that ought to be included in such as request.
In the current interpretation of service instance creation requests (thus, POST content-type of a service instance with the intention to create a new instance of a service), we have denoted it as a "CREATE" or "DEPLOYMENT" to better synchronized with current IT nomenclature.
As part of the introspective nature of the Cloud API, the primary attributes/params of a "DEPLOYMENT" requests are included as part of the application/oracle.com.cloud.common.ServiceTemplate resource, which means each resource type extending the ServiceTemplate may choose to populate "deployment_params" attribute. Furthermore, for ServiceTemplate in the IaaS family (application/oracle.com.cloud.common.VMTemplate and application/oracle.com.cloud.common.AssemblyTemplate), we will always populate the "deployment_params" attribute.
Here are some examples: (all paths are relative to the EM end point)
<h4>Get the list of IaaS Service Templates to introspect</h4>
-----
GET /em/cloud/service_family_type/iaas?service_templates
-----
{
"service_templates" : {
"media_type" : "application/oracle.com.cloud.common.ServiceTemplate+json" ,
"total" : "5" ,
"elements" :
[
{
"uri" : "/em/cloud/iaas/servicetemplate/vm/oracle%3AdefaultService%3Aem%3Aprovisioning%3A1%3Acmp%3AVirtualization%3ATemplate%3AD7B887836B230A4BE0431780578C7C12%3A0.1" ,
"name" : "saved template from ssa" ,
"media_type" : "application/oracle.com.cloud.common.VMTemplate+json" ,
"type" : "Template"
} ,
{
"uri" : "/em/cloud/iaas/servicetemplate/vm/oracle%3AdefaultService%3Aem%3Aprovisioning%3A1%3Acmp%3AVirtualization%3ATemplate%3AD766060CF1D07533E0431780578CA840%3A0.1" ,
"name" : "Template1" ,
"media_type" : "application/oracle.com.cloud.common.VMTemplate+json" ,
"type" : "Template"
} ,
{
"uri" : "/em/cloud/iaas/servicetemplate/vm/oracle%3AdefaultService%3Aem%3Aprovisioning%3A1%3Acmp%3AVirtualization%3ATemplate%3AD7BDEC41C65F7C74E0431980578C221C%3A0.1" ,
"name" : "aaa" ,
"media_type" : "application/oracle.com.cloud.common.VMTemplate+json" ,
"type" : "Template"
} ,
{
"uri" : "/em/cloud/iaas/servicetemplate/assembly/oracle%3AdefaultService%3Aem%3Aprovisioning%3A1%3Acmp%3AVirtualization%3AAssembly%3AD766B6DD3BDE0F7BE0431780578CA8D8%3A0.1" ,
"name" : "Env Assembly" ,
"media_type" : "application/oracle.com.cloud.common.AssemblyTemplate+json" ,
"type" : "Assembly"
} ,
{
"uri" : "/em/cloud/iaas/servicetemplate/assembly/oracle%3AdefaultService%3Aem%3Aprovisioning%3A1%3Acmp%3AVirtualization%3AAssembly%3AD766898D34A66DCAE0431980578C55B6%3A0.1" ,
"name" : "sidb_asm" ,
"media_type" : "application/oracle.com.cloud.common.AssemblyTemplate+json" ,
"type" : "Assembly"
}
]
}
}
-----
<h4>Select a VMTemplate to introspect the deployment parameters</h4>
-----
GET /em/cloud/iaas/servicetemplate/vm/oracle%3AdefaultService%3Aem%3Aprovisioning%3A1%3Acmp%3AVirtualization%3ATemplate%3AD7B887836B230A4BE0431780578C7C12%3A0.1?deployment_params
-----
{
"deployment_params" :
[
{
"name" : "zone" ,
"description" : "'zone' attribute is the URI of the zone that the 'application/oracle.com.cloud.common.VM' 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.VM' resource is to be followed" ,
"type" : "STRING" ,
"require" : "false" ,
"sensitive" : "false"
} ,
{
"name" : "cpu" ,
"description" : "The information that determined how much 'CPU' is to be allocated to the deployed resource" ,
"type" : "LIST" ,
"require" : "false" ,
"sensitive" : "false"
} ,
{
"name" : "memory" ,
"description" : "The information that determined how much 'MEMORY' is to be allocated to the deployed resource" ,
"type" : "NUMBER" ,
"require" : "false" ,
"sensitive" : "false"
} ,
{
"name" : "disks" ,
"description" : "The list of disks to be included in the deployed resource" ,
"type" : "LIST" ,
"require" : "false" ,
"sensitive" : "false"
} ,
{
"name" : "params.domain_type" ,
"description" : "The domain type of the Virtual Machine" ,
"type" : "STRING" ,
"require" : "false" ,
"sensitive" : "false"
} ,
{
"name" : "params.network_profile" ,
"description" : "The identifier of the network profile to be used for the network instances of the Virtual Machine" ,
"type" : "STRING" ,
"require" : "false" ,
"sensitive" : "false"
} ,
{
"name" : "params.server_prefix" ,
"description" : "The server prefix to be specified for the Virtual Machine" ,
"type" : "STRING" ,
"require" : "true" ,
"sensitive" : "false"
} ,
{
"name" : "params.server_size" ,
"description" : "The name of the server instance size" ,
"type" : "STRING" ,
"require" : "false" ,
"sensitive" : "false"
} ,
{
"name" : "params.request_name" ,
"description" : "The request name to be tracked for the Virtual Machine creation" ,
"type" : "STRING" ,
"require" : "false" ,
"sensitive" : "false"
} ,
{
"name" : "params.request_description" ,
"description" : "The request description to be tracked for the Virtual Machine creation" ,
"type" : "STRING" ,
"require" : "false" ,
"sensitive" : "false"
} ,
{
"name" : "params.vnc_password" ,
"description" : "The VNC password for the Virtual Machine" ,
"type" : "STRING" ,
"require" : "true" ,
"sensitive" : "true"
} ,
{
"name" : "params.root_password" ,
"description" : "The Root password for the Virtual Machine" ,
"type" : "STRING" ,
"require" : "true" ,
"sensitive" : "true"
} ,
{
"name" : "params.start_vm" ,
"description" : "Whether or not the Virtual Machine should be started after creation" ,
"type" : "STRING" ,
"defaultValue" : "YES" ,
"require" : "false" ,
"sensitive" : "false"
} ,
{
"name" : "params.ha_enabled" ,
"description" : "Whether or not the Virtual Machine should be HA enabled" ,
"type" : "STRING" ,
"defaultValue" : "NO" ,
"require" : "false" ,
"sensitive" : "false"
} ,
{
"name" : "params.disks_overwrite" ,
"description" : "Whether or not the default Virtual Machine disks should be overwritten" ,
"type" : "STRING" ,
"defaultValue" : "NO" ,
"require" : "false" ,
"sensitive" : "false"
} ,
{
"name" : "params.networks" ,
"description" : "Whether or not the default Virtual Machine disks should be overwritten" ,
"type" : "LIST" ,
"require" : "false" ,
"sensitive" : "false"
}
]
}
-----
<h4>Similarly, for Assembly Template </h4>
-----
GET /em/cloud/iaas/servicetemplate/assembly/oracle%3AdefaultService%3Aem%3Aprovisioning%3A1%3Acmp%3AVirtualization%3AAssembly%3AD766B6DD3BDE0F7BE0431780578CA8D8%3A0.1?deployment_params
-----
{
"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"
}
]
}
-----
One could think of some ways to use this information in its integration. In particular, when Enterprise Manager were upgraded to a newer version, additional optional parameters may be added or some existing parameters may no longer be needed. These changes may be automatically discovered via the above introspection.
For example, a client may cache the deployment parameters and before POSTing to create a new service instance, compare the API's deployment parameters with the cached copy to determine whether there are additional "require"="true" parameters. Even though Enterprise Manager will include missing required parameters/attributes in its 400 response, by introspecting deployment_parameters, a client can determine, a priori, what may be needed. 

The following additional parameters may be specified (though all of them are optional) as part of the Assembly Instance creation request:
-----
{
"name" : "params.assembly_instance_name" ,
"description" : "The name of the assembly instance" ,
"type" : "STRING" ,
"require" : "false" ,
"sensitive" : "false"
} ,
{
"name" : "params.request_name" ,
"description" : "The request name to be tracked for the Assembly Instance creation" ,
"type" : "STRING" ,
"require" : "false" ,
"sensitive" : "false"
} ,
{
"name" : "params.request_description" ,
"description" : "The request description to be tracked for the Assembly Instance creation" ,
"type" : "STRING" ,
"require" : "false" ,
"sensitive" : "false"
} ,
{
"name" : "params.vnc_password" ,
"description" : "The VNC password for all the Virtual Machines in the assembly" ,
"type" : "STRING" ,
"require" : "false" ,
"sensitive" : "true"
} ,
{
"name" : "params.root_password" ,
"description" : "The Root password for all the Virtual Machines in the assembly" ,
"type" : "STRING" ,
"require" : "false" ,
"sensitive" : "true"
} ,
{
"name" : "params.server_size" ,
"description" : "The name of the server instance size for all the Virtual Machines in the assembly" ,
"type" : "STRING" ,
"require" : "false" ,
"sensitive" : "false"
} ,
{
"name" : "params.network_profile" ,
"description" : "The id of the network profile for all the networks in all the Virtual Machines in the assembly" ,
"type" : "STRING" ,
"require" : "false" ,
"sensitive" : "false"
}
-----
For example,
-----
{
"params":{
"assembly_instance_name":"QA Assembly",
"request_name":"Quarterly Testing 1",
"request_description":"Here is the request to create an QA Assembly for Quarterly testing",
"vnc_password":"secret",
"root_password":"secret",
"server_size":"Small",
"network_profile":"oracle:defaultService:em:provisioning:1:netConfig:D7C43DB9969841F5E0431980578CB5C1"
}
}
-----
When both "deployment_plan" and "params" are specified during Assembly Instance creation request, the values in the "params" attribute would take precedent. For example,if "deployment_plan" contained various server size specifications for the assembly while "params.server_size" were specified to be "Small", all Virtual Machines created would be of size "Small" instead of the values specified in the "deployment_plan". 

For Assembly instance creation, the setting of root_password has multiple levels:
1. deployment plan's <HardwareConfiguration>'s <RootPasswordGuid> may contain a valid GUID to an EM credential object
2. deployment plans' <HardwareConfiguration>'s <RootPassword> may contain a plain text
3. POST body's "params" attribute may contain "root_password" with plain text
The assembly instance creation will observe the following heuristics
1. if <RootPasswordGuid> is specified and is a valid EM credential object, it will be used (and ignore all else)
2. if <RootPasswordGuid> is not specified or contains an invalid value, and if "params.root_password" is not set, then <RootPassword> will be used
3. if <RootPasswordGuid> is not specified or contains an invalid value, and if "params.root_password" is set, then "params.root_password" will be used (and ignore <RootPassword>)

Related

Error setting attribute in vdm:setscalar

I am trying to write the data for a visitor attribute(retrieved from login form) to the Sites-Engage database. Session sessionObject = SessionFactory.getSession();EngageManager eManager = (EngageManager)sessionObject.getManager(EngageManager.class.getName());;VisitorContext vContext = eManager.getVisitorContext();vContext.setAttribute("age", age);vContext.setAttribute("gender", gender); But I am getting exception : Error setting attribute age to 20errno: -13050 errdetail1: Exception in doEndTag() in tag com.openmarket.gator.jsp.vdm.Setscalar in page 'WebSite/Page/HomePage' in element 'WebSite/Page/HomePage' errno: -13050 errdetail: 0 com.openmarket.basic.interfaces.AssetException: Can't find scalar datum: age errdetail: 0com.openmarket.basic.interfaces.AssetException: Can't find scalar datum: gender I tried to google the cause of this exception but was not able to find any useful resource, can you help me with this...
Did u create the visitor attribute called gender in the system? Joe Scanlon
Yes sure I didGender (String)Age (String)
is the case correct?  Your code sample has it lowercased. For both age and gender

how to put a javascript  variable containg the i18n key  in the i18n tag

I have a list of values in a List box.when the user selects a praticular value.,i need to show the java script localized alert message for the selected value.
how can i pass the javascript variable to i18n tag.
For ex:
function test(){
var selectedvalue='name';
var localizedstring='<i18n:message key="+selectedvalue+"/>';--This is not working
alert('<i18n:message key="+selectedvalue+"/>');
}
the alert message is a blank string,even though i have the key in my resource bundle.
Also..if i give directly pass the key value to i18n string it works. like..
var localizedstring='<i18n:message key="+name+"/>';--This is  working
*(am passing the variable value)*

Query regarding MessageDriven Bean

Hi ,
I am newbie to MessageDrivenBeans .
Hi i have seen two examples of MDB .
The First One
#MessageDriven(activationConfig =
{
#ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
#ActivationConfigProperty(propertyName="destination", propertyValue="queue/mdb")
})The second :
#MessageDriven(ejbName="CalculatorBean",destinationType="javax.jms.queue",destinationJndiName="queue/mdb")
Please tell me what is the correct way ?? And what is ejbName Attribute and what should be the value passed to it . 
RaviKIran wrote:
Hi ,
I am newbie to MessageDrivenBeans .
Hi i have seen two examples of MDB .
The First One
#MessageDriven(activationConfig =
{
#ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
#ActivationConfigProperty(propertyName="destination", propertyValue="queue/mdb")
})The second :
#MessageDriven(ejbName="CalculatorBean",destinationType="javax.jms.queue",destinationJndiName="queue/mdb")
Please tell me what is the correct way ?? And what is ejbName Attribute and what should be the value passed to it .The first one... Seems normal with some vendor specific attribute (destination) which specifies the name of the QUE in that scenario (mst match the name of the resource name when the QUE was created before it was given to the message producer). From what I understand there is no norm an and I have read that the MDB will normally use .xml to configure this with the <mesage-destination-link> attribute tag.
EJB name is the name given to this bean and can be used when this bean is looked up.

Symbol not found

When clicking on a property e.g., conferenceText #{SessionBean1.eventListDp.value['abc']}
Bind to Data provider
Cjoose a Data provider to bind conferenceText:
eventListDp (SessionBean1)
Data field:
<none>
description String
abc String
id Integer
etc...
I changed abc to conference throughout the Project
The question is: How do I get conference (the changed property) to replace abc (the original property)
Thanks

Audit Log Not Being Created

Hi,
I'm using the workflow application "Audit" as an activity in my custom workflow and I'm passing the required arguments.
In the workflow trace file, I can see that the Audit application is run using the passed parameters but no record is being created matching that information in the "log" table.
Any ideas/suggestions?
Thanks
Here is the trace for your information:
-------------------------------------------------------------------------
Resolved reference requesterWSUser = object
Assigning requesterFullName = Test1 Manager1
Action Set Audit Resources List
Result title set to 'Set Audit Resources List'
Evaluating XPRESS
Resolved reference approved = false
Resolved reference auditApps = [AD_Simulated]
Resolved reference auditApps = [AD_Simulated]
Assigning depApps = [AD_Simulated]
Action Audit
Result title set to 'Audit'
Iterating over depApps = [AD_Simulated]
Iteration 0
app = AD_Simulated
Argument op = audit
Argument type = User
Argument status = success
Argument action = View
Argument reason = User Access Recertification
Argument subject = TestManager1
Resolved reference user.waveset.organization = null
Resolved reference app = AD_Simulated
Resolved reference app = AD_Simulated
Argument resource = AD_Simulated
Resolved reference enduserId = testuser4
Argument accountId = testuser4
Resolved reference enduserView.accounts[Lighthouse].firstname = Test4
Resolved reference enduserView.accounts[Lighthouse].lastname = User4
Resolved reference enduserId = testuser4
Resolved reference requesterFullName = Test1 Manager1
Argument error = The access of the user Test4 User4(testuser4) has been recertified by Test1 Manager1
Calling application 'com.waveset.session.WorkflowServices'
Application requested argument op
Application requested argument logResultErrors
Application requested argument action
Application requested argument status
Application requested argument type
Application requested argument subject
Application requested argument name
Application requested argument resource
Application requested argument accountId
Application requested argument error
Application requested argument parameters
Application requested argument attributes
Application requested argument originalAttributes
Application requested argument overflowAttributes
Application requested argument auditableAttributesList
Application requested argument organizations
Step complete 'Audit'
Step inactive 'Display Message'
------------------------------------------------------------------------- 
What is the value of the action in your audit call? Only certain values are allowed any other values are simply ignored and not audited. 
I agree with the anokun7. Check to make sure the action your are giving it is a valid one. ( See IDM Workflow Forms and Views pdf and search for Action Names, it will give you a list of all the valid actions) Also you can add your own attributes to the Audit object as well using the attributes variable. ( It expects a map: <map>
<s>Key</s>
<ref>value</ref>
<map>
Value can be a reference, or string, or however complex you want to make it. Just be aware of what view (if any) is available at the time you call the audit. Hope this helps
Message was edited by:
dmac28
Oh yeah..The attributes will appear on the audit log reports, Based on what action and type you audited it will show up on that record. i.e Delete action, on Type User...that audit record will have a changes value which will have whatever attributes you passed to the audit object.

Categories

Resources