Jump to: navigation, search

CLC

The input file must be in JSONObject format and include SPD parameters for a specific profile. The file must be encoded in UTF-8 format.

The input structure for a string type is described below:

{
	"Dialog name" : {
		"Input name" : "string"		
	} 	
}

Example

SPD Profile
<profile name="Install">
 <dialog step="Step1">
	<input name="NAME_PARAM1" title="PERSON NAME"  default="birit" type="string" required="true">
	   <description>Please enter the person name</description>
	</input>	
 </dialog>
 <dialog step="Step2">
	<input name="NAME_PARAM2" title="PERSON NAME"  default="birit" type="string" required="true">
	   <description>Please enter the person name</description>
	</input>	
 </dialog> 
 <execution>
	<script>
		log('string test' );
	</script>
 </execution>
</profile>

Input File for Install Profile
{
	"Step1" : {
		"NAME_PARAM1" : "Kate"		
	},
	"Step2" : {
		"NAME_PARAM2" : "John"
	}	
}

The input structure for a boolean type is described below:

{
	"Dialog name" : {
		"Input name" : true/false		
	} 	
}

Example

SPD Profile
<profile name="Install">
 <dialog step="Step1">
	<input name="STATUS" title="status"  type="boolean" required="true">
	   <description>status field</description>
	</input>	
 </dialog>
 <execution>
	<script>
		log('boolean test');
	</script>
 </execution>
</profile>

Input File for Install Profile
{
	"Step1" : {
		"STATUS" : true		
	}	
}

The input structure for an integer type is described below:

{
	"Dialog name" : {
		"Input name" : <integer>		
	} 	
}

Example

SPD Profile
<profile name="Install">
 <dialog step="Step1">
	<input name="NUMBER" title="number"  type="integer" required="true">
	   <description>number field</description>
	</input>	
 </dialog>
 <execution>
	<script>
		log('number test');
	</script>
 </execution>
</profile>

Input File for Install Profile
{
	"Step1" : {
		"NUMBER" : 132
	}	
}

The input structure for a password type is described below:

{
	"Dialog name" : {
		"Input name" : "password"
	} 	
}

Important
Input files that include sensitive data such as passwords should be encrypted using the SPD encrypt operation.

Example

SPD Profile
<profile name="Install">
 <dialog step="Step1">
	<input name="PASSWORD" title="password"  type="password" required="true">
	   <description>password field</description>
	</input>	
 </dialog>
 <execution>
	<script>
		log('password test');
	</script>
 </execution>
</profile>

Input File for Install Profile
{
	"Step1" : {
		"PASSWORD" : "xyz9846gdkjg"
	}	
}

The input structure for a selectOne type with an <objectselect> tag is described bellow:

{
	"Dialog name" : {
		"Input name" : {
			"objectselect" : {
				"filter" : [{
						"value" : "filter value",
						"name"  : "filter name"
					}
				]
			}
		}
	}
}

Important
CLC intersects (AND) filters defined in the SPD file and input file for a selectOne input. The filter criteria should be different in an SPD input file and filter names should differ in the same filter definition.

Example

SPD Profile
<profile name="Install">
 <dialog step="Step1">
	<input name="APP_OBJ_SELECT_ONE" title="Application Name" hidden="false" type="selectOne" default="">
				<description>select application</description>
				<objectselect>
					<filter value="CfgApplication" name="type"/>
				</objectselect>
	</input>	
 </dialog>
 <execution>
	<script>
		log('test select one' );
	</script>
 
 </execution>

Input File for Install Profile
{	
	"Step1" : {		
		"APP_OBJ_SELECT_ONE" : {
			"objectselect" : {
				"filter" : [{
						"value" : "SIP_lrm26",
						"name"  : "name"
					}
				]
			}
		}
	}
}

The input structure for a selectMultiple type with <objectselect> tag is described below:

{
	"Dialog name" : {
		"Input name" : {
			"objectselect" : {
				"filter" : [{
						"value" : "filter value",
						"name"  : "filter name"
					}
				]
			}
		}
	}
}

Filters defined in an SPD input file are joined in union (OR) and then intersect (AND) with filters defined in an SPD file for a selectMultiple input.

Example

SPD Profile
<profile name="Install">
 <dialog step="Step1">
	<input name="APP_OBJ_SELECT_MULTIPLE" title="Application Name" hidden="false" type="selectMultiple" default="">
				<description>select application</description>
				<objectselect>
					<filter value="CfgApplication" name="type"/>
				</objectselect>
	</input>
 </dialog>
 <execution>
	<script>
		log('test select multiple' );
	</script>
 
 </execution>

Input File for Install Profile
{	
	"Step1" : {		
		"APP_OBJ_SELECT_MULTIPLE" : {
			"objectselect" : {
				"filter" : [{
						"value" : "SIP_lrm26",
						"name"  : "name"
					},{
						"value" : "SIP_lrm27",
						"name"  : "name"
					}
				]
			}
		}
	}
}

The operation returns two applications named SIP_lrm26 and SIP_lrm27.

The input structure for a selectOne/selectMultiple/boolean type with <selection> tag is described below:

{
	"Dialog name" : {
		"Input name" : {
			"selection" : {
				"option" : [{
						"value" : "option value assigned to the input parameter",
						"name"  : "option name is displayed in UI"
					}
				]
			}
		}
	}
}

CLC selects options defined in the SPD input file. Multiple options can be specified only for the selectMultiple input type.

Example

SPD Profile
<profile name="Install">
 <dialog step="Application Parameters">
	<input name="DATA_MODEL" title="Binary Version (32-bit or 64-bit)" default="64" type="selectOne" required="true">
	    <description>This parameter defines the 32-bit or the 64-bit version of the binary to be deployed.  </description>
		<selection>
		    <option name="32" value="32"/>
		    <option name="64" value="64"/>
		</selection>
	</input>
 </dialog>
 <execution>
	<script>
		log('test selection support' );
	</script>
 
 </execution>

Input File for Install Profile
{	
	"Application Parameters" : {		
		"DATA_MODEL" : {
			"selection" : {
				"option" : [{
						"value" : "64",
						"name"  : "64"
					     }
				]
			}
		}
	}
}

Important
  • If the input file does not specify a value for a SPD parameter, the value defined in the default attribute of the input element will be used.
  • If an SPD input element has the required attribute set to true, but there is no corresponding input value that is supplied in either the SPD (as a default) or in the input file, then the SPD execution fails.
  • If an SPD input element has the readonly attribute value set to true, then the value in the default attribute value is used for the execution, if defined. If the readonly attribute value is set to true, required is set to false, and the default attribute is not defined, then the following logic is used for input value determination:
    1. For the boolean input type, the input value is set to false.
    2. For the string and password input types, the input value is set to "".
    3. For the integer input type, the input is not propagated.
  • If a dialog cond attribute value evaluates to false, the dialog is skipped by the CLC tool. Example:
     <dialog step="Role input" cond="false">
      <input name="ROLE" title="Role" hidden="false" type="selectOne" required="true">
    	<description>Please indicate the role</description>
    		<objectselect>
    			<filter value="CfgRole" name="type"/>
    		</objectselect>
    	</input>
     </dialog>

This page was last edited on June 17, 2014, at 13:38.
Comments or questions about this documentation? Contact us for support!