akamai/cli-sandbox

Sandbox Recipe file does not accept Property Version

akhiljay opened this issue · 3 comments

Issue Type: Bug

When trying to create a sandbox with two properties with property version, the CLI automatically pulls the first version of the property and creates a sandbox config based on that first version.

Below is the recipe file I used

{
  "sandbox": {
    "clonable": true,
    "name":"wap-ion-ipa-finaltest",
    "properties": [
      {
        "property": "a.foo.com",
        "propertyVersion": 24
      },
      {
        "property": "sandbox-playground",
        "propertyVersion": 10
      }
    ]
  },
  "clientConfig" : {
    "sandboxServerInfo": {
      "secure": false,
      "port": 5050,
      "host": "127.0.0.1"
    },
    "originMappings": [
    {
      "from": "origin-sandbox.akamai.tools",
      "to": {
        "secure": true,
        "port": 443,
        "host": "www.akamai.com",
        "hostHeader":"www.akamai.com"
      }
    },
    {
      "from": "origin.foo.com",
      "to": {
        "secure": true,
        "port": 443,
        "host": "developer.akamai.com",
        "hostHeader":"developer.akamai.com"
      }
    }
    ]
  }
}

When I use the API I am able to create the sandbox with the right property version.

Sandbox CLI recipe uses the same property format as defined for property option:

-p, --property <property_id | property_name : version>  Property to base the sandbox on.
        If an active version is not found, the most recent version is used.

So each of the following are allowed:

447903:4 // use property_id and version
447903 // use just property_id and latest version
www.example.com:4 // use hostname and version
www.example.com // use just hostname

Would that explanation help?

krzyk commented

@akhiljay Does the explanation in #39 (comment) help? If so please close this issue, thanks.

Closing, as it is working as explained.