Management Pack Builder

  • 1.  How to deal better with SubLists

    Posted Sep 29, 2023 11:06 AM

    Hi,

    i'm facing an specific issue very often and i don't know how to handle it.

    Example:

    An API Returns a Array of Objects. Every Object has an SubArray with Objects with IDs id like to us for relationships.

    Example:

    VMware Cloud Director OpenAPI

    GET /cloudapi/1.0.0/vdcGroups (shortened)

    {
    	"values" : [
    		{
    			"id" : "urn:vcloud:vdcGroup:4e6b4c42-1faa-4fea-9180-30293c78a9be",
    			"orgId" : "urn:vcloud:org:b0c84fd0-ccc3-4f46-9378-410fdc8a1892",
    			"name" : "vdcG-O9510FM-imported-1",
    			"participatingOrgVdcs" : [
    				{
    					"vdcRef" : {
    						"name" : "O9510FM_GT02_KEDZI01-01",
    						"id" : "urn:vcloud:vdc:5433db3a-31ab-4ec3-9003-30ac28835934"
    					}
    				},
    				{
    					"vdcRef" : {
    						"name" : "O9510FM_GT02_IMKA002-01",
    						"id" : "urn:vcloud:vdc:5e3baa85-dd25-4d5d-8c81-3231e81334a8"
    					}
    				},
    				{
    					"vdcRef" : {
    						"name" : "O9510FM_GT02_KIRS071-01",
    						"id" : "urn:vcloud:vdc:118b6015-65b5-46e6-a389-2c4f67cb4b17"
    					}
    				},
    				{
    					"vdcRef" : {
    						"name" : "O9510FM_GT02_PETR078-01",
    						"id" : "urn:vcloud:vdc:e74c8e45-37ea-4d33-be67-c7addeae54af"
    					}
    				}
    			]
    		},
    		{
    			"id" : "urn:vcloud:vdcGroup:c769e632-080f-488c-b65b-fa73822aac2b",
    			"orgId" : "urn:vcloud:org:65ce7ee1-a2e0-49d0-b21f-2d86121d6f9a",
    			"name" : "vdcG-O9901SM-vcdNative-01",
    			"participatingOrgVdcs" : [
    				{
    					"vdcRef" : {
    						"name" : "O9901SM_GT02_01",
    						"id" : "urn:vcloud:vdc:f4f9c6a9-db42-46cb-a55d-45ba970ec6a3"
    					}
    				}
    			]
    		}
    	]
    }

    For Every Object in the "values" array i create a new "VDCgroup" object.

    Every orgVDC object i created i'd like to connect to a existing object in Aria as parent.

    The matching attribues is participatingOrgVdcs.vdcRef.id (so a VDCgroup can have multiple childs).

    How can this be archived? I didn't get it...

     

    Kind Regards,

    Marcel



  • 2.  RE: How to deal better with SubLists

    Broadcom Employee
    Posted Sep 29, 2023 05:37 PM

    Hi ,

    There is no way to make relationships based on sub-arrays with MP Builder today. We had it in the roadmap and I've moved it up in priority. Thanks for your detailed example -- it will be a big help in implementing this feature.

    Best regards,

    Mark



  • 3.  RE: How to deal better with SubLists

    Posted Sep 12, 2024 01:22 PM

    Has this feature been added to version 2.0?

    Thank you.




  • 4.  RE: How to deal better with SubLists

    Broadcom Employee
    Posted Sep 13, 2024 08:15 AM

    Hi @deanphelps - the relationships based on sub-arrays feature is still on the roadmap. It was not part of the 2.0 release. You can find release notes here.

    Best regards,

    Mark




  • 5.  RE: How to deal better with SubLists

    Posted Oct 10, 2024 11:06 AM

    Hey Mark,

    thumbs up for a push-up in priority. This feature is important for near all of my builded Management Packs! 

    best regards,

    Robert




  • 6.  RE: How to deal better with SubLists

    Posted Nov 15, 2024 02:11 PM

    Is there an ETA for this feature - pulling in sub-arrays and using the data for API chaining or object creation. This is needed for NSX-T API calls for edge/transport stats

    Thank you,

    Eric