Class: Latitude::API::Resources::VirtualMachine

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

Defined Under Namespace

Classes: Credential, Distro, Feature, OperatingSystem, Plan, 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

Method Summary

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

#billingString

Returns:

  • (String)


30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# File 'lib/latitude/api/resources/virtual_machine.rb', line 30

class VirtualMachine < APIResource
    # @!attribute [r] raid
    #   @return [Boolean]
    # @!attribute [r] ssh_keys
    #   @return [Boolean]
    # @!attribute [r] user_data
    #   @return [Boolean]
  class Feature < APIObject
    attribute :raid, :boolean, read_only: true
    attribute :ssh_keys, :boolean, read_only: true
    attribute :user_data, :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] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
  class Plan < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
  end

    # @!attribute [r] vcpu
    #   @return [Integer]
    # @!attribute [r] ram
    #   @return [String]
    # @!attribute [r] storage
    #   @return [String]
    # @!attribute [r] nic
    #   @return [String]
    # @!attribute [r] gpu
    #   @return [String]
  class Spec < APIObject
    attribute :vcpu, :integer, read_only: true
    attribute :ram, :string, read_only: true
    attribute :storage, :string, read_only: true
    attribute :nic, :string, read_only: true
    attribute :gpu, :string, read_only: true
  end

    # @!attribute [r] username
    #   @return [String]
    # @!attribute [r] host
    #   @return [String]
    # @!attribute [r] password
    #   @return [String]
    # @!attribute [r] ssh_keys
    #   @return [Array]
  class Credential < APIObject
    attribute :username, :string, read_only: true
    attribute :host, :string, read_only: true
    attribute :password, :string, read_only: true
    attribute :ssh_keys, :array, read_only: true
  end

  attribute :name, :string
  attribute :status, :string
  attribute :created_at, :time, read_only: true
  attribute :primary_ipv4, :string
  attribute :operating_system, OperatingSystem
  attribute :site, :string
  attribute :billing, :string
  attribute :plan, Plan
  attribute :specs, Spec
  attribute :team, Objects::Team
  attribute :project, Objects::Project
  attribute :credentials, Credential

  resource_type "virtual_machines"
  resource_path "/virtual_machines"
  id_prefix     "vm_"

  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" }
end

#created_atTime (readonly)

Returns:

  • (Time)


30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# File 'lib/latitude/api/resources/virtual_machine.rb', line 30

class VirtualMachine < APIResource
    # @!attribute [r] raid
    #   @return [Boolean]
    # @!attribute [r] ssh_keys
    #   @return [Boolean]
    # @!attribute [r] user_data
    #   @return [Boolean]
  class Feature < APIObject
    attribute :raid, :boolean, read_only: true
    attribute :ssh_keys, :boolean, read_only: true
    attribute :user_data, :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] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
  class Plan < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
  end

    # @!attribute [r] vcpu
    #   @return [Integer]
    # @!attribute [r] ram
    #   @return [String]
    # @!attribute [r] storage
    #   @return [String]
    # @!attribute [r] nic
    #   @return [String]
    # @!attribute [r] gpu
    #   @return [String]
  class Spec < APIObject
    attribute :vcpu, :integer, read_only: true
    attribute :ram, :string, read_only: true
    attribute :storage, :string, read_only: true
    attribute :nic, :string, read_only: true
    attribute :gpu, :string, read_only: true
  end

    # @!attribute [r] username
    #   @return [String]
    # @!attribute [r] host
    #   @return [String]
    # @!attribute [r] password
    #   @return [String]
    # @!attribute [r] ssh_keys
    #   @return [Array]
  class Credential < APIObject
    attribute :username, :string, read_only: true
    attribute :host, :string, read_only: true
    attribute :password, :string, read_only: true
    attribute :ssh_keys, :array, read_only: true
  end

  attribute :name, :string
  attribute :status, :string
  attribute :created_at, :time, read_only: true
  attribute :primary_ipv4, :string
  attribute :operating_system, OperatingSystem
  attribute :site, :string
  attribute :billing, :string
  attribute :plan, Plan
  attribute :specs, Spec
  attribute :team, Objects::Team
  attribute :project, Objects::Project
  attribute :credentials, Credential

  resource_type "virtual_machines"
  resource_path "/virtual_machines"
  id_prefix     "vm_"

  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" }
end

#credentialsCredential

Returns:



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# File 'lib/latitude/api/resources/virtual_machine.rb', line 30

class VirtualMachine < APIResource
    # @!attribute [r] raid
    #   @return [Boolean]
    # @!attribute [r] ssh_keys
    #   @return [Boolean]
    # @!attribute [r] user_data
    #   @return [Boolean]
  class Feature < APIObject
    attribute :raid, :boolean, read_only: true
    attribute :ssh_keys, :boolean, read_only: true
    attribute :user_data, :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] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
  class Plan < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
  end

    # @!attribute [r] vcpu
    #   @return [Integer]
    # @!attribute [r] ram
    #   @return [String]
    # @!attribute [r] storage
    #   @return [String]
    # @!attribute [r] nic
    #   @return [String]
    # @!attribute [r] gpu
    #   @return [String]
  class Spec < APIObject
    attribute :vcpu, :integer, read_only: true
    attribute :ram, :string, read_only: true
    attribute :storage, :string, read_only: true
    attribute :nic, :string, read_only: true
    attribute :gpu, :string, read_only: true
  end

    # @!attribute [r] username
    #   @return [String]
    # @!attribute [r] host
    #   @return [String]
    # @!attribute [r] password
    #   @return [String]
    # @!attribute [r] ssh_keys
    #   @return [Array]
  class Credential < APIObject
    attribute :username, :string, read_only: true
    attribute :host, :string, read_only: true
    attribute :password, :string, read_only: true
    attribute :ssh_keys, :array, read_only: true
  end

  attribute :name, :string
  attribute :status, :string
  attribute :created_at, :time, read_only: true
  attribute :primary_ipv4, :string
  attribute :operating_system, OperatingSystem
  attribute :site, :string
  attribute :billing, :string
  attribute :plan, Plan
  attribute :specs, Spec
  attribute :team, Objects::Team
  attribute :project, Objects::Project
  attribute :credentials, Credential

  resource_type "virtual_machines"
  resource_path "/virtual_machines"
  id_prefix     "vm_"

  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" }
end

#nameString

Returns:

  • (String)


30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# File 'lib/latitude/api/resources/virtual_machine.rb', line 30

class VirtualMachine < APIResource
    # @!attribute [r] raid
    #   @return [Boolean]
    # @!attribute [r] ssh_keys
    #   @return [Boolean]
    # @!attribute [r] user_data
    #   @return [Boolean]
  class Feature < APIObject
    attribute :raid, :boolean, read_only: true
    attribute :ssh_keys, :boolean, read_only: true
    attribute :user_data, :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] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
  class Plan < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
  end

    # @!attribute [r] vcpu
    #   @return [Integer]
    # @!attribute [r] ram
    #   @return [String]
    # @!attribute [r] storage
    #   @return [String]
    # @!attribute [r] nic
    #   @return [String]
    # @!attribute [r] gpu
    #   @return [String]
  class Spec < APIObject
    attribute :vcpu, :integer, read_only: true
    attribute :ram, :string, read_only: true
    attribute :storage, :string, read_only: true
    attribute :nic, :string, read_only: true
    attribute :gpu, :string, read_only: true
  end

    # @!attribute [r] username
    #   @return [String]
    # @!attribute [r] host
    #   @return [String]
    # @!attribute [r] password
    #   @return [String]
    # @!attribute [r] ssh_keys
    #   @return [Array]
  class Credential < APIObject
    attribute :username, :string, read_only: true
    attribute :host, :string, read_only: true
    attribute :password, :string, read_only: true
    attribute :ssh_keys, :array, read_only: true
  end

  attribute :name, :string
  attribute :status, :string
  attribute :created_at, :time, read_only: true
  attribute :primary_ipv4, :string
  attribute :operating_system, OperatingSystem
  attribute :site, :string
  attribute :billing, :string
  attribute :plan, Plan
  attribute :specs, Spec
  attribute :team, Objects::Team
  attribute :project, Objects::Project
  attribute :credentials, Credential

  resource_type "virtual_machines"
  resource_path "/virtual_machines"
  id_prefix     "vm_"

  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" }
end

#operating_systemOperatingSystem

Returns:



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# File 'lib/latitude/api/resources/virtual_machine.rb', line 30

class VirtualMachine < APIResource
    # @!attribute [r] raid
    #   @return [Boolean]
    # @!attribute [r] ssh_keys
    #   @return [Boolean]
    # @!attribute [r] user_data
    #   @return [Boolean]
  class Feature < APIObject
    attribute :raid, :boolean, read_only: true
    attribute :ssh_keys, :boolean, read_only: true
    attribute :user_data, :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] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
  class Plan < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
  end

    # @!attribute [r] vcpu
    #   @return [Integer]
    # @!attribute [r] ram
    #   @return [String]
    # @!attribute [r] storage
    #   @return [String]
    # @!attribute [r] nic
    #   @return [String]
    # @!attribute [r] gpu
    #   @return [String]
  class Spec < APIObject
    attribute :vcpu, :integer, read_only: true
    attribute :ram, :string, read_only: true
    attribute :storage, :string, read_only: true
    attribute :nic, :string, read_only: true
    attribute :gpu, :string, read_only: true
  end

    # @!attribute [r] username
    #   @return [String]
    # @!attribute [r] host
    #   @return [String]
    # @!attribute [r] password
    #   @return [String]
    # @!attribute [r] ssh_keys
    #   @return [Array]
  class Credential < APIObject
    attribute :username, :string, read_only: true
    attribute :host, :string, read_only: true
    attribute :password, :string, read_only: true
    attribute :ssh_keys, :array, read_only: true
  end

  attribute :name, :string
  attribute :status, :string
  attribute :created_at, :time, read_only: true
  attribute :primary_ipv4, :string
  attribute :operating_system, OperatingSystem
  attribute :site, :string
  attribute :billing, :string
  attribute :plan, Plan
  attribute :specs, Spec
  attribute :team, Objects::Team
  attribute :project, Objects::Project
  attribute :credentials, Credential

  resource_type "virtual_machines"
  resource_path "/virtual_machines"
  id_prefix     "vm_"

  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" }
end

#planPlan

Returns:



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# File 'lib/latitude/api/resources/virtual_machine.rb', line 30

class VirtualMachine < APIResource
    # @!attribute [r] raid
    #   @return [Boolean]
    # @!attribute [r] ssh_keys
    #   @return [Boolean]
    # @!attribute [r] user_data
    #   @return [Boolean]
  class Feature < APIObject
    attribute :raid, :boolean, read_only: true
    attribute :ssh_keys, :boolean, read_only: true
    attribute :user_data, :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] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
  class Plan < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
  end

    # @!attribute [r] vcpu
    #   @return [Integer]
    # @!attribute [r] ram
    #   @return [String]
    # @!attribute [r] storage
    #   @return [String]
    # @!attribute [r] nic
    #   @return [String]
    # @!attribute [r] gpu
    #   @return [String]
  class Spec < APIObject
    attribute :vcpu, :integer, read_only: true
    attribute :ram, :string, read_only: true
    attribute :storage, :string, read_only: true
    attribute :nic, :string, read_only: true
    attribute :gpu, :string, read_only: true
  end

    # @!attribute [r] username
    #   @return [String]
    # @!attribute [r] host
    #   @return [String]
    # @!attribute [r] password
    #   @return [String]
    # @!attribute [r] ssh_keys
    #   @return [Array]
  class Credential < APIObject
    attribute :username, :string, read_only: true
    attribute :host, :string, read_only: true
    attribute :password, :string, read_only: true
    attribute :ssh_keys, :array, read_only: true
  end

  attribute :name, :string
  attribute :status, :string
  attribute :created_at, :time, read_only: true
  attribute :primary_ipv4, :string
  attribute :operating_system, OperatingSystem
  attribute :site, :string
  attribute :billing, :string
  attribute :plan, Plan
  attribute :specs, Spec
  attribute :team, Objects::Team
  attribute :project, Objects::Project
  attribute :credentials, Credential

  resource_type "virtual_machines"
  resource_path "/virtual_machines"
  id_prefix     "vm_"

  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" }
end

#primary_ipv4String

Returns:

  • (String)


30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# File 'lib/latitude/api/resources/virtual_machine.rb', line 30

class VirtualMachine < APIResource
    # @!attribute [r] raid
    #   @return [Boolean]
    # @!attribute [r] ssh_keys
    #   @return [Boolean]
    # @!attribute [r] user_data
    #   @return [Boolean]
  class Feature < APIObject
    attribute :raid, :boolean, read_only: true
    attribute :ssh_keys, :boolean, read_only: true
    attribute :user_data, :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] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
  class Plan < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
  end

    # @!attribute [r] vcpu
    #   @return [Integer]
    # @!attribute [r] ram
    #   @return [String]
    # @!attribute [r] storage
    #   @return [String]
    # @!attribute [r] nic
    #   @return [String]
    # @!attribute [r] gpu
    #   @return [String]
  class Spec < APIObject
    attribute :vcpu, :integer, read_only: true
    attribute :ram, :string, read_only: true
    attribute :storage, :string, read_only: true
    attribute :nic, :string, read_only: true
    attribute :gpu, :string, read_only: true
  end

    # @!attribute [r] username
    #   @return [String]
    # @!attribute [r] host
    #   @return [String]
    # @!attribute [r] password
    #   @return [String]
    # @!attribute [r] ssh_keys
    #   @return [Array]
  class Credential < APIObject
    attribute :username, :string, read_only: true
    attribute :host, :string, read_only: true
    attribute :password, :string, read_only: true
    attribute :ssh_keys, :array, read_only: true
  end

  attribute :name, :string
  attribute :status, :string
  attribute :created_at, :time, read_only: true
  attribute :primary_ipv4, :string
  attribute :operating_system, OperatingSystem
  attribute :site, :string
  attribute :billing, :string
  attribute :plan, Plan
  attribute :specs, Spec
  attribute :team, Objects::Team
  attribute :project, Objects::Project
  attribute :credentials, Credential

  resource_type "virtual_machines"
  resource_path "/virtual_machines"
  id_prefix     "vm_"

  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" }
end

#projectLatitude::API::Objects::Project



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# File 'lib/latitude/api/resources/virtual_machine.rb', line 30

class VirtualMachine < APIResource
    # @!attribute [r] raid
    #   @return [Boolean]
    # @!attribute [r] ssh_keys
    #   @return [Boolean]
    # @!attribute [r] user_data
    #   @return [Boolean]
  class Feature < APIObject
    attribute :raid, :boolean, read_only: true
    attribute :ssh_keys, :boolean, read_only: true
    attribute :user_data, :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] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
  class Plan < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
  end

    # @!attribute [r] vcpu
    #   @return [Integer]
    # @!attribute [r] ram
    #   @return [String]
    # @!attribute [r] storage
    #   @return [String]
    # @!attribute [r] nic
    #   @return [String]
    # @!attribute [r] gpu
    #   @return [String]
  class Spec < APIObject
    attribute :vcpu, :integer, read_only: true
    attribute :ram, :string, read_only: true
    attribute :storage, :string, read_only: true
    attribute :nic, :string, read_only: true
    attribute :gpu, :string, read_only: true
  end

    # @!attribute [r] username
    #   @return [String]
    # @!attribute [r] host
    #   @return [String]
    # @!attribute [r] password
    #   @return [String]
    # @!attribute [r] ssh_keys
    #   @return [Array]
  class Credential < APIObject
    attribute :username, :string, read_only: true
    attribute :host, :string, read_only: true
    attribute :password, :string, read_only: true
    attribute :ssh_keys, :array, read_only: true
  end

  attribute :name, :string
  attribute :status, :string
  attribute :created_at, :time, read_only: true
  attribute :primary_ipv4, :string
  attribute :operating_system, OperatingSystem
  attribute :site, :string
  attribute :billing, :string
  attribute :plan, Plan
  attribute :specs, Spec
  attribute :team, Objects::Team
  attribute :project, Objects::Project
  attribute :credentials, Credential

  resource_type "virtual_machines"
  resource_path "/virtual_machines"
  id_prefix     "vm_"

  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" }
end

#siteString

Returns:

  • (String)


30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# File 'lib/latitude/api/resources/virtual_machine.rb', line 30

class VirtualMachine < APIResource
    # @!attribute [r] raid
    #   @return [Boolean]
    # @!attribute [r] ssh_keys
    #   @return [Boolean]
    # @!attribute [r] user_data
    #   @return [Boolean]
  class Feature < APIObject
    attribute :raid, :boolean, read_only: true
    attribute :ssh_keys, :boolean, read_only: true
    attribute :user_data, :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] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
  class Plan < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
  end

    # @!attribute [r] vcpu
    #   @return [Integer]
    # @!attribute [r] ram
    #   @return [String]
    # @!attribute [r] storage
    #   @return [String]
    # @!attribute [r] nic
    #   @return [String]
    # @!attribute [r] gpu
    #   @return [String]
  class Spec < APIObject
    attribute :vcpu, :integer, read_only: true
    attribute :ram, :string, read_only: true
    attribute :storage, :string, read_only: true
    attribute :nic, :string, read_only: true
    attribute :gpu, :string, read_only: true
  end

    # @!attribute [r] username
    #   @return [String]
    # @!attribute [r] host
    #   @return [String]
    # @!attribute [r] password
    #   @return [String]
    # @!attribute [r] ssh_keys
    #   @return [Array]
  class Credential < APIObject
    attribute :username, :string, read_only: true
    attribute :host, :string, read_only: true
    attribute :password, :string, read_only: true
    attribute :ssh_keys, :array, read_only: true
  end

  attribute :name, :string
  attribute :status, :string
  attribute :created_at, :time, read_only: true
  attribute :primary_ipv4, :string
  attribute :operating_system, OperatingSystem
  attribute :site, :string
  attribute :billing, :string
  attribute :plan, Plan
  attribute :specs, Spec
  attribute :team, Objects::Team
  attribute :project, Objects::Project
  attribute :credentials, Credential

  resource_type "virtual_machines"
  resource_path "/virtual_machines"
  id_prefix     "vm_"

  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" }
end

#specsSpec

Returns:



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# File 'lib/latitude/api/resources/virtual_machine.rb', line 30

class VirtualMachine < APIResource
    # @!attribute [r] raid
    #   @return [Boolean]
    # @!attribute [r] ssh_keys
    #   @return [Boolean]
    # @!attribute [r] user_data
    #   @return [Boolean]
  class Feature < APIObject
    attribute :raid, :boolean, read_only: true
    attribute :ssh_keys, :boolean, read_only: true
    attribute :user_data, :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] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
  class Plan < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
  end

    # @!attribute [r] vcpu
    #   @return [Integer]
    # @!attribute [r] ram
    #   @return [String]
    # @!attribute [r] storage
    #   @return [String]
    # @!attribute [r] nic
    #   @return [String]
    # @!attribute [r] gpu
    #   @return [String]
  class Spec < APIObject
    attribute :vcpu, :integer, read_only: true
    attribute :ram, :string, read_only: true
    attribute :storage, :string, read_only: true
    attribute :nic, :string, read_only: true
    attribute :gpu, :string, read_only: true
  end

    # @!attribute [r] username
    #   @return [String]
    # @!attribute [r] host
    #   @return [String]
    # @!attribute [r] password
    #   @return [String]
    # @!attribute [r] ssh_keys
    #   @return [Array]
  class Credential < APIObject
    attribute :username, :string, read_only: true
    attribute :host, :string, read_only: true
    attribute :password, :string, read_only: true
    attribute :ssh_keys, :array, read_only: true
  end

  attribute :name, :string
  attribute :status, :string
  attribute :created_at, :time, read_only: true
  attribute :primary_ipv4, :string
  attribute :operating_system, OperatingSystem
  attribute :site, :string
  attribute :billing, :string
  attribute :plan, Plan
  attribute :specs, Spec
  attribute :team, Objects::Team
  attribute :project, Objects::Project
  attribute :credentials, Credential

  resource_type "virtual_machines"
  resource_path "/virtual_machines"
  id_prefix     "vm_"

  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" }
end

#statusString

Returns:

  • (String)


30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# File 'lib/latitude/api/resources/virtual_machine.rb', line 30

class VirtualMachine < APIResource
    # @!attribute [r] raid
    #   @return [Boolean]
    # @!attribute [r] ssh_keys
    #   @return [Boolean]
    # @!attribute [r] user_data
    #   @return [Boolean]
  class Feature < APIObject
    attribute :raid, :boolean, read_only: true
    attribute :ssh_keys, :boolean, read_only: true
    attribute :user_data, :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] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
  class Plan < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
  end

    # @!attribute [r] vcpu
    #   @return [Integer]
    # @!attribute [r] ram
    #   @return [String]
    # @!attribute [r] storage
    #   @return [String]
    # @!attribute [r] nic
    #   @return [String]
    # @!attribute [r] gpu
    #   @return [String]
  class Spec < APIObject
    attribute :vcpu, :integer, read_only: true
    attribute :ram, :string, read_only: true
    attribute :storage, :string, read_only: true
    attribute :nic, :string, read_only: true
    attribute :gpu, :string, read_only: true
  end

    # @!attribute [r] username
    #   @return [String]
    # @!attribute [r] host
    #   @return [String]
    # @!attribute [r] password
    #   @return [String]
    # @!attribute [r] ssh_keys
    #   @return [Array]
  class Credential < APIObject
    attribute :username, :string, read_only: true
    attribute :host, :string, read_only: true
    attribute :password, :string, read_only: true
    attribute :ssh_keys, :array, read_only: true
  end

  attribute :name, :string
  attribute :status, :string
  attribute :created_at, :time, read_only: true
  attribute :primary_ipv4, :string
  attribute :operating_system, OperatingSystem
  attribute :site, :string
  attribute :billing, :string
  attribute :plan, Plan
  attribute :specs, Spec
  attribute :team, Objects::Team
  attribute :project, Objects::Project
  attribute :credentials, Credential

  resource_type "virtual_machines"
  resource_path "/virtual_machines"
  id_prefix     "vm_"

  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" }
end

#teamLatitude::API::Objects::Team



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# File 'lib/latitude/api/resources/virtual_machine.rb', line 30

class VirtualMachine < APIResource
    # @!attribute [r] raid
    #   @return [Boolean]
    # @!attribute [r] ssh_keys
    #   @return [Boolean]
    # @!attribute [r] user_data
    #   @return [Boolean]
  class Feature < APIObject
    attribute :raid, :boolean, read_only: true
    attribute :ssh_keys, :boolean, read_only: true
    attribute :user_data, :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] id
    #   @return [String]
    # @!attribute [r] name
    #   @return [String]
  class Plan < APIObject
    attribute :id, :string, read_only: true
    attribute :name, :string, read_only: true
  end

    # @!attribute [r] vcpu
    #   @return [Integer]
    # @!attribute [r] ram
    #   @return [String]
    # @!attribute [r] storage
    #   @return [String]
    # @!attribute [r] nic
    #   @return [String]
    # @!attribute [r] gpu
    #   @return [String]
  class Spec < APIObject
    attribute :vcpu, :integer, read_only: true
    attribute :ram, :string, read_only: true
    attribute :storage, :string, read_only: true
    attribute :nic, :string, read_only: true
    attribute :gpu, :string, read_only: true
  end

    # @!attribute [r] username
    #   @return [String]
    # @!attribute [r] host
    #   @return [String]
    # @!attribute [r] password
    #   @return [String]
    # @!attribute [r] ssh_keys
    #   @return [Array]
  class Credential < APIObject
    attribute :username, :string, read_only: true
    attribute :host, :string, read_only: true
    attribute :password, :string, read_only: true
    attribute :ssh_keys, :array, read_only: true
  end

  attribute :name, :string
  attribute :status, :string
  attribute :created_at, :time, read_only: true
  attribute :primary_ipv4, :string
  attribute :operating_system, OperatingSystem
  attribute :site, :string
  attribute :billing, :string
  attribute :plan, Plan
  attribute :specs, Spec
  attribute :team, Objects::Team
  attribute :project, Objects::Project
  attribute :credentials, Credential

  resource_type "virtual_machines"
  resource_path "/virtual_machines"
  id_prefix     "vm_"

  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" }
end