actions
ArkAction
¶
Bases: ABC
Source code in ark_sdk_python/actions/ark_action.py
9 10 11 12 13 14 15 16 17 18 19 20 21 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 |
|
can_run_action(action_name, args)
abstractmethod
¶
Checks whether the given action can be run with the specified arguments.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
action_name |
str
|
description |
required |
args |
Namespace
|
description |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
description |
Source code in ark_sdk_python/actions/ark_action.py
75 76 77 78 79 80 81 82 83 84 85 86 |
|
define_action(subparsers)
abstractmethod
¶
Defines the action as part of the specified subparsers group.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
subparsers |
_SubParsersAction
|
description |
required |
Source code in ark_sdk_python/actions/ark_action.py
57 58 59 60 61 62 63 64 |
|
run_action(args)
abstractmethod
¶
Runs the actual action with the given arguments.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
args |
Namespace
|
description |
required |
Source code in ark_sdk_python/actions/ark_action.py
66 67 68 69 70 71 72 73 |
|
ArkCacheAction
¶
Bases: ArkAction
Source code in ark_sdk_python/actions/ark_cache_action.py
12 13 14 15 16 17 18 19 20 21 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 |
|
can_run_action(action_name, args)
¶
Asserts the action is cache
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
action_name |
str
|
description |
required |
args |
Namespace
|
description |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
description |
Source code in ark_sdk_python/actions/ark_cache_action.py
53 54 55 56 57 58 59 60 61 62 63 64 65 |
|
define_action(subparsers)
¶
Defines the CLI cache
action, and adds the clear cache function.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
subparsers |
_SubParsersAction
|
description |
required |
Source code in ark_sdk_python/actions/ark_cache_action.py
13 14 15 16 17 18 19 20 21 22 23 24 25 |
|
run_action(args)
¶
Runs the cache action.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
args |
Namespace
|
description |
required |
Raises:
Type | Description |
---|---|
ArkException
|
description |
Source code in ark_sdk_python/actions/ark_cache_action.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
|
ArkConfigureAction
¶
Bases: ArkAction
Source code in ark_sdk_python/actions/ark_configure_action.py
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 |
|
__run_interactive_action(args)
¶
Performs an interactive configuration. The user is prompted for each Ark profile setting, with the default/defined CLI arguments. Selected authenticators are also configured with the user's auth methods and settings.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
args |
Namespace
|
description |
required |
Returns:
Name | Type | Description |
---|---|---|
ArkProfile |
ArkProfile
|
description |
Source code in ark_sdk_python/actions/ark_configure_action.py
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 |
|
__run_silent_action(args)
¶
Runs the CLI configure action silently, without user interaction.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
args |
Namespace
|
description |
required |
Raises:
Type | Description |
---|---|
ArkException
|
description |
Returns:
Name | Type | Description |
---|---|---|
ArkProfile |
ArkProfile
|
description |
Source code in ark_sdk_python/actions/ark_configure_action.py
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 |
|
can_run_action(action_name, args)
¶
Asserts the action is configure
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
action_name |
str
|
description |
required |
args |
Namespace
|
description |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
description |
Source code in ark_sdk_python/actions/ark_configure_action.py
306 307 308 309 310 311 312 313 314 315 316 317 318 |
|
define_action(subparsers)
¶
Defines the CLI configure
action.
For each supported authenticator, sets whether it is used and adds the appropriate parameters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
subparsers |
_SubParsersAction
|
description |
required |
Source code in ark_sdk_python/actions/ark_configure_action.py
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 |
|
run_action(args)
¶
Runs the configure action. Prompts the user when interactive mode is run, based on the associated authenticators, and saves the configured profile when completed.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
args |
Namespace
|
description |
required |
Source code in ark_sdk_python/actions/ark_configure_action.py
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 |
|
ArkExecAction
¶
Bases: ArkAction
Source code in ark_sdk_python/actions/ark_exec_action.py
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 |
|
can_run_action(action_name, args)
¶
Asserts the action is exec
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
action_name |
str
|
description |
required |
args |
Namespace
|
description |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
description |
Source code in ark_sdk_python/actions/ark_exec_action.py
250 251 252 253 254 255 256 257 258 259 260 261 262 |
|
can_run_exec_action(command_name, args)
abstractmethod
¶
Checks whether the specified exec service action can be run.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
command_name |
str
|
description |
required |
args |
Namespace
|
description |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
description |
Source code in ark_sdk_python/actions/ark_exec_action.py
283 284 285 286 287 288 289 290 291 292 293 294 |
|
define_action(subparsers)
¶
Defines the CLI exec
action, with its subparsers (args) for the service.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
subparsers |
_SubParsersAction
|
description |
required |
Source code in ark_sdk_python/actions/ark_exec_action.py
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 |
|
define_exec_action(exec_subparsers)
abstractmethod
¶
Defines an exec action, and its specified configurations and args, for a service.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
exec_subparsers |
_SubParsersAction
|
description |
required |
Source code in ark_sdk_python/actions/ark_exec_action.py
264 265 266 267 268 269 270 271 |
|
run_action(args)
¶
Runs the exec action. Loads the authenticators from the cache and connects to the API using the loaded authenticators. Each service is created from the API, based on the given authenticators, and then runs the exec action using the API.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
args |
Namespace
|
description |
required |
Raises:
Type | Description |
---|---|
ArkException
|
description |
ArkException
|
description |
Source code in ark_sdk_python/actions/ark_exec_action.py
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 |
|
run_exec_action(api, args)
abstractmethod
¶
Runs the exec action for a service with the specified arguments and API.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
api |
ArkCLIAPI
|
description |
required |
args |
Namespace
|
description |
required |
Source code in ark_sdk_python/actions/ark_exec_action.py
273 274 275 276 277 278 279 280 281 |
|
ArkLoginAction
¶
Bases: ArkAction
Source code in ark_sdk_python/actions/ark_login_action.py
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 |
|
can_run_action(action_name, args)
¶
Asserts the action is login
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
action_name |
str
|
description |
required |
args |
Namespace
|
description |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
description |
Source code in ark_sdk_python/actions/ark_login_action.py
188 189 190 191 192 193 194 195 196 197 198 199 200 |
|
define_action(subparsers)
¶
Defines the CLI login
action.
For each supported authenticator, adds the username/secret params for logging in.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
subparsers |
_SubParsersAction
|
description |
required |
Source code in ark_sdk_python/actions/ark_login_action.py
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 |
|
run_action(args)
¶
Runs the login action for each authenticator. After a login completes, credentials are stored in the keyring for future use.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
args |
Namespace
|
description |
required |
Raises:
Type | Description |
---|---|
ArkException
|
description |
ArkException
|
description |
Source code in ark_sdk_python/actions/ark_login_action.py
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 |
|
ArkProfilesAction
¶
Bases: ArkAction
Source code in ark_sdk_python/actions/ark_profiles_action.py
15 16 17 18 19 20 21 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 |
|
can_run_action(action_name, args)
¶
Asserts the action is profile
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
action_name |
str
|
description |
required |
args |
Namespace
|
description |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
description |
Source code in ark_sdk_python/actions/ark_profiles_action.py
193 194 195 196 197 198 199 200 201 202 203 204 205 |
|
define_action(subparsers)
¶
Defines the CLI profile
action, and adds actions for managing multiple profiles.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
subparsers |
_SubParsersAction
|
description |
required |
Source code in ark_sdk_python/actions/ark_profiles_action.py
16 17 18 19 20 21 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 |
|
run_action(args)
¶
Runs the profile action.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
args |
Namespace
|
description |
required |
Raises:
Type | Description |
---|---|
ArkException
|
description |
ArkException
|
description |
Source code in ark_sdk_python/actions/ark_profiles_action.py
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 |
|
ArkServiceExecAction
¶
Bases: ArkExecAction
Source code in ark_sdk_python/actions/ark_service_exec_action.py
12 13 14 15 16 17 18 19 20 21 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 |
|
can_run_exec_action(command_name, args)
¶
Checks whether there is a service definition for the command and its actions.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
command_name |
str
|
description |
required |
args |
Namespace
|
description |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
description |
Source code in ark_sdk_python/actions/ark_service_exec_action.py
99 100 101 102 103 104 105 106 107 108 109 110 111 |
|
define_exec_action(exec_subparsers)
¶
Defines all the supported service actions as CLI actions, with its associated arguments and schemas.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
exec_subparsers |
_SubParsersAction
|
description |
required |
Source code in ark_sdk_python/actions/ark_service_exec_action.py
67 68 69 70 71 72 73 74 75 76 |
|
run_exec_action(api, args)
¶
Deduces from the arguments the appropriate service definition and action. Finds the appropriate service using the definition and executes the sync or async service action.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
api |
ArkCLIAPI
|
description |
required |
args |
Namespace
|
description |
required |
Source code in ark_sdk_python/actions/ark_service_exec_action.py
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
|