@Override
Collection getOptionTypes() {
OptionType ot1 = new OptionType(
name: ‘IdentyAPIUrl’,
code: ‘identy-APIURL’,
fieldName: ‘identyapiurl’,
displayOrder: 0,
fieldLabel: ‘Identy API URL’,
required: true,
inputType: OptionType.InputType.TEXT,
fieldContext: ‘config’
)
OptionType ot2 = new OptionType(
name: ‘Domain Name’,
code: ‘domain-name’,
fieldName: ‘domainName’,
displayOrder: 1,
fieldLabel: ‘Domain Name’,
required: true,
inputType: OptionType.InputType.TEXT,
fieldContext: ‘config’
)
OptionType ot3 = new OptionType(
name: ‘Credentials’,
code: ‘credentials’,
fieldName: ‘Credentials’,
displayOrder: 2,
fieldLabel: ‘Credentials’,
required: true,
inputType: OptionType.InputType.CREDENTIAL,
dependsOn: ‘username,password’,
fieldContext: ‘config’
)
OptionType ot4 = new OptionType(
name: ‘User Name’,
code: ‘username’,
fieldName: ‘UserName’,
displayOrder: 3,
fieldLabel: ‘User Name’,
required: true,
inputType: OptionType.InputType.TEXT,
fieldContext: ‘config’
)
OptionType ot5 = new OptionType(
name: ‘Password’,
code: ‘password’,
fieldName: ‘Password’,
displayOrder: 4,
fieldLabel: ‘Password’,
required: true,
inputType: OptionType.InputType.PASSWORD,
fieldContext: ‘config’
)
OptionType ot6 = new OptionType(
name: ‘Projects’,
code: ‘projects’,
fieldName: ‘Projects’,
displayOrder: 5,
fieldLabel: ‘Projects’,
required: true,
inputType: OptionType.InputType.TEXT,
fieldContext: ‘config’
)
OptionType ot7 = new OptionType(
name: ‘Regions’,
code: ‘regions’,
fieldName: ‘Regions’,
displayOrder: 6,
fieldLabel: ‘Regions’,
required: false,
inputType: OptionType.InputType.TEXT,
fieldContext: ‘config’
)
OptionType sep1 = new OptionType(
name: 'Compute Service',
code: 'compute-service',
fieldName: 'ComputeService',
displayOrder: 10,
fieldLabel: 'Compute Service',
required: false,
inputType: OptionType.InputType.TEXT,
fieldContext: 'config'
)
OptionType sep2 = new OptionType(
name: 'Image Service',
code: 'image-service',
fieldName: 'ImageService',
displayOrder: 11,
fieldLabel: 'Image Service',
required: false,
inputType: OptionType.InputType.TEXT,
fieldContext: 'config'
)
OptionType sep3 = new OptionType(
name: 'Storage Service',
code: 'storage-service',
fieldName: 'StorageService',
displayOrder: 12,
fieldLabel: 'Storage Service',
required: false,
inputType: OptionType.InputType.TEXT,
fieldContext: 'config'
)
OptionType sep4 = new OptionType(
name: 'Network Service',
code: 'network-service',
fieldName: 'NetworkService',
displayOrder: 13,
fieldLabel: 'Network Service',
required: false,
inputType: OptionType.InputType.TEXT,
fieldContext: 'config'
)
OptionType sep5 = new OptionType(
name: 'Load Balancer Service',
code: 'load-balancer-service',
fieldName: 'LoadBalancerService',
displayOrder: 14,
fieldLabel: 'Load Balancer Service',
required: false,
inputType: OptionType.InputType.TEXT,
fieldContext: 'config'
)
OptionType sep6 = new OptionType(
name: 'Object Storage Service',
code: 'object-storage-service',
fieldName: 'ObjectStorageService',
displayOrder: 15,
fieldLabel: 'Object Storage Service',
required: false,
inputType: OptionType.InputType.TEXT,
fieldContext: 'config'
)
OptionType sep7 = new OptionType(
name: 'Shared File System Service',
code: 'shared-file-system-service',
fieldName: 'SharedFileSystemService',
displayOrder: 16,
fieldLabel: 'Shared File System Service',
placeHolderText: '',
required: false,
inputType: OptionType.InputType.TEXT,
fieldContext: 'config'
)
these are optionTypes i have. I wanted to create a group and put all the service related optionTypes under that group.
I am trying like this , but when upload plugin it shows “file not found” on Morpheus
def OptionTypeGroup =[
name: ‘Service Endpoints’,
code: ‘service-group’,
displayOrder: 1,
fieldContext: ‘config’,
optionTypes: [sep1,sep2,sep3,sep4,sep5,sep6,sep7]
]
Many thanks .