Class: LabClient::Terraform
- Defined in:
- lib/labclient/terraform/lock.rb,
lib/labclient/terraform/show.rb,
lib/labclient/terraform/create.rb,
lib/labclient/terraform/delete.rb,
lib/labclient/terraform/unlock.rb
Overview
Specifics
Constant Summary
Constants included from AccessLevel
AccessLevel::HUMAN_ACCESS_LEVELS, AccessLevel::MACHINE_ACCESS_LEVELS
Instance Attribute Summary
Attributes inherited from Common
Instance Method Summary collapse
- #create(project_id, name, xid, body) ⇒ Object
- #delete(project_id, name) ⇒ Object
- #lock(project_id, name, query) ⇒ Object
- #show(project_id, name) ⇒ Object
- #unlock(project_id, name, xid) ⇒ Object
Methods inherited from Common
#api_methods, #api_methods_help, #format_id, #format_query_id, #format_query_ids, #format_time?, #group_name, #help, #initialize, #inspect, #klass, #protected_query_access_level, #query_access_level, #query_format_time
Methods included from Docs
#demo, #desc, #doc, docs, #example, #group_name, #help, json, #markdown, #navigation, #option, #result, #subtitle, #title
Methods included from AccessLevel
#human_access_level, #human_protected_access_level, #machine_access_level, #machine_protected_access_level
Constructor Details
This class inherits a constructor from LabClient::Common
Instance Method Details
#create(project_id, name, xid, body) ⇒ Object
17 18 19 20 21 |
# File 'lib/labclient/terraform/create.rb', line 17 def create(project_id, name, xid, body) project_id = format_id(project_id) client.request(:post, "projects/#{project_id}/terraform/state/#{name}?ID=#{xid}", nil, body) end |
#delete(project_id, name) ⇒ Object
10 11 12 13 14 |
# File 'lib/labclient/terraform/delete.rb', line 10 def delete(project_id, name) project_id = format_id(project_id) client.request(:delete, "projects/#{project_id}/terraform/state/#{name}") end |
#lock(project_id, name, query) ⇒ Object
11 12 13 14 15 |
# File 'lib/labclient/terraform/lock.rb', line 11 def lock(project_id, name, query) project_id = format_id(project_id) client.request(:post, "projects/#{project_id}/terraform/state/#{name}/lock", nil, query) end |
#show(project_id, name) ⇒ Object
16 17 18 19 20 |
# File 'lib/labclient/terraform/show.rb', line 16 def show(project_id, name) project_id = format_id(project_id) client.request(:get, "projects/#{project_id}/terraform/state/#{name}", TerraformState) end |
#unlock(project_id, name, xid) ⇒ Object
10 11 12 13 14 |
# File 'lib/labclient/terraform/unlock.rb', line 10 def unlock(project_id, name, xid) project_id = format_id(project_id) client.request(:delete, "projects/#{project_id}/terraform/state/#{name}/lock?ID=#{xid}") end |