vmware-vra-gem icon indicating copy to clipboard operation
vmware-vra-gem copied to clipboard

Feature request: Remove requirement to provide the type and fail run if mandatory fields are not provided

Open stuartpreston opened this issue 5 years ago • 0 comments

Creating new issue from #75

@stuartpreston Hmm, I see what you mean. What you might need to do is one call to the Properties Service API of each Property Group found in the blueprint. Within the property group you will see mandatory value.

"properties": {
    "_deploymentName": {
      "facets": {
        "visibility": {
          "type": "constant",
          "value": {
            "type": "boolean",
            "value": true
          }
        },
        "encrypted": {
          "type": "constant",
          "value": {
            "type": "boolean",
            "value": false
          }
        },
        "mandatory": {
          "type": "constant",
          "value": {
            "type": "boolean",
            "value": true
          }
        },
        "defaultValue": {
          "type": "constant",
          "value": {
            "type": "string",
            "value": ""
          }
        }
      }
    },

Another thought that came to my mind if you end up improving the driver by finding out which properties are mandatory or not, would be to also look at the defaultValue.value.type. This would mean you would know exactly why type you need to send the property as. This means inside the kitchen.yml, it would be even simpler for the end user to fill out.

Example

platforms:
  - name: APP_Server
    driver:
      catalog_name: Application Basic
      subtenant_name: Windows Services
      cpus: 1
      memory: 2048
      notes: Notes go here
      extra_parameters:
        Deployment.PPMProjectCode: A PPM Project Code goes here
        Deployment.ServiceName: A Deployment Service Name goes here
        APP_Server~description: A Description for the App Server goes here
        APP_Server~My.Domain: A Domain here
        APP_Server~My.Network: A Network Name here
        APP_Server~My.SRM: A SRM here
        Deployment.AdditionalStringParameter: A string value
        Deployment.AdditionalIntegerParameter: 999
        Deployment.AdditionalBooleanParameter: true

Originally posted by @RoinGrindwald in https://github.com/chef-partners/vmware-vra-gem/issues/75#issuecomment-496716357

stuartpreston avatar Jun 04 '19 06:06 stuartpreston