package com.cloudera.director.openstack.nova;

import com.cloudera.director.spi.v1.compute.ComputeInstanceTemplate.ComputeInstanceTemplateConfigurationPropertyToken;
import com.cloudera.director.spi.v1.model.ConfigurationProperty;
import com.cloudera.director.spi.v1.model.ConfigurationPropertyToken;
import com.cloudera.director.spi.v1.model.util.SimpleConfigurationPropertyBuilder;

public enum NovaInstanceTemplateConfigurationProperty implements ConfigurationPropertyToken{
	
	
     IMGER(new SimpleConfigurationPropertyBuilder()
    		 .configKey(ComputeInstanceTemplateConfigurationPropertyToken.IMAGE.unwrap().getConfigKey())
    		 .name("Image ID")
    		 .required(true)
    		 .widget(ConfigurationProperty.Widget.OPENLIST)
    		 .defaultDescription("The image id")
    		 .defaultErrorMessage("Image ID is mandatory")
    		 .build()),
     
     TYPE(new SimpleConfigurationPropertyBuilder()
    		 .configKey(ComputeInstanceTemplateConfigurationPropertyToken.TYPE.unwrap().getConfigKey())
    		 .name("Instance flavor")
    		 .required(true)
    		 .widget(ConfigurationProperty.Widget.OPENLIST)
    		 .defaultDescription("Size of image to launch")
    		 .defaultErrorMessage("Instance flavor is mandatory")
    		 .addValidValues(
    				 "m1.tiny","m1.small","m1.medium","m1.large","m1.xlarge")
    		 .build()),
     
     /**
      * Name of the key pair to use for new instances.
      */
     KEY_NAME(new SimpleConfigurationPropertyBuilder()
    		 .configKey("keyName")
    		 .name("Key name")
    		 .required(false)
    		 .widget(ConfigurationProperty.Widget.TEXT)
    		 .defaultDescription("The Nova key pair")
    		 .hidden(true)
    		 .build());
	/**
	 * The configuration property.
	 */
	private final ConfigurationProperty configurationProperty;
	
	/**
	 * Creates a configuration property token with the specified parameters.
	 * 
	 * @param configurationProperty the configuration property
	 */
	private NovaInstanceTemplateConfigurationProperty(ConfigurationProperty configurationProperty) {
		this.configurationProperty = configurationProperty;
	}
	
	@Override
	public ConfigurationProperty unwrap() {
		return configurationProperty;
	}
	
}

@@ -472,18 +472,385 @@
 Token%7B%0A%09
+ 
 %0A%09
+ /**%0A%09  * The availability zone.%0A%09  */%0A     AVAILABILITY_ZONE(new SimpleConfigurationPropertyBuilder()%0A    %09%09 .configKey(%22availabilityZone%22)%0A    %09%09 .name(%22Availability zone%22)%0A    %09%09 .widget(ConfigurationProperty.Widget.OPENLIST)%0A    %09%09 .defaultDescription(%22The availability zone%22)%0A    %09%09 .hidden(true)%0A    %09%09 .build()),%09%0A     %0A     /**%0A      * The image ID.%0A      */
 %0A     IM
@@ -1211,24 +1211,852 @@
 d()),%0A     %0A
+     /**%0A      * The IDs of the security groups (comma separated).%0A      */%0A     SECURITY_GROUP_IDS(new SimpleConfigurationPropertyBuilder()%0A    %09%09 .configKey(%22securityGroupIds%22)%0A    %09%09 .name(%22Security group IDs%22)%0A    %09%09 .widget(ConfigurationProperty.Widget.OPENLIST)%0A    %09%09 .required(true)%0A    %09%09 .defaultDescription(%22Specify the list of security group IDs.%22)%0A    %09%09 .defaultErrorMessage(%22Security group IDs are mandatory%22)%0A    %09%09 .build()),%0A     %0A     /**%0A      * The ID of the subnet.%0A      */%0A     SUNET_ID(new SimpleConfigurationPropertyBuilder()%0A    %09%09 .configKey(%22subnetId%22)%0A    %09%09 .name(%22Subnet ID%22)%0A    %09%09 .required(true)%0A    %09%09 .defaultDescription(%22The subnet ID%22)%0A    %09%09 .defaultErrorMessage(%22Subnet ID is mandatory%22)%0A    %09%09 .build()),%0A     %0A     /**%0A      * The instance type (e.g. m1.medium, m1.large, etc%0A      */%0A
      TYPE(ne

add NovaInstanceState.java