Adapter definition
AdapterDefinition
¶
Bases: GroupType
Source code in lib/python/src/aria/ops/definition/adapter_definition.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 |
|
__init__(key, label=None, adapter_instance_key=None, adapter_instance_label=None, version=1)
¶
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key |
str
|
The adapter key is used to identify the adapter and its object types. It must be unique across all Management Packs. |
required |
label |
Optional[str]
|
Label that is displayed in the VMware Aria Operations UI for this adapter. Defaults to the key. |
None
|
adapter_instance_key |
Optional[str]
|
Object type of the adapter instance object. Defaults to '{adapter key}_adapter_instance'. |
None
|
adapter_instance_label |
Optional[str]
|
Label that is displayed in the VMware Aria Operations UI for the adapter instance object type. Defaults to '{adapter label} Adapter Instance'. |
None
|
version |
int
|
Version of the definition. This should be incremented for new releases of the adapter. Defaults to 1 |
1
|
Source code in lib/python/src/aria/ops/definition/adapter_definition.py
add_credential_type(credential_type)
¶
Add a credential type to the adapter instance. When more than one credential types are present, The user will be required to select the type and then fill in the parameters for that type, as only one credential type can be used for any given adapter instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
credential_type |
CredentialType
|
The credential type to add. |
required |
Source code in lib/python/src/aria/ops/definition/adapter_definition.py
add_credential_types(credential_types)
¶
Add a list of credential types to the adapter instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
credential_types |
List[CredentialType]
|
A list of credential types to add. |
required |
Source code in lib/python/src/aria/ops/definition/adapter_definition.py
add_object_type(object_type)
¶
Adds an object type to this adapter definition
Parameters:
Name | Type | Description | Default |
---|---|---|---|
object_type |
ObjectType
|
An object type definition. |
required |
Source code in lib/python/src/aria/ops/definition/adapter_definition.py
add_object_types(object_types)
¶
Adds a list of object types to this adapter definition Args: object_types (List[ObjectType]): A list of object type definitions.
Source code in lib/python/src/aria/ops/definition/adapter_definition.py
add_parameter(parameter)
¶
Add a parameter to the adapter instance. The user will be asked to provide a value for this parameter each time a new account/adapter instance is created.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
parameter |
Parameter
|
The parameter to add to the adapter instance. |
required |
Source code in lib/python/src/aria/ops/definition/adapter_definition.py
define_credential_type(key='default_credential', label=None)
¶
Create a new credential type and add it to this adapter instance. When more than one credential types are present, The user will be required to select the type and then fill in the parameters for that type, as only one credential type can be used for any given adapter instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key |
str
|
Used to identify the credential type |
'default_credential'
|
label |
Optional[str]
|
Label that is displayed in the VMware Aria Operations UI. Defaults to the key. |
None
|
Returns:
Type | Description |
---|---|
CredentialType
|
The created credential type. |
Source code in lib/python/src/aria/ops/definition/adapter_definition.py
define_enum_parameter(key, values, label=None, description=None, default=None, required=True, advanced=False)
¶
Create a new enum parameter and add it to the adapter instance. The user will be asked to provide a value for this parameter each time a new account/adapter instance is created.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key |
str
|
Used to identify the parameter |
required |
values |
List[str]
|
An array containing all enum values. If 'default' is specified and not part of this array, it will be added as an additional enum value (values are case-sensitive). Enum values are not localizable. |
required |
label |
Optional[str]
|
Label that is displayed in the VMware Aria Operations UI. Defaults to the key. |
None
|
description |
Optional[str]
|
More in-depth explanation of the parameter. Displayed as a tooltip in the VMware Aria Operations UI. |
None
|
default |
Optional[str]
|
The default value of the parameter. |
None
|
required |
bool
|
True if user is required to provide this parameter. Defaults to True. |
True
|
advanced |
bool
|
True if the parameter should be collapsed by default. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
EnumParameter
|
The created enum parameter definition. |
Source code in lib/python/src/aria/ops/definition/adapter_definition.py
define_int_parameter(key, label=None, description=None, default=None, required=True, advanced=False)
¶
Create a new integer parameter and add it to the adapter instance. The user will be asked to provide a value for this parameter each time a new account/adapter instance is created.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key |
str
|
Used to identify the parameter |
required |
label |
Optional[str]
|
Label that is displayed in the VMware Aria Operations UI. Defaults to the key. |
None
|
description |
Optional[str]
|
More in-depth explanation of the parameter. Displayed as a tooltip in the VMware Aria Operations UI. |
None
|
default |
Optional[int]
|
The default value of the parameter. |
None
|
required |
bool
|
True if user is required to provide this parameter. Defaults to True. |
True
|
advanced |
bool
|
True if the parameter should be collapsed by default. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
IntParameter
|
The created int parameter definition. |
Source code in lib/python/src/aria/ops/definition/adapter_definition.py
define_object_type(key, label=None)
¶
Create a new object type definition and add it to this adapter definition.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key |
str
|
The object type |
required |
label |
Optional[str]
|
Label that is displayed in the VMware Aria Operations UI for this object type. Defaults to the key. |
None
|
Returns:
Type | Description |
---|---|
ObjectType
|
The created object type definition |
Source code in lib/python/src/aria/ops/definition/adapter_definition.py
define_string_parameter(key, label=None, description=None, default=None, max_length=512, required=True, advanced=False)
¶
Create a new string parameter and add it to the adapter instance. The user will be asked to provide a value for this parameter each time a new account/adapter instance is created.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key |
str
|
Used to identify the parameter |
required |
label |
Optional[str]
|
Label that is displayed in the VMware Aria Operations UI. Defaults to the key. |
None
|
description |
Optional[str]
|
More in-depth explanation of the parameter. Displayed as a tooltip in the VMware Aria Operations UI. |
None
|
default |
Optional[str]
|
The default value of the parameter. Defaults to None |
None
|
max_length |
int
|
The max length of the parameter value. Defaults to 512. |
512
|
required |
bool
|
True if user is required to provide this parameter. Defaults to True. |
True
|
advanced |
bool
|
True if the parameter should be collapsed by default. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
StringParameter
|
The created string parameter definition. |
Source code in lib/python/src/aria/ops/definition/adapter_definition.py
send_results(output_pipe=sys.argv[-1])
¶
Opens the output pipe and sends results directly back to the server
This method can only be called once per server request.