haipa_compute 0.0.3 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/lib/1.0/generated/haipa_compute/haipa_compute.rb +136 -136
  3. data/lib/1.0/generated/haipa_compute/machines.rb +578 -578
  4. data/lib/1.0/generated/haipa_compute/models/agent.rb +87 -87
  5. data/lib/1.0/generated/haipa_compute/models/agent_network.rb +93 -93
  6. data/lib/1.0/generated/haipa_compute/models/machine.rb +125 -125
  7. data/lib/1.0/generated/haipa_compute/models/machine_config.rb +102 -91
  8. data/lib/1.0/generated/haipa_compute/models/machine_network.rb +187 -187
  9. data/lib/1.0/generated/haipa_compute/models/machine_network_config.rb +67 -67
  10. data/lib/1.0/generated/haipa_compute/models/machine_subnet_config.rb +47 -47
  11. data/lib/1.0/generated/haipa_compute/models/network.rb +109 -109
  12. data/lib/1.0/generated/haipa_compute/models/odata_value_ienumerable_machine.rb +56 -56
  13. data/lib/1.0/generated/haipa_compute/models/odata_value_ienumerable_operation.rb +56 -56
  14. data/lib/1.0/generated/haipa_compute/models/odata_value_ienumerable_operation_log.rb +56 -56
  15. data/lib/1.0/generated/haipa_compute/models/operation.rb +123 -123
  16. data/lib/1.0/generated/haipa_compute/models/operation_log.rb +81 -81
  17. data/lib/1.0/generated/haipa_compute/models/subnet.rb +144 -144
  18. data/lib/1.0/generated/haipa_compute/models/virtual_machine.rb +90 -90
  19. data/lib/1.0/generated/haipa_compute/models/virtual_machine_config.rb +111 -111
  20. data/lib/1.0/generated/haipa_compute/models/virtual_machine_cpu_config.rb +47 -47
  21. data/lib/1.0/generated/haipa_compute/models/virtual_machine_disk_config.rb +80 -80
  22. data/lib/1.0/generated/haipa_compute/models/virtual_machine_memory_config.rb +69 -69
  23. data/lib/1.0/generated/haipa_compute/models/virtual_machine_network_adapter.rb +92 -92
  24. data/lib/1.0/generated/haipa_compute/models/virtual_machine_network_adapter_config.rb +69 -69
  25. data/lib/1.0/generated/haipa_compute/models/virtual_machine_provisioning_config.rb +58 -58
  26. data/lib/1.0/generated/haipa_compute/module_definition.rb +9 -9
  27. data/lib/1.0/generated/haipa_compute/networks.rb +415 -415
  28. data/lib/1.0/generated/haipa_compute/operations.rb +347 -347
  29. data/lib/1.0/generated/haipa_compute/subnets.rb +100 -100
  30. data/lib/1.0/generated/haipa_compute.rb +53 -53
  31. data/lib/api_configuration.rb +2 -1
  32. data/lib/version.rb +1 -1
  33. metadata +4 -4
@@ -1,100 +1,100 @@
1
- # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator.
3
- # Changes may cause incorrect behavior and will be lost if the code is
4
- # regenerated.
5
-
6
- module Haipa::Client::Compute::V1_0
7
- #
8
- # Haipa management API
9
- #
10
- class Subnets
11
- include Haipa::Client
12
-
13
- #
14
- # Creates and initializes a new instance of the Subnets class.
15
- # @param client service class for accessing basic functionality.
16
- #
17
- def initialize(client)
18
- @client = client
19
- end
20
-
21
- # @return [HaipaCompute] reference to the HaipaCompute
22
- attr_reader :client
23
-
24
- #
25
- # @param select [String] Limits the properties returned in the result.
26
- # @param expand [String] Indicates the related entities to be represented
27
- # inline. The maximum depth is 2.
28
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
29
- # will be added to the HTTP request.
30
- #
31
- #
32
- def list(select:nil, expand:nil, custom_headers:nil)
33
- response = list_async(select:select, expand:expand, custom_headers:custom_headers).value!
34
- nil
35
- end
36
-
37
- #
38
- # @param select [String] Limits the properties returned in the result.
39
- # @param expand [String] Indicates the related entities to be represented
40
- # inline. The maximum depth is 2.
41
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
42
- # will be added to the HTTP request.
43
- #
44
- # @return [Haipa::Client::HaipaOperationResponse] HTTP response information.
45
- #
46
- def list_with_http_info(select:nil, expand:nil, custom_headers:nil)
47
- list_async(select:select, expand:expand, custom_headers:custom_headers).value!
48
- end
49
-
50
- #
51
- # @param select [String] Limits the properties returned in the result.
52
- # @param expand [String] Indicates the related entities to be represented
53
- # inline. The maximum depth is 2.
54
- # @param [Hash{String => String}] A hash of custom headers that will be added
55
- # to the HTTP request.
56
- #
57
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
58
- #
59
- def list_async(select:nil, expand:nil, custom_headers:nil)
60
-
61
-
62
- request_headers = {}
63
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
64
-
65
- # Set Headers
66
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
67
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
68
- path_template = 'odata/v1'
69
-
70
- request_url = @base_url || @client.base_url
71
-
72
- options = {
73
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02]],
74
- query_params: {'$select' => select,'$expand' => expand},
75
- headers: request_headers.merge(custom_headers || {}),
76
- base_url: request_url
77
- }
78
- promise = @client.make_request_async(:get, path_template, options)
79
-
80
- promise = promise.then do |result|
81
- http_response = result.response
82
- status_code = http_response.status
83
- response_content = http_response.body
84
- unless status_code == 200
85
- error_model = JSON.load(response_content)
86
- fail Haipa::Client::HaipaOperationError.new(result.request, http_response, error_model)
87
- end
88
-
89
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
90
- result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
91
- result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
92
-
93
- result
94
- end
95
-
96
- promise.execute
97
- end
98
-
99
- end
100
- end
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Haipa::Client::Compute::V1_0
7
+ #
8
+ # Haipa management API
9
+ #
10
+ class Subnets
11
+ include Haipa::Client
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Subnets class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [HaipaCompute] reference to the HaipaCompute
22
+ attr_reader :client
23
+
24
+ #
25
+ # @param select [String] Limits the properties returned in the result.
26
+ # @param expand [String] Indicates the related entities to be represented
27
+ # inline. The maximum depth is 2.
28
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
29
+ # will be added to the HTTP request.
30
+ #
31
+ #
32
+ def list(select:nil, expand:nil, custom_headers:nil)
33
+ response = list_async(select:select, expand:expand, custom_headers:custom_headers).value!
34
+ nil
35
+ end
36
+
37
+ #
38
+ # @param select [String] Limits the properties returned in the result.
39
+ # @param expand [String] Indicates the related entities to be represented
40
+ # inline. The maximum depth is 2.
41
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
42
+ # will be added to the HTTP request.
43
+ #
44
+ # @return [Haipa::Client::HaipaOperationResponse] HTTP response information.
45
+ #
46
+ def list_with_http_info(select:nil, expand:nil, custom_headers:nil)
47
+ list_async(select:select, expand:expand, custom_headers:custom_headers).value!
48
+ end
49
+
50
+ #
51
+ # @param select [String] Limits the properties returned in the result.
52
+ # @param expand [String] Indicates the related entities to be represented
53
+ # inline. The maximum depth is 2.
54
+ # @param [Hash{String => String}] A hash of custom headers that will be added
55
+ # to the HTTP request.
56
+ #
57
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
58
+ #
59
+ def list_async(select:nil, expand:nil, custom_headers:nil)
60
+
61
+
62
+ request_headers = {}
63
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
64
+
65
+ # Set Headers
66
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
67
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
68
+ path_template = 'odata/v1'
69
+
70
+ request_url = @base_url || @client.base_url
71
+
72
+ options = {
73
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02]],
74
+ query_params: {'$select' => select,'$expand' => expand},
75
+ headers: request_headers.merge(custom_headers || {}),
76
+ base_url: request_url
77
+ }
78
+ promise = @client.make_request_async(:get, path_template, options)
79
+
80
+ promise = promise.then do |result|
81
+ http_response = result.response
82
+ status_code = http_response.status
83
+ response_content = http_response.body
84
+ unless status_code == 200
85
+ error_model = JSON.load(response_content)
86
+ fail Haipa::Client::HaipaOperationError.new(result.request, http_response, error_model)
87
+ end
88
+
89
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
90
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
91
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
92
+
93
+ result
94
+ end
95
+
96
+ promise.execute
97
+ end
98
+
99
+ end
100
+ end
@@ -1,53 +1,53 @@
1
- # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator.
3
- # Changes may cause incorrect behavior and will be lost if the code is
4
- # regenerated.
5
-
6
- require 'uri'
7
- require 'cgi'
8
- require 'date'
9
- require 'json'
10
- require 'base64'
11
- require 'erb'
12
- require 'securerandom'
13
- require 'time'
14
- require 'timeliness'
15
- require 'faraday'
16
- require 'faraday-cookie_jar'
17
- require 'concurrent'
18
- require 'ms_rest'
19
- require '1.0/generated/haipa_compute/module_definition'
20
- require 'haipa_rest'
21
-
22
- module Haipa::Client::Compute::V1_0
23
- autoload :Machines, '1.0/generated/haipa_compute/machines.rb'
24
- autoload :Networks, '1.0/generated/haipa_compute/networks.rb'
25
- autoload :Operations, '1.0/generated/haipa_compute/operations.rb'
26
- autoload :Subnets, '1.0/generated/haipa_compute/subnets.rb'
27
- autoload :HaipaCompute, '1.0/generated/haipa_compute/haipa_compute.rb'
28
-
29
- module Models
30
- autoload :VirtualMachineDiskConfig, '1.0/generated/haipa_compute/models/virtual_machine_disk_config.rb'
31
- autoload :Subnet, '1.0/generated/haipa_compute/models/subnet.rb'
32
- autoload :VirtualMachineNetworkAdapterConfig, '1.0/generated/haipa_compute/models/virtual_machine_network_adapter_config.rb'
33
- autoload :AgentNetwork, '1.0/generated/haipa_compute/models/agent_network.rb'
34
- autoload :VirtualMachineConfig, '1.0/generated/haipa_compute/models/virtual_machine_config.rb'
35
- autoload :VirtualMachineNetworkAdapter, '1.0/generated/haipa_compute/models/virtual_machine_network_adapter.rb'
36
- autoload :MachineSubnetConfig, '1.0/generated/haipa_compute/models/machine_subnet_config.rb'
37
- autoload :MachineNetwork, '1.0/generated/haipa_compute/models/machine_network.rb'
38
- autoload :MachineNetworkConfig, '1.0/generated/haipa_compute/models/machine_network_config.rb'
39
- autoload :ODataValueIEnumerableMachine, '1.0/generated/haipa_compute/models/odata_value_ienumerable_machine.rb'
40
- autoload :VirtualMachineProvisioningConfig, '1.0/generated/haipa_compute/models/virtual_machine_provisioning_config.rb'
41
- autoload :VirtualMachineMemoryConfig, '1.0/generated/haipa_compute/models/virtual_machine_memory_config.rb'
42
- autoload :MachineConfig, '1.0/generated/haipa_compute/models/machine_config.rb'
43
- autoload :Agent, '1.0/generated/haipa_compute/models/agent.rb'
44
- autoload :OperationLog, '1.0/generated/haipa_compute/models/operation_log.rb'
45
- autoload :Machine, '1.0/generated/haipa_compute/models/machine.rb'
46
- autoload :Operation, '1.0/generated/haipa_compute/models/operation.rb'
47
- autoload :Network, '1.0/generated/haipa_compute/models/network.rb'
48
- autoload :ODataValueIEnumerableOperation, '1.0/generated/haipa_compute/models/odata_value_ienumerable_operation.rb'
49
- autoload :VirtualMachineCpuConfig, '1.0/generated/haipa_compute/models/virtual_machine_cpu_config.rb'
50
- autoload :ODataValueIEnumerableOperationLog, '1.0/generated/haipa_compute/models/odata_value_ienumerable_operation_log.rb'
51
- autoload :VirtualMachine, '1.0/generated/haipa_compute/models/virtual_machine.rb'
52
- end
53
- end
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ require 'uri'
7
+ require 'cgi'
8
+ require 'date'
9
+ require 'json'
10
+ require 'base64'
11
+ require 'erb'
12
+ require 'securerandom'
13
+ require 'time'
14
+ require 'timeliness'
15
+ require 'faraday'
16
+ require 'faraday-cookie_jar'
17
+ require 'concurrent'
18
+ require 'ms_rest'
19
+ require '1.0/generated/haipa_compute/module_definition'
20
+ require 'haipa_rest'
21
+
22
+ module Haipa::Client::Compute::V1_0
23
+ autoload :Machines, '1.0/generated/haipa_compute/machines.rb'
24
+ autoload :Networks, '1.0/generated/haipa_compute/networks.rb'
25
+ autoload :Operations, '1.0/generated/haipa_compute/operations.rb'
26
+ autoload :Subnets, '1.0/generated/haipa_compute/subnets.rb'
27
+ autoload :HaipaCompute, '1.0/generated/haipa_compute/haipa_compute.rb'
28
+
29
+ module Models
30
+ autoload :VirtualMachineDiskConfig, '1.0/generated/haipa_compute/models/virtual_machine_disk_config.rb'
31
+ autoload :Subnet, '1.0/generated/haipa_compute/models/subnet.rb'
32
+ autoload :VirtualMachineNetworkAdapterConfig, '1.0/generated/haipa_compute/models/virtual_machine_network_adapter_config.rb'
33
+ autoload :AgentNetwork, '1.0/generated/haipa_compute/models/agent_network.rb'
34
+ autoload :VirtualMachineConfig, '1.0/generated/haipa_compute/models/virtual_machine_config.rb'
35
+ autoload :VirtualMachineNetworkAdapter, '1.0/generated/haipa_compute/models/virtual_machine_network_adapter.rb'
36
+ autoload :MachineSubnetConfig, '1.0/generated/haipa_compute/models/machine_subnet_config.rb'
37
+ autoload :MachineNetwork, '1.0/generated/haipa_compute/models/machine_network.rb'
38
+ autoload :MachineNetworkConfig, '1.0/generated/haipa_compute/models/machine_network_config.rb'
39
+ autoload :ODataValueIEnumerableMachine, '1.0/generated/haipa_compute/models/odata_value_ienumerable_machine.rb'
40
+ autoload :VirtualMachineProvisioningConfig, '1.0/generated/haipa_compute/models/virtual_machine_provisioning_config.rb'
41
+ autoload :VirtualMachineMemoryConfig, '1.0/generated/haipa_compute/models/virtual_machine_memory_config.rb'
42
+ autoload :MachineConfig, '1.0/generated/haipa_compute/models/machine_config.rb'
43
+ autoload :Agent, '1.0/generated/haipa_compute/models/agent.rb'
44
+ autoload :OperationLog, '1.0/generated/haipa_compute/models/operation_log.rb'
45
+ autoload :Machine, '1.0/generated/haipa_compute/models/machine.rb'
46
+ autoload :Operation, '1.0/generated/haipa_compute/models/operation.rb'
47
+ autoload :Network, '1.0/generated/haipa_compute/models/network.rb'
48
+ autoload :ODataValueIEnumerableOperation, '1.0/generated/haipa_compute/models/odata_value_ienumerable_operation.rb'
49
+ autoload :VirtualMachineCpuConfig, '1.0/generated/haipa_compute/models/virtual_machine_cpu_config.rb'
50
+ autoload :ODataValueIEnumerableOperationLog, '1.0/generated/haipa_compute/models/odata_value_ienumerable_operation_log.rb'
51
+ autoload :VirtualMachine, '1.0/generated/haipa_compute/models/virtual_machine.rb'
52
+ end
53
+ end
@@ -59,7 +59,8 @@ module Haipa::Client::Compute
59
59
  mapper_hash = mapper_class.mapper()
60
60
  end
61
61
 
62
- @client.deserialize(mapper_hash, hash)
62
+ hash_with_string_keys = JSON.parse(hash.to_json)
63
+ @client.deserialize(mapper_hash, hash_with_string_keys)
63
64
  end
64
65
 
65
66
  def module_version
data/lib/version.rb CHANGED
@@ -4,5 +4,5 @@
4
4
 
5
5
  module Haipa::Client::Compute
6
6
 
7
- VERSION = '0.0.3'
7
+ VERSION = '0.1.0'
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: haipa_compute
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Haipa Contributors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-09 00:00:00.000000000 Z
11
+ date: 2019-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.11.3
75
+ version: 0.11.4
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 0.11.3
82
+ version: 0.11.4
83
83
  description: Haipa Client Library for Ruby.
84
84
  email: package-maintainers@haipa.io
85
85
  executables: []