> + assertThat(stackFromList).isNotNull();
> + assertThat(stackFromList.getId()).isEqualTo(stack.getId());
> + for (String parmName : parameters.keySet()) {
> +
> assertThat(stackFromList.getParameters().containsKey(parmName)).isTrue();
> + }
> +
> + }
> + }
> +
> + public void testCreateWithFilesAndEnvironment() throws IOException,
> ParseException {
> + for (String region : api.getConfiguredRegions()) {
> + StackApi stackApi = api.getStackApi(region);
> + JSONParser parser = new JSONParser();
> + Map<String, String> files = new HashMap<String, String>();
> + Object obj =
> parser.parse(stringFromResource("/stack_with_environment_and_files.json"));
> + files.put("LCP-VolumeB.template.yaml",
> "{\"resources\":{\"ALU-LCP-Block-StorageB\":{\"properties\":{\"description\":\"Used
> for VM \\/storage
> partition.\",\"name\":{\"str_replace\":{\"template\":\"$stk-s01c$cardh0\",\"params\":{\"$card\":{\"get_param\":\"cardvB\"},\"$stk\":{\"get_param\":\"deployment_prefix\"}}}},\"size\":{\"get_param\":\"storage_size\"}},\"type\":\"OS::Cinder::Volume\"}},\"heat_template_version\":\"2013-05-23\",\"description\":\"Template
> to set up volumes for the initial
> deployment\",\"parameters\":{\"cardvB\":{\"default\":\"00\",\"description\":\"The
> (2 digit) virtual card number for server attached to volume when on shelf
> 0\",\"constraints\":[{\"length\":{\"min\":\"2\",\"max\":\"2\"}},{\"allowed_pattern\":\"^[0-9][0-9]$\"}],\"type\":\"string\"},\"deployment_prefix\":{\"description\":\"Name
> prefix for resources. It should match the system prefix\\nused in the FI
> worksheet but this is not
> enforced.\",\"constraints\":[{\"length\":{\"min\":\"5\",\"max\":\"1
4\"}},{\"allowed_pattern\":\"^[a-zA-Z0-9][a-zA-Z0-9_-]*$\"}],\"type\":\"string\"},\"storage_size\":{\"default\":\"4\",\"description\":\"GBs
for block
storage\",\"constraints\":[{\"range\":{\"min\":\"4\"}}],\"type\":\"number\"},\"group_index\":{\"default\":[],\"description\":\"List
of strings each pointing to one of the other parameters that is steped up for
each additional \\nresource of the same type added to the stack (e.g. at growth
event)\",\"type\":\"comma_delimited_list\"}},\"outputs\":{\"volumeId\":{\"description\":\"VolumeId\",\"value\":{\"get_resource\":\"ALU-LCP-Block-StorageB\"}}}}");
Can this be a stringFromResource, also?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/188/files#r28102314