chef / knife-vrealize

Plugin for Chef's knife tool to interact with VMware vRealize products
Apache License 2.0
13 stars 13 forks source link

I should not have to ask my Administrator for my subtenant-id #19

Open digitaljedi2 opened 8 years ago

digitaljedi2 commented 8 years ago

I was able to retrieve the subtenant-id by poking around the api I was able to obtain the subtenant-id with a get request to catalog-service/api/consumer/entitledCatalogItems. I think this subtenant-id should be displayed with a knife vra catalog list. Otherwise I cannot create VM's unless I can get the subtenant-id, and I shouldn't need to ask my Administrator for this information.

<snip>
{
  "links": [],
  "content": [
    {
      "@type": "ConsumerEntitledCatalogItem",
      "catalogItem": {
        "id": "****-87aa-4f79-92b8-*****",
        "version": 2,
        "name": "ubuntu-trusty-64",
        "description": "Ubuntu Trusty 64Bit",
        "status": "PUBLISHED",
        "statusName": "Published",
        "organization": {
          "tenantRef": "OPS",
          "tenantLabel": "OPS",
          "subtenantRef": null,
          "subtenantLabel": null
        },
        "providerBinding": {
          "bindingId": "*****-5c36-46c5-97ee-4e4c88fdcf14",
          "providerRef": {
            "id": "14a0a6b8-5d16-4a3e-35g3-a7335f31gegb",
            "label": "iaas-service"
          }
        },
        "forms": null,
        "callbacks": null,
        "isNoteworthy": false,
        "dateCreated": "2015-08-06T12:12:13.137Z",
        "lastUpdatedDate": "2015-08-07T09:55:35.774Z",
        "iconId": "583929c7-87aa-4f79-92b8-47feedb30908",
        "catalogItemTypeRef": {
          "id": "Infrastructure.Virtual",
          "label": "Virtual Machine"
        },
        "serviceRef": {
          "id": "3ac5d618-2fa7-455d-afe8-29e11084f1a9",
          "label": "ubuntu-trusty-64"
        },
        "outputResourceTypeRef": {
          "id": "Infrastructure.Virtual",
          "label": "Virtual Machine"
        }
      },
      "entitledOrganizations": [
        {
          "tenantRef": "Ops",
          "tenantLabel": "Ops",
          "subtenantRef": "this-is-the-subtenant-id-required-for-creating-vms",
          "subtenantLabel": "Operations-BusinessGroup"
        }
      ]
    },
</snip>
adamleff commented 8 years ago

This is only true if the catalog item is directly associated with a subtenant. Global catalog items do not show a subtenant. I agree that a better user experience would be for us to detect if we can see the subtenant and use it if it's there, however it's not universal that the data will be available to us.

Pull requested are always welcome :)

mcascone commented 7 years ago

Agree, i had to go into the vrealize console to see the subtenant in an already-spun machine, as it did not come back from knife vra catalog list.