Task Name | UCSD Remedy Integration |
Description | - UCSD Remedy Integration
|
Prerequisites | - Tested on 5.2.0.0.A
|
Category | Workflow |
Components | vSphere 5.x |
User Inputs | |
Instructions for Regular Workflow Use:
- Download the attached .ZIP file below to your computer. *Remember the location of the saved file on your computer.
- Unzip the file on your computer. Should end up with a .WFD file.
- Log in to UCS Director as a user that has "system-admin" privileges.
- Navigate to "Policies-->Orchestration" and click on "Import".
- Click "Browse" and navigate to the location on your computer where the .WFD file resides. Choose the .WFD file and click "Open".
- Click "Upload" and then "OK" once the file upload is completed. Then click "Next".
- Click the "Select" button next to "Import Workflows". Click the "Check All" button to check all checkboxes and then the "Select" button.
- Click "Submit".
- A new folder should appear in "Policies-->Orchestration" that contains the imported workflow. You will now need to update the included tasks with information about the specific environment.
A thank you goes out to Niraj Kumar.
Workflow execution:

The SR log run:

The outcome is a new storage policy:

The workflows and custom task :

The code:
importPackage(java.lang);
importPackage(java.util);
importPackage(com.cloupia.model.cIM);
importPackage(com.cloupia.service.cIM.inframgr);
importPackage(com.cloupia.service.cIM.inframgr.profiles);
importPackage(com.cloupia.lib.cIaaS.vmware);
var storPolicyId;
var vdcProfile = input.vDCProfile;
var storPolicyName = input.StorPolicyName;
var datastoreClusterIdentity = input.DatastoreCluster;
var datastoreClusterArray =[];
datastoreClusterArray = datastoreClusterIdentity.split("@");
var datastoreCluster=[];
datastoreCluster[0] = datastoreClusterArray[2];
var scopeType=input.datastoreClusterScope;
var oldVDC = VDCUtil.getVDC(vdcProfile);
function createStorPolicy(oldVDC,storPolicyName, datastoreCluster)
{
var policy;
var policy = InfraPersistenceUtil.getPrivateCloudStoragePolicy(storPolicyName);
if (policy != null)
{
ctxt.setFailed("Storage policy with name "+storPolicyName+" already exists");
ctxt.exit();
}
var profile = InfraPersistenceUtil.getPrivateCloudStoragePolicy(oldVDC.getStoragePolicy());
policy = new PrivateCloudStoragePolicy();
policy.setPolicyName(storPolicyName);
policy.setPolicyDescription(storPolicyName+" created by SR "+ctxt.getSrId());
policy.setCloudName(oldVDC.getCloudName());
var result = new DRAPScope();
result.setEnabled(true);
result.setInclude(true);
result.setScopeContextName(DRAPFormUtil.SCOPE_CONTEXT_NAME_DATASTORE_CLUSTERS);
result.setScopeContextValue(datastoreCluster);
var list = new ArrayList();
list.add(result);
policy.setScopeType(scopeType);
policy.setDatastoreCluster(datastoreCluster);
policy.setScopeList(list);
policy.setLocalStorage(profile.isLocalStorage());
policy.setNfsStorage(profile.isNfsStorage());
policy.setISCSIStorage(profile.isISCSIStorage());
policy.setRules(profile.getRules());
if(profile.isOverrideTemplateProperties()){
policy.setOverrideTemplateProperties(profile.isOverrideTemplateProperties());
policy.setDoThinProvisioning(profile.isDoThinProvisioning());
if(profile.isManualDiskSize()){
policy.setManualDiskSize(profile.isManualDiskSize());
policy.setCustomDiskSizeGB(profile.getCustomDiskSizeGB());
}
}
if(profile.isAllowResizing()){
policy.setAllowResizing(profile.isAllowResizing());
policy.setResizeAllowedDiskGB(profile.getResizeAllowedDiskGB());
}
policy.setAllowDataStoreSelect(profile.isAllowDataStoreSelect());
InfraPersistenceUtil.persistPrivateCloudStoragePolicy(policy);
storPolicyId = policy.getPolicyId();
return policy;
}
createStorPolicy(oldVDC,storPolicyName,datastoreCluster);
logger.addInfo("storage policy created successfully");