Plans disappear when changing customoptions.selectedcloud value in catalog config

Hi,

I have been working on a catalog with optionlists and inputs.

Currently in the morpheus environment we have one VMware cloud, however we will be deploying to a morpheus environment with mulitple clouds, so I want to verify that all the custom options in the catalog are working.

image

The only issue I’m having is if I change the cloud id to the customoptions.selectcloud, my plans list disappear on the catalog form so it’s empty.

If I leave it hardcoded to 1 everything works.

Just to check the outputs, I have added the customoptions.selectedcloud under customoptions and ran a ansible workflow and can see it being listed as ‘1’

I wondering whether it’s being pedantic and not liking ‘1’ and only accepting “1”

Any ideas why the plans entry would go blank when changing the id to customoptions input?

Cheers
Jon

What release are you on? Pre-Catalog Forms (6.1.0+)?

If pre-forms, what do your translation and request scripts look like for plan?

6.0.2

var i=0;
results = ;
for(i; i<data.length; i++) {
if (data[i].name.includes (‘Plan’))
{
results.push({name: data[i].name, value: data[i].value});
}
}

This filters out everything and only displays plans beginning with Plan.
I have removed the includes part out but that does not make a difference.

This works for me:

Description (A note to myself on this object):
needs to have siteId + zoneId (layoutId OR provisionTypeCode can be used for futher filtering and they will be pulled from catalog item config if hardcoded)

Translation:

for (var x = 0; x < data.length; x++) {
    results.push({name:data[x].name, value:data[x].id});
}

Request:

if (input.targetCloud && input.targetGroup) {
  results.siteId = input.targetGroup
  results.zoneId = input.targetCloud
}

though I usually just hardcode the provisionTypeCode in the Option LIst to be cloud specific. I.E -

Request:

if (input.targetCloud && input.targetGroup) {
  results.siteId = input.targetGroup
  results.zoneId = input.targetCloud
  results.provisionTypeCode == 'vmware'
}

Brill that works.

So if I create a catalog in master tenant and make it visible to all other tenants, then they also see the changes and it works.

If I have deploy the same catalog directly to a subtenant the plans are still blank.

Any ideas why that is the case?

Cheers
Jon

Make sure your Option Lists are all set to ‘Public’ so they are viewable/consumable in Subtenants

Yep a catalog in the master set to visible works fine.

It’s more if I deploy a catalog directly into a subtenant, so that subtenant has all the optionlists/inputs etc.
I don’t see plans etc when changing the catalog config for cloud id to the custom options.

Cheers
Jon

This is resolved, seperate issue where permissions to the subtenant were not set correctly.

1 Like