Class: Latitude::API::Resources::Server

Inherits:
APIResource show all
Extended by:
Operations::Action, Operations::Create, Operations::Delete, Operations::List, Operations::Retrieve, Operations::Update
Defined in:
lib/latitude/api/resources/server.rb

Defined Under Namespace

Classes: Distro, Feature, Interface, OperatingSystem, Plan, Region, Site, Spec

Constant Summary

Constants inherited from APIResource

APIResource::READ_ONLY_ATTRIBUTES

Instance Attribute Summary collapse

Attributes inherited from APIResource

#id, #meta, #path_params, #raw_data, #type

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Operations::List

all, list

Methods included from Operations::Create

create

Methods included from Operations::Retrieve

retrieve

Methods included from Operations::Update

update

Methods included from Operations::Delete

delete

Methods included from Operations::Action

action

Methods inherited from APIResource

#==, #[], #[]=, #as_json, #attributes, #changed?, class_url, config_source, construct_from, #delete, execute_request, extract_path_params, #hash, id_prefix, #initialize, #inspect, instance_url, #method_missing, path_param_keys, #refresh, resource_path, resource_type, #resource_url, #respond_to_missing?, #save, #to_h, #unsaved_attributes, with_config, #write_attribute

Methods included from Attributes::ClassMethods

#attribute, #attribute_specs

Methods included from Attributes::InstanceMethods

#attribute_spec, #read_attribute, #wrap_attribute

Constructor Details

This class inherits a constructor from Latitude::API::APIResource

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Latitude::API::APIResource

Instance Attribute Details

#created_atTime (readonly)

Returns:

  • (Time)


46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
# File 'lib/latitude/api/resources/server.rb', line 46

class Server < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] facility
    #   @return [String]
    # @!attribute [r] rack_id
    #   @return [String]
  class Site < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :facility, :string, read_only: true
    attribute :rack_id, :string, read_only: true
  end

    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
    # @!attribute [r] site
    #   @return [Site]
  class Region < APIObject
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
    attribute :site, Site, read_only: true
  end

    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] billing
    #   @return [String]
  class Plan < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :billing, :string, read_only: true
  end

    # @!attribute [r] role
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] mac_address
    #   @return [String]
    # @!attribute [r] description
    #   @return [String]
  class Interface < APIObject
    attribute :role, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :mac_address, :string, read_only: true
    attribute :description, :string, read_only: true
  end

    # @!attribute [r] raid
    #   @return [Boolean]
    # @!attribute [r] ssh_keys
    #   @return [Boolean]
  class Feature < APIObject
    attribute :raid, :boolean, read_only: true
    attribute :ssh_keys, :boolean, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] series
    #   @return [String]
  class Distro < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :series, :string, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] version
    #   @return [String]
    # @!attribute [r] features
    #   @return [Feature]
    # @!attribute [r] distro
    #   @return [Distro]
  class OperatingSystem < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :version, :string, read_only: true
    attribute :features, Feature, read_only: true
    attribute :distro, Distro, read_only: true
  end

    # @!attribute [r] cpu
    #   @return [String]
    # @!attribute [r] disk
    #   @return [String]
    # @!attribute [r] ram
    #   @return [String]
    # @!attribute [r] nic
    #   @return [String]
    # @!attribute [r] gpu
    #   @return [String]
  class Spec < APIObject
    attribute :cpu, :string, read_only: true
    attribute :disk, :string, read_only: true
    attribute :ram, :string, read_only: true
    attribute :nic, :string, read_only: true
    attribute :gpu, :string, read_only: true
  end

  attribute :hostname, :string
  attribute :label, :string
  attribute :price, :integer
  attribute :ipmi_status, :string
  attribute :scheduled_deletion_at, :time
  attribute :status, :string
  attribute :role, :string
  attribute :primary_ipv4, :string
  attribute :created_at, :time, read_only: true
  attribute :locked, :boolean
  attribute :team, Objects::Team
  attribute :project, Objects::Project
  attribute :region, Region
  attribute :tags, [Objects::Tag]
  attribute :primary_ipv6, :string
  attribute :rescue_allowed, :boolean
  attribute :plan, Plan
  attribute :interfaces, [Interface]
  attribute :operating_system, OperatingSystem
  attribute :specs, Spec

  resource_type "servers"
  resource_path "/servers"
  id_prefix     "sv_"

  extend Operations::List
  extend Operations::Create
  extend Operations::Retrieve
  extend Operations::Update
  extend Operations::Delete
  extend Operations::Action

  action :power_action,      path: "actions",        type: "actions",      accepts: i[action]
  action :reboot,            path: "actions",        type: "actions",      attributes: { action: "reboot" }
  action :power_on,          path: "actions",        type: "actions",      attributes: { action: "power_on" }
  action :power_off,         path: "actions",        type: "actions",      attributes: { action: "power_off" }
  action :reset,             path: "actions",        type: "actions",      attributes: { action: "reset" }
  action :lock,              path: "lock"
  action :unlock,            path: "unlock"
  action :rescue_mode,       path: "rescue_mode"
  action :exit_rescue_mode,  path: "exit_rescue_mode"
  action :remote_access,     path: "remote_access"
  action :schedule_deletion, path: "schedule_deletion",
                             accepts: i[at reason]
  action :unschedule_deletion, path: "schedule_deletion", method: :delete

  action :reinstall,         path: "reinstall",      type: "reinstalls",
                             accepts: i[operating_system ipxe hostname ssh_keys user_data raid partitions]

  action :create_out_of_band_connection, path: "out_of_band_connection", type: "out_of_band_connections",
                                         accepts: i[port ssh_key_id]
  action :list_out_of_band_connections,  path: "out_of_band_connection", method: :get

  class << self
    def deploy_config(id, opts = {}, path_params: {})
      params = opts.is_a?(Hash) ? opts : {}
      path_params = extract_path_params(params, path_param_keys) if path_params.empty?
      parsed = execute_request(
        method: :get,
        path: "#{instance_url(id, path_params: path_params)}/deploy_config",
        opts: params,
      )
      parsed
    end

    def update_deploy_config(id, attributes = {}, opts = {})
      body = JSONAPI.encode(type: "deploy_config", id: id, attributes: attributes)
      parsed = execute_request(
        method: :patch,
        path: "#{instance_url(id)}/deploy_config",
        body: body,
        opts: opts,
      )
      parsed
    end
  end

  def deploy_config(opts = {})
    self.class.deploy_config(id, opts)
  end

  def update_deploy_config(attributes, opts = {})
    self.class.update_deploy_config(id, attributes, opts)
  end
end

#hostnameString

Returns:

  • (String)


46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
# File 'lib/latitude/api/resources/server.rb', line 46

class Server < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] facility
    #   @return [String]
    # @!attribute [r] rack_id
    #   @return [String]
  class Site < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :facility, :string, read_only: true
    attribute :rack_id, :string, read_only: true
  end

    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
    # @!attribute [r] site
    #   @return [Site]
  class Region < APIObject
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
    attribute :site, Site, read_only: true
  end

    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] billing
    #   @return [String]
  class Plan < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :billing, :string, read_only: true
  end

    # @!attribute [r] role
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] mac_address
    #   @return [String]
    # @!attribute [r] description
    #   @return [String]
  class Interface < APIObject
    attribute :role, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :mac_address, :string, read_only: true
    attribute :description, :string, read_only: true
  end

    # @!attribute [r] raid
    #   @return [Boolean]
    # @!attribute [r] ssh_keys
    #   @return [Boolean]
  class Feature < APIObject
    attribute :raid, :boolean, read_only: true
    attribute :ssh_keys, :boolean, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] series
    #   @return [String]
  class Distro < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :series, :string, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] version
    #   @return [String]
    # @!attribute [r] features
    #   @return [Feature]
    # @!attribute [r] distro
    #   @return [Distro]
  class OperatingSystem < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :version, :string, read_only: true
    attribute :features, Feature, read_only: true
    attribute :distro, Distro, read_only: true
  end

    # @!attribute [r] cpu
    #   @return [String]
    # @!attribute [r] disk
    #   @return [String]
    # @!attribute [r] ram
    #   @return [String]
    # @!attribute [r] nic
    #   @return [String]
    # @!attribute [r] gpu
    #   @return [String]
  class Spec < APIObject
    attribute :cpu, :string, read_only: true
    attribute :disk, :string, read_only: true
    attribute :ram, :string, read_only: true
    attribute :nic, :string, read_only: true
    attribute :gpu, :string, read_only: true
  end

  attribute :hostname, :string
  attribute :label, :string
  attribute :price, :integer
  attribute :ipmi_status, :string
  attribute :scheduled_deletion_at, :time
  attribute :status, :string
  attribute :role, :string
  attribute :primary_ipv4, :string
  attribute :created_at, :time, read_only: true
  attribute :locked, :boolean
  attribute :team, Objects::Team
  attribute :project, Objects::Project
  attribute :region, Region
  attribute :tags, [Objects::Tag]
  attribute :primary_ipv6, :string
  attribute :rescue_allowed, :boolean
  attribute :plan, Plan
  attribute :interfaces, [Interface]
  attribute :operating_system, OperatingSystem
  attribute :specs, Spec

  resource_type "servers"
  resource_path "/servers"
  id_prefix     "sv_"

  extend Operations::List
  extend Operations::Create
  extend Operations::Retrieve
  extend Operations::Update
  extend Operations::Delete
  extend Operations::Action

  action :power_action,      path: "actions",        type: "actions",      accepts: i[action]
  action :reboot,            path: "actions",        type: "actions",      attributes: { action: "reboot" }
  action :power_on,          path: "actions",        type: "actions",      attributes: { action: "power_on" }
  action :power_off,         path: "actions",        type: "actions",      attributes: { action: "power_off" }
  action :reset,             path: "actions",        type: "actions",      attributes: { action: "reset" }
  action :lock,              path: "lock"
  action :unlock,            path: "unlock"
  action :rescue_mode,       path: "rescue_mode"
  action :exit_rescue_mode,  path: "exit_rescue_mode"
  action :remote_access,     path: "remote_access"
  action :schedule_deletion, path: "schedule_deletion",
                             accepts: i[at reason]
  action :unschedule_deletion, path: "schedule_deletion", method: :delete

  action :reinstall,         path: "reinstall",      type: "reinstalls",
                             accepts: i[operating_system ipxe hostname ssh_keys user_data raid partitions]

  action :create_out_of_band_connection, path: "out_of_band_connection", type: "out_of_band_connections",
                                         accepts: i[port ssh_key_id]
  action :list_out_of_band_connections,  path: "out_of_band_connection", method: :get

  class << self
    def deploy_config(id, opts = {}, path_params: {})
      params = opts.is_a?(Hash) ? opts : {}
      path_params = extract_path_params(params, path_param_keys) if path_params.empty?
      parsed = execute_request(
        method: :get,
        path: "#{instance_url(id, path_params: path_params)}/deploy_config",
        opts: params,
      )
      parsed
    end

    def update_deploy_config(id, attributes = {}, opts = {})
      body = JSONAPI.encode(type: "deploy_config", id: id, attributes: attributes)
      parsed = execute_request(
        method: :patch,
        path: "#{instance_url(id)}/deploy_config",
        body: body,
        opts: opts,
      )
      parsed
    end
  end

  def deploy_config(opts = {})
    self.class.deploy_config(id, opts)
  end

  def update_deploy_config(attributes, opts = {})
    self.class.update_deploy_config(id, attributes, opts)
  end
end

#interfacesArray<Interface>

Returns:



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
# File 'lib/latitude/api/resources/server.rb', line 46

class Server < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] facility
    #   @return [String]
    # @!attribute [r] rack_id
    #   @return [String]
  class Site < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :facility, :string, read_only: true
    attribute :rack_id, :string, read_only: true
  end

    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
    # @!attribute [r] site
    #   @return [Site]
  class Region < APIObject
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
    attribute :site, Site, read_only: true
  end

    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] billing
    #   @return [String]
  class Plan < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :billing, :string, read_only: true
  end

    # @!attribute [r] role
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] mac_address
    #   @return [String]
    # @!attribute [r] description
    #   @return [String]
  class Interface < APIObject
    attribute :role, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :mac_address, :string, read_only: true
    attribute :description, :string, read_only: true
  end

    # @!attribute [r] raid
    #   @return [Boolean]
    # @!attribute [r] ssh_keys
    #   @return [Boolean]
  class Feature < APIObject
    attribute :raid, :boolean, read_only: true
    attribute :ssh_keys, :boolean, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] series
    #   @return [String]
  class Distro < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :series, :string, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] version
    #   @return [String]
    # @!attribute [r] features
    #   @return [Feature]
    # @!attribute [r] distro
    #   @return [Distro]
  class OperatingSystem < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :version, :string, read_only: true
    attribute :features, Feature, read_only: true
    attribute :distro, Distro, read_only: true
  end

    # @!attribute [r] cpu
    #   @return [String]
    # @!attribute [r] disk
    #   @return [String]
    # @!attribute [r] ram
    #   @return [String]
    # @!attribute [r] nic
    #   @return [String]
    # @!attribute [r] gpu
    #   @return [String]
  class Spec < APIObject
    attribute :cpu, :string, read_only: true
    attribute :disk, :string, read_only: true
    attribute :ram, :string, read_only: true
    attribute :nic, :string, read_only: true
    attribute :gpu, :string, read_only: true
  end

  attribute :hostname, :string
  attribute :label, :string
  attribute :price, :integer
  attribute :ipmi_status, :string
  attribute :scheduled_deletion_at, :time
  attribute :status, :string
  attribute :role, :string
  attribute :primary_ipv4, :string
  attribute :created_at, :time, read_only: true
  attribute :locked, :boolean
  attribute :team, Objects::Team
  attribute :project, Objects::Project
  attribute :region, Region
  attribute :tags, [Objects::Tag]
  attribute :primary_ipv6, :string
  attribute :rescue_allowed, :boolean
  attribute :plan, Plan
  attribute :interfaces, [Interface]
  attribute :operating_system, OperatingSystem
  attribute :specs, Spec

  resource_type "servers"
  resource_path "/servers"
  id_prefix     "sv_"

  extend Operations::List
  extend Operations::Create
  extend Operations::Retrieve
  extend Operations::Update
  extend Operations::Delete
  extend Operations::Action

  action :power_action,      path: "actions",        type: "actions",      accepts: i[action]
  action :reboot,            path: "actions",        type: "actions",      attributes: { action: "reboot" }
  action :power_on,          path: "actions",        type: "actions",      attributes: { action: "power_on" }
  action :power_off,         path: "actions",        type: "actions",      attributes: { action: "power_off" }
  action :reset,             path: "actions",        type: "actions",      attributes: { action: "reset" }
  action :lock,              path: "lock"
  action :unlock,            path: "unlock"
  action :rescue_mode,       path: "rescue_mode"
  action :exit_rescue_mode,  path: "exit_rescue_mode"
  action :remote_access,     path: "remote_access"
  action :schedule_deletion, path: "schedule_deletion",
                             accepts: i[at reason]
  action :unschedule_deletion, path: "schedule_deletion", method: :delete

  action :reinstall,         path: "reinstall",      type: "reinstalls",
                             accepts: i[operating_system ipxe hostname ssh_keys user_data raid partitions]

  action :create_out_of_band_connection, path: "out_of_band_connection", type: "out_of_band_connections",
                                         accepts: i[port ssh_key_id]
  action :list_out_of_band_connections,  path: "out_of_band_connection", method: :get

  class << self
    def deploy_config(id, opts = {}, path_params: {})
      params = opts.is_a?(Hash) ? opts : {}
      path_params = extract_path_params(params, path_param_keys) if path_params.empty?
      parsed = execute_request(
        method: :get,
        path: "#{instance_url(id, path_params: path_params)}/deploy_config",
        opts: params,
      )
      parsed
    end

    def update_deploy_config(id, attributes = {}, opts = {})
      body = JSONAPI.encode(type: "deploy_config", id: id, attributes: attributes)
      parsed = execute_request(
        method: :patch,
        path: "#{instance_url(id)}/deploy_config",
        body: body,
        opts: opts,
      )
      parsed
    end
  end

  def deploy_config(opts = {})
    self.class.deploy_config(id, opts)
  end

  def update_deploy_config(attributes, opts = {})
    self.class.update_deploy_config(id, attributes, opts)
  end
end

#ipmi_statusString

Returns:

  • (String)


46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
# File 'lib/latitude/api/resources/server.rb', line 46

class Server < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] facility
    #   @return [String]
    # @!attribute [r] rack_id
    #   @return [String]
  class Site < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :facility, :string, read_only: true
    attribute :rack_id, :string, read_only: true
  end

    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
    # @!attribute [r] site
    #   @return [Site]
  class Region < APIObject
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
    attribute :site, Site, read_only: true
  end

    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] billing
    #   @return [String]
  class Plan < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :billing, :string, read_only: true
  end

    # @!attribute [r] role
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] mac_address
    #   @return [String]
    # @!attribute [r] description
    #   @return [String]
  class Interface < APIObject
    attribute :role, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :mac_address, :string, read_only: true
    attribute :description, :string, read_only: true
  end

    # @!attribute [r] raid
    #   @return [Boolean]
    # @!attribute [r] ssh_keys
    #   @return [Boolean]
  class Feature < APIObject
    attribute :raid, :boolean, read_only: true
    attribute :ssh_keys, :boolean, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] series
    #   @return [String]
  class Distro < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :series, :string, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] version
    #   @return [String]
    # @!attribute [r] features
    #   @return [Feature]
    # @!attribute [r] distro
    #   @return [Distro]
  class OperatingSystem < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :version, :string, read_only: true
    attribute :features, Feature, read_only: true
    attribute :distro, Distro, read_only: true
  end

    # @!attribute [r] cpu
    #   @return [String]
    # @!attribute [r] disk
    #   @return [String]
    # @!attribute [r] ram
    #   @return [String]
    # @!attribute [r] nic
    #   @return [String]
    # @!attribute [r] gpu
    #   @return [String]
  class Spec < APIObject
    attribute :cpu, :string, read_only: true
    attribute :disk, :string, read_only: true
    attribute :ram, :string, read_only: true
    attribute :nic, :string, read_only: true
    attribute :gpu, :string, read_only: true
  end

  attribute :hostname, :string
  attribute :label, :string
  attribute :price, :integer
  attribute :ipmi_status, :string
  attribute :scheduled_deletion_at, :time
  attribute :status, :string
  attribute :role, :string
  attribute :primary_ipv4, :string
  attribute :created_at, :time, read_only: true
  attribute :locked, :boolean
  attribute :team, Objects::Team
  attribute :project, Objects::Project
  attribute :region, Region
  attribute :tags, [Objects::Tag]
  attribute :primary_ipv6, :string
  attribute :rescue_allowed, :boolean
  attribute :plan, Plan
  attribute :interfaces, [Interface]
  attribute :operating_system, OperatingSystem
  attribute :specs, Spec

  resource_type "servers"
  resource_path "/servers"
  id_prefix     "sv_"

  extend Operations::List
  extend Operations::Create
  extend Operations::Retrieve
  extend Operations::Update
  extend Operations::Delete
  extend Operations::Action

  action :power_action,      path: "actions",        type: "actions",      accepts: i[action]
  action :reboot,            path: "actions",        type: "actions",      attributes: { action: "reboot" }
  action :power_on,          path: "actions",        type: "actions",      attributes: { action: "power_on" }
  action :power_off,         path: "actions",        type: "actions",      attributes: { action: "power_off" }
  action :reset,             path: "actions",        type: "actions",      attributes: { action: "reset" }
  action :lock,              path: "lock"
  action :unlock,            path: "unlock"
  action :rescue_mode,       path: "rescue_mode"
  action :exit_rescue_mode,  path: "exit_rescue_mode"
  action :remote_access,     path: "remote_access"
  action :schedule_deletion, path: "schedule_deletion",
                             accepts: i[at reason]
  action :unschedule_deletion, path: "schedule_deletion", method: :delete

  action :reinstall,         path: "reinstall",      type: "reinstalls",
                             accepts: i[operating_system ipxe hostname ssh_keys user_data raid partitions]

  action :create_out_of_band_connection, path: "out_of_band_connection", type: "out_of_band_connections",
                                         accepts: i[port ssh_key_id]
  action :list_out_of_band_connections,  path: "out_of_band_connection", method: :get

  class << self
    def deploy_config(id, opts = {}, path_params: {})
      params = opts.is_a?(Hash) ? opts : {}
      path_params = extract_path_params(params, path_param_keys) if path_params.empty?
      parsed = execute_request(
        method: :get,
        path: "#{instance_url(id, path_params: path_params)}/deploy_config",
        opts: params,
      )
      parsed
    end

    def update_deploy_config(id, attributes = {}, opts = {})
      body = JSONAPI.encode(type: "deploy_config", id: id, attributes: attributes)
      parsed = execute_request(
        method: :patch,
        path: "#{instance_url(id)}/deploy_config",
        body: body,
        opts: opts,
      )
      parsed
    end
  end

  def deploy_config(opts = {})
    self.class.deploy_config(id, opts)
  end

  def update_deploy_config(attributes, opts = {})
    self.class.update_deploy_config(id, attributes, opts)
  end
end

#labelString

Returns:

  • (String)


46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
# File 'lib/latitude/api/resources/server.rb', line 46

class Server < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] facility
    #   @return [String]
    # @!attribute [r] rack_id
    #   @return [String]
  class Site < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :facility, :string, read_only: true
    attribute :rack_id, :string, read_only: true
  end

    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
    # @!attribute [r] site
    #   @return [Site]
  class Region < APIObject
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
    attribute :site, Site, read_only: true
  end

    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] billing
    #   @return [String]
  class Plan < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :billing, :string, read_only: true
  end

    # @!attribute [r] role
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] mac_address
    #   @return [String]
    # @!attribute [r] description
    #   @return [String]
  class Interface < APIObject
    attribute :role, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :mac_address, :string, read_only: true
    attribute :description, :string, read_only: true
  end

    # @!attribute [r] raid
    #   @return [Boolean]
    # @!attribute [r] ssh_keys
    #   @return [Boolean]
  class Feature < APIObject
    attribute :raid, :boolean, read_only: true
    attribute :ssh_keys, :boolean, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] series
    #   @return [String]
  class Distro < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :series, :string, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] version
    #   @return [String]
    # @!attribute [r] features
    #   @return [Feature]
    # @!attribute [r] distro
    #   @return [Distro]
  class OperatingSystem < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :version, :string, read_only: true
    attribute :features, Feature, read_only: true
    attribute :distro, Distro, read_only: true
  end

    # @!attribute [r] cpu
    #   @return [String]
    # @!attribute [r] disk
    #   @return [String]
    # @!attribute [r] ram
    #   @return [String]
    # @!attribute [r] nic
    #   @return [String]
    # @!attribute [r] gpu
    #   @return [String]
  class Spec < APIObject
    attribute :cpu, :string, read_only: true
    attribute :disk, :string, read_only: true
    attribute :ram, :string, read_only: true
    attribute :nic, :string, read_only: true
    attribute :gpu, :string, read_only: true
  end

  attribute :hostname, :string
  attribute :label, :string
  attribute :price, :integer
  attribute :ipmi_status, :string
  attribute :scheduled_deletion_at, :time
  attribute :status, :string
  attribute :role, :string
  attribute :primary_ipv4, :string
  attribute :created_at, :time, read_only: true
  attribute :locked, :boolean
  attribute :team, Objects::Team
  attribute :project, Objects::Project
  attribute :region, Region
  attribute :tags, [Objects::Tag]
  attribute :primary_ipv6, :string
  attribute :rescue_allowed, :boolean
  attribute :plan, Plan
  attribute :interfaces, [Interface]
  attribute :operating_system, OperatingSystem
  attribute :specs, Spec

  resource_type "servers"
  resource_path "/servers"
  id_prefix     "sv_"

  extend Operations::List
  extend Operations::Create
  extend Operations::Retrieve
  extend Operations::Update
  extend Operations::Delete
  extend Operations::Action

  action :power_action,      path: "actions",        type: "actions",      accepts: i[action]
  action :reboot,            path: "actions",        type: "actions",      attributes: { action: "reboot" }
  action :power_on,          path: "actions",        type: "actions",      attributes: { action: "power_on" }
  action :power_off,         path: "actions",        type: "actions",      attributes: { action: "power_off" }
  action :reset,             path: "actions",        type: "actions",      attributes: { action: "reset" }
  action :lock,              path: "lock"
  action :unlock,            path: "unlock"
  action :rescue_mode,       path: "rescue_mode"
  action :exit_rescue_mode,  path: "exit_rescue_mode"
  action :remote_access,     path: "remote_access"
  action :schedule_deletion, path: "schedule_deletion",
                             accepts: i[at reason]
  action :unschedule_deletion, path: "schedule_deletion", method: :delete

  action :reinstall,         path: "reinstall",      type: "reinstalls",
                             accepts: i[operating_system ipxe hostname ssh_keys user_data raid partitions]

  action :create_out_of_band_connection, path: "out_of_band_connection", type: "out_of_band_connections",
                                         accepts: i[port ssh_key_id]
  action :list_out_of_band_connections,  path: "out_of_band_connection", method: :get

  class << self
    def deploy_config(id, opts = {}, path_params: {})
      params = opts.is_a?(Hash) ? opts : {}
      path_params = extract_path_params(params, path_param_keys) if path_params.empty?
      parsed = execute_request(
        method: :get,
        path: "#{instance_url(id, path_params: path_params)}/deploy_config",
        opts: params,
      )
      parsed
    end

    def update_deploy_config(id, attributes = {}, opts = {})
      body = JSONAPI.encode(type: "deploy_config", id: id, attributes: attributes)
      parsed = execute_request(
        method: :patch,
        path: "#{instance_url(id)}/deploy_config",
        body: body,
        opts: opts,
      )
      parsed
    end
  end

  def deploy_config(opts = {})
    self.class.deploy_config(id, opts)
  end

  def update_deploy_config(attributes, opts = {})
    self.class.update_deploy_config(id, attributes, opts)
  end
end

#lockedBoolean

Returns:

  • (Boolean)


46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
# File 'lib/latitude/api/resources/server.rb', line 46

class Server < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] facility
    #   @return [String]
    # @!attribute [r] rack_id
    #   @return [String]
  class Site < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :facility, :string, read_only: true
    attribute :rack_id, :string, read_only: true
  end

    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
    # @!attribute [r] site
    #   @return [Site]
  class Region < APIObject
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
    attribute :site, Site, read_only: true
  end

    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] billing
    #   @return [String]
  class Plan < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :billing, :string, read_only: true
  end

    # @!attribute [r] role
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] mac_address
    #   @return [String]
    # @!attribute [r] description
    #   @return [String]
  class Interface < APIObject
    attribute :role, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :mac_address, :string, read_only: true
    attribute :description, :string, read_only: true
  end

    # @!attribute [r] raid
    #   @return [Boolean]
    # @!attribute [r] ssh_keys
    #   @return [Boolean]
  class Feature < APIObject
    attribute :raid, :boolean, read_only: true
    attribute :ssh_keys, :boolean, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] series
    #   @return [String]
  class Distro < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :series, :string, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] version
    #   @return [String]
    # @!attribute [r] features
    #   @return [Feature]
    # @!attribute [r] distro
    #   @return [Distro]
  class OperatingSystem < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :version, :string, read_only: true
    attribute :features, Feature, read_only: true
    attribute :distro, Distro, read_only: true
  end

    # @!attribute [r] cpu
    #   @return [String]
    # @!attribute [r] disk
    #   @return [String]
    # @!attribute [r] ram
    #   @return [String]
    # @!attribute [r] nic
    #   @return [String]
    # @!attribute [r] gpu
    #   @return [String]
  class Spec < APIObject
    attribute :cpu, :string, read_only: true
    attribute :disk, :string, read_only: true
    attribute :ram, :string, read_only: true
    attribute :nic, :string, read_only: true
    attribute :gpu, :string, read_only: true
  end

  attribute :hostname, :string
  attribute :label, :string
  attribute :price, :integer
  attribute :ipmi_status, :string
  attribute :scheduled_deletion_at, :time
  attribute :status, :string
  attribute :role, :string
  attribute :primary_ipv4, :string
  attribute :created_at, :time, read_only: true
  attribute :locked, :boolean
  attribute :team, Objects::Team
  attribute :project, Objects::Project
  attribute :region, Region
  attribute :tags, [Objects::Tag]
  attribute :primary_ipv6, :string
  attribute :rescue_allowed, :boolean
  attribute :plan, Plan
  attribute :interfaces, [Interface]
  attribute :operating_system, OperatingSystem
  attribute :specs, Spec

  resource_type "servers"
  resource_path "/servers"
  id_prefix     "sv_"

  extend Operations::List
  extend Operations::Create
  extend Operations::Retrieve
  extend Operations::Update
  extend Operations::Delete
  extend Operations::Action

  action :power_action,      path: "actions",        type: "actions",      accepts: i[action]
  action :reboot,            path: "actions",        type: "actions",      attributes: { action: "reboot" }
  action :power_on,          path: "actions",        type: "actions",      attributes: { action: "power_on" }
  action :power_off,         path: "actions",        type: "actions",      attributes: { action: "power_off" }
  action :reset,             path: "actions",        type: "actions",      attributes: { action: "reset" }
  action :lock,              path: "lock"
  action :unlock,            path: "unlock"
  action :rescue_mode,       path: "rescue_mode"
  action :exit_rescue_mode,  path: "exit_rescue_mode"
  action :remote_access,     path: "remote_access"
  action :schedule_deletion, path: "schedule_deletion",
                             accepts: i[at reason]
  action :unschedule_deletion, path: "schedule_deletion", method: :delete

  action :reinstall,         path: "reinstall",      type: "reinstalls",
                             accepts: i[operating_system ipxe hostname ssh_keys user_data raid partitions]

  action :create_out_of_band_connection, path: "out_of_band_connection", type: "out_of_band_connections",
                                         accepts: i[port ssh_key_id]
  action :list_out_of_band_connections,  path: "out_of_band_connection", method: :get

  class << self
    def deploy_config(id, opts = {}, path_params: {})
      params = opts.is_a?(Hash) ? opts : {}
      path_params = extract_path_params(params, path_param_keys) if path_params.empty?
      parsed = execute_request(
        method: :get,
        path: "#{instance_url(id, path_params: path_params)}/deploy_config",
        opts: params,
      )
      parsed
    end

    def update_deploy_config(id, attributes = {}, opts = {})
      body = JSONAPI.encode(type: "deploy_config", id: id, attributes: attributes)
      parsed = execute_request(
        method: :patch,
        path: "#{instance_url(id)}/deploy_config",
        body: body,
        opts: opts,
      )
      parsed
    end
  end

  def deploy_config(opts = {})
    self.class.deploy_config(id, opts)
  end

  def update_deploy_config(attributes, opts = {})
    self.class.update_deploy_config(id, attributes, opts)
  end
end

#operating_systemOperatingSystem

Returns:



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
# File 'lib/latitude/api/resources/server.rb', line 46

class Server < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] facility
    #   @return [String]
    # @!attribute [r] rack_id
    #   @return [String]
  class Site < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :facility, :string, read_only: true
    attribute :rack_id, :string, read_only: true
  end

    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
    # @!attribute [r] site
    #   @return [Site]
  class Region < APIObject
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
    attribute :site, Site, read_only: true
  end

    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] billing
    #   @return [String]
  class Plan < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :billing, :string, read_only: true
  end

    # @!attribute [r] role
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] mac_address
    #   @return [String]
    # @!attribute [r] description
    #   @return [String]
  class Interface < APIObject
    attribute :role, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :mac_address, :string, read_only: true
    attribute :description, :string, read_only: true
  end

    # @!attribute [r] raid
    #   @return [Boolean]
    # @!attribute [r] ssh_keys
    #   @return [Boolean]
  class Feature < APIObject
    attribute :raid, :boolean, read_only: true
    attribute :ssh_keys, :boolean, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] series
    #   @return [String]
  class Distro < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :series, :string, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] version
    #   @return [String]
    # @!attribute [r] features
    #   @return [Feature]
    # @!attribute [r] distro
    #   @return [Distro]
  class OperatingSystem < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :version, :string, read_only: true
    attribute :features, Feature, read_only: true
    attribute :distro, Distro, read_only: true
  end

    # @!attribute [r] cpu
    #   @return [String]
    # @!attribute [r] disk
    #   @return [String]
    # @!attribute [r] ram
    #   @return [String]
    # @!attribute [r] nic
    #   @return [String]
    # @!attribute [r] gpu
    #   @return [String]
  class Spec < APIObject
    attribute :cpu, :string, read_only: true
    attribute :disk, :string, read_only: true
    attribute :ram, :string, read_only: true
    attribute :nic, :string, read_only: true
    attribute :gpu, :string, read_only: true
  end

  attribute :hostname, :string
  attribute :label, :string
  attribute :price, :integer
  attribute :ipmi_status, :string
  attribute :scheduled_deletion_at, :time
  attribute :status, :string
  attribute :role, :string
  attribute :primary_ipv4, :string
  attribute :created_at, :time, read_only: true
  attribute :locked, :boolean
  attribute :team, Objects::Team
  attribute :project, Objects::Project
  attribute :region, Region
  attribute :tags, [Objects::Tag]
  attribute :primary_ipv6, :string
  attribute :rescue_allowed, :boolean
  attribute :plan, Plan
  attribute :interfaces, [Interface]
  attribute :operating_system, OperatingSystem
  attribute :specs, Spec

  resource_type "servers"
  resource_path "/servers"
  id_prefix     "sv_"

  extend Operations::List
  extend Operations::Create
  extend Operations::Retrieve
  extend Operations::Update
  extend Operations::Delete
  extend Operations::Action

  action :power_action,      path: "actions",        type: "actions",      accepts: i[action]
  action :reboot,            path: "actions",        type: "actions",      attributes: { action: "reboot" }
  action :power_on,          path: "actions",        type: "actions",      attributes: { action: "power_on" }
  action :power_off,         path: "actions",        type: "actions",      attributes: { action: "power_off" }
  action :reset,             path: "actions",        type: "actions",      attributes: { action: "reset" }
  action :lock,              path: "lock"
  action :unlock,            path: "unlock"
  action :rescue_mode,       path: "rescue_mode"
  action :exit_rescue_mode,  path: "exit_rescue_mode"
  action :remote_access,     path: "remote_access"
  action :schedule_deletion, path: "schedule_deletion",
                             accepts: i[at reason]
  action :unschedule_deletion, path: "schedule_deletion", method: :delete

  action :reinstall,         path: "reinstall",      type: "reinstalls",
                             accepts: i[operating_system ipxe hostname ssh_keys user_data raid partitions]

  action :create_out_of_band_connection, path: "out_of_band_connection", type: "out_of_band_connections",
                                         accepts: i[port ssh_key_id]
  action :list_out_of_band_connections,  path: "out_of_band_connection", method: :get

  class << self
    def deploy_config(id, opts = {}, path_params: {})
      params = opts.is_a?(Hash) ? opts : {}
      path_params = extract_path_params(params, path_param_keys) if path_params.empty?
      parsed = execute_request(
        method: :get,
        path: "#{instance_url(id, path_params: path_params)}/deploy_config",
        opts: params,
      )
      parsed
    end

    def update_deploy_config(id, attributes = {}, opts = {})
      body = JSONAPI.encode(type: "deploy_config", id: id, attributes: attributes)
      parsed = execute_request(
        method: :patch,
        path: "#{instance_url(id)}/deploy_config",
        body: body,
        opts: opts,
      )
      parsed
    end
  end

  def deploy_config(opts = {})
    self.class.deploy_config(id, opts)
  end

  def update_deploy_config(attributes, opts = {})
    self.class.update_deploy_config(id, attributes, opts)
  end
end

#planPlan

Returns:



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
# File 'lib/latitude/api/resources/server.rb', line 46

class Server < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] facility
    #   @return [String]
    # @!attribute [r] rack_id
    #   @return [String]
  class Site < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :facility, :string, read_only: true
    attribute :rack_id, :string, read_only: true
  end

    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
    # @!attribute [r] site
    #   @return [Site]
  class Region < APIObject
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
    attribute :site, Site, read_only: true
  end

    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] billing
    #   @return [String]
  class Plan < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :billing, :string, read_only: true
  end

    # @!attribute [r] role
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] mac_address
    #   @return [String]
    # @!attribute [r] description
    #   @return [String]
  class Interface < APIObject
    attribute :role, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :mac_address, :string, read_only: true
    attribute :description, :string, read_only: true
  end

    # @!attribute [r] raid
    #   @return [Boolean]
    # @!attribute [r] ssh_keys
    #   @return [Boolean]
  class Feature < APIObject
    attribute :raid, :boolean, read_only: true
    attribute :ssh_keys, :boolean, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] series
    #   @return [String]
  class Distro < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :series, :string, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] version
    #   @return [String]
    # @!attribute [r] features
    #   @return [Feature]
    # @!attribute [r] distro
    #   @return [Distro]
  class OperatingSystem < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :version, :string, read_only: true
    attribute :features, Feature, read_only: true
    attribute :distro, Distro, read_only: true
  end

    # @!attribute [r] cpu
    #   @return [String]
    # @!attribute [r] disk
    #   @return [String]
    # @!attribute [r] ram
    #   @return [String]
    # @!attribute [r] nic
    #   @return [String]
    # @!attribute [r] gpu
    #   @return [String]
  class Spec < APIObject
    attribute :cpu, :string, read_only: true
    attribute :disk, :string, read_only: true
    attribute :ram, :string, read_only: true
    attribute :nic, :string, read_only: true
    attribute :gpu, :string, read_only: true
  end

  attribute :hostname, :string
  attribute :label, :string
  attribute :price, :integer
  attribute :ipmi_status, :string
  attribute :scheduled_deletion_at, :time
  attribute :status, :string
  attribute :role, :string
  attribute :primary_ipv4, :string
  attribute :created_at, :time, read_only: true
  attribute :locked, :boolean
  attribute :team, Objects::Team
  attribute :project, Objects::Project
  attribute :region, Region
  attribute :tags, [Objects::Tag]
  attribute :primary_ipv6, :string
  attribute :rescue_allowed, :boolean
  attribute :plan, Plan
  attribute :interfaces, [Interface]
  attribute :operating_system, OperatingSystem
  attribute :specs, Spec

  resource_type "servers"
  resource_path "/servers"
  id_prefix     "sv_"

  extend Operations::List
  extend Operations::Create
  extend Operations::Retrieve
  extend Operations::Update
  extend Operations::Delete
  extend Operations::Action

  action :power_action,      path: "actions",        type: "actions",      accepts: i[action]
  action :reboot,            path: "actions",        type: "actions",      attributes: { action: "reboot" }
  action :power_on,          path: "actions",        type: "actions",      attributes: { action: "power_on" }
  action :power_off,         path: "actions",        type: "actions",      attributes: { action: "power_off" }
  action :reset,             path: "actions",        type: "actions",      attributes: { action: "reset" }
  action :lock,              path: "lock"
  action :unlock,            path: "unlock"
  action :rescue_mode,       path: "rescue_mode"
  action :exit_rescue_mode,  path: "exit_rescue_mode"
  action :remote_access,     path: "remote_access"
  action :schedule_deletion, path: "schedule_deletion",
                             accepts: i[at reason]
  action :unschedule_deletion, path: "schedule_deletion", method: :delete

  action :reinstall,         path: "reinstall",      type: "reinstalls",
                             accepts: i[operating_system ipxe hostname ssh_keys user_data raid partitions]

  action :create_out_of_band_connection, path: "out_of_band_connection", type: "out_of_band_connections",
                                         accepts: i[port ssh_key_id]
  action :list_out_of_band_connections,  path: "out_of_band_connection", method: :get

  class << self
    def deploy_config(id, opts = {}, path_params: {})
      params = opts.is_a?(Hash) ? opts : {}
      path_params = extract_path_params(params, path_param_keys) if path_params.empty?
      parsed = execute_request(
        method: :get,
        path: "#{instance_url(id, path_params: path_params)}/deploy_config",
        opts: params,
      )
      parsed
    end

    def update_deploy_config(id, attributes = {}, opts = {})
      body = JSONAPI.encode(type: "deploy_config", id: id, attributes: attributes)
      parsed = execute_request(
        method: :patch,
        path: "#{instance_url(id)}/deploy_config",
        body: body,
        opts: opts,
      )
      parsed
    end
  end

  def deploy_config(opts = {})
    self.class.deploy_config(id, opts)
  end

  def update_deploy_config(attributes, opts = {})
    self.class.update_deploy_config(id, attributes, opts)
  end
end

#priceInteger

Returns:

  • (Integer)


46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
# File 'lib/latitude/api/resources/server.rb', line 46

class Server < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] facility
    #   @return [String]
    # @!attribute [r] rack_id
    #   @return [String]
  class Site < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :facility, :string, read_only: true
    attribute :rack_id, :string, read_only: true
  end

    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
    # @!attribute [r] site
    #   @return [Site]
  class Region < APIObject
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
    attribute :site, Site, read_only: true
  end

    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] billing
    #   @return [String]
  class Plan < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :billing, :string, read_only: true
  end

    # @!attribute [r] role
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] mac_address
    #   @return [String]
    # @!attribute [r] description
    #   @return [String]
  class Interface < APIObject
    attribute :role, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :mac_address, :string, read_only: true
    attribute :description, :string, read_only: true
  end

    # @!attribute [r] raid
    #   @return [Boolean]
    # @!attribute [r] ssh_keys
    #   @return [Boolean]
  class Feature < APIObject
    attribute :raid, :boolean, read_only: true
    attribute :ssh_keys, :boolean, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] series
    #   @return [String]
  class Distro < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :series, :string, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] version
    #   @return [String]
    # @!attribute [r] features
    #   @return [Feature]
    # @!attribute [r] distro
    #   @return [Distro]
  class OperatingSystem < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :version, :string, read_only: true
    attribute :features, Feature, read_only: true
    attribute :distro, Distro, read_only: true
  end

    # @!attribute [r] cpu
    #   @return [String]
    # @!attribute [r] disk
    #   @return [String]
    # @!attribute [r] ram
    #   @return [String]
    # @!attribute [r] nic
    #   @return [String]
    # @!attribute [r] gpu
    #   @return [String]
  class Spec < APIObject
    attribute :cpu, :string, read_only: true
    attribute :disk, :string, read_only: true
    attribute :ram, :string, read_only: true
    attribute :nic, :string, read_only: true
    attribute :gpu, :string, read_only: true
  end

  attribute :hostname, :string
  attribute :label, :string
  attribute :price, :integer
  attribute :ipmi_status, :string
  attribute :scheduled_deletion_at, :time
  attribute :status, :string
  attribute :role, :string
  attribute :primary_ipv4, :string
  attribute :created_at, :time, read_only: true
  attribute :locked, :boolean
  attribute :team, Objects::Team
  attribute :project, Objects::Project
  attribute :region, Region
  attribute :tags, [Objects::Tag]
  attribute :primary_ipv6, :string
  attribute :rescue_allowed, :boolean
  attribute :plan, Plan
  attribute :interfaces, [Interface]
  attribute :operating_system, OperatingSystem
  attribute :specs, Spec

  resource_type "servers"
  resource_path "/servers"
  id_prefix     "sv_"

  extend Operations::List
  extend Operations::Create
  extend Operations::Retrieve
  extend Operations::Update
  extend Operations::Delete
  extend Operations::Action

  action :power_action,      path: "actions",        type: "actions",      accepts: i[action]
  action :reboot,            path: "actions",        type: "actions",      attributes: { action: "reboot" }
  action :power_on,          path: "actions",        type: "actions",      attributes: { action: "power_on" }
  action :power_off,         path: "actions",        type: "actions",      attributes: { action: "power_off" }
  action :reset,             path: "actions",        type: "actions",      attributes: { action: "reset" }
  action :lock,              path: "lock"
  action :unlock,            path: "unlock"
  action :rescue_mode,       path: "rescue_mode"
  action :exit_rescue_mode,  path: "exit_rescue_mode"
  action :remote_access,     path: "remote_access"
  action :schedule_deletion, path: "schedule_deletion",
                             accepts: i[at reason]
  action :unschedule_deletion, path: "schedule_deletion", method: :delete

  action :reinstall,         path: "reinstall",      type: "reinstalls",
                             accepts: i[operating_system ipxe hostname ssh_keys user_data raid partitions]

  action :create_out_of_band_connection, path: "out_of_band_connection", type: "out_of_band_connections",
                                         accepts: i[port ssh_key_id]
  action :list_out_of_band_connections,  path: "out_of_band_connection", method: :get

  class << self
    def deploy_config(id, opts = {}, path_params: {})
      params = opts.is_a?(Hash) ? opts : {}
      path_params = extract_path_params(params, path_param_keys) if path_params.empty?
      parsed = execute_request(
        method: :get,
        path: "#{instance_url(id, path_params: path_params)}/deploy_config",
        opts: params,
      )
      parsed
    end

    def update_deploy_config(id, attributes = {}, opts = {})
      body = JSONAPI.encode(type: "deploy_config", id: id, attributes: attributes)
      parsed = execute_request(
        method: :patch,
        path: "#{instance_url(id)}/deploy_config",
        body: body,
        opts: opts,
      )
      parsed
    end
  end

  def deploy_config(opts = {})
    self.class.deploy_config(id, opts)
  end

  def update_deploy_config(attributes, opts = {})
    self.class.update_deploy_config(id, attributes, opts)
  end
end

#primary_ipv4String

Returns:

  • (String)


46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
# File 'lib/latitude/api/resources/server.rb', line 46

class Server < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] facility
    #   @return [String]
    # @!attribute [r] rack_id
    #   @return [String]
  class Site < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :facility, :string, read_only: true
    attribute :rack_id, :string, read_only: true
  end

    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
    # @!attribute [r] site
    #   @return [Site]
  class Region < APIObject
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
    attribute :site, Site, read_only: true
  end

    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] billing
    #   @return [String]
  class Plan < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :billing, :string, read_only: true
  end

    # @!attribute [r] role
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] mac_address
    #   @return [String]
    # @!attribute [r] description
    #   @return [String]
  class Interface < APIObject
    attribute :role, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :mac_address, :string, read_only: true
    attribute :description, :string, read_only: true
  end

    # @!attribute [r] raid
    #   @return [Boolean]
    # @!attribute [r] ssh_keys
    #   @return [Boolean]
  class Feature < APIObject
    attribute :raid, :boolean, read_only: true
    attribute :ssh_keys, :boolean, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] series
    #   @return [String]
  class Distro < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :series, :string, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] version
    #   @return [String]
    # @!attribute [r] features
    #   @return [Feature]
    # @!attribute [r] distro
    #   @return [Distro]
  class OperatingSystem < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :version, :string, read_only: true
    attribute :features, Feature, read_only: true
    attribute :distro, Distro, read_only: true
  end

    # @!attribute [r] cpu
    #   @return [String]
    # @!attribute [r] disk
    #   @return [String]
    # @!attribute [r] ram
    #   @return [String]
    # @!attribute [r] nic
    #   @return [String]
    # @!attribute [r] gpu
    #   @return [String]
  class Spec < APIObject
    attribute :cpu, :string, read_only: true
    attribute :disk, :string, read_only: true
    attribute :ram, :string, read_only: true
    attribute :nic, :string, read_only: true
    attribute :gpu, :string, read_only: true
  end

  attribute :hostname, :string
  attribute :label, :string
  attribute :price, :integer
  attribute :ipmi_status, :string
  attribute :scheduled_deletion_at, :time
  attribute :status, :string
  attribute :role, :string
  attribute :primary_ipv4, :string
  attribute :created_at, :time, read_only: true
  attribute :locked, :boolean
  attribute :team, Objects::Team
  attribute :project, Objects::Project
  attribute :region, Region
  attribute :tags, [Objects::Tag]
  attribute :primary_ipv6, :string
  attribute :rescue_allowed, :boolean
  attribute :plan, Plan
  attribute :interfaces, [Interface]
  attribute :operating_system, OperatingSystem
  attribute :specs, Spec

  resource_type "servers"
  resource_path "/servers"
  id_prefix     "sv_"

  extend Operations::List
  extend Operations::Create
  extend Operations::Retrieve
  extend Operations::Update
  extend Operations::Delete
  extend Operations::Action

  action :power_action,      path: "actions",        type: "actions",      accepts: i[action]
  action :reboot,            path: "actions",        type: "actions",      attributes: { action: "reboot" }
  action :power_on,          path: "actions",        type: "actions",      attributes: { action: "power_on" }
  action :power_off,         path: "actions",        type: "actions",      attributes: { action: "power_off" }
  action :reset,             path: "actions",        type: "actions",      attributes: { action: "reset" }
  action :lock,              path: "lock"
  action :unlock,            path: "unlock"
  action :rescue_mode,       path: "rescue_mode"
  action :exit_rescue_mode,  path: "exit_rescue_mode"
  action :remote_access,     path: "remote_access"
  action :schedule_deletion, path: "schedule_deletion",
                             accepts: i[at reason]
  action :unschedule_deletion, path: "schedule_deletion", method: :delete

  action :reinstall,         path: "reinstall",      type: "reinstalls",
                             accepts: i[operating_system ipxe hostname ssh_keys user_data raid partitions]

  action :create_out_of_band_connection, path: "out_of_band_connection", type: "out_of_band_connections",
                                         accepts: i[port ssh_key_id]
  action :list_out_of_band_connections,  path: "out_of_band_connection", method: :get

  class << self
    def deploy_config(id, opts = {}, path_params: {})
      params = opts.is_a?(Hash) ? opts : {}
      path_params = extract_path_params(params, path_param_keys) if path_params.empty?
      parsed = execute_request(
        method: :get,
        path: "#{instance_url(id, path_params: path_params)}/deploy_config",
        opts: params,
      )
      parsed
    end

    def update_deploy_config(id, attributes = {}, opts = {})
      body = JSONAPI.encode(type: "deploy_config", id: id, attributes: attributes)
      parsed = execute_request(
        method: :patch,
        path: "#{instance_url(id)}/deploy_config",
        body: body,
        opts: opts,
      )
      parsed
    end
  end

  def deploy_config(opts = {})
    self.class.deploy_config(id, opts)
  end

  def update_deploy_config(attributes, opts = {})
    self.class.update_deploy_config(id, attributes, opts)
  end
end

#primary_ipv6String

Returns:

  • (String)


46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
# File 'lib/latitude/api/resources/server.rb', line 46

class Server < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] facility
    #   @return [String]
    # @!attribute [r] rack_id
    #   @return [String]
  class Site < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :facility, :string, read_only: true
    attribute :rack_id, :string, read_only: true
  end

    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
    # @!attribute [r] site
    #   @return [Site]
  class Region < APIObject
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
    attribute :site, Site, read_only: true
  end

    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] billing
    #   @return [String]
  class Plan < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :billing, :string, read_only: true
  end

    # @!attribute [r] role
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] mac_address
    #   @return [String]
    # @!attribute [r] description
    #   @return [String]
  class Interface < APIObject
    attribute :role, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :mac_address, :string, read_only: true
    attribute :description, :string, read_only: true
  end

    # @!attribute [r] raid
    #   @return [Boolean]
    # @!attribute [r] ssh_keys
    #   @return [Boolean]
  class Feature < APIObject
    attribute :raid, :boolean, read_only: true
    attribute :ssh_keys, :boolean, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] series
    #   @return [String]
  class Distro < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :series, :string, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] version
    #   @return [String]
    # @!attribute [r] features
    #   @return [Feature]
    # @!attribute [r] distro
    #   @return [Distro]
  class OperatingSystem < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :version, :string, read_only: true
    attribute :features, Feature, read_only: true
    attribute :distro, Distro, read_only: true
  end

    # @!attribute [r] cpu
    #   @return [String]
    # @!attribute [r] disk
    #   @return [String]
    # @!attribute [r] ram
    #   @return [String]
    # @!attribute [r] nic
    #   @return [String]
    # @!attribute [r] gpu
    #   @return [String]
  class Spec < APIObject
    attribute :cpu, :string, read_only: true
    attribute :disk, :string, read_only: true
    attribute :ram, :string, read_only: true
    attribute :nic, :string, read_only: true
    attribute :gpu, :string, read_only: true
  end

  attribute :hostname, :string
  attribute :label, :string
  attribute :price, :integer
  attribute :ipmi_status, :string
  attribute :scheduled_deletion_at, :time
  attribute :status, :string
  attribute :role, :string
  attribute :primary_ipv4, :string
  attribute :created_at, :time, read_only: true
  attribute :locked, :boolean
  attribute :team, Objects::Team
  attribute :project, Objects::Project
  attribute :region, Region
  attribute :tags, [Objects::Tag]
  attribute :primary_ipv6, :string
  attribute :rescue_allowed, :boolean
  attribute :plan, Plan
  attribute :interfaces, [Interface]
  attribute :operating_system, OperatingSystem
  attribute :specs, Spec

  resource_type "servers"
  resource_path "/servers"
  id_prefix     "sv_"

  extend Operations::List
  extend Operations::Create
  extend Operations::Retrieve
  extend Operations::Update
  extend Operations::Delete
  extend Operations::Action

  action :power_action,      path: "actions",        type: "actions",      accepts: i[action]
  action :reboot,            path: "actions",        type: "actions",      attributes: { action: "reboot" }
  action :power_on,          path: "actions",        type: "actions",      attributes: { action: "power_on" }
  action :power_off,         path: "actions",        type: "actions",      attributes: { action: "power_off" }
  action :reset,             path: "actions",        type: "actions",      attributes: { action: "reset" }
  action :lock,              path: "lock"
  action :unlock,            path: "unlock"
  action :rescue_mode,       path: "rescue_mode"
  action :exit_rescue_mode,  path: "exit_rescue_mode"
  action :remote_access,     path: "remote_access"
  action :schedule_deletion, path: "schedule_deletion",
                             accepts: i[at reason]
  action :unschedule_deletion, path: "schedule_deletion", method: :delete

  action :reinstall,         path: "reinstall",      type: "reinstalls",
                             accepts: i[operating_system ipxe hostname ssh_keys user_data raid partitions]

  action :create_out_of_band_connection, path: "out_of_band_connection", type: "out_of_band_connections",
                                         accepts: i[port ssh_key_id]
  action :list_out_of_band_connections,  path: "out_of_band_connection", method: :get

  class << self
    def deploy_config(id, opts = {}, path_params: {})
      params = opts.is_a?(Hash) ? opts : {}
      path_params = extract_path_params(params, path_param_keys) if path_params.empty?
      parsed = execute_request(
        method: :get,
        path: "#{instance_url(id, path_params: path_params)}/deploy_config",
        opts: params,
      )
      parsed
    end

    def update_deploy_config(id, attributes = {}, opts = {})
      body = JSONAPI.encode(type: "deploy_config", id: id, attributes: attributes)
      parsed = execute_request(
        method: :patch,
        path: "#{instance_url(id)}/deploy_config",
        body: body,
        opts: opts,
      )
      parsed
    end
  end

  def deploy_config(opts = {})
    self.class.deploy_config(id, opts)
  end

  def update_deploy_config(attributes, opts = {})
    self.class.update_deploy_config(id, attributes, opts)
  end
end

#projectLatitude::API::Objects::Project



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
# File 'lib/latitude/api/resources/server.rb', line 46

class Server < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] facility
    #   @return [String]
    # @!attribute [r] rack_id
    #   @return [String]
  class Site < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :facility, :string, read_only: true
    attribute :rack_id, :string, read_only: true
  end

    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
    # @!attribute [r] site
    #   @return [Site]
  class Region < APIObject
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
    attribute :site, Site, read_only: true
  end

    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] billing
    #   @return [String]
  class Plan < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :billing, :string, read_only: true
  end

    # @!attribute [r] role
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] mac_address
    #   @return [String]
    # @!attribute [r] description
    #   @return [String]
  class Interface < APIObject
    attribute :role, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :mac_address, :string, read_only: true
    attribute :description, :string, read_only: true
  end

    # @!attribute [r] raid
    #   @return [Boolean]
    # @!attribute [r] ssh_keys
    #   @return [Boolean]
  class Feature < APIObject
    attribute :raid, :boolean, read_only: true
    attribute :ssh_keys, :boolean, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] series
    #   @return [String]
  class Distro < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :series, :string, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] version
    #   @return [String]
    # @!attribute [r] features
    #   @return [Feature]
    # @!attribute [r] distro
    #   @return [Distro]
  class OperatingSystem < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :version, :string, read_only: true
    attribute :features, Feature, read_only: true
    attribute :distro, Distro, read_only: true
  end

    # @!attribute [r] cpu
    #   @return [String]
    # @!attribute [r] disk
    #   @return [String]
    # @!attribute [r] ram
    #   @return [String]
    # @!attribute [r] nic
    #   @return [String]
    # @!attribute [r] gpu
    #   @return [String]
  class Spec < APIObject
    attribute :cpu, :string, read_only: true
    attribute :disk, :string, read_only: true
    attribute :ram, :string, read_only: true
    attribute :nic, :string, read_only: true
    attribute :gpu, :string, read_only: true
  end

  attribute :hostname, :string
  attribute :label, :string
  attribute :price, :integer
  attribute :ipmi_status, :string
  attribute :scheduled_deletion_at, :time
  attribute :status, :string
  attribute :role, :string
  attribute :primary_ipv4, :string
  attribute :created_at, :time, read_only: true
  attribute :locked, :boolean
  attribute :team, Objects::Team
  attribute :project, Objects::Project
  attribute :region, Region
  attribute :tags, [Objects::Tag]
  attribute :primary_ipv6, :string
  attribute :rescue_allowed, :boolean
  attribute :plan, Plan
  attribute :interfaces, [Interface]
  attribute :operating_system, OperatingSystem
  attribute :specs, Spec

  resource_type "servers"
  resource_path "/servers"
  id_prefix     "sv_"

  extend Operations::List
  extend Operations::Create
  extend Operations::Retrieve
  extend Operations::Update
  extend Operations::Delete
  extend Operations::Action

  action :power_action,      path: "actions",        type: "actions",      accepts: i[action]
  action :reboot,            path: "actions",        type: "actions",      attributes: { action: "reboot" }
  action :power_on,          path: "actions",        type: "actions",      attributes: { action: "power_on" }
  action :power_off,         path: "actions",        type: "actions",      attributes: { action: "power_off" }
  action :reset,             path: "actions",        type: "actions",      attributes: { action: "reset" }
  action :lock,              path: "lock"
  action :unlock,            path: "unlock"
  action :rescue_mode,       path: "rescue_mode"
  action :exit_rescue_mode,  path: "exit_rescue_mode"
  action :remote_access,     path: "remote_access"
  action :schedule_deletion, path: "schedule_deletion",
                             accepts: i[at reason]
  action :unschedule_deletion, path: "schedule_deletion", method: :delete

  action :reinstall,         path: "reinstall",      type: "reinstalls",
                             accepts: i[operating_system ipxe hostname ssh_keys user_data raid partitions]

  action :create_out_of_band_connection, path: "out_of_band_connection", type: "out_of_band_connections",
                                         accepts: i[port ssh_key_id]
  action :list_out_of_band_connections,  path: "out_of_band_connection", method: :get

  class << self
    def deploy_config(id, opts = {}, path_params: {})
      params = opts.is_a?(Hash) ? opts : {}
      path_params = extract_path_params(params, path_param_keys) if path_params.empty?
      parsed = execute_request(
        method: :get,
        path: "#{instance_url(id, path_params: path_params)}/deploy_config",
        opts: params,
      )
      parsed
    end

    def update_deploy_config(id, attributes = {}, opts = {})
      body = JSONAPI.encode(type: "deploy_config", id: id, attributes: attributes)
      parsed = execute_request(
        method: :patch,
        path: "#{instance_url(id)}/deploy_config",
        body: body,
        opts: opts,
      )
      parsed
    end
  end

  def deploy_config(opts = {})
    self.class.deploy_config(id, opts)
  end

  def update_deploy_config(attributes, opts = {})
    self.class.update_deploy_config(id, attributes, opts)
  end
end

#regionRegion

Returns:



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
# File 'lib/latitude/api/resources/server.rb', line 46

class Server < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] facility
    #   @return [String]
    # @!attribute [r] rack_id
    #   @return [String]
  class Site < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :facility, :string, read_only: true
    attribute :rack_id, :string, read_only: true
  end

    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
    # @!attribute [r] site
    #   @return [Site]
  class Region < APIObject
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
    attribute :site, Site, read_only: true
  end

    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] billing
    #   @return [String]
  class Plan < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :billing, :string, read_only: true
  end

    # @!attribute [r] role
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] mac_address
    #   @return [String]
    # @!attribute [r] description
    #   @return [String]
  class Interface < APIObject
    attribute :role, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :mac_address, :string, read_only: true
    attribute :description, :string, read_only: true
  end

    # @!attribute [r] raid
    #   @return [Boolean]
    # @!attribute [r] ssh_keys
    #   @return [Boolean]
  class Feature < APIObject
    attribute :raid, :boolean, read_only: true
    attribute :ssh_keys, :boolean, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] series
    #   @return [String]
  class Distro < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :series, :string, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] version
    #   @return [String]
    # @!attribute [r] features
    #   @return [Feature]
    # @!attribute [r] distro
    #   @return [Distro]
  class OperatingSystem < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :version, :string, read_only: true
    attribute :features, Feature, read_only: true
    attribute :distro, Distro, read_only: true
  end

    # @!attribute [r] cpu
    #   @return [String]
    # @!attribute [r] disk
    #   @return [String]
    # @!attribute [r] ram
    #   @return [String]
    # @!attribute [r] nic
    #   @return [String]
    # @!attribute [r] gpu
    #   @return [String]
  class Spec < APIObject
    attribute :cpu, :string, read_only: true
    attribute :disk, :string, read_only: true
    attribute :ram, :string, read_only: true
    attribute :nic, :string, read_only: true
    attribute :gpu, :string, read_only: true
  end

  attribute :hostname, :string
  attribute :label, :string
  attribute :price, :integer
  attribute :ipmi_status, :string
  attribute :scheduled_deletion_at, :time
  attribute :status, :string
  attribute :role, :string
  attribute :primary_ipv4, :string
  attribute :created_at, :time, read_only: true
  attribute :locked, :boolean
  attribute :team, Objects::Team
  attribute :project, Objects::Project
  attribute :region, Region
  attribute :tags, [Objects::Tag]
  attribute :primary_ipv6, :string
  attribute :rescue_allowed, :boolean
  attribute :plan, Plan
  attribute :interfaces, [Interface]
  attribute :operating_system, OperatingSystem
  attribute :specs, Spec

  resource_type "servers"
  resource_path "/servers"
  id_prefix     "sv_"

  extend Operations::List
  extend Operations::Create
  extend Operations::Retrieve
  extend Operations::Update
  extend Operations::Delete
  extend Operations::Action

  action :power_action,      path: "actions",        type: "actions",      accepts: i[action]
  action :reboot,            path: "actions",        type: "actions",      attributes: { action: "reboot" }
  action :power_on,          path: "actions",        type: "actions",      attributes: { action: "power_on" }
  action :power_off,         path: "actions",        type: "actions",      attributes: { action: "power_off" }
  action :reset,             path: "actions",        type: "actions",      attributes: { action: "reset" }
  action :lock,              path: "lock"
  action :unlock,            path: "unlock"
  action :rescue_mode,       path: "rescue_mode"
  action :exit_rescue_mode,  path: "exit_rescue_mode"
  action :remote_access,     path: "remote_access"
  action :schedule_deletion, path: "schedule_deletion",
                             accepts: i[at reason]
  action :unschedule_deletion, path: "schedule_deletion", method: :delete

  action :reinstall,         path: "reinstall",      type: "reinstalls",
                             accepts: i[operating_system ipxe hostname ssh_keys user_data raid partitions]

  action :create_out_of_band_connection, path: "out_of_band_connection", type: "out_of_band_connections",
                                         accepts: i[port ssh_key_id]
  action :list_out_of_band_connections,  path: "out_of_band_connection", method: :get

  class << self
    def deploy_config(id, opts = {}, path_params: {})
      params = opts.is_a?(Hash) ? opts : {}
      path_params = extract_path_params(params, path_param_keys) if path_params.empty?
      parsed = execute_request(
        method: :get,
        path: "#{instance_url(id, path_params: path_params)}/deploy_config",
        opts: params,
      )
      parsed
    end

    def update_deploy_config(id, attributes = {}, opts = {})
      body = JSONAPI.encode(type: "deploy_config", id: id, attributes: attributes)
      parsed = execute_request(
        method: :patch,
        path: "#{instance_url(id)}/deploy_config",
        body: body,
        opts: opts,
      )
      parsed
    end
  end

  def deploy_config(opts = {})
    self.class.deploy_config(id, opts)
  end

  def update_deploy_config(attributes, opts = {})
    self.class.update_deploy_config(id, attributes, opts)
  end
end

#rescue_allowedBoolean

Returns:

  • (Boolean)


46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
# File 'lib/latitude/api/resources/server.rb', line 46

class Server < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] facility
    #   @return [String]
    # @!attribute [r] rack_id
    #   @return [String]
  class Site < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :facility, :string, read_only: true
    attribute :rack_id, :string, read_only: true
  end

    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
    # @!attribute [r] site
    #   @return [Site]
  class Region < APIObject
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
    attribute :site, Site, read_only: true
  end

    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] billing
    #   @return [String]
  class Plan < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :billing, :string, read_only: true
  end

    # @!attribute [r] role
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] mac_address
    #   @return [String]
    # @!attribute [r] description
    #   @return [String]
  class Interface < APIObject
    attribute :role, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :mac_address, :string, read_only: true
    attribute :description, :string, read_only: true
  end

    # @!attribute [r] raid
    #   @return [Boolean]
    # @!attribute [r] ssh_keys
    #   @return [Boolean]
  class Feature < APIObject
    attribute :raid, :boolean, read_only: true
    attribute :ssh_keys, :boolean, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] series
    #   @return [String]
  class Distro < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :series, :string, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] version
    #   @return [String]
    # @!attribute [r] features
    #   @return [Feature]
    # @!attribute [r] distro
    #   @return [Distro]
  class OperatingSystem < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :version, :string, read_only: true
    attribute :features, Feature, read_only: true
    attribute :distro, Distro, read_only: true
  end

    # @!attribute [r] cpu
    #   @return [String]
    # @!attribute [r] disk
    #   @return [String]
    # @!attribute [r] ram
    #   @return [String]
    # @!attribute [r] nic
    #   @return [String]
    # @!attribute [r] gpu
    #   @return [String]
  class Spec < APIObject
    attribute :cpu, :string, read_only: true
    attribute :disk, :string, read_only: true
    attribute :ram, :string, read_only: true
    attribute :nic, :string, read_only: true
    attribute :gpu, :string, read_only: true
  end

  attribute :hostname, :string
  attribute :label, :string
  attribute :price, :integer
  attribute :ipmi_status, :string
  attribute :scheduled_deletion_at, :time
  attribute :status, :string
  attribute :role, :string
  attribute :primary_ipv4, :string
  attribute :created_at, :time, read_only: true
  attribute :locked, :boolean
  attribute :team, Objects::Team
  attribute :project, Objects::Project
  attribute :region, Region
  attribute :tags, [Objects::Tag]
  attribute :primary_ipv6, :string
  attribute :rescue_allowed, :boolean
  attribute :plan, Plan
  attribute :interfaces, [Interface]
  attribute :operating_system, OperatingSystem
  attribute :specs, Spec

  resource_type "servers"
  resource_path "/servers"
  id_prefix     "sv_"

  extend Operations::List
  extend Operations::Create
  extend Operations::Retrieve
  extend Operations::Update
  extend Operations::Delete
  extend Operations::Action

  action :power_action,      path: "actions",        type: "actions",      accepts: i[action]
  action :reboot,            path: "actions",        type: "actions",      attributes: { action: "reboot" }
  action :power_on,          path: "actions",        type: "actions",      attributes: { action: "power_on" }
  action :power_off,         path: "actions",        type: "actions",      attributes: { action: "power_off" }
  action :reset,             path: "actions",        type: "actions",      attributes: { action: "reset" }
  action :lock,              path: "lock"
  action :unlock,            path: "unlock"
  action :rescue_mode,       path: "rescue_mode"
  action :exit_rescue_mode,  path: "exit_rescue_mode"
  action :remote_access,     path: "remote_access"
  action :schedule_deletion, path: "schedule_deletion",
                             accepts: i[at reason]
  action :unschedule_deletion, path: "schedule_deletion", method: :delete

  action :reinstall,         path: "reinstall",      type: "reinstalls",
                             accepts: i[operating_system ipxe hostname ssh_keys user_data raid partitions]

  action :create_out_of_band_connection, path: "out_of_band_connection", type: "out_of_band_connections",
                                         accepts: i[port ssh_key_id]
  action :list_out_of_band_connections,  path: "out_of_band_connection", method: :get

  class << self
    def deploy_config(id, opts = {}, path_params: {})
      params = opts.is_a?(Hash) ? opts : {}
      path_params = extract_path_params(params, path_param_keys) if path_params.empty?
      parsed = execute_request(
        method: :get,
        path: "#{instance_url(id, path_params: path_params)}/deploy_config",
        opts: params,
      )
      parsed
    end

    def update_deploy_config(id, attributes = {}, opts = {})
      body = JSONAPI.encode(type: "deploy_config", id: id, attributes: attributes)
      parsed = execute_request(
        method: :patch,
        path: "#{instance_url(id)}/deploy_config",
        body: body,
        opts: opts,
      )
      parsed
    end
  end

  def deploy_config(opts = {})
    self.class.deploy_config(id, opts)
  end

  def update_deploy_config(attributes, opts = {})
    self.class.update_deploy_config(id, attributes, opts)
  end
end

#roleString

Returns:

  • (String)


46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
# File 'lib/latitude/api/resources/server.rb', line 46

class Server < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] facility
    #   @return [String]
    # @!attribute [r] rack_id
    #   @return [String]
  class Site < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :facility, :string, read_only: true
    attribute :rack_id, :string, read_only: true
  end

    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
    # @!attribute [r] site
    #   @return [Site]
  class Region < APIObject
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
    attribute :site, Site, read_only: true
  end

    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] billing
    #   @return [String]
  class Plan < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :billing, :string, read_only: true
  end

    # @!attribute [r] role
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] mac_address
    #   @return [String]
    # @!attribute [r] description
    #   @return [String]
  class Interface < APIObject
    attribute :role, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :mac_address, :string, read_only: true
    attribute :description, :string, read_only: true
  end

    # @!attribute [r] raid
    #   @return [Boolean]
    # @!attribute [r] ssh_keys
    #   @return [Boolean]
  class Feature < APIObject
    attribute :raid, :boolean, read_only: true
    attribute :ssh_keys, :boolean, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] series
    #   @return [String]
  class Distro < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :series, :string, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] version
    #   @return [String]
    # @!attribute [r] features
    #   @return [Feature]
    # @!attribute [r] distro
    #   @return [Distro]
  class OperatingSystem < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :version, :string, read_only: true
    attribute :features, Feature, read_only: true
    attribute :distro, Distro, read_only: true
  end

    # @!attribute [r] cpu
    #   @return [String]
    # @!attribute [r] disk
    #   @return [String]
    # @!attribute [r] ram
    #   @return [String]
    # @!attribute [r] nic
    #   @return [String]
    # @!attribute [r] gpu
    #   @return [String]
  class Spec < APIObject
    attribute :cpu, :string, read_only: true
    attribute :disk, :string, read_only: true
    attribute :ram, :string, read_only: true
    attribute :nic, :string, read_only: true
    attribute :gpu, :string, read_only: true
  end

  attribute :hostname, :string
  attribute :label, :string
  attribute :price, :integer
  attribute :ipmi_status, :string
  attribute :scheduled_deletion_at, :time
  attribute :status, :string
  attribute :role, :string
  attribute :primary_ipv4, :string
  attribute :created_at, :time, read_only: true
  attribute :locked, :boolean
  attribute :team, Objects::Team
  attribute :project, Objects::Project
  attribute :region, Region
  attribute :tags, [Objects::Tag]
  attribute :primary_ipv6, :string
  attribute :rescue_allowed, :boolean
  attribute :plan, Plan
  attribute :interfaces, [Interface]
  attribute :operating_system, OperatingSystem
  attribute :specs, Spec

  resource_type "servers"
  resource_path "/servers"
  id_prefix     "sv_"

  extend Operations::List
  extend Operations::Create
  extend Operations::Retrieve
  extend Operations::Update
  extend Operations::Delete
  extend Operations::Action

  action :power_action,      path: "actions",        type: "actions",      accepts: i[action]
  action :reboot,            path: "actions",        type: "actions",      attributes: { action: "reboot" }
  action :power_on,          path: "actions",        type: "actions",      attributes: { action: "power_on" }
  action :power_off,         path: "actions",        type: "actions",      attributes: { action: "power_off" }
  action :reset,             path: "actions",        type: "actions",      attributes: { action: "reset" }
  action :lock,              path: "lock"
  action :unlock,            path: "unlock"
  action :rescue_mode,       path: "rescue_mode"
  action :exit_rescue_mode,  path: "exit_rescue_mode"
  action :remote_access,     path: "remote_access"
  action :schedule_deletion, path: "schedule_deletion",
                             accepts: i[at reason]
  action :unschedule_deletion, path: "schedule_deletion", method: :delete

  action :reinstall,         path: "reinstall",      type: "reinstalls",
                             accepts: i[operating_system ipxe hostname ssh_keys user_data raid partitions]

  action :create_out_of_band_connection, path: "out_of_band_connection", type: "out_of_band_connections",
                                         accepts: i[port ssh_key_id]
  action :list_out_of_band_connections,  path: "out_of_band_connection", method: :get

  class << self
    def deploy_config(id, opts = {}, path_params: {})
      params = opts.is_a?(Hash) ? opts : {}
      path_params = extract_path_params(params, path_param_keys) if path_params.empty?
      parsed = execute_request(
        method: :get,
        path: "#{instance_url(id, path_params: path_params)}/deploy_config",
        opts: params,
      )
      parsed
    end

    def update_deploy_config(id, attributes = {}, opts = {})
      body = JSONAPI.encode(type: "deploy_config", id: id, attributes: attributes)
      parsed = execute_request(
        method: :patch,
        path: "#{instance_url(id)}/deploy_config",
        body: body,
        opts: opts,
      )
      parsed
    end
  end

  def deploy_config(opts = {})
    self.class.deploy_config(id, opts)
  end

  def update_deploy_config(attributes, opts = {})
    self.class.update_deploy_config(id, attributes, opts)
  end
end

#scheduled_deletion_atTime

Returns:

  • (Time)


46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
# File 'lib/latitude/api/resources/server.rb', line 46

class Server < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] facility
    #   @return [String]
    # @!attribute [r] rack_id
    #   @return [String]
  class Site < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :facility, :string, read_only: true
    attribute :rack_id, :string, read_only: true
  end

    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
    # @!attribute [r] site
    #   @return [Site]
  class Region < APIObject
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
    attribute :site, Site, read_only: true
  end

    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] billing
    #   @return [String]
  class Plan < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :billing, :string, read_only: true
  end

    # @!attribute [r] role
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] mac_address
    #   @return [String]
    # @!attribute [r] description
    #   @return [String]
  class Interface < APIObject
    attribute :role, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :mac_address, :string, read_only: true
    attribute :description, :string, read_only: true
  end

    # @!attribute [r] raid
    #   @return [Boolean]
    # @!attribute [r] ssh_keys
    #   @return [Boolean]
  class Feature < APIObject
    attribute :raid, :boolean, read_only: true
    attribute :ssh_keys, :boolean, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] series
    #   @return [String]
  class Distro < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :series, :string, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] version
    #   @return [String]
    # @!attribute [r] features
    #   @return [Feature]
    # @!attribute [r] distro
    #   @return [Distro]
  class OperatingSystem < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :version, :string, read_only: true
    attribute :features, Feature, read_only: true
    attribute :distro, Distro, read_only: true
  end

    # @!attribute [r] cpu
    #   @return [String]
    # @!attribute [r] disk
    #   @return [String]
    # @!attribute [r] ram
    #   @return [String]
    # @!attribute [r] nic
    #   @return [String]
    # @!attribute [r] gpu
    #   @return [String]
  class Spec < APIObject
    attribute :cpu, :string, read_only: true
    attribute :disk, :string, read_only: true
    attribute :ram, :string, read_only: true
    attribute :nic, :string, read_only: true
    attribute :gpu, :string, read_only: true
  end

  attribute :hostname, :string
  attribute :label, :string
  attribute :price, :integer
  attribute :ipmi_status, :string
  attribute :scheduled_deletion_at, :time
  attribute :status, :string
  attribute :role, :string
  attribute :primary_ipv4, :string
  attribute :created_at, :time, read_only: true
  attribute :locked, :boolean
  attribute :team, Objects::Team
  attribute :project, Objects::Project
  attribute :region, Region
  attribute :tags, [Objects::Tag]
  attribute :primary_ipv6, :string
  attribute :rescue_allowed, :boolean
  attribute :plan, Plan
  attribute :interfaces, [Interface]
  attribute :operating_system, OperatingSystem
  attribute :specs, Spec

  resource_type "servers"
  resource_path "/servers"
  id_prefix     "sv_"

  extend Operations::List
  extend Operations::Create
  extend Operations::Retrieve
  extend Operations::Update
  extend Operations::Delete
  extend Operations::Action

  action :power_action,      path: "actions",        type: "actions",      accepts: i[action]
  action :reboot,            path: "actions",        type: "actions",      attributes: { action: "reboot" }
  action :power_on,          path: "actions",        type: "actions",      attributes: { action: "power_on" }
  action :power_off,         path: "actions",        type: "actions",      attributes: { action: "power_off" }
  action :reset,             path: "actions",        type: "actions",      attributes: { action: "reset" }
  action :lock,              path: "lock"
  action :unlock,            path: "unlock"
  action :rescue_mode,       path: "rescue_mode"
  action :exit_rescue_mode,  path: "exit_rescue_mode"
  action :remote_access,     path: "remote_access"
  action :schedule_deletion, path: "schedule_deletion",
                             accepts: i[at reason]
  action :unschedule_deletion, path: "schedule_deletion", method: :delete

  action :reinstall,         path: "reinstall",      type: "reinstalls",
                             accepts: i[operating_system ipxe hostname ssh_keys user_data raid partitions]

  action :create_out_of_band_connection, path: "out_of_band_connection", type: "out_of_band_connections",
                                         accepts: i[port ssh_key_id]
  action :list_out_of_band_connections,  path: "out_of_band_connection", method: :get

  class << self
    def deploy_config(id, opts = {}, path_params: {})
      params = opts.is_a?(Hash) ? opts : {}
      path_params = extract_path_params(params, path_param_keys) if path_params.empty?
      parsed = execute_request(
        method: :get,
        path: "#{instance_url(id, path_params: path_params)}/deploy_config",
        opts: params,
      )
      parsed
    end

    def update_deploy_config(id, attributes = {}, opts = {})
      body = JSONAPI.encode(type: "deploy_config", id: id, attributes: attributes)
      parsed = execute_request(
        method: :patch,
        path: "#{instance_url(id)}/deploy_config",
        body: body,
        opts: opts,
      )
      parsed
    end
  end

  def deploy_config(opts = {})
    self.class.deploy_config(id, opts)
  end

  def update_deploy_config(attributes, opts = {})
    self.class.update_deploy_config(id, attributes, opts)
  end
end

#specsSpec

Returns:



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
# File 'lib/latitude/api/resources/server.rb', line 46

class Server < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] facility
    #   @return [String]
    # @!attribute [r] rack_id
    #   @return [String]
  class Site < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :facility, :string, read_only: true
    attribute :rack_id, :string, read_only: true
  end

    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
    # @!attribute [r] site
    #   @return [Site]
  class Region < APIObject
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
    attribute :site, Site, read_only: true
  end

    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] billing
    #   @return [String]
  class Plan < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :billing, :string, read_only: true
  end

    # @!attribute [r] role
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] mac_address
    #   @return [String]
    # @!attribute [r] description
    #   @return [String]
  class Interface < APIObject
    attribute :role, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :mac_address, :string, read_only: true
    attribute :description, :string, read_only: true
  end

    # @!attribute [r] raid
    #   @return [Boolean]
    # @!attribute [r] ssh_keys
    #   @return [Boolean]
  class Feature < APIObject
    attribute :raid, :boolean, read_only: true
    attribute :ssh_keys, :boolean, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] series
    #   @return [String]
  class Distro < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :series, :string, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] version
    #   @return [String]
    # @!attribute [r] features
    #   @return [Feature]
    # @!attribute [r] distro
    #   @return [Distro]
  class OperatingSystem < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :version, :string, read_only: true
    attribute :features, Feature, read_only: true
    attribute :distro, Distro, read_only: true
  end

    # @!attribute [r] cpu
    #   @return [String]
    # @!attribute [r] disk
    #   @return [String]
    # @!attribute [r] ram
    #   @return [String]
    # @!attribute [r] nic
    #   @return [String]
    # @!attribute [r] gpu
    #   @return [String]
  class Spec < APIObject
    attribute :cpu, :string, read_only: true
    attribute :disk, :string, read_only: true
    attribute :ram, :string, read_only: true
    attribute :nic, :string, read_only: true
    attribute :gpu, :string, read_only: true
  end

  attribute :hostname, :string
  attribute :label, :string
  attribute :price, :integer
  attribute :ipmi_status, :string
  attribute :scheduled_deletion_at, :time
  attribute :status, :string
  attribute :role, :string
  attribute :primary_ipv4, :string
  attribute :created_at, :time, read_only: true
  attribute :locked, :boolean
  attribute :team, Objects::Team
  attribute :project, Objects::Project
  attribute :region, Region
  attribute :tags, [Objects::Tag]
  attribute :primary_ipv6, :string
  attribute :rescue_allowed, :boolean
  attribute :plan, Plan
  attribute :interfaces, [Interface]
  attribute :operating_system, OperatingSystem
  attribute :specs, Spec

  resource_type "servers"
  resource_path "/servers"
  id_prefix     "sv_"

  extend Operations::List
  extend Operations::Create
  extend Operations::Retrieve
  extend Operations::Update
  extend Operations::Delete
  extend Operations::Action

  action :power_action,      path: "actions",        type: "actions",      accepts: i[action]
  action :reboot,            path: "actions",        type: "actions",      attributes: { action: "reboot" }
  action :power_on,          path: "actions",        type: "actions",      attributes: { action: "power_on" }
  action :power_off,         path: "actions",        type: "actions",      attributes: { action: "power_off" }
  action :reset,             path: "actions",        type: "actions",      attributes: { action: "reset" }
  action :lock,              path: "lock"
  action :unlock,            path: "unlock"
  action :rescue_mode,       path: "rescue_mode"
  action :exit_rescue_mode,  path: "exit_rescue_mode"
  action :remote_access,     path: "remote_access"
  action :schedule_deletion, path: "schedule_deletion",
                             accepts: i[at reason]
  action :unschedule_deletion, path: "schedule_deletion", method: :delete

  action :reinstall,         path: "reinstall",      type: "reinstalls",
                             accepts: i[operating_system ipxe hostname ssh_keys user_data raid partitions]

  action :create_out_of_band_connection, path: "out_of_band_connection", type: "out_of_band_connections",
                                         accepts: i[port ssh_key_id]
  action :list_out_of_band_connections,  path: "out_of_band_connection", method: :get

  class << self
    def deploy_config(id, opts = {}, path_params: {})
      params = opts.is_a?(Hash) ? opts : {}
      path_params = extract_path_params(params, path_param_keys) if path_params.empty?
      parsed = execute_request(
        method: :get,
        path: "#{instance_url(id, path_params: path_params)}/deploy_config",
        opts: params,
      )
      parsed
    end

    def update_deploy_config(id, attributes = {}, opts = {})
      body = JSONAPI.encode(type: "deploy_config", id: id, attributes: attributes)
      parsed = execute_request(
        method: :patch,
        path: "#{instance_url(id)}/deploy_config",
        body: body,
        opts: opts,
      )
      parsed
    end
  end

  def deploy_config(opts = {})
    self.class.deploy_config(id, opts)
  end

  def update_deploy_config(attributes, opts = {})
    self.class.update_deploy_config(id, attributes, opts)
  end
end

#statusString

Returns:

  • (String)


46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
# File 'lib/latitude/api/resources/server.rb', line 46

class Server < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] facility
    #   @return [String]
    # @!attribute [r] rack_id
    #   @return [String]
  class Site < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :facility, :string, read_only: true
    attribute :rack_id, :string, read_only: true
  end

    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
    # @!attribute [r] site
    #   @return [Site]
  class Region < APIObject
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
    attribute :site, Site, read_only: true
  end

    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] billing
    #   @return [String]
  class Plan < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :billing, :string, read_only: true
  end

    # @!attribute [r] role
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] mac_address
    #   @return [String]
    # @!attribute [r] description
    #   @return [String]
  class Interface < APIObject
    attribute :role, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :mac_address, :string, read_only: true
    attribute :description, :string, read_only: true
  end

    # @!attribute [r] raid
    #   @return [Boolean]
    # @!attribute [r] ssh_keys
    #   @return [Boolean]
  class Feature < APIObject
    attribute :raid, :boolean, read_only: true
    attribute :ssh_keys, :boolean, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] series
    #   @return [String]
  class Distro < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :series, :string, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] version
    #   @return [String]
    # @!attribute [r] features
    #   @return [Feature]
    # @!attribute [r] distro
    #   @return [Distro]
  class OperatingSystem < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :version, :string, read_only: true
    attribute :features, Feature, read_only: true
    attribute :distro, Distro, read_only: true
  end

    # @!attribute [r] cpu
    #   @return [String]
    # @!attribute [r] disk
    #   @return [String]
    # @!attribute [r] ram
    #   @return [String]
    # @!attribute [r] nic
    #   @return [String]
    # @!attribute [r] gpu
    #   @return [String]
  class Spec < APIObject
    attribute :cpu, :string, read_only: true
    attribute :disk, :string, read_only: true
    attribute :ram, :string, read_only: true
    attribute :nic, :string, read_only: true
    attribute :gpu, :string, read_only: true
  end

  attribute :hostname, :string
  attribute :label, :string
  attribute :price, :integer
  attribute :ipmi_status, :string
  attribute :scheduled_deletion_at, :time
  attribute :status, :string
  attribute :role, :string
  attribute :primary_ipv4, :string
  attribute :created_at, :time, read_only: true
  attribute :locked, :boolean
  attribute :team, Objects::Team
  attribute :project, Objects::Project
  attribute :region, Region
  attribute :tags, [Objects::Tag]
  attribute :primary_ipv6, :string
  attribute :rescue_allowed, :boolean
  attribute :plan, Plan
  attribute :interfaces, [Interface]
  attribute :operating_system, OperatingSystem
  attribute :specs, Spec

  resource_type "servers"
  resource_path "/servers"
  id_prefix     "sv_"

  extend Operations::List
  extend Operations::Create
  extend Operations::Retrieve
  extend Operations::Update
  extend Operations::Delete
  extend Operations::Action

  action :power_action,      path: "actions",        type: "actions",      accepts: i[action]
  action :reboot,            path: "actions",        type: "actions",      attributes: { action: "reboot" }
  action :power_on,          path: "actions",        type: "actions",      attributes: { action: "power_on" }
  action :power_off,         path: "actions",        type: "actions",      attributes: { action: "power_off" }
  action :reset,             path: "actions",        type: "actions",      attributes: { action: "reset" }
  action :lock,              path: "lock"
  action :unlock,            path: "unlock"
  action :rescue_mode,       path: "rescue_mode"
  action :exit_rescue_mode,  path: "exit_rescue_mode"
  action :remote_access,     path: "remote_access"
  action :schedule_deletion, path: "schedule_deletion",
                             accepts: i[at reason]
  action :unschedule_deletion, path: "schedule_deletion", method: :delete

  action :reinstall,         path: "reinstall",      type: "reinstalls",
                             accepts: i[operating_system ipxe hostname ssh_keys user_data raid partitions]

  action :create_out_of_band_connection, path: "out_of_band_connection", type: "out_of_band_connections",
                                         accepts: i[port ssh_key_id]
  action :list_out_of_band_connections,  path: "out_of_band_connection", method: :get

  class << self
    def deploy_config(id, opts = {}, path_params: {})
      params = opts.is_a?(Hash) ? opts : {}
      path_params = extract_path_params(params, path_param_keys) if path_params.empty?
      parsed = execute_request(
        method: :get,
        path: "#{instance_url(id, path_params: path_params)}/deploy_config",
        opts: params,
      )
      parsed
    end

    def update_deploy_config(id, attributes = {}, opts = {})
      body = JSONAPI.encode(type: "deploy_config", id: id, attributes: attributes)
      parsed = execute_request(
        method: :patch,
        path: "#{instance_url(id)}/deploy_config",
        body: body,
        opts: opts,
      )
      parsed
    end
  end

  def deploy_config(opts = {})
    self.class.deploy_config(id, opts)
  end

  def update_deploy_config(attributes, opts = {})
    self.class.update_deploy_config(id, attributes, opts)
  end
end

#tagsArray<Latitude::API::Objects::Tag>

Returns:



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
# File 'lib/latitude/api/resources/server.rb', line 46

class Server < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] facility
    #   @return [String]
    # @!attribute [r] rack_id
    #   @return [String]
  class Site < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :facility, :string, read_only: true
    attribute :rack_id, :string, read_only: true
  end

    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
    # @!attribute [r] site
    #   @return [Site]
  class Region < APIObject
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
    attribute :site, Site, read_only: true
  end

    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] billing
    #   @return [String]
  class Plan < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :billing, :string, read_only: true
  end

    # @!attribute [r] role
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] mac_address
    #   @return [String]
    # @!attribute [r] description
    #   @return [String]
  class Interface < APIObject
    attribute :role, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :mac_address, :string, read_only: true
    attribute :description, :string, read_only: true
  end

    # @!attribute [r] raid
    #   @return [Boolean]
    # @!attribute [r] ssh_keys
    #   @return [Boolean]
  class Feature < APIObject
    attribute :raid, :boolean, read_only: true
    attribute :ssh_keys, :boolean, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] series
    #   @return [String]
  class Distro < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :series, :string, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] version
    #   @return [String]
    # @!attribute [r] features
    #   @return [Feature]
    # @!attribute [r] distro
    #   @return [Distro]
  class OperatingSystem < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :version, :string, read_only: true
    attribute :features, Feature, read_only: true
    attribute :distro, Distro, read_only: true
  end

    # @!attribute [r] cpu
    #   @return [String]
    # @!attribute [r] disk
    #   @return [String]
    # @!attribute [r] ram
    #   @return [String]
    # @!attribute [r] nic
    #   @return [String]
    # @!attribute [r] gpu
    #   @return [String]
  class Spec < APIObject
    attribute :cpu, :string, read_only: true
    attribute :disk, :string, read_only: true
    attribute :ram, :string, read_only: true
    attribute :nic, :string, read_only: true
    attribute :gpu, :string, read_only: true
  end

  attribute :hostname, :string
  attribute :label, :string
  attribute :price, :integer
  attribute :ipmi_status, :string
  attribute :scheduled_deletion_at, :time
  attribute :status, :string
  attribute :role, :string
  attribute :primary_ipv4, :string
  attribute :created_at, :time, read_only: true
  attribute :locked, :boolean
  attribute :team, Objects::Team
  attribute :project, Objects::Project
  attribute :region, Region
  attribute :tags, [Objects::Tag]
  attribute :primary_ipv6, :string
  attribute :rescue_allowed, :boolean
  attribute :plan, Plan
  attribute :interfaces, [Interface]
  attribute :operating_system, OperatingSystem
  attribute :specs, Spec

  resource_type "servers"
  resource_path "/servers"
  id_prefix     "sv_"

  extend Operations::List
  extend Operations::Create
  extend Operations::Retrieve
  extend Operations::Update
  extend Operations::Delete
  extend Operations::Action

  action :power_action,      path: "actions",        type: "actions",      accepts: i[action]
  action :reboot,            path: "actions",        type: "actions",      attributes: { action: "reboot" }
  action :power_on,          path: "actions",        type: "actions",      attributes: { action: "power_on" }
  action :power_off,         path: "actions",        type: "actions",      attributes: { action: "power_off" }
  action :reset,             path: "actions",        type: "actions",      attributes: { action: "reset" }
  action :lock,              path: "lock"
  action :unlock,            path: "unlock"
  action :rescue_mode,       path: "rescue_mode"
  action :exit_rescue_mode,  path: "exit_rescue_mode"
  action :remote_access,     path: "remote_access"
  action :schedule_deletion, path: "schedule_deletion",
                             accepts: i[at reason]
  action :unschedule_deletion, path: "schedule_deletion", method: :delete

  action :reinstall,         path: "reinstall",      type: "reinstalls",
                             accepts: i[operating_system ipxe hostname ssh_keys user_data raid partitions]

  action :create_out_of_band_connection, path: "out_of_band_connection", type: "out_of_band_connections",
                                         accepts: i[port ssh_key_id]
  action :list_out_of_band_connections,  path: "out_of_band_connection", method: :get

  class << self
    def deploy_config(id, opts = {}, path_params: {})
      params = opts.is_a?(Hash) ? opts : {}
      path_params = extract_path_params(params, path_param_keys) if path_params.empty?
      parsed = execute_request(
        method: :get,
        path: "#{instance_url(id, path_params: path_params)}/deploy_config",
        opts: params,
      )
      parsed
    end

    def update_deploy_config(id, attributes = {}, opts = {})
      body = JSONAPI.encode(type: "deploy_config", id: id, attributes: attributes)
      parsed = execute_request(
        method: :patch,
        path: "#{instance_url(id)}/deploy_config",
        body: body,
        opts: opts,
      )
      parsed
    end
  end

  def deploy_config(opts = {})
    self.class.deploy_config(id, opts)
  end

  def update_deploy_config(attributes, opts = {})
    self.class.update_deploy_config(id, attributes, opts)
  end
end

#teamLatitude::API::Objects::Team



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
# File 'lib/latitude/api/resources/server.rb', line 46

class Server < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] facility
    #   @return [String]
    # @!attribute [r] rack_id
    #   @return [String]
  class Site < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :facility, :string, read_only: true
    attribute :rack_id, :string, read_only: true
  end

    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
    # @!attribute [r] site
    #   @return [Site]
  class Region < APIObject
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
    attribute :site, Site, read_only: true
  end

    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] billing
    #   @return [String]
  class Plan < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :billing, :string, read_only: true
  end

    # @!attribute [r] role
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] mac_address
    #   @return [String]
    # @!attribute [r] description
    #   @return [String]
  class Interface < APIObject
    attribute :role, :string, read_only: true
    attribute :name, :string, read_only: true
    attribute :mac_address, :string, read_only: true
    attribute :description, :string, read_only: true
  end

    # @!attribute [r] raid
    #   @return [Boolean]
    # @!attribute [r] ssh_keys
    #   @return [Boolean]
  class Feature < APIObject
    attribute :raid, :boolean, read_only: true
    attribute :ssh_keys, :boolean, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] series
    #   @return [String]
  class Distro < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :series, :string, read_only: true
  end

    # @!attribute [r] name
    #   @return [String]
    # @!attribute [r] slug
    #   @return [String]
    # @!attribute [r] version
    #   @return [String]
    # @!attribute [r] features
    #   @return [Feature]
    # @!attribute [r] distro
    #   @return [Distro]
  class OperatingSystem < APIObject
    attribute :name, :string, read_only: true
    attribute :slug, :string, read_only: true
    attribute :version, :string, read_only: true
    attribute :features, Feature, read_only: true
    attribute :distro, Distro, read_only: true
  end

    # @!attribute [r] cpu
    #   @return [String]
    # @!attribute [r] disk
    #   @return [String]
    # @!attribute [r] ram
    #   @return [String]
    # @!attribute [r] nic
    #   @return [String]
    # @!attribute [r] gpu
    #   @return [String]
  class Spec < APIObject
    attribute :cpu, :string, read_only: true
    attribute :disk, :string, read_only: true
    attribute :ram, :string, read_only: true
    attribute :nic, :string, read_only: true
    attribute :gpu, :string, read_only: true
  end

  attribute :hostname, :string
  attribute :label, :string
  attribute :price, :integer
  attribute :ipmi_status, :string
  attribute :scheduled_deletion_at, :time
  attribute :status, :string
  attribute :role, :string
  attribute :primary_ipv4, :string
  attribute :created_at, :time, read_only: true
  attribute :locked, :boolean
  attribute :team, Objects::Team
  attribute :project, Objects::Project
  attribute :region, Region
  attribute :tags, [Objects::Tag]
  attribute :primary_ipv6, :string
  attribute :rescue_allowed, :boolean
  attribute :plan, Plan
  attribute :interfaces, [Interface]
  attribute :operating_system, OperatingSystem
  attribute :specs, Spec

  resource_type "servers"
  resource_path "/servers"
  id_prefix     "sv_"

  extend Operations::List
  extend Operations::Create
  extend Operations::Retrieve
  extend Operations::Update
  extend Operations::Delete
  extend Operations::Action

  action :power_action,      path: "actions",        type: "actions",      accepts: i[action]
  action :reboot,            path: "actions",        type: "actions",      attributes: { action: "reboot" }
  action :power_on,          path: "actions",        type: "actions",      attributes: { action: "power_on" }
  action :power_off,         path: "actions",        type: "actions",      attributes: { action: "power_off" }
  action :reset,             path: "actions",        type: "actions",      attributes: { action: "reset" }
  action :lock,              path: "lock"
  action :unlock,            path: "unlock"
  action :rescue_mode,       path: "rescue_mode"
  action :exit_rescue_mode,  path: "exit_rescue_mode"
  action :remote_access,     path: "remote_access"
  action :schedule_deletion, path: "schedule_deletion",
                             accepts: i[at reason]
  action :unschedule_deletion, path: "schedule_deletion", method: :delete

  action :reinstall,         path: "reinstall",      type: "reinstalls",
                             accepts: i[operating_system ipxe hostname ssh_keys user_data raid partitions]

  action :create_out_of_band_connection, path: "out_of_band_connection", type: "out_of_band_connections",
                                         accepts: i[port ssh_key_id]
  action :list_out_of_band_connections,  path: "out_of_band_connection", method: :get

  class << self
    def deploy_config(id, opts = {}, path_params: {})
      params = opts.is_a?(Hash) ? opts : {}
      path_params = extract_path_params(params, path_param_keys) if path_params.empty?
      parsed = execute_request(
        method: :get,
        path: "#{instance_url(id, path_params: path_params)}/deploy_config",
        opts: params,
      )
      parsed
    end

    def update_deploy_config(id, attributes = {}, opts = {})
      body = JSONAPI.encode(type: "deploy_config", id: id, attributes: attributes)
      parsed = execute_request(
        method: :patch,
        path: "#{instance_url(id)}/deploy_config",
        body: body,
        opts: opts,
      )
      parsed
    end
  end

  def deploy_config(opts = {})
    self.class.deploy_config(id, opts)
  end

  def update_deploy_config(attributes, opts = {})
    self.class.update_deploy_config(id, attributes, opts)
  end
end

Class Method Details

.deploy_config(id, opts = {}, path_params: {}) ⇒ Object



218
219
220
221
222
223
224
225
226
227
# File 'lib/latitude/api/resources/server.rb', line 218

def deploy_config(id, opts = {}, path_params: {})
  params = opts.is_a?(Hash) ? opts : {}
  path_params = extract_path_params(params, path_param_keys) if path_params.empty?
  parsed = execute_request(
    method: :get,
    path: "#{instance_url(id, path_params: path_params)}/deploy_config",
    opts: params,
  )
  parsed
end

.update_deploy_config(id, attributes = {}, opts = {}) ⇒ Object



229
230
231
232
233
234
235
236
237
238
# File 'lib/latitude/api/resources/server.rb', line 229

def update_deploy_config(id, attributes = {}, opts = {})
  body = JSONAPI.encode(type: "deploy_config", id: id, attributes: attributes)
  parsed = execute_request(
    method: :patch,
    path: "#{instance_url(id)}/deploy_config",
    body: body,
    opts: opts,
  )
  parsed
end

Instance Method Details

#deploy_config(opts = {}) ⇒ Object



241
242
243
# File 'lib/latitude/api/resources/server.rb', line 241

def deploy_config(opts = {})
  self.class.deploy_config(id, opts)
end

#update_deploy_config(attributes, opts = {}) ⇒ Object



245
246
247
# File 'lib/latitude/api/resources/server.rb', line 245

def update_deploy_config(attributes, opts = {})
  self.class.update_deploy_config(id, attributes, opts)
end