VMware Cloud Community
LuckyT
Contributor
Contributor

Plugin for Network & Security in vCO

Hi All,

       Is there a Plugin for Network & Security (vShield) to develop workflows in vCO?

Thanks in advance.

0 Kudos
8 Replies
OscarDavey
Hot Shot
Hot Shot

The only plugin for VCO that is related to Network is F5 Networks Management Plug-in for vCenter Orchestrator and for more plugins please check this page

https://solutionexchange.vmware.com/store/category_groups/cloud-management?category=cloud-automation...

Hope this helped ,

Best regards

Your Oscar

0 Kudos
LuckyT
Contributor
Contributor

Thanks, but is there a way to deploy vShield Edge through vCO?

I found this http://www.vmware.com/support/orchestrator/doc/vshield-plugin-50-release-notes.html but there is no download link for plugin. I want to develop a workflow in vCO to deploy vShield Edge.

0 Kudos
pjank
Contributor
Contributor

I don't think there is a VCNS plugin, but I am using the VCO HTTP-REST plugin to access the VCNS REST API and it is working just fine.

0 Kudos
LuckyT
Contributor
Contributor

Hi,

Can you share one sample workflow which passes xml to VCNS REST API?

Thanks in advance.

0 Kudos
pjank
Contributor
Contributor

1) First, download the latest version of the HTTP-REST plugin for VCO, which I believe is version 1.0.2 found here:

https://my.vmware.com/web/vmware/details?downloadGroup=VCO_REST_PLUGIN_102&productId=284

2) Once installed, look under Library-->HTTP-REST-->Configuration and run the "Add a REST Host" workflow found there.  Beware that I have found it only likes official-looking domain names when using DNS for the VCNS host URL, so "https://myvcns.sitea.local" will probably give you an error, while "https://myvcns.sitea.local.yourdomain.com"  will probably work.  I used a hosts file entry for my dev box to get around this limitation, but once it is registered it should be fine.  You can also try a hard-coded IP address as a test if you are having trouble with this part.  I used Basic authentication and Shared Session for the host authentication piece.

3) Next, run the "Add a REST Operation" workflow found in the same location.  Choose your new host, give the operation a name, and enter "/api/versions" for the template URL (no quotes).

Set the method to GET.

4) Now run the "Invoke a REST operation" workflow and execute your new operation from the inventory.  If all is setup properly, you should see the Status code 200 returned along with the XML content as a string.

5) You can also add an operation that takes variables in the url like this: "/api/2.0/vdn/virtualwires/{vw-moref}", where you will be prompted for the values when invoking this operation.

The way I am actually making calls to VCNS from my workflows right now is to make a call to the "Invoke a REST host" workflow from my outer workflow, where i just simply build up the operationUrl as a string in my code first and set a different string var to "GET" for the request type.  This workflow returns a Properties var from which you can extract the status code and the XML content as a string and start parsing out the data you need from there.  Hope this helps get you started.

0 Kudos
LuckyT
Contributor
Contributor

Thanks.

I have done all these steps, but i'm not able to pass XML to "Invoke REST Operations" workflow. I'm trying to create vShield Edge & send POST request. Could you please share me the steps on Scriptable Task?

Thanks in advance.

0 Kudos
pjank
Contributor
Contributor

I haven't tried that yet, but here's an easier one to get you started and test out a POST without the more complicated XML of an edge deploy:

1) Add a REST Operation.

2) Choose your REST Host and the following properties:

Name: NTP

URL: /api/2.0/global/config

Method: POST

Content Type: application/xml

3) Invoke a REST operation.  Choose NTP and the following:

Content Type: application/xml

Content: <vsmGlobalConfig xmlns="vmware.vshield.edge.2.0"><timeInfo><ntpServer>192.168.0.1</ntpServer></timeInfo></vsmGlobalConfig>  

(Of course, use the IP of your local NTP server)

You should get a Status code: 204 and you can check the VCNS interface (or query via REST) to see that it took your update.  If this works, then you have the basic pieces functioning and you just have to troubleshoot the specific XML in your other request.

0 Kudos
LuckyT
Contributor
Contributor

Hi,

Thanks, i have already tried like that, it is working fine. But i want to invoke REST Operation from another workflow and pass XML content, which i'm not able to do.

0 Kudos