morpheus-cli 3.6.8 → 3.6.9

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 (93) hide show
  1. checksums.yaml +4 -4
  2. data/lib/morpheus/api/account_groups_interface.rb +2 -2
  3. data/lib/morpheus/api/accounts_interface.rb +4 -7
  4. data/lib/morpheus/api/api_client.rb +207 -70
  5. data/lib/morpheus/api/app_templates_interface.rb +7 -28
  6. data/lib/morpheus/api/apps_interface.rb +14 -21
  7. data/lib/morpheus/api/archive_buckets_interface.rb +2 -2
  8. data/lib/morpheus/api/archive_files_interface.rb +6 -6
  9. data/lib/morpheus/api/auth_interface.rb +14 -1
  10. data/lib/morpheus/api/blueprints_interface.rb +9 -16
  11. data/lib/morpheus/api/cloud_datastores_interface.rb +1 -1
  12. data/lib/morpheus/api/cloud_policies_interface.rb +1 -1
  13. data/lib/morpheus/api/clouds_interface.rb +18 -21
  14. data/lib/morpheus/api/cypher_interface.rb +19 -28
  15. data/lib/morpheus/api/file_copy_request_interface.rb +1 -1
  16. data/lib/morpheus/api/group_policies_interface.rb +1 -1
  17. data/lib/morpheus/api/groups_interface.rb +4 -4
  18. data/lib/morpheus/api/image_builder_boot_scripts_interface.rb +1 -1
  19. data/lib/morpheus/api/image_builder_image_builds_interface.rb +2 -2
  20. data/lib/morpheus/api/image_builder_preseed_scripts_interface.rb +1 -1
  21. data/lib/morpheus/api/instances_interface.rb +17 -23
  22. data/lib/morpheus/api/logs_interface.rb +7 -10
  23. data/lib/morpheus/api/network_domains_interface.rb +1 -1
  24. data/lib/morpheus/api/network_groups_interface.rb +1 -1
  25. data/lib/morpheus/api/network_pool_servers_interface.rb +1 -1
  26. data/lib/morpheus/api/network_pools_interface.rb +1 -1
  27. data/lib/morpheus/api/network_proxies_interface.rb +1 -1
  28. data/lib/morpheus/api/network_services_interface.rb +1 -1
  29. data/lib/morpheus/api/networks_interface.rb +1 -1
  30. data/lib/morpheus/api/old_cypher_interface.rb +55 -0
  31. data/lib/morpheus/api/packages_interface.rb +1 -1
  32. data/lib/morpheus/api/policies_interface.rb +1 -1
  33. data/lib/morpheus/api/setup_interface.rb +1 -1
  34. data/lib/morpheus/api/storage_providers_interface.rb +1 -1
  35. data/lib/morpheus/api/whoami_interface.rb +1 -1
  36. data/lib/morpheus/benchmarking.rb +277 -0
  37. data/lib/morpheus/cli.rb +6 -22
  38. data/lib/morpheus/cli/access_token_command.rb +172 -0
  39. data/lib/morpheus/cli/accounts.rb +5 -0
  40. data/lib/morpheus/cli/apps.rb +93 -37
  41. data/lib/morpheus/cli/archives_command.rb +0 -2
  42. data/lib/morpheus/cli/auth_command.rb +112 -0
  43. data/lib/morpheus/cli/blueprints_command.rb +50 -13
  44. data/lib/morpheus/cli/change_password_command.rb +148 -0
  45. data/lib/morpheus/cli/cli_command.rb +173 -49
  46. data/lib/morpheus/cli/clouds.rb +15 -5
  47. data/lib/morpheus/cli/command_error.rb +7 -1
  48. data/lib/morpheus/cli/{alias_command.rb → commands/standard/alias_command.rb} +79 -51
  49. data/lib/morpheus/cli/commands/standard/benchmark_command.rb +399 -0
  50. data/lib/morpheus/cli/commands/standard/coloring_command.rb +60 -0
  51. data/lib/morpheus/cli/{curl_command.rb → commands/standard/curl_command.rb} +0 -7
  52. data/lib/morpheus/cli/commands/standard/debug_command.rb +61 -0
  53. data/lib/morpheus/cli/{echo_command.rb → commands/standard/echo_command.rb} +1 -1
  54. data/lib/morpheus/cli/{edit_profile_command.rb → commands/standard/edit_profile_command.rb} +0 -0
  55. data/lib/morpheus/cli/{edit_rc_command.rb → commands/standard/edit_rc_command.rb} +0 -0
  56. data/lib/morpheus/cli/commands/standard/get_prompt_command.rb +39 -0
  57. data/lib/morpheus/cli/commands/standard/history_command.rb +76 -0
  58. data/lib/morpheus/cli/{log_level_command.rb → commands/standard/log_level_command.rb} +1 -1
  59. data/lib/morpheus/cli/{man_command.rb → commands/standard/man_command.rb} +2 -2
  60. data/lib/morpheus/cli/commands/standard/rm_command.rb +14 -0
  61. data/lib/morpheus/cli/commands/standard/set_prompt_command.rb +54 -0
  62. data/lib/morpheus/cli/{sleep_command.rb → commands/standard/sleep_command.rb} +0 -0
  63. data/lib/morpheus/cli/{source_command.rb → commands/standard/source_command.rb} +0 -0
  64. data/lib/morpheus/cli/{ssl_verification_command.rb → commands/standard/ssl_verification_command.rb} +1 -1
  65. data/lib/morpheus/cli/commands/standard/tee_command.rb +14 -0
  66. data/lib/morpheus/cli/{version_command.rb → commands/standard/version_command.rb} +0 -0
  67. data/lib/morpheus/cli/credentials.rb +276 -87
  68. data/lib/morpheus/cli/cypher_command.rb +333 -214
  69. data/lib/morpheus/cli/error_handler.rb +12 -2
  70. data/lib/morpheus/cli/groups.rb +44 -20
  71. data/lib/morpheus/cli/hosts.rb +39 -16
  72. data/lib/morpheus/cli/instances.rb +114 -62
  73. data/lib/morpheus/cli/login.rb +74 -21
  74. data/lib/morpheus/cli/logout.rb +3 -4
  75. data/lib/morpheus/cli/mixins/accounts_helper.rb +50 -18
  76. data/lib/morpheus/cli/mixins/print_helper.rb +207 -42
  77. data/lib/morpheus/cli/old_cypher_command.rb +414 -0
  78. data/lib/morpheus/cli/option_parser.rb +6 -1
  79. data/lib/morpheus/cli/processes_command.rb +3 -0
  80. data/lib/morpheus/cli/remote.rb +11 -17
  81. data/lib/morpheus/cli/roles.rb +17 -17
  82. data/lib/morpheus/cli/security_groups.rb +47 -17
  83. data/lib/morpheus/cli/shell.rb +139 -79
  84. data/lib/morpheus/cli/tenants_command.rb +353 -0
  85. data/lib/morpheus/cli/users.rb +26 -18
  86. data/lib/morpheus/cli/version.rb +1 -1
  87. data/lib/morpheus/cli/whoami.rb +14 -10
  88. data/lib/morpheus/formatters.rb +4 -4
  89. data/lib/morpheus/logging.rb +16 -8
  90. data/lib/morpheus/terminal.rb +63 -34
  91. metadata +28 -15
  92. data/lib/morpheus/cli/coloring_command.rb +0 -45
  93. data/lib/morpheus/cli/set_prompt_command.rb +0 -51
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f07f82c8c3a9f9040ddd94a5d7537c5bd0f060c2299964f6338876eea0886a84
4
- data.tar.gz: fc432221b5e84bc65cf18daba858aad0f491700c5b6fcc02a2092ab6e504d4b9
3
+ metadata.gz: edf4a115c224b9ee5fbdb0289bc5ed3a9338e2847461ff395c558e28c6352929
4
+ data.tar.gz: d3eed3cf1efe9c90679fb6c3a6e52e177fc9e78bc6bafeab4429cbe4a72308da
5
5
  SHA512:
6
- metadata.gz: dd6fe7211b9b4634daa9a497786cb755b7f8127860810d06903398d4ada337dd02cd1a6cdb68aa244773783277131dc2a08bc2fe2be6b912da01daf5d3983d04
7
- data.tar.gz: 696525d04100e85028de52f8417bdf3449815236e1da81a57d5d9418d79fbaa82a554a3b774f45d46f7c6d6c7a096c3b3e63d77f61376d43d88218a8bfb42fc8
6
+ metadata.gz: 970a441acc7a65b6b91578f7a3d44bba995ac01f4060982a17d7ebc490ef7ddced9bb63a9dca5b1bebecb7dff7239bc352f42d6ea8a7f1a179b05fb20b312323
7
+ data.tar.gz: f07cc47e7ffdc6d2f754dca1551d4f122a944b6b5afe18e7a8d52bb494c870f6cc57c0a0298f42bca88f3559b878f6c7b0d408693b6e02ff9812fd4e753063db
@@ -40,14 +40,14 @@ class Morpheus::AccountGroupsInterface < Morpheus::APIClient
40
40
  def destroy(account_id, id, params={})
41
41
  url = "#{@base_url}/api/accounts/#{account_id}/groups/#{id}"
42
42
  headers = { :params => params, :authorization => "Bearer #{@access_token}", 'Content-Type' => 'application/json' }
43
- opts = {method: :delete, url: url, timeout: 30, headers: headers}
43
+ opts = {method: :delete, url: url, headers: headers}
44
44
  execute(opts)
45
45
  end
46
46
 
47
47
  def update_zones(account_id, id, payload)
48
48
  url = "#{@base_url}/api/accounts/#{account_id}/groups/#{id}/update-zones"
49
49
  headers = { :authorization => "Bearer #{@access_token}", 'Content-Type' => 'application/json' }
50
- opts = {method: :put, url: url, timeout: 30, headers: headers, payload: payload.to_json}
50
+ opts = {method: :put, url: url, headers: headers, payload: payload.to_json}
51
51
  execute(opts)
52
52
  end
53
53
 
@@ -15,24 +15,21 @@ class Morpheus::AccountsInterface < Morpheus::APIClient
15
15
  execute(method: :get, url: url, headers: headers)
16
16
  end
17
17
 
18
- def list(options={})
18
+ def list(params={})
19
19
  url = "#{@base_url}/api/accounts"
20
- headers = { params: {}, authorization: "Bearer #{@access_token}" }
21
- headers[:params].merge!(options)
20
+ headers = { params: params, authorization: "Bearer #{@access_token}" }
22
21
  execute(method: :get, url: url, headers: headers)
23
22
  end
24
23
 
25
- def create(options)
24
+ def create(payload)
26
25
  url = "#{@base_url}/api/accounts"
27
26
  headers = { :authorization => "Bearer #{@access_token}", 'Content-Type' => 'application/json' }
28
- payload = options
29
27
  execute(method: :post, url: url, headers: headers, payload: payload.to_json)
30
28
  end
31
29
 
32
- def update(id, options)
30
+ def update(id, payload)
33
31
  url = "#{@base_url}/api/accounts/#{id}"
34
32
  headers = { :authorization => "Bearer #{@access_token}", 'Content-Type' => 'application/json' }
35
- payload = options
36
33
  execute(method: :put, url: url, headers: headers, payload: payload.to_json)
37
34
  end
38
35
 
@@ -3,7 +3,7 @@ require 'uri'
3
3
  require 'rest-client'
4
4
 
5
5
  class Morpheus::APIClient
6
- def initialize(access_token, refresh_token=nil,expires_in = nil, base_url=nil, verify_ssl=true)
6
+ def initialize(access_token, refresh_token=nil,expires_in = nil, base_url=nil, verify_ssl=true, options={})
7
7
  @access_token = access_token
8
8
  @refresh_token = refresh_token
9
9
  @base_url = base_url
@@ -11,6 +11,7 @@ class Morpheus::APIClient
11
11
  @expires_at = DateTime.now + expires_in.seconds
12
12
  end
13
13
  set_ssl_verification_enabled(verify_ssl)
14
+ setopts(options)
14
15
  end
15
16
 
16
17
  def dry_run(val=true)
@@ -30,7 +31,127 @@ class Morpheus::APIClient
30
31
  @verify_ssl = !!val
31
32
  end
32
33
 
33
- def execute(opts, parse_json=true)
34
+ # set this in your interface, eg. to 'application/json'
35
+ def default_content_type
36
+ nil
37
+ end
38
+
39
+ # common global options, hooray.
40
+ # this is probably needed for CliCommand too..
41
+ # maybe make this a mixin...
42
+
43
+ # need this accessor?
44
+ # def get_options
45
+ # @options
46
+ # end
47
+
48
+ # set common global @options for use with all requests
49
+ # meant for inline use just like dry(), set_options(dry_run:true) can be used in place of dry()
50
+ # @param opts [Hash] globally supported options like :dry_run, :json, :curl, :headers, :timeout, etc
51
+ # Example:
52
+ # Prints curl -XGET .../whoami -H "Bearer" instead of actually request
53
+ # APIClient.new(token).whoami.setopts(curl:true).get({})
54
+ # @return self (APIClient)
55
+ def setopts(new_options)
56
+ @options = new_options
57
+ if @options[:dry_run]
58
+ dry_run(true)
59
+ end
60
+ self
61
+ end
62
+
63
+ # with_options sets common global @options for the duration of the block only
64
+ # then returns the options to their prior values
65
+ # @param opts [Hash] globally supported options like :dry_run, :json, :curl, :headers, :timeout, etc
66
+ # @return result of block, usually the a result Hash from client.execute({})
67
+ def withopts(tmp_options, &block)
68
+ @_old_options = @options
69
+ begin
70
+ @options = tmp_options
71
+ result = block.call()
72
+ ensure
73
+ @options = @_old_options
74
+ end
75
+ return result
76
+ end
77
+
78
+ alias :set_options :setopts
79
+ alias :with_options :withopts
80
+ # Execute an HTTP request with this client.
81
+ # opts - Hash of options for HTTP Request.
82
+ # :url - The full url
83
+ # :method - The default method is :get (GET)
84
+ # :headers - Hash of headers to include in the request.
85
+ # eg. {'Content-Type' => 'application/json'}. :params is a special key for query parameters.
86
+ # :params - query parameters
87
+ # :payload - The body of the request.
88
+ # :timeout - A custom timeout in seconds for api requests. The default is 30. todo: separate timeout options
89
+ # options - Hash of common global options that commands parse. eg. :headers, :timeout, :dry_run, :curl, etc
90
+ # :headers - Extra headers to add. This expects a Hash like {'Content-Type' => 'application/json'}.
91
+ # :timeout - A custom timeout in seconds for api requests. The default is 30. todo: separate timeout options
92
+ def execute(opts, options={})
93
+ # merge in common global @options
94
+ if @options
95
+ options = options.merge(@options)
96
+ else
97
+ options = options.clone
98
+ end
99
+
100
+ # default HTTP method
101
+ if opts[:method].nil?
102
+ # why not a default? you will get an error from RestClient
103
+ # opts[:method] = :get
104
+ else
105
+ # convert to lowercase Symbol like :get, :post, :put, or :delete
106
+ opts[:method] = opts[:method].to_s.downcase.to_sym
107
+ end
108
+
109
+ # apply default headers
110
+ opts[:headers] ||= {}
111
+ # Authorization: apply our access token
112
+ if @access_token
113
+ if opts[:headers][:authorization].nil? && opts[:headers]['Authorization'].nil?
114
+ opts[:headers][:authorization] = "Bearer #{@access_token}"
115
+ else
116
+ # authorization header has already been set.
117
+ end
118
+ end
119
+
120
+ # Content-Type: apply interface default
121
+ if opts[:headers]['Content-Type'].nil? && default_content_type
122
+ opts[:headers]['Content-Type'] = default_content_type
123
+ end
124
+
125
+ # use custom timeout eg. from --timeout option
126
+ if options[:timeout]
127
+ opts[:timeout] = options[:timeout].to_f
128
+ end
129
+
130
+ # add extra headers, eg. from --header option
131
+ # headers should be a Hash and not an Array, dont make me split you here!
132
+ if options[:headers]
133
+ opts[:headers] = opts[:headers].merge(options[:headers])
134
+ end
135
+
136
+ # this is confusing, but RestClient expects :params inside the headers...?
137
+ # right?
138
+ # move/copy params to headers.params for simplification.
139
+ # remove this if issues arise
140
+ if opts[:params] && (opts[:headers][:params].nil? || opts[:headers][:params].empty?)
141
+ opts[:headers][:params] = opts[:params] # .delete(:params) maybe?
142
+ end
143
+
144
+ # :command_options for these
145
+ # if options[:curl]
146
+ # opts[:curl] = options[:curl]
147
+ # end
148
+ # if options.key?(:pretty_json)
149
+ # opts[:pretty_json] = options[:pretty_json]
150
+ # end
151
+ # if options.key?(:scrub)
152
+ # opts[:scrub] = options[:scrub]
153
+ # end
154
+
34
155
  # @verify_ssl is not used atm
35
156
  # todo: finish this and use it instead of the global variable RestClient.ssl_verification_enabled?
36
157
  # gotta clean up all APIClient subclasses new() methods to support this
@@ -39,14 +160,24 @@ class Morpheus::APIClient
39
160
  if @verify_ssl == false
40
161
  opts[:verify_ssl] = OpenSSL::SSL::VERIFY_NONE
41
162
  end
163
+
42
164
  if @dry_run
43
165
  # JD: could return a Request object instead...
166
+ # print_dry_run needs options somehow...
167
+ opts[:command_options] = options # trash this..we got @options with setopts now
44
168
  return opts
45
169
  end
170
+
171
+ # uhh can't use LIST at the moment
172
+ # fix it!
173
+ # if opts[:method] == :list
174
+ # opts[:method]
175
+ # end
176
+
46
177
  # Morpheus::Logging::DarkPrinter.puts "Morpheus::RestClient.execute(#{opts})" if Morpheus::Logging.debug?
47
178
  # instead, using ::RestClient.log = STDOUT
48
179
  response = Morpheus::RestClient.execute(opts)
49
- if parse_json
180
+ if opts[:parse_json] != false && options[:parse_json] != false
50
181
  return JSON.parse(response.to_s)
51
182
  else
52
183
  return response
@@ -54,273 +185,279 @@ class Morpheus::APIClient
54
185
  end
55
186
 
56
187
  def auth
57
- Morpheus::AuthInterface.new(@base_url, @access_token)
188
+ Morpheus::AuthInterface.new(@base_url, @access_token).setopts(@options)
58
189
  end
59
190
 
60
191
  def whoami
61
- Morpheus::WhoamiInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
192
+ Morpheus::WhoamiInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
62
193
  end
63
194
 
64
195
  def user_settings
65
- Morpheus::UserSettingsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
196
+ Morpheus::UserSettingsInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
66
197
  end
67
198
 
68
199
  def options
69
- Morpheus::OptionsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
200
+ Morpheus::OptionsInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
70
201
  end
71
202
 
72
203
  def groups
73
- Morpheus::GroupsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
204
+ Morpheus::GroupsInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
74
205
  end
75
206
 
76
207
  def account_groups
77
- Morpheus::AccountGroupsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
208
+ Morpheus::AccountGroupsInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
78
209
  end
79
210
 
80
211
  def clouds
81
- Morpheus::CloudsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
212
+ Morpheus::CloudsInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
82
213
  end
83
214
 
84
215
  def cloud_datastores
85
- Morpheus::CloudDatastoresInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
216
+ Morpheus::CloudDatastoresInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
86
217
  end
87
218
 
88
219
  def servers
89
- Morpheus::ServersInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
220
+ Morpheus::ServersInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
90
221
  end
91
222
 
92
223
  def instances
93
- Morpheus::InstancesInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
224
+ Morpheus::InstancesInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
94
225
  end
95
226
 
96
227
  def containers
97
- Morpheus::ContainersInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
228
+ Morpheus::ContainersInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
98
229
  end
99
230
 
100
231
  def instance_types
101
- Morpheus::InstanceTypesInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
232
+ Morpheus::InstanceTypesInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
102
233
  end
103
234
 
104
235
  def provision_types
105
- Morpheus::ProvisionTypesInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
236
+ Morpheus::ProvisionTypesInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
106
237
  end
107
238
 
108
239
  def load_balancers
109
- Morpheus::LoadBalancersInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
240
+ Morpheus::LoadBalancersInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
110
241
  end
111
242
 
112
243
  def tasks
113
- Morpheus::TasksInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
244
+ Morpheus::TasksInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
114
245
  end
115
246
 
116
247
  def task_sets
117
- Morpheus::TaskSetsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
248
+ Morpheus::TaskSetsInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
118
249
  end
119
250
 
120
251
  def virtual_images
121
- Morpheus::VirtualImagesInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
252
+ Morpheus::VirtualImagesInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
122
253
  end
123
254
 
124
255
  def apps
125
- Morpheus::AppsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
256
+ Morpheus::AppsInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
126
257
  end
127
258
 
128
259
  def blueprints
129
- Morpheus::BlueprintsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
260
+ Morpheus::BlueprintsInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
130
261
  end
131
262
 
132
263
  def app_templates
133
- Morpheus::AppTemplatesInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
264
+ Morpheus::AppTemplatesInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
134
265
  end
135
266
 
136
267
  def deploy
137
- Morpheus::DeployInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
268
+ Morpheus::DeployInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
138
269
  end
139
270
 
140
271
  def deployments
141
- Morpheus::DeploymentsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
272
+ Morpheus::DeploymentsInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
142
273
  end
143
274
 
144
275
  def security_groups
145
- Morpheus::SecurityGroupsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
276
+ Morpheus::SecurityGroupsInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
146
277
  end
147
278
 
148
279
  def security_group_rules
149
- Morpheus::SecurityGroupRulesInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
280
+ Morpheus::SecurityGroupRulesInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
150
281
  end
151
282
 
152
283
  def accounts
153
- Morpheus::AccountsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
284
+ Morpheus::AccountsInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
154
285
  end
155
286
 
156
287
  def users
157
- Morpheus::UsersInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
288
+ Morpheus::UsersInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
158
289
  end
159
290
 
160
291
  def user_groups
161
- Morpheus::UserGroupsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
292
+ Morpheus::UserGroupsInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
162
293
  end
163
294
 
164
295
  def user_sources
165
- Morpheus::UserSourcesInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
296
+ Morpheus::UserSourcesInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
166
297
  end
167
298
 
168
299
  def logs
169
- Morpheus::LogsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
300
+ Morpheus::LogsInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
170
301
  end
171
302
 
172
303
  def roles
173
- Morpheus::RolesInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
304
+ Morpheus::RolesInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
174
305
  end
175
306
 
176
307
  def key_pairs
177
- Morpheus::KeyPairsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
308
+ Morpheus::KeyPairsInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
178
309
  end
179
310
 
180
311
  def license
181
- Morpheus::LicenseInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
312
+ Morpheus::LicenseInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
182
313
  end
183
314
 
184
315
  def custom_instance_types
185
- Morpheus::CustomInstanceTypesInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
316
+ Morpheus::CustomInstanceTypesInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
186
317
  end
187
318
 
188
319
  def option_types
189
- Morpheus::OptionTypesInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
320
+ Morpheus::OptionTypesInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
190
321
  end
191
322
 
192
323
  def option_type_lists
193
- Morpheus::OptionTypeListsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
324
+ Morpheus::OptionTypeListsInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
194
325
  end
195
326
 
196
327
  def dashboard
197
- Morpheus::DashboardInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
328
+ Morpheus::DashboardInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
198
329
  end
199
330
 
200
331
  def power_schedules
201
- Morpheus::PowerSchedulesInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
332
+ Morpheus::PowerSchedulesInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
202
333
  end
203
334
 
204
335
  def execute_schedules
205
- Morpheus::ExecuteSchedulesInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
336
+ Morpheus::ExecuteSchedulesInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
206
337
  end
207
338
 
208
339
  def setup
209
- Morpheus::SetupInterface.new(@base_url)
340
+ Morpheus::SetupInterface.new(@base_url).setopts(@options).setopts(@options)
210
341
  end
211
342
 
212
343
  def monitoring
213
- Morpheus::MonitoringInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
344
+ Morpheus::MonitoringInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
214
345
  end
215
346
 
216
347
  # def checks
217
- # # Morpheus::MonitoringChecksInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
348
+ # # Morpheus::MonitoringChecksInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
218
349
  # monitoring.checks
219
350
  # end
220
351
 
221
352
  # def incidents
222
- # # Morpheus::MonitoringIncidentsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
353
+ # # Morpheus::MonitoringIncidentsInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
223
354
  # monitoring.incidents
224
355
  # end
225
356
 
226
357
  def policies
227
- Morpheus::PoliciesInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
358
+ Morpheus::PoliciesInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
228
359
  end
229
360
 
230
361
  def group_policies
231
- Morpheus::GroupPoliciesInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
362
+ Morpheus::GroupPoliciesInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
232
363
  end
233
364
 
234
365
  def cloud_policies
235
- Morpheus::CloudPoliciesInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
366
+ Morpheus::CloudPoliciesInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
236
367
  end
237
368
 
238
369
  def networks
239
- Morpheus::NetworksInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
370
+ Morpheus::NetworksInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
240
371
  end
241
372
 
242
373
  def network_groups
243
- Morpheus::NetworkGroupsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
374
+ Morpheus::NetworkGroupsInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
244
375
  end
245
376
 
246
377
  def network_pools
247
- Morpheus::NetworkPoolsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
378
+ Morpheus::NetworkPoolsInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
248
379
  end
249
380
 
250
381
  def network_services
251
- Morpheus::NetworkServicesInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
382
+ Morpheus::NetworkServicesInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
252
383
  end
253
384
 
254
385
  def network_pool_servers
255
- Morpheus::NetworkPoolServersInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
386
+ Morpheus::NetworkPoolServersInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
256
387
  end
257
388
 
258
389
  def network_domains
259
- Morpheus::NetworkDomainsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
390
+ Morpheus::NetworkDomainsInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
260
391
  end
261
392
 
262
393
  def network_proxies
263
- Morpheus::NetworkProxiesInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
394
+ Morpheus::NetworkProxiesInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
264
395
  end
265
396
 
266
397
  def archive_buckets
267
- Morpheus::ArchiveBucketsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
398
+ Morpheus::ArchiveBucketsInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
268
399
  end
269
400
 
270
401
  def archive_files
271
- Morpheus::ArchiveFilesInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
402
+ Morpheus::ArchiveFilesInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
272
403
  end
273
404
 
274
405
  def image_builder
275
- Morpheus::ImageBuilderInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
406
+ Morpheus::ImageBuilderInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
276
407
  end
277
408
 
278
409
  def storage_providers
279
- Morpheus::StorageProvidersInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
410
+ Morpheus::StorageProvidersInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
280
411
  end
281
412
 
282
413
  def library_instance_types
283
- Morpheus::LibraryInstanceTypesInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
414
+ Morpheus::LibraryInstanceTypesInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
284
415
  end
285
416
 
286
417
  def library_layouts
287
- Morpheus::LibraryLayoutsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
418
+ Morpheus::LibraryLayoutsInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
288
419
  end
289
420
 
290
421
  def library_container_upgrades
291
- Morpheus::LibraryContainerUpgradesInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
422
+ Morpheus::LibraryContainerUpgradesInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
292
423
  end
293
424
 
294
425
  def library_container_types
295
- Morpheus::LibraryContainerTypesInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
426
+ Morpheus::LibraryContainerTypesInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
296
427
  end
297
428
 
298
429
  def library_container_scripts
299
- Morpheus::LibraryContainerScriptsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
430
+ Morpheus::LibraryContainerScriptsInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
300
431
  end
301
432
 
302
433
  def library_container_templates
303
- Morpheus::LibraryContainerTemplatesInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
434
+ Morpheus::LibraryContainerTemplatesInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
304
435
  end
305
436
 
306
437
  def packages
307
- Morpheus::PackagesInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
438
+ Morpheus::PackagesInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
308
439
  end
309
440
 
310
441
  def cypher
311
- Morpheus::CypherInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
442
+ Morpheus::CypherInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
443
+ end
444
+
445
+ def old_cypher
446
+ Morpheus::OldCypherInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
312
447
  end
313
448
 
314
449
  def execution_request
315
- Morpheus::ExecutionRequestInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
450
+ Morpheus::ExecutionRequestInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
316
451
  end
317
452
 
318
453
  def file_copy_request
319
- Morpheus::FileCopyRequestInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
454
+ Morpheus::FileCopyRequestInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
320
455
  end
321
456
 
322
457
  def processes
323
- Morpheus::ProcessesInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
458
+ Morpheus::ProcessesInterface.new(@access_token, @refresh_token, @expires_at, @base_url).setopts(@options)
324
459
  end
325
460
 
461
+ # new interfaces get added here
462
+
326
463
  end