{
"Resources": [
{
"Uri": "/cli/v1/storage",
"Interfaces": [
{
"Type": "Patch",
"Description": "Configure storage device"
}
]
},
{
"Uri": "/cli/v1/storage/addld",
"Interfaces": [
{
"Type": "Patch",
"Description": "Add a logical drive on already existing disk array",
"Usage": "\n ipmcset -t storage -d addld -v <RAID Controller ID> -array <Disk array ID> [<raidlevel>]\n [-name <LD name>] [-size <LD size>{m|g|t}] [-ss <64K|128K|256K|512K|1M>]\n [-rp <ra|nra>] [-wp <wt|wbwithbbu|wb>] [-iop <cio|dio>] [-ap <rw|ro|blocked>] [-dcp <enabled|disabled|default>]\n [-init <no|quick|full>] [-block <block index>]",
"Confirm": {
"Condition": true,
"Description": "WARNING: The operation may have many adverse effects.\nDo you want to continue?[Y/N]:"
},
"ReqBody": {
"Type": "object",
"Required": true,
"Properties": {
"controlid": {
"Required": true,
"Validator": [
{
"Type": "Range",
"Formula": [
0,
255
]
}
],
"Description": "\n -v <RAID Controller ID> The RAID controller on which logical drive will be created. It is mandatory."
},
"arrayid": {
"Required": true,
"Validator": [
{
"Type": "Range",
"Formula": [
0,
255
]
}
],
"Description": "\n -array <Disk array ID> The array that logical drive will be added. It is mandatory."
},
"ldname": {
"Validator": [
{
"Type": "Length",
"Formula": [
null,
15
]
}
],
"Description": "\n -name <LD name> Logical drive name. 15 ASCII characters is maximum. It is optional.\n The value can't be same as the options if it starts with '-'."
},
"ldsize": {
"Validator": [
{
"Type": "Regex",
"Formula": "^[0-9]+([.][0-9]+)?[m,g,t,M,G,T]{1}$"
}
],
"Description": "\n -size <LD size>{m|g|t} The size of logical drive and the uint can be 'm'(megabytes) , 'g'(gigabytes) , 't'(terabytes). It is optional.\n If this option is not specified, the size of logical drive depends on the usable size of each array."
},
"stripesize": {
"Validator": [
{
"Type": "Enum",
"Formula": [
"16K",
"32K",
"64K",
"128K",
"256K",
"512K",
"1M",
255
]
}
],
"Description": "\n -ss <64K|128K|256K|512K|1M> Logical drive strip size. The recommended range is 64K ~ 1M. It is optional. The default of strip size is '256K'."
},
"rpvalue": {
"Validator": [
{
"Type": "Enum",
"Formula": [
"ra",
"nra",
255
]
}
],
"Description": "\n -rp <ra|nra> Logical drive read policy. It is optional. The default of read policy is 'Read Ahead'.\n ra = Read ahead\n nra = No Read ahead\n"
},
"wpvalue": {
"Validator": [
{
"Type": "Enum",
"Formula": [
"wt",
"wbwithbbu",
"wb",
255
]
}
],
"Description": "\n -wp <wt|wbwithbbu|wb> Logical drive write policy. It is optional. the default of write policy is 'Write Back with BBU'.\n wt = Write through\n wbwithbbu = Write back with BBU\n wb = Write back"
},
"iopvalue": {
"Validator": [
{
"Type": "Enum",
"Formula": [
"cio",
"dio",
255
]
}
],
"Description": "\n -iop <cio|dio> Logical drive IO policy. It is optional. The default of IO policy is 'Direct IO'.\n cio = Cached IO\n dio = Direct IO"
},
"apvalue": {
"Validator": [
{
"Type": "Enum",
"Formula": [
"rw",
"ro",
"blocked",
255
]
}
],
"Description": "\n -ap <rw|ro|blocked> Logical drive access policy. It is optional. The default of access policy is 'Read Write'.\n rw = Read write\n ro = Read only\n blocked = Blocked"
},
"dcpvalue": {
"Validator": [
{
"Type": "Enum",
"Formula": [
"enabled",
"disabled",
"default"
]
}
],
"Description": "\n -dcp <enabled|disabled|default> Logical drive disk cache policy. It is optional. The default of disk cache policy is 'Enabled'.\n enabled = Enable disk cache\n disabled = Disable disk cache\n default = Unchanged and determined by disk type"
},
"initmode": {
"Validator": [
{
"Type": "Enum",
"Formula": [
"no",
"quick",
"full",
"rpi",
"opo"
]
}
],
"Description": "\n -init <no|quick|full> Logical drive init type. It is optional. The default of init type is 'None'.\n no = Don't initialize the logical drive\n quick = Quickly initialize the logical drive\n full = Fully initialize the logical drive"
},
"blockid": {
"Validator": [
{
"Type": "Range",
"Formula": [
-1,
32
]
}
],
"Description": "\n -block <block index> Continuous space to which a logical drive is to be added. It is optional."
},
"AccelerationMethod": {},
"VolumeRaidType": {
"Type": "number"
},
"cachecade": {
"Type": "number"
}
}
},
"RspBody": {
"ControlidExist": "${Statements/ControlidExist()}"
},
"Statements": {
"ControlidExist": {
"Input": "${ProcessingFlow[1]/Destination/Path}",
"Steps": [
{
"Type": "Script",
"Formula": "return (type(Input) == 'string' and Input ~= '')"
}
]
},
"AccelerationMethod": {
"Input": "${ReqBody/AccelerationMethod}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "no",
"To": 0
},
{
"Case": "cache",
"To": 1
},
{
"Case": "iobypass",
"To": 2
},
{
"To": 255
}
]
}
]
},
"blockid": {
"Input": "${ReqBody/blockid}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": -1,
"To": 255
}
]
}
]
},
"Capacity": {
"Steps": [
{
"Type": "Script",
"Formula": "return tonumber(string.sub(ReqBody.ldsize, 1 , -2))"
}
]
},
"CapacityUnit": {
"Steps": [
{
"Type": "Script",
"Formula": "return string.sub(ReqBody.ldsize, -1)"
},
{
"Type": "Switch",
"Formula": [
{
"Case": "m",
"To": 0
},
{
"Case": "g",
"To": 1
},
{
"Case": "t",
"To": 2
},
{
"Case": "M",
"To": 0
},
{
"Case": "G",
"To": 1
},
{
"Case": "T",
"To": 2
}
]
}
]
},
"stripesize": {
"Input": "${ReqBody/stripesize}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "16K",
"To": 5
},
{
"Case": "32K",
"To": 6
},
{
"Case": "64K",
"To": 7
},
{
"Case": "128K",
"To": 8
},
{
"Case": "256K",
"To": 9
},
{
"Case": "512K",
"To": 10
},
{
"Case": "1M",
"To": 11
}
]
}
]
},
"rpvalue": {
"Input": "${ReqBody/rpvalue}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "ra",
"To": 1
},
{
"Case": "nra",
"To": 0
}
]
}
]
},
"wpvalue": {
"Input": "${ReqBody/wpvalue}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "wt",
"To": 0
},
{
"Case": "wbwithbbu",
"To": 1
},
{
"Case": "wb",
"To": 2
}
]
}
]
},
"iopvalue": {
"Input": "${ReqBody/iopvalue}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "cio",
"To": 0
},
{
"Case": "dio",
"To": 1
},
{
"To": 255
}
]
}
]
},
"apvalue": {
"Input": "${ReqBody/apvalue}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "rw",
"To": 0
},
{
"Case": "ro",
"To": 1
},
{
"Case": "blocked",
"To": 2
},
{
"To": 255
}
]
}
]
},
"dcpvalue": {
"Input": "${ReqBody/dcpvalue}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "enabled",
"To": 1
},
{
"Case": "disabled",
"To": 2
},
{
"Case": "default",
"To": 0
},
{
"To": 1
}
]
}
]
},
"initmode": {
"Input": "${ReqBody/initmode}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "no",
"To": 0
},
{
"Case": "quick",
"To": 1
},
{
"Case": "full",
"To": 2
},
{
"Case": "rpi",
"To": 3
},
{
"Case": "opo",
"To": 4
},
{
"To": 0
}
]
}
]
}
},
"ProcessingFlow": [
{
"Type": "Method",
"Path": "/bmc/kepler/MdbService",
"Interface": "bmc.kepler.Mdb",
"Name": "GetPath",
"Params": [
"bmc.kepler.Systems.Storage.Controller",
{
"Id": "${ReqBody/controlid}"
},
false
],
"Destination": {
"Path": "Path"
}
},
{
"Type": "Task",
"Path": "${ProcessingFlow[1]/Destination/Path}",
"Interface": "bmc.kepler.Systems.Storage.Controller.VolumeManage",
"Name": "CreateVolumeInExisingtArray",
"Params": [
"${ReqBody/arrayid}",
"${Statements/blockid()}",
"${ReqBody/VolumeRaidType}",
255,
"${ReqBody/ldname}",
"${Statements/Capacity()}",
"${Statements/CapacityUnit()}",
"${Statements/stripesize()}",
"${Statements/rpvalue()}",
"${Statements/wpvalue()}",
"${Statements/iopvalue()}",
"${Statements/apvalue()}",
"${Statements/dcpvalue()}",
"${Statements/initmode()}",
"${Statements/AccelerationMethod()}"
]
}
],
"Echoes": [
"ipmcset/storage_addld",
""
]
}
]
},
{
"Uri": "/cli/v1/storage/createld",
"Interfaces": [
{
"Type": "Patch",
"Description": "Create a logical drive",
"Usage": "\n ipmcset -t storage -d createld -v <RAID Controller ID> -rl <r0|r1|r5|r6|r10|r50|r60> -pd <PD ID separated by commas>\n [-cachecade] [-sc <Span Count>] [-name <LD name>] [-size <LD size>{m|g|t}] [-ss <64K|128K|256K|512K|1M>]\n [-rp <ra|nra>] [-wp <wt|wbwithbbu|wb>] [-iop <cio|dio>] [-ap <rw|ro|blocked>] [-dcp <enabled|disabled|default>]\n [-init <no|quick|full>]",
"Confirm": {
"Condition": true,
"Description": "WARNING: The operation may have many adverse effects.\nDo you want to continue?[Y/N]:"
},
"ReqBody": {
"Type": "object",
"Required": true,
"Properties": {
"controlid": {
"Required": true,
"Validator": [
{
"Type": "Range",
"Formula": [
0,
255
]
}
],
"Description": "\n -v <RAID Controller ID> The RAID controller on which logical drive will be created. It is mandatory."
},
"raidlevel": {
"Required": true,
"Description": "\n -rl <r0|r1|r5|r6|r10|r50|r60> Logical drive RAID level. It is mandatory. When '-cachecade' is specified, RAID level 0/1 is valid.\n r0 = RAID0\n r1 = RAID1\n r5 = RAID5\n r6 = RAID6\n r10 = RAID10\n r50 = RAID50\n r60 = RAID60"
},
"pdid": {
"Required": true,
"Validator": [
{
"Type": "Regex",
"Formula": "^[0-9]+([,][0-9]+)*$"
}
],
"Description": "\n -pd <PD ID separated by commas> Physical drives ID participated in this logical drive, seperated by commas. It is mandatory."
},
"cachecade": {
"Validator": [
{
"Type": "Enum",
"Formula": [
0,
1
]
}
],
"Description": "\n -cachecade Logical drive is used for secondary cache. It is optional. It must be supported by RAID controller first."
},
"spannum": {
"Description": "\n -sc <Span Count> Logical drive span count. 8 is maximum. It will be 1 on RAID0/1/5/6 and 2 on RAID10/50/60 by default."
},
"ldname": {
"Validator": [
{
"Type": "Length",
"Formula": [
null,
15
]
}
],
"Description": "\n -name <LD name> Logical drive name. 15 ASCII characters is maximum. It is optional.\n The value can't be same as the options if it starts with '-'."
},
"ldsize": {
"Validator": [
{
"Type": "Regex",
"Formula": "^[0-9]+([.][0-9]+)?[m,g,t,M,G,T]{1}$"
}
],
"Description": "\n -size <LD size>{m|g|t} The size of logical drive and the uint can be 'm'(megabytes) , 'g'(gigabytes) , 't'(terabytes). It is optional.\n If this option is not specified, the size of logical drive depends on the usable size of each array."
},
"stripesize": {
"Validator": [
{
"Type": "Enum",
"Formula": [
"16K",
"32K",
"64K",
"128K",
"256K",
"512K",
"1M",
255
]
}
],
"Description": "\n -ss <64K|128K|256K|512K|1M> Logical drive strip size. The recommended range is 64K ~ 1M. It is optional. The default of strip size is '256K'."
},
"rpvalue": {
"Validator": [
{
"Type": "Enum",
"Formula": [
"ra",
"nra",
255
]
}
],
"Description": "\n -rp <ra|nra> Logical drive read policy. It is optional. The default of read policy is 'Read Ahead'.\n ra = Read ahead\n nra = No Read ahead\n"
},
"wpvalue": {
"Validator": [
{
"Type": "Enum",
"Formula": [
"wt",
"wbwithbbu",
"wb",
255
]
}
],
"Description": "\n -wp <wt|wbwithbbu|wb> Logical drive write policy. It is optional. the default of write policy is 'Write Back with BBU'.\n wt = Write through\n wbwithbbu = Write back with BBU\n wb = Write back"
},
"iopvalue": {
"Validator": [
{
"Type": "Enum",
"Formula": [
"cio",
"dio",
255
]
}
],
"Description": "\n -iop <cio|dio> Logical drive IO policy. It is optional. The default of IO policy is 'Direct IO'.\n cio = Cached IO\n dio = Direct IO"
},
"apvalue": {
"Validator": [
{
"Type": "Enum",
"Formula": [
"rw",
"ro",
"blocked",
255
]
}
],
"Description": "\n -ap <rw|ro|blocked> Logical drive access policy. It is optional. The default of access policy is 'Read Write'.\n rw = Read write\n ro = Read only\n blocked = Blocked"
},
"dcpvalue": {
"Validator": [
{
"Type": "Enum",
"Formula": [
"enabled",
"disabled",
"default",
255
]
}
],
"Description": "\n -dcp <enabled|disabled|default> Logical drive disk cache policy. It is optional. The default of disk cache policy is 'Enabled'.\n enabled = Enable disk cache\n disabled = Disable disk cache\n default = Unchanged and determined by disk type"
},
"initmode": {
"Validator": [
{
"Type": "Enum",
"Formula": [
"no",
"quick",
"full",
"rpi",
"opo",
255
]
}
],
"Description": "\n -init <no|quick|full> Logical drive init type. It is optional. The default of init type is 'None'.\n no = Don't initialize the logical drive\n quick = Quickly initialize the logical drive\n full = Fully initialize the logical drive"
},
"AccelerationMethod": {
"Validator": [
{
"Type": "Enum",
"Formula": [
"no",
"cache",
"iobypass",
255
]
}
],
"Description": "\n -acc <no|cache|iobypass> Logical drive acceleration method. \nIt is optional and not involved when '-cachecade' is specified.\n"
},
"AssociateLd": {
"Type": "integer",
"Validator": [
{
"Type": "Range",
"Formula": [
0,
65535
]
}
],
"Description": "\n -associatedld <LD ID> General Logical Drive ID associated with cachecade. It is mandatory when '-cachecade' is specified"
},
"CacheLineSize": {
"Validator": [
{
"Type": "Enum",
"Formula": [
"64K",
"256K"
]
}
],
"Description": "\n -cls <64K|256K> Cache Line Size. It is optional and not involved when '-cachecade' is not specified.\nIf this option is not specified, the default of cache line size is 64K.\n"
}
}
},
"RspBody": {
"ControlidExist": "${Statements/ControlidExist()}",
"cachecade": "${Statements/cachecade()}"
},
"Statements": {
"AccelerationMethod": {
"Input": "${ReqBody/AccelerationMethod}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "no",
"To": 1
},
{
"Case": "cache",
"To": 2
},
{
"Case": "iobypass",
"To": 3
},
{
"To": 255
}
]
}
]
},
"cachecade": {
"Input": "${ReqBody/cachecade}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": 1,
"To": true
},
{
"To": false
}
]
}
]
},
"Capacity": {
"Steps": [
{
"Type": "Script",
"Formula": "return tonumber(string.sub(ReqBody.ldsize, 1 , -2))"
}
]
},
"CapacityUnit": {
"Steps": [
{
"Type": "Script",
"Formula": "return string.sub(ReqBody.ldsize, -1)"
},
{
"Type": "Switch",
"Formula": [
{
"Case": "m",
"To": 0
},
{
"Case": "g",
"To": 1
},
{
"Case": "t",
"To": 2
},
{
"Case": "M",
"To": 0
},
{
"Case": "G",
"To": 1
},
{
"Case": "T",
"To": 2
}
]
}
]
},
"stripesize": {
"Input": "${ReqBody/stripesize}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "16K",
"To": 5
},
{
"Case": "32K",
"To": 6
},
{
"Case": "64K",
"To": 7
},
{
"Case": "128K",
"To": 8
},
{
"Case": "256K",
"To": 9
},
{
"Case": "512K",
"To": 10
},
{
"Case": "1M",
"To": 11
}
]
}
]
},
"rpvalue": {
"Input": "${ReqBody/rpvalue}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "ra",
"To": 1
},
{
"Case": "nra",
"To": 0
}
]
}
]
},
"wpvalue": {
"Input": "${ReqBody/wpvalue}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "wt",
"To": 0
},
{
"Case": "wbwithbbu",
"To": 1
},
{
"Case": "wb",
"To": 2
}
]
}
]
},
"iopvalue": {
"Input": "${ReqBody/iopvalue}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "cio",
"To": 0
},
{
"Case": "dio",
"To": 1
},
{
"To": 255
}
]
}
]
},
"apvalue": {
"Input": "${ReqBody/apvalue}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "rw",
"To": 0
},
{
"Case": "ro",
"To": 1
},
{
"Case": "blocked",
"To": 2
},
{
"To": 255
}
]
}
]
},
"dcpvalue": {
"Input": "${ReqBody/dcpvalue}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "enabled",
"To": 1
},
{
"Case": "disabled",
"To": 2
},
{
"Case": "default",
"To": 0
},
{
"To": 1
}
]
}
]
},
"initmode": {
"Input": "${ReqBody/initmode}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "no",
"To": 0
},
{
"Case": "quick",
"To": 1
},
{
"Case": "full",
"To": 2
},
{
"Case": "rpi",
"To": 3
},
{
"Case": "opo",
"To": 4
},
{
"To": 0
}
]
}
]
},
"DriveList": {
"Steps": [
{
"Type": "Plugin",
"Formula": "orchestrator.storage.split_str(ReqBody.pdid, ',')"
}
]
},
"ControlidExist": {
"Input": "${ProcessingFlow[1]/Destination/Path}",
"Steps": [
{
"Type": "Script",
"Formula": "return (type(Input) == 'string' and Input ~= '')"
}
]
},
"CacheLineSize": {
"Input": "${ReqBody/CacheLineSize}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "64K",
"To": 1
},
{
"Case": "256K",
"To": 4
}
]
}
]
}
},
"ProcessingFlow": [
{
"Type": "Method",
"Path": "/bmc/kepler/MdbService",
"Interface": "bmc.kepler.Mdb",
"Name": "GetPath",
"Params": [
"bmc.kepler.Systems.Storage.Controller",
{
"Id": "${ReqBody/controlid}"
},
false
],
"Destination": {
"Path": "Path"
}
},
{
"Type": "Task",
"Path": "${ProcessingFlow[1]/Destination/Path}",
"Interface": "bmc.kepler.Systems.Storage.Controller.VolumeManage",
"Name": "CreateVolumeInNewArray",
"Params": [
"${Statements/DriveList()}",
"${ReqBody/raidlevel}",
"${ReqBody/spannum}",
"${ReqBody/ldname}",
"${Statements/Capacity()}",
"${Statements/CapacityUnit()}",
"${Statements/stripesize()}",
"${Statements/rpvalue()}",
"${Statements/wpvalue()}",
"${Statements/iopvalue()}",
"${Statements/apvalue()}",
"${Statements/dcpvalue()}",
"${Statements/initmode()}",
"${Statements/AccelerationMethod()}"
],
"CallIf": {
"${Statements/cachecade()}": false
}
},
{
"Type": "Task",
"Path": "${ProcessingFlow[1]/Destination/Path}",
"Interface": "bmc.kepler.Systems.Storage.Controller.VolumeManage",
"Name": "CreateCachecadeVolume",
"Params": [
"${Statements/DriveList()}",
"${ReqBody/raidlevel}",
"${ReqBody/ldname}",
"${Statements/wpvalue()}",
65535,
"${Statements/Capacity()}",
"${Statements/CapacityUnit()}",
"${ReqBody/AssociateLd}",
"${Statements/CacheLineSize()}"
],
"CallIf": {
"${Statements/cachecade()}": true
}
}
],
"Echoes": [
"ipmcset/storage_createld",
""
]
}
]
},
{
"Uri": "/cli/v1/storage/deleteld",
"Interfaces": [
{
"Type": "Patch",
"Description": "Delete a logical drive",
"Usage": "ipmcset -t storage -d deleteld -v <RAID Controller ID> <Logical Drive ID>",
"Confirm": {
"Condition": true,
"Description": "WARNING: The operation may have many adverse effects.\nDo you want to continue?[Y/N]:"
},
"ReqBody": {
"Type": "object",
"Required": true,
"Properties": {
"ContollerId": {
"Type": "integer",
"Required": true,
"Validator": [
{
"Type": "Range",
"Formula": [
0,
null
]
}
]
},
"DriveId": {
"Type": "integer",
"Required": true,
"Validator": [
{
"Type": "Range",
"Formula": [
0,
65535
]
}
]
}
}
},
"RspBody": {
"GetPathSuccess": "${Statements/GetPathSuccess()}"
},
"Statements": {
"GetPathSuccess": {
"Steps": [
{
"Type": "Script",
"Formula": "local path = ProcessingFlow[1].Destination.Path return type(path) == 'string' and #path > 0"
}
]
}
},
"ProcessingFlow": [
{
"Type": "Method",
"Path": "/bmc/kepler/MdbService",
"Interface": "bmc.kepler.Mdb",
"Name": "GetPath",
"Params": [
"bmc.kepler.Systems.Storage.Controller",
{
"Id": "${ReqBody/ContollerId}"
},
false
],
"Destination": {
"Path": "Path"
}
},
{
"Type": "Task",
"Path": "${ProcessingFlow[1]/Destination/Path}",
"Interface": "bmc.kepler.Systems.Storage.Controller.VolumeManage",
"Name": "DeleteVolume",
"Params": [
"${ReqBody/DriveId}"
],
"Destination": {
"TaskId": "TaskId"
}
}
],
"Echoes": [
"ipmcset/storage_deleteld",
""
]
}
]
},
{
"Uri": "/cli/v1/storage/ctrlconfig",
"Interfaces": [
{
"Type": "Patch",
"Description": "Set RAID controller configurations",
"Usage": "ipmcset -t storage -d ctrlconfig -v <RAID Controller ID> <[-cb <enabled|disabled>] [-smartercb <enabled|disabled>] [-jbod <enabled|disabled>] [-mode <RAID|HBA|JBOD|Mixed>] [-restore]>\n",
"Example": [
"ipmcset -t storage -d ctrlconfig -v 0 -cb enabled -smartercb enabled -jbod enabled -mode RAID",
"ipmcset -t storage -d ctrlconfig -v 0 -restore"
],
"Confirm": {
"Condition": true,
"Description": "WARNING: The operation may have many adverse effects.\nDo you want to continue?[Y/N]:"
},
"ReqBody": {
"Type": "object",
"Required": true,
"Properties": {
"ControlId": {
"Type": "number",
"Required": true,
"Validator": [
{
"Type": "Range",
"Formula": [
0,
255
]
}
],
"Description": " -v <RAID Controller ID> The RAID controller which will be set. It is mandatory.\n"
},
"CopyBackState": {
"Validator": [
{
"Type": "Enum",
"Formula": [
"enabled",
"disabled",
"default"
]
}
],
"Description": " -cb <enabled|disabled> Set RAID controller Copyback to be enabled or disabled.\n enabled = Enable RAID controller Copyback\n disabled = Disable RAID controller Copyback\n\n"
},
"SmarterCopyBackState": {
"Validator": [
{
"Type": "Enum",
"Formula": [
"enabled",
"disabled",
"default"
]
}
],
"Description": " -smartercb <enabled|disabled> Set RAID controller Copyback on SMART error to be enabled or disabled. It will be disabled when 'Copyback' is disabled.\n enabled = Enable RAID controller Copyback on SMART error. It can be enabled only when Copyback is enabled\n disabled = Disable RAID controller Copyback on SMART error\n\n"
},
"JBODState": {
"Validator": [
{
"Type": "Enum",
"Formula": [
"enabled",
"disabled",
"default"
]
}
],
"Description": " -jbod <enabled|disabled> Set RAID controller JBOD to be enabled or disabled.\n enabled = Enable RAID controller JBOD mode\n disabled = Disable RAID controller JBOD mode\n\n"
},
"WorkMode": {
"Type": "string",
"Validator": [
{
"Type": "Enum",
"Formula": [
"RAID",
"JBOD",
"HBA",
"Mixed",
"default"
]
}
],
"Description": " -mode <RAID|HBA|JBOD|Mixed> Set RAID controller working mode.\n\n"
},
"Restore": {
"Description": " -restore Restore RAID controller settings. It can't be specified with other options simultaneously but mode.\n\n"
}
}
},
"RspBody": {
"CopyBackStateExist": "${Statements/IsValidCopyBackState()}",
"SmarterCopyBackStateExist": "${Statements/IsValidSmarterCopyBackState()}",
"JBODStateExist": "${Statements/IsValidJBODState()}",
"WorkModeExist": "${Statements/IsValidWorkMode()}",
"RestoreExist": "${Statements/IsValidRestore()}"
},
"Statements": {
"IsValidCopyBackState": {
"Input": "${ReqBody/CopyBackState}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "default",
"To": false
},
{
"To": true
}
]
}
]
},
"IsValidSmarterCopyBackState": {
"Input": "${ReqBody/SmarterCopyBackState}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "default",
"To": false
},
{
"To": true
}
]
}
]
},
"IsValidJBODState": {
"Input": "${ReqBody/JBODState}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "default",
"To": false
},
{
"To": true
}
]
}
]
},
"IsValidWorkMode": {
"Input": "${ReqBody/WorkMode}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "default",
"To": false
},
{
"To": true
}
]
}
]
},
"IsValidRestore": {
"Input": "${ReqBody/Restore}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "default",
"To": false
},
{
"To": true
}
]
}
]
},
"CopyBackState": {
"Input": "${ReqBody/CopyBackState}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "disabled",
"To": 0
},
{
"Case": "enabled",
"To": 1
}
]
}
]
},
"SmarterCopyBackState": {
"Input": "${ReqBody/SmarterCopyBackState}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "disabled",
"To": 0
},
{
"Case": "enabled",
"To": 1
}
]
}
]
},
"JBODState": {
"Input": "${ReqBody/JBODState}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "disabled",
"To": 0
},
{
"Case": "enabled",
"To": 1
}
]
}
]
},
"WorkMode": {
"Input": "${ReqBody/WorkMode}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "RAID",
"To": 0
},
{
"Case": "HBA",
"To": 1
},
{
"Case": "JBOD",
"To": 2
},
{
"Case": "Mixed",
"To": 3
}
]
}
]
},
"Restore": {
"Input": "${ReqBody/Restore}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "default",
"To": false
},
{
"To": true
}
]
}
]
}
},
"ProcessingFlow": [
{
"Type": "Method",
"Path": "/bmc/kepler/MdbService",
"Interface": "bmc.kepler.Mdb",
"Name": "GetPath",
"Params": [
"bmc.kepler.Systems.Storage.Controller",
{
"Id": "${ReqBody/ControlId}"
},
false
],
"Destination": {
"Path": "Path"
}
},
{
"Type": "Method",
"Path": "${ProcessingFlow[1]/Destination/Path}",
"Interface": "bmc.kepler.Systems.Storage.Controller",
"Name": "SetCopybackState",
"Params": [
"${Statements/CopyBackState()}"
],
"CallIf": {
"${Statements/IsValidCopyBackState()}": true
}
},
{
"Type": "Method",
"Path": "${ProcessingFlow[1]/Destination/Path}",
"Interface": "bmc.kepler.Systems.Storage.Controller",
"Name": "SetSmarterCopyBackState",
"Params": [
"${Statements/SmarterCopyBackState()}"
],
"CallIf": {
"${Statements/IsValidSmarterCopyBackState()}": true
}
},
{
"Type": "Method",
"Path": "${ProcessingFlow[1]/Destination/Path}",
"Interface": "bmc.kepler.Systems.Storage.Controller",
"Name": "SetJBODState",
"Params": [
"${Statements/JBODState()}"
],
"CallIf": {
"${Statements/IsValidJBODState()}": true
}
},
{
"Type": "Method",
"Path": "${ProcessingFlow[1]/Destination/Path}",
"Interface": "bmc.kepler.Systems.Storage.Controller",
"Name": "SetWorkMode",
"Params": [
"${Statements/WorkMode()}",
0
],
"CallIf": {
"${Statements/IsValidWorkMode()}": true
}
},
{
"Type": "Method",
"Path": "${ProcessingFlow[1]/Destination/Path}",
"Interface": "bmc.kepler.Systems.Storage.Controller",
"Name": "RestoreDefaultSettings",
"Params": [
"${Statements/Restore()}"
],
"CallIf": {
"${Statements/IsValidRestore()}": true
}
}
],
"Echoes": [
"ipmcset/storage_ctrlconfig",
""
]
}
]
},
{
"Uri": "/cli/v1/storage/pdconfig",
"Interfaces": [
{
"Type": "Patch",
"Description": "Set physical drive configurations",
"Usage": " ipmcset -t storage -d pdconfig -v <Physical Drive ID>\n <[-state <online|offline|ug|jbod>] [-hotspare <none|global|dedicated|autoreplace> [-ld <Logical Drive ID>]]\n [-locate <start|stop>] [-cryptoerase] [-boot <none|primary|secondary|all>]>\n",
"Confirm": {
"Condition": true,
"Description": "WARNING: The operation may have many adverse effects.\nDo you want to continue?[Y/N]:"
},
"Example": [
"ipmcset -t storage -d pdconfig -v 1 -state ug",
"ipmcset -t storage -d pdconfig -v 1 -locate start"
],
"ReqBody": {
"Type": "object",
"Required": true,
"Properties": {
"pdid": {
"Type": "integer",
"Required": true,
"Description": "\roptions:\n -v <Physical Drive ID> The physical drive which will be set. It is mandatory.",
"Validator": [
{
"Type": "Range",
"Formula": [
0,
255
]
}
]
},
"state": {
"Type": "string",
"Required": false,
"Description": "\r -state <online|offline|ug|jbod> Set physical drive firmware state.\n online = Set physical drive state to ONLINE. The drive must be participated in logical drive\n offline = Set physical drive state to OFFLINE. The drive must be participated in logical drive\n ug = Set physical drive state to UNCONFIGURED GOOD\n jbod = Set physical drive state to JBOD (Drive is exposed and controlled by host). You should enable JBOD of RAID controller first\n",
"Validator": [
{
"Type": "Enum",
"Formula": [
"nil",
"online",
"offline",
"ug",
"jbod"
]
}
]
},
"hotspare": {
"Type": "string",
"Required": false,
"Description": "\r -hotspare <none|global|dedicated|autoreplace> Set physical drive hotspare state.\n none = Cancel physical drive hot spare\n global = Set physical drive as global hot spare device\n dedicated -ld <Logical Drive ID> = Set physical drive as dedicated hot spare device and the option '-ld' specify\n the logical drive ID for which physical drive dedicated hot spare, separated by commas.\n autoreplace -ld <Logical Drive ID> = Set physical drive as autoreplace hot spare device and the option '-ld' specify\n the logical drive ID for which physical drive autoreplace hot spare\n",
"Validator": [
{
"Type": "Enum",
"Formula": [
"nil",
"none",
"global",
"dedicated",
"autoreplace"
]
}
]
},
"ld": {
"Type": "string",
"Required": false
},
"locate": {
"Type": "string",
"Required": false,
"Description": "\r -locate <start|stop> Set physical drive location state.\n start = Start locating physical drive\n stop = Stop locating physical drive\n",
"Validator": [
{
"Type": "Enum",
"Formula": [
"nil",
"start",
"stop"
]
}
]
},
"cryptoerase": {
"Type": "string",
"Required": false,
"Description": "\r -cryptoerase Cryptographically erase physical drive.\n",
"Validator": [
{
"Type": "Enum",
"Formula": [
"nil",
"cryptoerase"
]
}
]
},
"boot": {
"Type": "string",
"Required": false,
"Description": "\r -boot Set physical drive as boot device.\n none = Disable physical drive as boot device\n primary = Set physical drive as first boot device\n secondary = Set physical drive as second boot device\n all = Set physical drive as first and second boot device",
"Validator": [
{
"Type": "Enum",
"Formula": [
"nil",
"none",
"primary",
"secondary",
"all"
]
}
]
}
}
},
"RspBody": {
"pdidIsValid": "${Statements/pdidIsValid()}",
"SystemLockDownStatus": "${ProcessingFlow[2]/Destination/SystemLockDownStatus}",
"state": "${ReqBody/state}",
"hotspare": "${ReqBody/hotspare}",
"locate": "${ReqBody/locate}",
"cryptoerase": "${ReqBody/cryptoerase}",
"boot": "${ReqBody/boot}"
},
"Statements": {
"pdidIsValid": {
"Steps": [
{
"Type": "Script",
"Formula": "local path = ProcessingFlow[1].Destination.Path return type(path) == 'string' and string.len(path) > 0"
}
]
},
"state": {
"Input": "${ReqBody/state}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "nil",
"To": null
},
{
"Case": "online",
"To": 6
},
{
"Case": "offline",
"To": 3
},
{
"Case": "ug",
"To": 0
},
{
"Case": "jbod",
"To": 8
}
]
}
]
},
"hotspare": {
"Input": "${ReqBody/hotspare}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "nil",
"To": null
},
{
"Case": "none",
"To": 0
},
{
"Case": "global",
"To": 1
},
{
"Case": "dedicated",
"To": 2
},
{
"Case": "autoreplace",
"To": 3
}
]
}
]
},
"locate": {
"Input": "${ReqBody/locate}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "nil",
"To": null
},
{
"Case": "start",
"To": 1
},
{
"Case": "stop",
"To": 0
}
]
}
]
},
"Getld": {
"Input": "${ReqBody/ld}",
"Steps": [
{
"Type": "Script",
"Formula": "if Input == 'nil' then return 255 else return tonumber(ReqBody.ld) end"
}
]
},
"boot": {
"Input": "${ReqBody/boot}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "nil",
"To": null
},
{
"Case": "none",
"To": 0
},
{
"Case": "primary",
"To": 1
},
{
"Case": "secondary",
"To": 2
},
{
"Case": "all",
"To": 3
}
]
}
]
}
},
"ProcessingFlow": [
{
"Type": "Method",
"Path": "/bmc/kepler/MdbService",
"Interface": "bmc.kepler.Mdb",
"Name": "GetPath",
"Params": [
"bmc.kepler.Systems.Storage.Drive",
{
"Id": "${ReqBody/pdid}"
},
false
],
"Destination": {
"Path": "Path"
}
},
{
"Type": "Property",
"Path": "/bmc/kepler/Systems/1",
"Interface": "bmc.kepler.Systems.SystemLockDown",
"Destination": {
"SystemLockDownStatus": "SystemLockDownStatus"
}
},
{
"Type": "Method",
"Path": "${ProcessingFlow[1]/Destination/Path}",
"Interface": "bmc.kepler.Systems.Storage.Drive",
"Name": "SetFirmwareStatus",
"Params": [
"${Statements/state()}"
],
"CallIf": {
"${Statements/pdidIsValid()}": true,
"${ProcessingFlow[2]/Destination/SystemLockDownStatus}": "Unlocked",
"${Statements/state()}": "#WITH"
}
},
{
"Type": "Method",
"Path": "${ProcessingFlow[1]/Destination/Path}",
"Interface": "bmc.kepler.Systems.Storage.Drive",
"Name": "SetHotspareType",
"Params": [
"${Statements/hotspare()}",
"${Statements/Getld()}"
],
"CallIf": {
"${Statements/pdidIsValid()}": true,
"${ProcessingFlow[2]/Destination/SystemLockDownStatus}": "Unlocked",
"${Statements/hotspare()}": "#WITH"
}
},
{
"Type": "Method",
"Path": "${ProcessingFlow[1]/Destination/Path}",
"Interface": "bmc.kepler.Systems.Storage.Drive",
"Name": "SetLocationIndicatorState",
"Params": [
"${Statements/locate()}"
],
"CallIf": {
"${Statements/pdidIsValid()}": true,
"${ProcessingFlow[2]/Destination/SystemLockDownStatus}": "Unlocked",
"${Statements/locate()}": "#WITH"
}
},
{
"Type": "Method",
"Path": "${ProcessingFlow[1]/Destination/Path}",
"Interface": "bmc.kepler.Systems.Storage.Drive",
"Name": "CryptoErase",
"CallIf": {
"${Statements/pdidIsValid()}": true,
"${ReqBody/cryptoerase}": "cryptoerase",
"${ProcessingFlow[2]/Destination/SystemLockDownStatus}": "Unlocked"
}
},
{
"Type": "Method",
"Path": "${ProcessingFlow[1]/Destination/Path}",
"Interface": "bmc.kepler.Systems.Storage.Drive",
"Name": "SetBootPriority",
"Params": [
"${Statements/boot()}"
],
"CallIf": {
"${Statements/boot()}": "#WITH",
"${Statements/pdidIsValid()}": true,
"${ProcessingFlow[2]/Destination/SystemLockDownStatus}": "Unlocked"
}
}
],
"Echoes": [
"ipmcset/storage_pdconfig",
""
]
}
]
},
{
"Uri": "/cli/v1/storage/ldconfig",
"Interfaces": [
{
"Type": "Patch",
"Description": "Set logical drive configurations",
"Usage": "\n ipmcset -t storage -d ldconfig -v <RAID Controller ID> <Logical Drive ID>\n <[-name <LD name>] [-rp <ra|nra>] [-wp <wt|wbwithbbu|wb>]\n [-iop <cio|dio>] [-ap <rw|ro|blocked>] [-dcp <enabled|disabled|default>]\n [-bgi <enabled|disabled>] [-boot <primary>] [-sscd <enabled|disabled>]>",
"Confirm": {
"Condition": true,
"Description": "WARNING: The operation may have many adverse effects.\nDo you want to continue?[Y/N]:"
},
"ReqBody": {
"Type": "object",
"Required": true,
"Properties": {
"controllerid": {
"Required": true,
"Validator": [
{
"Type": "Range",
"Formula": [
0,
255
]
}
],
"Description": "\n -v <RAID Controller ID> <Logical Drive ID> The logical drive of which RAID controller will be set. It is mandatory."
},
"volumeid": {
"Required": true,
"Validator": [
{
"Type": "Range",
"Formula": [
0,
255
]
}
],
"Description": "\n -v <RAID Controller ID> <Logical Drive ID> The logical drive of which RAID controller will be set. It is mandatory."
},
"name": {
"Validator": [
{
"Type": "Length",
"Formula": [
null,
15
]
}
],
"Description": "\n -name <LD name> Set logical drive name. 15 ASCII characters is maximum. The value can't be same as the options if it starts with '-'."
},
"rpvalue": {
"Validator": [
{
"Type": "Enum",
"Formula": [
"NA",
"ra",
"nra"
]
}
],
"Description": "\n -rp <ra|nra> Set logical drive read policy. This option is not supported when logical drive is cachecade.\n ra = Read ahead\n nra = No Read ahead"
},
"wpvalue": {
"Validator": [
{
"Type": "Enum",
"Formula": [
"NA",
"wt",
"wbwithbbu",
"wb"
]
}
],
"Description": "\n -wp <wt|wbwithbbu|wb> Set logical drive write policy. The 'Write back' is not supported when logical drive is cachecade.\n wt = Write through\n wbwithbbu = Write back with BBU\n wb = Write back"
},
"iopvalue": {
"Validator": [
{
"Type": "Enum",
"Formula": [
"NA",
"cio",
"dio"
]
}
],
"Description": "\n -iop <cio|dio> Set logical drive IO policy. This option is not supported when logical drive is cachecade.\n cio = Cached IO\n dio = Direct IO"
},
"apvalue": {
"Validator": [
{
"Type": "Enum",
"Formula": [
"NA",
"rw",
"ro",
"blocked"
]
}
],
"Description": "\n -ap <rw|ro|blocked> Set logical drive access policy. This option is not supported when logical drive is cachecade.\n rw = Read write\n ro = Read only\n blocked = Blocked"
},
"dcpvalue": {
"Validator": [
{
"Type": "Enum",
"Formula": [
"NA",
"enabled",
"disabled",
"default"
]
}
],
"Description": "\n -dcp <enabled|disabled|default> Set logical drive disk cache policy. This option is not supported when logical drive is cachecade.\n enabled = Enable disk cache\n disabled = Disable disk cache\n default = Unchanged and determined by disk type"
},
"bgi": {
"Validator": [
{
"Type": "Enum",
"Formula": [
"NA",
"enabled",
"disabled"
]
}
],
"Description": "\n -bgi <enabled|disabled> Set logical drive BGI state. This option is not supported when logical drive is cachecade.\n enabled = Enable logical drive BGI\n disabled = Disable logical drive BGI"
},
"boot": {
"Validator": [
{
"Type": "Enum",
"Formula": [
"NA",
"none",
"primary",
"secondary",
"all"
]
}
],
"Description": "\n -boot Set logical drive as boot device. This option is not supported when logical drive is cachecade.\n primary = Set logical drive as first boot device"
},
"sscd": {
"Validator": [
{
"Type": "Enum",
"Formula": [
"NA",
"enabled",
"disabled"
]
}
],
"Description": "\n -sscd <enabled|disabled> Set logical drive SSCD caching state. There must be one or more cachecade logical drive in the same RAID controller.\n enabled = Enable logical drive SSCD caching\n disabled = Disable logical drive SSCD caching"
},
"ldsize": {
"Validator": [
{
"Type": "Regex",
"Formula":"^(NA)|([0-9]+([.][0-9]+)?[m,g,t,M,G,T]{1})$"
}
],
"Description": "\n -size <LD size>{m|g|t} The size of logical drive and the uint can be 'm'(megabytes) , 'g'(gigabytes) , 't'(terabytes). It is optional.\n If this option is not specified, the size of logical drive depends on the usable size of each array."
},
"stripesize": {
"Validator": [
{
"Type": "Enum",
"Formula": [
"NA",
"16K",
"32K",
"64K",
"128K",
"256K",
"512K",
"1M"
]
}
],
"Description": "\n -ss <64K|128K|256K|512K|1M> Logical drive strip size. The recommended range is 64K ~ 1M. It is optional. The default of strip size is '256K'."
},
"accelerationmethod": {
"Validator": [
{
"Type": "Enum",
"Formula": [
"NA",
"iobypass",
"cache",
"no"
]
}
]
}
}
},
"RspBody": {
"PathExist": "${Statements/PathExist()}",
"NameExist": "${Statements/NameExist()}",
"RpValueExist": "${Statements/RpValueExist()}",
"WpValueExist": "${Statements/WpValueExist()}",
"IopValueExist": "${Statements/IopValueExist()}",
"ApValueExist": "${Statements/ApValueExist()}",
"DcpValueExist": "${Statements/DcpValueExist()}",
"BgiExist": "${Statements/BgiExist()}",
"BootExist": "${Statements/BootExist()}",
"SscdExist": "${Statements/SscdExist()}",
"LdsizeExist": "${Statements/LdsizeExist()}",
"StripesizeExist": "${Statements/StripesizeExist()}",
"AcceleratorExist": "${Statements/AcceleratorExist()}"
},
"Statements": {
"PathExist": {
"Input": "${ProcessingFlow[1]/Destination/Path}",
"Steps": [
{
"Type": "Script",
"Formula": "return (type(Input) == 'string' and Input ~= '')"
}
]
},
"NameExist": {
"Input": "${ReqBody/name}",
"Steps": [
{
"Type": "Script",
"Formula": "return type(Input) == 'string'"
}
]
},
"RpValueExist": {
"Input": "${ReqBody/rpvalue}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "NA",
"To": false
},
{
"To": true
}
]
}
]
},
"WpValueExist": {
"Input": "${ReqBody/wpvalue}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "NA",
"To": false
},
{
"To": true
}
]
}
]
},
"IopValueExist": {
"Input": "${ReqBody/iopvalue}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "NA",
"To": false
},
{
"To": true
}
]
}
]
},
"ApValueExist": {
"Input": "${ReqBody/apvalue}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "NA",
"To": false
},
{
"To": true
}
]
}
]
},
"DcpValueExist": {
"Input": "${ReqBody/dcpvalue}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "NA",
"To": false
},
{
"To": true
}
]
}
]
},
"BgiExist": {
"Input": "${ReqBody/bgi}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "NA",
"To": false
},
{
"To": true
}
]
}
]
},
"BootExist": {
"Input": "${ReqBody/boot}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "NA",
"To": false
},
{
"To": true
}
]
}
]
},
"SscdExist": {
"Input": "${ReqBody/sscd}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "NA",
"To": false
},
{
"To": true
}
]
}
]
},
"rpvalue": {
"Input": "${ReqBody/rpvalue}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "ra",
"To": 1
},
{
"Case": "nra",
"To": 0
},
{
"To": 255
}
]
}
]
},
"wpvalue": {
"Input": "${ReqBody/wpvalue}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "wt",
"To": 0
},
{
"Case": "wbwithbbu",
"To": 1
},
{
"Case": "wb",
"To": 2
},
{
"To": 255
}
]
}
]
},
"iopvalue": {
"Input": "${ReqBody/iopvalue}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "cio",
"To": 0
},
{
"Case": "dio",
"To": 1
},
{
"To": 255
}
]
}
]
},
"apvalue": {
"Input": "${ReqBody/apvalue}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "rw",
"To": 0
},
{
"Case": "ro",
"To": 1
},
{
"Case": "blocked",
"To": 2
},
{
"To": 255
}
]
}
]
},
"dcpvalue": {
"Input": "${ReqBody/dcpvalue}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "enabled",
"To": 1
},
{
"Case": "disabled",
"To": 2
},
{
"Case": "default",
"To": 0
},
{
"To": 255
}
]
}
]
},
"bgi": {
"Input": "${ReqBody/bgi}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "enabled",
"To": 1
},
{
"Case": "disabled",
"To": 0
},
{
"To": 255
}
]
}
]
},
"boot": {
"Input": "${ReqBody/boot}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "none",
"To": 0
},
{
"Case": "primary",
"To": 1
},
{
"Case": "secondary",
"To": 2
},
{
"Case": "all",
"To": 3
},
{
"To": 255
}
]
}
]
},
"sscd": {
"Input": "${ReqBody/sscd}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "enabled",
"To": 1
},
{
"Case": "disabled",
"To": 0
},
{
"To": 255
}
]
}
]
},
"LdsizeExist": {
"Input": "${ReqBody/ldsize}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "NA",
"To": false
},
{
"To": true
}
]
}
]
},
"StripesizeExist": {
"Input": "${ReqBody/stripesize}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "NA",
"To": false
},
{
"To": true
}
]
}
]
},
"AcceleratorExist": {
"Input": "${ReqBody/accelerationmethod}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "NA",
"To": false
},
{
"To": true
}
]
}
]
},
"Capacity": {
"Steps": [
{
"Type": "Script",
"Formula": "return tonumber(string.sub(ReqBody.ldsize, 1 , -2))"
}
]
},
"CapacityUnit": {
"Steps": [
{
"Type": "Script",
"Formula": "return string.sub(ReqBody.ldsize, -1)"
},
{
"Type": "Switch",
"Formula": [
{
"Case": "m",
"To": 0
},
{
"Case": "g",
"To": 1
},
{
"Case": "t",
"To": 2
},
{
"Case": "M",
"To": 0
},
{
"Case": "G",
"To": 1
},
{
"Case": "T",
"To": 2
}
]
}
]
},
"ss": {
"Input": "${ReqBody/stripesize}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "16K",
"To": 5
},
{
"Case": "32K",
"To": 6
},
{
"Case": "64K",
"To": 7
},
{
"Case": "128K",
"To": 8
},
{
"Case": "256K",
"To": 9
},
{
"Case": "512K",
"To": 10
},
{
"Case": "1M",
"To": 11
}
]
}
]
},
"acc": {
"Input": "${ReqBody/accelerationmethod}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "no",
"To": 1
},
{
"Case": "cache",
"To": 2
},
{
"Case": "iobypass",
"To": 3
},
{
"To": 255
}
]
}
]
}
},
"ProcessingFlow": [
{
"Type": "Method",
"Path": "/bmc/kepler/MdbService",
"Interface": "bmc.kepler.Mdb",
"Name": "GetPath",
"Params": [
"bmc.kepler.Systems.Storage.Volume",
{
"RefControllerId": "${ReqBody/controllerid}",
"Id": "${ReqBody/volumeid}"
},
false
],
"Destination": {
"Path": "Path"
}
},
{
"Type": "Method",
"Path": "${ProcessingFlow[1]/Destination/Path}",
"Interface": "bmc.kepler.Systems.Storage.Volume",
"Name": "SetName",
"Params": [
"${ReqBody/name}"
],
"CallIf": {
"${Statements/NameExist()}": true
}
},
{
"Type": "Method",
"Path": "${ProcessingFlow[1]/Destination/Path}",
"Interface": "bmc.kepler.Systems.Storage.Volume",
"Name": "SetReadPolicy",
"Params": [
"${Statements/rpvalue()}"
],
"CallIf": {
"${Statements/RpValueExist()}": true
}
},
{
"Type": "Method",
"Path": "${ProcessingFlow[1]/Destination/Path}",
"Interface": "bmc.kepler.Systems.Storage.Volume",
"Name": "SetWritePolicy",
"Params": [
"${Statements/wpvalue()}"
],
"CallIf": {
"${Statements/WpValueExist()}": true
}
},
{
"Type": "Method",
"Path": "${ProcessingFlow[1]/Destination/Path}",
"Interface": "bmc.kepler.Systems.Storage.Volume",
"Name": "SetAccessPolicy",
"Params": [
"${Statements/apvalue()}"
],
"CallIf": {
"${Statements/ApValueExist()}": true
}
},
{
"Type": "Method",
"Path": "${ProcessingFlow[1]/Destination/Path}",
"Interface": "bmc.kepler.Systems.Storage.Volume",
"Name": "SetDiskCachePolicy",
"Params": [
"${Statements/dcpvalue()}"
],
"CallIf": {
"${Statements/DcpValueExist()}": true
}
},
{
"Type": "Method",
"Path": "${ProcessingFlow[1]/Destination/Path}",
"Interface": "bmc.kepler.Systems.Storage.Volume",
"Name": "SetIOPolicy",
"Params": [
"${Statements/iopvalue()}"
],
"CallIf": {
"${Statements/IopValueExist()}": true
}
},
{
"Type": "Method",
"Path": "${ProcessingFlow[1]/Destination/Path}",
"Interface": "bmc.kepler.Systems.Storage.Volume",
"Name": "SetBootable",
"Params": [
"${Statements/boot()}"
],
"CallIf": {
"${Statements/BootExist()}": true
}
},
{
"Type": "Method",
"Path": "${ProcessingFlow[1]/Destination/Path}",
"Interface": "bmc.kepler.Systems.Storage.Volume",
"Name": "SetBGIEnable",
"Params": [
"${Statements/bgi()}"
],
"CallIf": {
"${Statements/BgiExist()}": true
}
},
{
"Type": "Method",
"Path": "${ProcessingFlow[1]/Destination/Path}",
"Interface": "bmc.kepler.Systems.Storage.Volume",
"Name": "SetCachecadeEnable",
"Params": [
"${Statements/sscd()}"
],
"CallIf": {
"${Statements/SscdExist()}": true
}
},
{
"Type": "Method",
"Path": "${ProcessingFlow[1]/Destination/Path}",
"Interface": "bmc.kepler.Systems.Storage.Volume",
"Name": "SetCapacitySize",
"Params": [
"${Statements/Capacity()}",
"${Statements/CapacityUnit()}"
],
"CallIf": {
"${Statements/LdsizeExist()}": true
}
},
{
"Type": "Method",
"Path": "${ProcessingFlow[1]/Destination/Path}",
"Interface": "bmc.kepler.Systems.Storage.Volume",
"Name": "SetStripSize",
"Params": [
"${Statements/ss()}"
],
"CallIf": {
"${Statements/StripesizeExist()}": true
}
},
{
"Type": "Method",
"Path": "${ProcessingFlow[1]/Destination/Path}",
"Interface": "bmc.kepler.Systems.Storage.Volume",
"Name": "SetAccelerator",
"Params": [
"${Statements/acc()}"
],
"CallIf": {
"${Statements/AcceleratorExist()}": true
}
}
],
"Echoes": [
"ipmcset/storage_ldconfig",
""
]
}
]
}
]
}