anujdixit
Contributor
Contributor

6.5 To 6.7 SDK migration: Related objects list retrieve issue

Hello,

As part of 6.7 SDK migration, I have to remove related items tag from plugin.xml and have to implement same using Angular scripts.

In 6.5 "/list/ex/" api was responsible to return all related items.

In 6.7 i am using the same api but response of api is not getting filtered against the objectId. Hence I am getting data for all registered host.

If I have registered 3 host and each have 1 Chassis then i am getting 3 chassis list in response.

it must be filtered as per the object id which I passed in https request.

Details : 

  • I have three host registered with my plugin ( xx.xx.xx.8, xx.xx.xx.10, xx.xx.xx.156).
  • I queried chassis list for host
  • Expected response : Chassis list for xx.xx.xx.8.  should be returned.
  • Actual result : I am getting chassis list for xx.xx.xx.8, xx.xx.xx.10, xx.xx.xx.156.

Below is the https request/ response in my case.

Am I doing right thing ? What is the right  way to fetch related objects list in 6.7 SDK? Can some one please help me here. I am stuck and not able to find the right solution for this.

Api : https://<ip>/ui/list/ex/

Method: POST

request :

{

   "constraintObjectId":"urn:ucs:myUCS:UcsHandleMap:UCS%252F%252Fxx.xx.xx.8",

   "queryFilterId":"relatedItemsListFilterId",

   "filterParams":[

      "chassisForUcs"

   ],

   "requestedProperties":[

      "id",

      "primaryIconId",

      "name",

      "labelIds",

      "model",

      "vendor",

      "operState",

      "thermal",

      "power",

      "operability",

      "configState"

   ],

   "dataModels":[

      "myUCS:EquipmentChassisMap"

   ],

   "take":500,

   "skip":0,

   "page":1,

   "pageSize":500,

   "sort":[

      {

         "field":"name",

         "dir":"asc"

      }

   ],

   "group":[

   ],

   "listViewId":"com.myPlugin.ucs.vcplugin.chassis.list",

   "isLiveRefreshRequest":false

}

----------------------------------------

Response :

{

   "data":[

      {

         "labelIds":null,

         "vendor":"",

         "operState":"power-problem",

         "name":"chassis-1",

         "thermal":"ok",

         "primaryIconId":null,

         "model":"6508",

         "id":"urn:ucs:myUCS:EquipmentChassisMap:UCS%252F%252Fxx.xx.xx.156%252F%252Fsys%252Fchassis-1",

         "power":"redundancy-failed",

         "configState":"ok",

         "operability":"operable"

      },

      {

         "labelIds":null,

         "vendor":"",

         "operState":"power-problem",

         "name":"chassis-1",

         "thermal":"ok",

         "primaryIconId":null,

         "model":"6508",

         "id":"urn:ucs:myUCS:EquipmentChassisMap:UCS%252F%252Fxx.xx.xx.10%252F%252Fsys%252Fchassis-1",

         "power":"redundancy-failed",

         "configState":"ok",

         "operability":"operable"

      },

      {

         "labelIds":null,

         "vendor":"",

         "operState":"power-problem",

         "name":"chassis-1",

         "thermal":"ok",

         "primaryIconId":null,

         "model":"6508",

         "id":"urn:ucs:myUCS:EquipmentChassisMap:UCS%252F%252Fxx.xx.xx.8%252F%252Fsys%252Fchassis-1",

         "power":"redundancy-failed",

         "configState":"ok",

         "operability":"operable"

      }

   ],

   "totalResultCount":6

}

0 Kudos
0 Replies