AzureCredential azureCredential = (AzureCredential) stack.getCredential();
byte[] encoded = Base64.encodeBase64(vmName.getBytes());
String label = new String(encoded);
Map<String, Object> props = new HashMap<>();
List<Port> ports = new ArrayList<>();
ports.add(new Port("Ambari", "8080", "8080", "tcp"));
ports.add(new Port("NameNode", "50070", "50070", "tcp"));
ports.add(new Port("RM Web", "8088", "8088", "tcp"));
ports.add(new Port("RM Scheduler", "8030", "8030", "tcp"));
ports.add(new Port("RM IPC", "8050", "8050", "tcp"));
ports.add(new Port("Job History Server", "19888", "19888", "tcp"));
ports.add(new Port("HBase Master", "60010", "60010", "tcp"));
ports.add(new Port("Falcon", "15000", "15000", "tcp"));
ports.add(new Port("Storm", "8744", "8744", "tcp"));
ports.add(new Port("Oozie", "11000", "11000", "tcp"));
ports.add(new Port("HTTP", "80", "80", "tcp"));
props.put(NAME, vmName);
props.put(DEPLOYMENTSLOT, PRODUCTION);
props.put(LABEL, label);
props.put(IMAGENAME,
azureTemplate.getImageName().equals(AzureStackUtil.IMAGE_NAME) ? po.getOsImageName() : azureTemplate.getImageName());