cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5245
Views
2
Helpful
10
Comments
Orf Gelbrich
Cisco Employee
Cisco Employee
Task NameUCSD to PSC integration
Description

Prerequisites

Minimum UCSD version: 5.3

CategoryCustom task
Components
User Inputs
User OutputOutputString

Instructions for Regular Workflow Use:

Instructions for Regular Workflow Use:

  1. Download the attached .ZIP file below to your computer. *Remember the location of the saved file on your computer.
  2. Unzip the file on your computer. Should end up with a .WFD file.
  3. Log in to UCS Director as a user that has "system-admin" privileges.
  4. Navigate to "Policies-->Orchestration" and click on "Import".
  5. Click "Browse" and navigate to the location on your computer where the .WFD file resides. Choose the .WFD file and click "Open".
  6. Click "Upload" and then "OK" once the file upload is completed. Then click "Next".
  7. Click the "Select" button next to "Import Workflows". Click the "Check All" button to check all checkboxes and then the "Select" button.
  8. Click "Submit".
  9. 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.

Many thanks goes out to: Alejandro Madurga Ainoza for creating this...

UCSD - PSC SI Integration

This documents covers the custom integration integration between UCS Director and Prime Service Catalog to allow UCSD to query, create, update, and delete Service Items on PSC.

1.1  Preface

This documents covers the custom integration integration between UCS Director and Prime Service Catalog to allow UCSD to query, create, update, and delete Service Items on PSC.

1.2  Audience

Cisco consultants that needs to extend the out of the box integration between UCSD and PSC.

1.3  Scope

The integration covers the following use cases:

1.      Query a Service Item Table on PSC

2.      Create a new Service Item

3.      Update an Existing Service Item

4.      Delete an Existing Service Item.

1.4  Assumptions

The following product versions were used on this integration, it should work with newer releases, but some changes could be needed:

·        UCSD 5.3.2

·        PSC 11.1 Virtual Appliance

1.5  Related Documents

·        Cisco UCS Director Orchestration Guide, Release 5.3: Cisco UCS Director Orchestration Guide, Release 5.3 - Cisco

·        Cisco UCS Director CloupiaScript Cookbook 5.4: http://www.cisco.com/c/dam/en/us/td/docs/unified_computing/ucs/ucs-director/cloupia-script-cookbook/5-4/b_Cisco_UCS_Dire…

·        Cisco Prime Service Catalog 11.0 Integration Guide: Cisco Prime Service Catalog 11.0 Integration Guide - Getting Started [Cisco Prime Service Catalog] - Cisco

Workflow custom task import:

Screen Shot 2016-01-11 at 7.01.29 AM.png

Other examples:

1.       <PSC_URL>/nsapi/ucsd/discovery/deleteEntities

2.       <PSC_URL>/nsapi/ucsd/discovery/importData

The data you need to POST:    {"shortName":"<SHORT_NAME_FROM_PSC>","description":"<DESCRIPTION_FROM_PSC>","hostName":"<UCSD_HOSTNAME_OR_IP>","protocol":"http","port":"80","un":"admin","up":"test","exportUser":"1","id":"1","isTriggeredByPoller":false,"provider":"UCSD"}

Comments
Florent TYMEN
Level 1
Level 1

Hi all,

I'm looking for some help about theses custom Tasks. Especially how to get set PSC-Credentials

Thanks

F

Orf Gelbrich
Cisco Employee
Cisco Employee

I just down loaded the custom workflow task

looks like the credential policy was used

           PersistenceUtil.getCredentialPolicyByName(accountName);

and this function uses the policy results and does the HTTP connection...

function getSITable(PSCIP,PSCPort,PSCUser,PSCPassword,SITableName,filter){

  var httpsClient = CustomEasySSLSocketFactory.getIgnoreSSLClient(PSCIP,PSCPort);

  httpsClient.getParams().setCookiePolicy("default");

  if(SITableName.indexOf("Si")!=0){

  SITableName = "Si" + SITableName;

  }

  var tableURL = "/RequestCenter/nsapi/serviceitem/" +  SITableName;

  if (filter !=""){

  tableURL = tableURL + "/" + filter;

  }

  var httpMethod = new GetMethod(tableURL);

  httpMethod.addRequestHeader("username", PSCUser);

  httpMethod.addRequestHeader("password", PSCPassword);

  httpMethod.addRequestHeader("Content-type", "application/json");

  httpsClient.executeMethod(httpMethod);

Florent TYMEN
Level 1
Level 1

Ok, Thanks.

I'll look in that way.

Which account type do you recommend ? (APIC / Cisco IOS / Cisco Identity Services Engine / Cisco Nexus OS / PNSC / UCS Central /UCS Invista Appliance / UCS Invista Scaling System / UCSM ) ?

Many Thanks

Orf Gelbrich
Cisco Employee
Cisco Employee

In the code section beforeMarshal I see this suggestion on the Policy type:

Screen Shot 2016-09-21 at 7.14.26 AM.png

Which would be this Policy:

Screen Shot 2016-09-21 at 7.17.53 AM.png

Florent TYMEN
Level 1
Level 1

Many Thanks.

I'm facing a another issue.

I've got an 422 error ("The request was well-formed but was unable to be followed due to semantic errors")

I don't find the way to select the PrimaryKey on the table i want to update.

Is someone got any examples ?

Thanks !!

PS:Don't find the way to upload a screeshot :/

Orf Gelbrich
Cisco Employee
Cisco Employee

Are you using PSC11 and UCSD 5.3?  This was developed for that.  You would have to open up the custom task and start de-bugging.  

Images you can drag and drop into here..

Screen Shot 2016-10-06 at 4.32.30 PM.png

Florent TYMEN
Level 1
Level 1

Thanks Orf,

I'm using PSC 11..1 and UCSD 5.4

Is the "SI Data" field correctly completed ?

Many Thanks for your help

PSC.PNG

Orf Gelbrich
Cisco Employee
Cisco Employee

I have asked the original person that created this to comment on this...

Florent TYMEN
Level 1
Level 1

Ok Thanks.

Florent TYMEN
Level 1
Level 1

Hi all,

I've found the answer:

the "Si Table Name" is UCSDVM and not SiUCSDVM. you need to remove the "Si".

In SI DATA, the exemple refer to [FieldName1]=[FieldValue1] ;[FieldName2]=[FielValue2];

and so the correct field is:

Name=Test05;UCSDName=Test05;Status=Active;


Without square bracket and in my case Status is mandatory. so i need to add it.

Expect this will help.

Thanks

Florent

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links