NSX-v Dynamic Types plug-in V2

NSX-v Dynamic Types plug-in V2

The included plug-in is a solution I have built for providing NSX Network & Security as a Service in vCAC. This is the second edition. The first one was built mostly manually, this one was built with the plug-in generator V2.

The advantages are that this one:

  • Supports multiple NSX hosts
  • Support multiple object levels hierarchy
  • Is a lot more customizable than V1 : you can download the plug-in generator V2 package to add new objects and new methods

This plug-in is also a good way to learn more about the Dynamic Types technology. It is possible to extend the plug-in with REST operations that can be found in the NSX API guide.

Features:

Inventory objects:

Screen Shot 2015-03-30 at 12.35.01.png

Workflows :

Workflows are contextual to the inventory objects. You can right click on an object to run a workflow.

Sample workflows :

Screen Shot 2015-03-30 at 12.36.30.png

Screen Shot 2015-03-30 at 12.36.57.png

It can be easily extended with other operations and can use the workflows that are in the NSX plug-in delivered with vCO.

The advantage of using this plug-in is that it you have access to the source of the object definitions, the methods and can customize it at will.

Requisites:

  • vCO 5.5 U1 build 1617127 or greater
  • Dynamic Types plug-in 1951696 or greater
  • NSX 6.X

Download

Since Flowgrab has shutdown, this file is currently attached to this thread until Christophe Posts it to the Sample Exchange

Installation / Configuration:

  • Rename the downloaded package com.vmware.coe.plugin.dynamictypes.nsx.v2.package
  • Import the package
  • Run the "Plugin gen -1- Install plug-in" workflow, select the package you renamed
  • Run the "Plugin gen -2- Add new host" workflow. Enter a host URL starting with https:// (and not just the host name or http://. Choose basic authentication - upon validation the "Add a REST host" workflow may expect you to answer an user interaction if you did not imported the certificate before AND if you are running an old version of the HTTP-REST plug-in).
  • After a few minutes you can browse the inventory and right click on objects that have workflows associated with them

Disclaimers:

Material designed for PoC / educational / testing purposes. Use at your own risk.

Tags (3)
Attachments
Comments

Hi,

When you run the Plugin gen -2-Add new host workflow,

what do you select as the namespace and the rest host ? Is the REST host the NSX manager?

The namespace is listed in the inventory under DynamicTypes. Has a {} icon and has the name of NSX

The host is the NSX manager.

Christophe,

If I have previously had V1 of the plugin installed, is there any cleanup required before I can install V2?

Deleting the v1 namespace before installing v2 should work but unfortunately I cannot certify it since I had no time to test it.

Thank you. I'll give it a try and let you know Smiley Happy

This looks awesome! However, when I was browsing my list of items, the Security Policies section is failing to populate, NSX manager throws a 500 error stating 'The server encountered an internal error that prevented it from fulfilling this request.' It appears that the call to https://<NSXMGR>/api/2.0/services/policy/securitypolicy/all with the header 'accept' : 'application/json' is not a supported call yet (or there is something wrong with my nsx manager).  If i run the call in a REST client, it succeedes when I don't have the Accept: Application/json header, and fails when I do...

Are you able to browse security policies successfully?

Running the newest version of the plugin from flowgrab, and NSX 6.1.3.

This is odd since it was working (even if not yet officially supported) in previous versions of NSX. If other users of the plug-in could report on the version of NSX they are using this could help.

Sorry, I saw this earlier but didn't get as far as responding. It's probably not that helpful but we're using:

vCO 5.5.2.1951762

Dynamic Types 1.0.0.1951696

NSX 6.1.4.2691049

And Security Policies show up just fine.

looks like my lab NSX manager is having issues, or there is something in some security policy (special character, random spaces, who knows) causing the rest call to fail on json conversion.......when I try in a different environment with same version it works. Just ignore this I suppose...

Thanks for publishing the package! This could be extremely useful for me, since I only began learning to work with the REST API.

I have one question - is the package compatible with vRO 6.0? I'm using 6.0.3, with Dynamic Types 1.0.1 and the "Plugin gen -1- Install plug-in" workflow fails on the "Import configuration from Package" nested workflow, with the error: Cannot convert ch.dunes.model.fileattachment.MimeAttachment@2791dd52 to java.util.List (Workflow:Import Configuration From Package / Import Configuration (item3)#1)

I've downloaded the package from flowgrab.

Thanks!

You are the second person reporting this issue on this specific version of vRO. The first one was stvkpln‌. I suspect this is a 6.0.3 (or 6.0.2 ?) regression.

I suggest opening a support request if this is not done yet and as a work around use a previous version like 6.0.1.

Thanks,

Christophe.

New to Dynamic Types here; but do you have any tips on when this step fails "Run the "Plugin gen -1- Install plug-in" workflow" with this error "TypeError: Cannot call method "getContentAsMimeAttachment" of undefined (Dynamic Script Module name : importNamespaceResourceElementToConfiguration#200)"?

Hello, i am trying to download NSX-v Dynamic Types plug-in V2 from flowgrab link but link does not work

I just grabbed a copy I had on my local filesystem and updated the main post with that file as an attachment until Christophe is able to get it posted to the Sample Exchange.

thank you! I've installed it and will begin testing once i have network access to the NSX manager

i am running

NSX 6.2.4

Dynamic Types 1.0.1.2984801

vRO 6.0.3 and had nsx plugin 1.0.4 had to  downgrade to 1.0.2 since when trying to add an NSX endpoint it was failing.Now i can see my NSX from VRO but The NSX-v Dynamic Types plug-in V2 gives me validation errors on workflows when i try to run them, Unknown type 'DynamicTypes:NSX.NSXHost' used as Input parameter. Could it be i have to downgrade the V2  dynamic types plugins?

additionally if i try to run the "Plugin gen -1- Install plug-in", i get the following error: Parameter 'namespaces' is added to the linked workflow : Import Configuration From Package.

hello, cdecanini_​, what do you think about the previous issues i-ve mentioned? Could it be something with versions?

Is it OK to use in vRO 7.3, vRA 7.3, DynamicTypes 1.3.0.5416411, NSX plugin 1.2.0.6004830

Version history
Revision #:
1 of 1
Last update:
‎03-11-2015 10:23 AM
Updated by: