Uploaded image for project: 'jclouds'
  1. jclouds
  2. JCLOUDS-1072

Add support for environment-specific run lists to Role and Role.Builder

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.9.2
    • 2.0.0
    • jclouds-chef
    • None

    Description

      The Role and Role.Builder classes in the org.jclouds.chef.domain package don't provide methods for manipulating environment-specific run list entries.

      The JSON representation of a Role that includes environment-specific run lists looks like this:

      {
        "name": "jclouds-role",
        "description": "",
        "json_class": "Chef::Role",
        "default_attributes": {
      
        },
        "override_attributes": {
      
        },
        "chef_type": "role",
        "run_list": [
      
        ],
        "env_run_lists": {
          "env1": [
            "recipe[env1.alpha]",
            "recipe[env1.bravo]"
          ],
          "env2": [
            "recipe[env2.alpha]",
            "recipe[env2.bravo]"
          ]
        }
      }
      

      To address this gap, I suggest the following changes:

      1. The constructor for org.jclouds.chef.domain.Role needs to include a parameter that contains the environment run list.
      2. The org.jclouds.chef.domain.Role should include a getter for the environment run list.
      3. The org.jclouds.chef.domain.Role.Builder class should include a method for adding an entry to the environment run list.

      I plan to prepare a pull request that will include these changes.

      Attachments

        Activity

          People

            Unassigned Unassigned
            rongallagher Ron Gallagher
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: