Class: Falcon::HostMigration
- Inherits:
-
Object
- Object
- Falcon::HostMigration
- Defined in:
- lib/crimson-falcon/api/host_migration.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_migration_v1(body, opts = {}) ⇒ ApiCreateMigrationResponseV1
Create a device migration job.
-
#create_migration_v1_with_http_info(body, opts = {}) ⇒ Array<(ApiCreateMigrationResponseV1, Integer, Hash)>
Create a device migration job.
-
#get_host_migration_ids_v1(id, opts = {}) ⇒ MsaspecQueryResponse
Query host migration IDs.
-
#get_host_migration_ids_v1_with_http_info(id, opts = {}) ⇒ Array<(MsaspecQueryResponse, Integer, Hash)>
Query host migration IDs.
-
#get_host_migrations_v1(body, opts = {}) ⇒ ApiGetHostMigrationResponseV1
Get host migration details.
-
#get_host_migrations_v1_with_http_info(body, opts = {}) ⇒ Array<(ApiGetHostMigrationResponseV1, Integer, Hash)>
Get host migration details.
-
#get_migration_destinations_v1(body, opts = {}) ⇒ ApiGetMigrationDestinationsResponseV1
Get destinations for a migration.
-
#get_migration_destinations_v1_with_http_info(body, opts = {}) ⇒ Array<(ApiGetMigrationDestinationsResponseV1, Integer, Hash)>
Get destinations for a migration.
-
#get_migration_ids_v1(opts = {}) ⇒ MsaspecQueryResponse
Query migration jobs.
-
#get_migration_ids_v1_with_http_info(opts = {}) ⇒ Array<(MsaspecQueryResponse, Integer, Hash)>
Query migration jobs.
-
#get_migrations_v1(ids, opts = {}) ⇒ ApiGetMigrationsResponseV1
Get migration job details.
-
#get_migrations_v1_with_http_info(ids, opts = {}) ⇒ Array<(ApiGetMigrationsResponseV1, Integer, Hash)>
Get migration job details.
-
#host_migration_aggregates_v1(body, opts = {}) ⇒ MsaAggregatesResponse
Get host migration aggregates as specified via json in request body.
-
#host_migration_aggregates_v1_with_http_info(body, opts = {}) ⇒ Array<(MsaAggregatesResponse, Integer, Hash)>
Get host migration aggregates as specified via json in request body.
-
#host_migrations_actions_v1(id, action_name, body, opts = {}) ⇒ MsaspecQueryResponse
Perform an action on host migrations.
-
#host_migrations_actions_v1_with_http_info(id, action_name, body, opts = {}) ⇒ Array<(MsaspecQueryResponse, Integer, Hash)>
Perform an action on host migrations.
-
#initialize(api_client = ApiClient.default) ⇒ HostMigration
constructor
A new instance of HostMigration.
-
#migration_aggregates_v1(body, opts = {}) ⇒ MsaAggregatesResponse
Get migration aggregates as specified via json in request body.
-
#migration_aggregates_v1_with_http_info(body, opts = {}) ⇒ Array<(MsaAggregatesResponse, Integer, Hash)>
Get migration aggregates as specified via json in request body.
-
#migrations_actions_v1(action_name, body, opts = {}) ⇒ MsaspecQueryResponse
Perform an action on a migration job.
-
#migrations_actions_v1_with_http_info(action_name, body, opts = {}) ⇒ Array<(MsaspecQueryResponse, Integer, Hash)>
Perform an action on a migration job.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ HostMigration
Returns a new instance of HostMigration.
36 37 38 |
# File 'lib/crimson-falcon/api/host_migration.rb', line 36 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
34 35 36 |
# File 'lib/crimson-falcon/api/host_migration.rb', line 34 def api_client @api_client end |
Instance Method Details
#create_migration_v1(body, opts = {}) ⇒ ApiCreateMigrationResponseV1
Create a device migration job. ‘device_ids` and `filter` are mutually exclusive. Filter takes precedence.
44 45 46 47 |
# File 'lib/crimson-falcon/api/host_migration.rb', line 44 def create_migration_v1(body, opts = {}) data, _status_code, _headers = create_migration_v1_with_http_info(body, opts) data end |
#create_migration_v1_with_http_info(body, opts = {}) ⇒ Array<(ApiCreateMigrationResponseV1, Integer, Hash)>
Create a device migration job. `device_ids` and `filter` are mutually exclusive. Filter takes precedence.
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 |
# File 'lib/crimson-falcon/api/host_migration.rb', line 54 def create_migration_v1_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: HostMigration.create_migration_v1 ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling HostMigration.create_migration_v1" end # resource path local_var_path = '/host-migration/entities/migrations/v1' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'ApiCreateMigrationResponseV1' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"HostMigration.create_migration_v1", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: HostMigration#create_migration_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_host_migration_ids_v1(id, opts = {}) ⇒ MsaspecQueryResponse
Query host migration IDs. Query host migration IDs.
116 117 118 119 |
# File 'lib/crimson-falcon/api/host_migration.rb', line 116 def get_host_migration_ids_v1(id, opts = {}) data, _status_code, _headers = get_host_migration_ids_v1_with_http_info(id, opts) data end |
#get_host_migration_ids_v1_with_http_info(id, opts = {}) ⇒ Array<(MsaspecQueryResponse, Integer, Hash)>
Query host migration IDs. Query host migration IDs.
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 |
# File 'lib/crimson-falcon/api/host_migration.rb', line 130 def get_host_migration_ids_v1_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: HostMigration.get_host_migration_ids_v1 ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling HostMigration.get_host_migration_ids_v1" end allowable_values = ["target_cid|asc", "target_cid|desc", "target_cid", "source_cid|asc", "source_cid|desc", "source_cid", "host_migration_id|asc", "host_migration_id|desc", "host_migration_id", "groups|asc", "groups|desc", "groups", "static_host_groups|asc", "static_host_groups|desc", "static_host_groups", "hostname|asc", "hostname|desc", "hostname", "status|asc", "status|desc", "status", "migration_id|asc", "migration_id|desc", "migration_id", "id|asc", "id|desc", "id", "created_time|asc", "created_time|desc", "created_time", "hostgroups|asc", "hostgroups|desc", "hostgroups"] if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" end # resource path local_var_path = '/host-migration/queries/host-migrations/v1' # query parameters query_params = opts[:query_params] || {} query_params[:'id'] = id query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MsaspecQueryResponse' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"HostMigration.get_host_migration_ids_v1", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: HostMigration#get_host_migration_ids_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_host_migrations_v1(body, opts = {}) ⇒ ApiGetHostMigrationResponseV1
Get host migration details. # Events The ‘events` field describes actions that have occurred to the host migration entity. Each object is defined by the `action` field. When `user` is present, it is the user who performed the action. `time` is when the action occurred. ## Event actions ### added This action is emitted when the host migration is created. “` { "action": "added", "user": "[email protected]", "time": "2024-01-01T00:00:00Z" } “` ### assigned_static_host_groups This action is emitted when a user assigns static host groups to a host migration. `ids` are the ids of the new host groups that have been assigned. “` { "action": "assigned_static_host_groups", "ids": ["foo", "bar"], "user": "[email protected]", "time": "2024-01-01T00:00:00Z" } “` ### removed_static_host_groups This action is emitted when a user removes static host groups from a host migration. `ids` are the ids of the host groups that have been removed. “` { "action": "removed_static_host_groups", "ids": ["foo", "bar"], "user": "[email protected]", "time": "2024-01-01T00:00:00Z" } “` ### queued This action is emitted when the migration is started. “` { "action": "queued", "user": "[email protected]", "time": "2024-01-01T00:00:00Z" } “` ### failed This action is emitted when the host migration fails. `reason` is the reason for failure. `reason` can be `unsupported_sensor_version`, `unsupported_sensor_platform`, `host_missing`, `migration_expired`, or `internal_error`. “` { "action": "failed", "reason": "unsupported_sensor_version", "time": "2024-01-01T00:00:00Z" } “` ### cancelled This action is emitted when the migration has been cancelled. “` { "action": "cancelled", "user": "[email protected]", "time": "2024-01-01T00:00:00Z" } “` ### completed This action is emitted when the host has successfully migrated. “` { "action": "completed", "time": "2024-01-01T00:00:00Z" } “` # Status Details The `status_details` field is an optional field that provides some more details about the status of a failed host migration. It may be omitted or empty from a response. ### internal_error This status detail is provided when an internal occurs during a host migration. ### canceled_by_user This status detail is provided when a migration has been canceled by a user. ### host_missing This status detail is provided when a host migration is canceled because the source host can no longer be found. ### migration_expired This status detail is provided when a host migration is expired because the migration is too old. ### migration_already_in_progress This status detail is provided when attempting to start a host migration on a host that is already in progress in another migration. ### source_host_unsupported_version This status detail is provided when attempting to create or start a host migration when the sensor is on an unsupported version. ### source_host_unsupported_platform This status detail is provided when attempting to create or start a host migration when the sensor is an unsupported platform.
192 193 194 195 |
# File 'lib/crimson-falcon/api/host_migration.rb', line 192 def get_host_migrations_v1(body, opts = {}) data, _status_code, _headers = get_host_migrations_v1_with_http_info(body, opts) data end |
#get_host_migrations_v1_with_http_info(body, opts = {}) ⇒ Array<(ApiGetHostMigrationResponseV1, Integer, Hash)>
Get host migration details. # Events The `events` field describes actions that have occurred to the host migration entity. Each object is defined by the `action` field. When `user` is present, it is the user who performed the action. `time` is when the action occurred. ## Event actions ### added This action is emitted when the host migration is created. ``` { "action": "added", "user": "[email protected]", "time": "2024-01-01T00:00:00Z" } ``` ### assigned_static_host_groups This action is emitted when a user assigns static host groups to a host migration. `ids` are the ids of the new host groups that have been assigned. ``` { "action": "assigned_static_host_groups", "ids": ["foo", "bar"], "user": "[email protected]", "time": "2024-01-01T00:00:00Z" } ``` ### removed_static_host_groups This action is emitted when a user removes static host groups from a host migration. `ids` are the ids of the host groups that have been removed. ``` { "action": "removed_static_host_groups", "ids": ["foo", "bar"], "user": "[email protected]", "time": "2024-01-01T00:00:00Z" } ``` ### queued This action is emitted when the migration is started. ``` { "action": "queued", "user": "[email protected]", "time": "2024-01-01T00:00:00Z" } ``` ### failed This action is emitted when the host migration fails. `reason` is the reason for failure. `reason` can be `unsupported_sensor_version`, `unsupported_sensor_platform`, `host_missing`, `migration_expired`, or `internal_error`. ``` { "action": "failed", "reason": "unsupported_sensor_version", "time": "2024-01-01T00:00:00Z" } ``` ### cancelled This action is emitted when the migration has been cancelled. ``` { "action": "cancelled", "user": "[email protected]", "time": "2024-01-01T00:00:00Z" } ``` ### completed This action is emitted when the host has successfully migrated. ``` { "action": "completed", "time": "2024-01-01T00:00:00Z" } ``` # Status Details The `status_details` field is an optional field that provides some more details about the status of a failed host migration. It may be omitted or empty from a response. ### internal_error This status detail is provided when an internal occurs during a host migration. ### canceled_by_user This status detail is provided when a migration has been canceled by a user. ### host_missing This status detail is provided when a host migration is canceled because the source host can no longer be found. ### migration_expired This status detail is provided when a host migration is expired because the migration is too old. ### migration_already_in_progress This status detail is provided when attempting to start a host migration on a host that is already in progress in another migration. ### source_host_unsupported_version This status detail is provided when attempting to create or start a host migration when the sensor is on an unsupported version. ### source_host_unsupported_platform This status detail is provided when attempting to create or start a host migration when the sensor is an unsupported platform.
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 |
# File 'lib/crimson-falcon/api/host_migration.rb', line 202 def get_host_migrations_v1_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: HostMigration.get_host_migrations_v1 ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling HostMigration.get_host_migrations_v1" end # resource path local_var_path = '/host-migration/entities/host-migrations/GET/v1' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'ApiGetHostMigrationResponseV1' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"HostMigration.get_host_migrations_v1", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: HostMigration#get_host_migrations_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_migration_destinations_v1(body, opts = {}) ⇒ ApiGetMigrationDestinationsResponseV1
Get destinations for a migration. ‘device_ids` and `filter` are mutually exclusive.
260 261 262 263 |
# File 'lib/crimson-falcon/api/host_migration.rb', line 260 def get_migration_destinations_v1(body, opts = {}) data, _status_code, _headers = get_migration_destinations_v1_with_http_info(body, opts) data end |
#get_migration_destinations_v1_with_http_info(body, opts = {}) ⇒ Array<(ApiGetMigrationDestinationsResponseV1, Integer, Hash)>
Get destinations for a migration. `device_ids` and `filter` are mutually exclusive.
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 319 320 321 |
# File 'lib/crimson-falcon/api/host_migration.rb', line 270 def get_migration_destinations_v1_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: HostMigration.get_migration_destinations_v1 ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling HostMigration.get_migration_destinations_v1" end # resource path local_var_path = '/host-migration/entities/migration-destinations/GET/v1' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'ApiGetMigrationDestinationsResponseV1' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"HostMigration.get_migration_destinations_v1", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: HostMigration#get_migration_destinations_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_migration_ids_v1(opts = {}) ⇒ MsaspecQueryResponse
Query migration jobs.
330 331 332 333 |
# File 'lib/crimson-falcon/api/host_migration.rb', line 330 def get_migration_ids_v1(opts = {}) data, _status_code, _headers = get_migration_ids_v1_with_http_info(opts) data end |
#get_migration_ids_v1_with_http_info(opts = {}) ⇒ Array<(MsaspecQueryResponse, Integer, Hash)>
Query migration jobs.
342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 |
# File 'lib/crimson-falcon/api/host_migration.rb', line 342 def get_migration_ids_v1_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: HostMigration.get_migration_ids_v1 ...' end allowable_values = ["status|asc", "status|desc", "status", "migration_status|asc", "migration_status|desc", "migration_status", "created_by|asc", "created_by|desc", "created_by", "created_time|asc", "created_time|desc", "created_time", "name|asc", "name|desc", "name", "id|asc", "id|desc", "id", "migration_id|asc", "migration_id|desc", "migration_id", "target_cid|asc", "target_cid|desc", "target_cid"] if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" end # resource path local_var_path = '/host-migration/queries/migrations/v1' # query parameters query_params = opts[:query_params] || {} query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MsaspecQueryResponse' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"HostMigration.get_migration_ids_v1", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: HostMigration#get_migration_ids_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_migrations_v1(ids, opts = {}) ⇒ ApiGetMigrationsResponseV1
Get migration job details.
398 399 400 401 |
# File 'lib/crimson-falcon/api/host_migration.rb', line 398 def get_migrations_v1(ids, opts = {}) data, _status_code, _headers = get_migrations_v1_with_http_info(ids, opts) data end |
#get_migrations_v1_with_http_info(ids, opts = {}) ⇒ Array<(ApiGetMigrationsResponseV1, Integer, Hash)>
Get migration job details.
407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 |
# File 'lib/crimson-falcon/api/host_migration.rb', line 407 def get_migrations_v1_with_http_info(ids, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: HostMigration.get_migrations_v1 ...' end # verify the required parameter 'ids' is set if @api_client.config.client_side_validation && ids.nil? fail ArgumentError, "Missing the required parameter 'ids' when calling HostMigration.get_migrations_v1" end # resource path local_var_path = '/host-migration/entities/migrations/v1' # query parameters query_params = opts[:query_params] || {} query_params[:'ids'] = @api_client.build_collection_param(ids, :multi) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ApiGetMigrationsResponseV1' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"HostMigration.get_migrations_v1", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: HostMigration#get_migrations_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#host_migration_aggregates_v1(body, opts = {}) ⇒ MsaAggregatesResponse
Get host migration aggregates as specified via json in request body. Get host migration aggregates as specified via json in request body. # Supported Types Both types support the following FQL filter properties: ‘groups`, `hostgroups`, `static_host_groups`, `hostname`, `status`, `target_cid`, `source_cid`, `migration_id`, `id`, `host_migration_id`, `created_time`. The values `groups` and `hostgroups` are aliases for `static_host_groups`. The value `host_migration_id` is an alias for `id` ## Terms `"type": "terms"` Supported `field` values: `groups`, `hostgroups`, `static_host_groups`, `hostname`, `status`, `target_cid`, `source_cid`, `migration_id`, `id`, `host_migration_id`. `sort` must be done on the same value as `field` and include a direction (`asc` or `desc`). Supports all FQL fields except for `groups`, `hostgroups`, or `static_host_groups`. Examples sort value: `status|asc` or `created_by|desc` ## Date Range `"type": "date_range"` Supported `field` fields: `created_time`. Does not support `sort`, `size`, or `from`.
461 462 463 464 |
# File 'lib/crimson-falcon/api/host_migration.rb', line 461 def host_migration_aggregates_v1(body, opts = {}) data, _status_code, _headers = host_migration_aggregates_v1_with_http_info(body, opts) data end |
#host_migration_aggregates_v1_with_http_info(body, opts = {}) ⇒ Array<(MsaAggregatesResponse, Integer, Hash)>
Get host migration aggregates as specified via json in request body. Get host migration aggregates as specified via json in request body. # Supported Types Both types support the following FQL filter properties: `groups`, `hostgroups`, `static_host_groups`, `hostname`, `status`, `target_cid`, `source_cid`, `migration_id`, `id`, `host_migration_id`, `created_time`. The values `groups` and `hostgroups` are aliases for `static_host_groups`. The value `host_migration_id` is an alias for `id` ## Terms `"type": "terms"` Supported `field` values: `groups`, `hostgroups`, `static_host_groups`, `hostname`, `status`, `target_cid`, `source_cid`, `migration_id`, `id`, `host_migration_id`. `sort` must be done on the same value as `field` and include a direction (`asc` or `desc`). Supports all FQL fields except for `groups`, `hostgroups`, or `static_host_groups`. Examples sort value: `status|asc` or `created_by|desc` ## Date Range `"type": "date_range"` Supported `field` fields: `created_time`. Does not support `sort`, `size`, or `from`.
471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 |
# File 'lib/crimson-falcon/api/host_migration.rb', line 471 def host_migration_aggregates_v1_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: HostMigration.host_migration_aggregates_v1 ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling HostMigration.host_migration_aggregates_v1" end # resource path local_var_path = '/host-migration/aggregates/host-migrations/v1' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'MsaAggregatesResponse' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"HostMigration.host_migration_aggregates_v1", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: HostMigration#host_migration_aggregates_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#host_migrations_actions_v1(id, action_name, body, opts = {}) ⇒ MsaspecQueryResponse
Perform an action on host migrations. The available actions are ‘add_host_groups`, `remove_host_groups`, and `remove_hosts`. FQL filter supports the following fields: `groups`, `hostgroups`, `static_host_groups`, `hostname`, `status`, `target_cid`, `source_cid`, `migration_id`, `id`, `host_migration_id`, `created_time`. These actions only works if the migration has not started. `add_host_groups` adds static host groups to the selected hosts in a migration. This action accepts the following action parameter: `{ "name": "host_group": "value": "$host_group_id" }`. Action parameters can be repeated to add multiple static host groups in a single request. `remove_host_groups` removes static host groups from the selected hosts in a migration. This action accepts the following action parameter: `{ "name": "host_group": "value": "$host_group_id" }`. Action parameters can be repeated to remove multiple static host groups in a single request. `remove_hosts` removes the selected hosts from a migration. This action does not accept any action parameters.
531 532 533 534 |
# File 'lib/crimson-falcon/api/host_migration.rb', line 531 def host_migrations_actions_v1(id, action_name, body, opts = {}) data, _status_code, _headers = host_migrations_actions_v1_with_http_info(id, action_name, body, opts) data end |
#host_migrations_actions_v1_with_http_info(id, action_name, body, opts = {}) ⇒ Array<(MsaspecQueryResponse, Integer, Hash)>
Perform an action on host migrations. The available actions are `add_host_groups`, `remove_host_groups`, and `remove_hosts`. FQL filter supports the following fields: `groups`, `hostgroups`, `static_host_groups`, `hostname`, `status`, `target_cid`, `source_cid`, `migration_id`, `id`, `host_migration_id`, `created_time`. These actions only works if the migration has not started. `add_host_groups` adds static host groups to the selected hosts in a migration. This action accepts the following action parameter: `{ "name": "host_group": "value": "$host_group_id" }`. Action parameters can be repeated to add multiple static host groups in a single request. `remove_host_groups` removes static host groups from the selected hosts in a migration. This action accepts the following action parameter: `{ "name": "host_group": "value": "$host_group_id" }`. Action parameters can be repeated to remove multiple static host groups in a single request. `remove_hosts` removes the selected hosts from a migration. This action does not accept any action parameters.
543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 |
# File 'lib/crimson-falcon/api/host_migration.rb', line 543 def host_migrations_actions_v1_with_http_info(id, action_name, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: HostMigration.host_migrations_actions_v1 ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling HostMigration.host_migrations_actions_v1" end # verify the required parameter 'action_name' is set if @api_client.config.client_side_validation && action_name.nil? fail ArgumentError, "Missing the required parameter 'action_name' when calling HostMigration.host_migrations_actions_v1" end # verify enum value allowable_values = ["remove_hosts", "remove_host_groups", "add_host_groups"] if @api_client.config.client_side_validation && !allowable_values.include?(action_name) fail ArgumentError, "invalid value for \"action_name\", must be one of #{allowable_values}" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling HostMigration.host_migrations_actions_v1" end # resource path local_var_path = '/host-migration/entities/host-migrations-actions/v1' # query parameters query_params = opts[:query_params] || {} query_params[:'id'] = id query_params[:'action_name'] = action_name # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'MsaspecQueryResponse' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"HostMigration.host_migrations_actions_v1", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: HostMigration#host_migrations_actions_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#migration_aggregates_v1(body, opts = {}) ⇒ MsaAggregatesResponse
Get migration aggregates as specified via json in request body. Get migration aggregates as specified via json in request body. # Supported Types Both types support the following FQL filter props: ‘name`, `id`, `migration_id`, `target_cid`, `status`, `migration_status`, `created_by`, `created_time`. The value `migration_status` is an alias for `status`. The value `migration_id` is an alias for `id`. ## Terms `"type": "terms"` Supported `field` values: `name`, `id`, `migration_id,` `target_cid`, `status`, `migration_status`, `created_by`. `sort` on `terms` type must be done on the same value as `field` and include a direction (`asc` or `desc`). Supports all supported FQL fields. Examples sort value: `status|asc` or `created_by|desc`. ## Date Range `"type": "date_range"` Supported `field` fields: `created_time`. Does not support `sort`, `size`, or `from`.
616 617 618 619 |
# File 'lib/crimson-falcon/api/host_migration.rb', line 616 def migration_aggregates_v1(body, opts = {}) data, _status_code, _headers = migration_aggregates_v1_with_http_info(body, opts) data end |
#migration_aggregates_v1_with_http_info(body, opts = {}) ⇒ Array<(MsaAggregatesResponse, Integer, Hash)>
Get migration aggregates as specified via json in request body. Get migration aggregates as specified via json in request body. # Supported Types Both types support the following FQL filter props: `name`, `id`, `migration_id`, `target_cid`, `status`, `migration_status`, `created_by`, `created_time`. The value `migration_status` is an alias for `status`. The value `migration_id` is an alias for `id`. ## Terms `"type": "terms"` Supported `field` values: `name`, `id`, `migration_id,` `target_cid`, `status`, `migration_status`, `created_by`. `sort` on `terms` type must be done on the same value as `field` and include a direction (`asc` or `desc`). Supports all supported FQL fields. Examples sort value: `status|asc` or `created_by|desc`. ## Date Range `"type": "date_range"` Supported `field` fields: `created_time`. Does not support `sort`, `size`, or `from`.
626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 |
# File 'lib/crimson-falcon/api/host_migration.rb', line 626 def migration_aggregates_v1_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: HostMigration.migration_aggregates_v1 ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling HostMigration.migration_aggregates_v1" end # resource path local_var_path = '/host-migration/aggregates/migrations/v1' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'MsaAggregatesResponse' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"HostMigration.migration_aggregates_v1", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: HostMigration#migration_aggregates_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#migrations_actions_v1(action_name, body, opts = {}) ⇒ MsaspecQueryResponse
Perform an action on a migration job. The available actions are ‘start_migration`, `cancel_migration`, `rename_migration`, and `delete_migration`. `start_migration` starts the selected migrations. This action only works if the migration has not started. This action does not accept any action parameters. Only one migration may be started per request. `cancel_migration` cancels the selected migrations. This actions only works if the migration has started and not completed. This action does not accept any action parameters. `rename_migration` renames the selected migrations. This action can be called at any time. Only 1 action parameter may be supplied. Action parameters take the form of `"migration_name": "value": "$new_migration_name"`. `delete_migration` deletes the selected migrations. This action only works if the migration has not started. This action does not accept any action parameters.
685 686 687 688 |
# File 'lib/crimson-falcon/api/host_migration.rb', line 685 def migrations_actions_v1(action_name, body, opts = {}) data, _status_code, _headers = migrations_actions_v1_with_http_info(action_name, body, opts) data end |
#migrations_actions_v1_with_http_info(action_name, body, opts = {}) ⇒ Array<(MsaspecQueryResponse, Integer, Hash)>
Perform an action on a migration job. The available actions are `start_migration`, `cancel_migration`, `rename_migration`, and `delete_migration`. `start_migration` starts the selected migrations. This action only works if the migration has not started. This action does not accept any action parameters. Only one migration may be started per request. `cancel_migration` cancels the selected migrations. This actions only works if the migration has started and not completed. This action does not accept any action parameters. `rename_migration` renames the selected migrations. This action can be called at any time. Only 1 action parameter may be supplied. Action parameters take the form of `"migration_name": "value": "$new_migration_name"`. `delete_migration` deletes the selected migrations. This action only works if the migration has not started. This action does not accept any action parameters.
696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 |
# File 'lib/crimson-falcon/api/host_migration.rb', line 696 def migrations_actions_v1_with_http_info(action_name, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: HostMigration.migrations_actions_v1 ...' end # verify the required parameter 'action_name' is set if @api_client.config.client_side_validation && action_name.nil? fail ArgumentError, "Missing the required parameter 'action_name' when calling HostMigration.migrations_actions_v1" end # verify enum value allowable_values = ["delete_migration", "rename_migration", "start_migration", "cancel_migration"] if @api_client.config.client_side_validation && !allowable_values.include?(action_name) fail ArgumentError, "invalid value for \"action_name\", must be one of #{allowable_values}" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling HostMigration.migrations_actions_v1" end # resource path local_var_path = '/host-migration/entities/migrations-actions/v1' # query parameters query_params = opts[:query_params] || {} query_params[:'action_name'] = action_name # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'MsaspecQueryResponse' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"HostMigration.migrations_actions_v1", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: HostMigration#migrations_actions_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |