Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
stuartpreston opened this issue Jun 4, 2019 · 0 comments

Comments

@stuartpreston
Copy link

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 #75 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant