Class: Kitchen::Driver::VmpoolStores::BaseStore

Inherits:
Object
  • Object
show all
Includes:
Logging
Defined in:
lib/kitchen/driver/vmpool_stores/base_store.rb

Direct Known Subclasses

FileStore, GitlabCommitStore, GitlabSnippetStore

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#pool_data(refresh = false) ⇒ Object (readonly)

Returns the value of attribute pool_data.



10
11
12
# File 'lib/kitchen/driver/vmpool_stores/base_store.rb', line 10

def pool_data
  @pool_data
end

#pool_fileObject (readonly)

Returns the value of attribute pool_file.



10
11
12
# File 'lib/kitchen/driver/vmpool_stores/base_store.rb', line 10

def pool_file
  @pool_file
end

Instance Method Details

#createObject



19
20
21
22
23
# File 'lib/kitchen/driver/vmpool_stores/base_store.rb', line 19

def create
  #info("Creating new vmpool data")
  write_content(base_content)
  read
end

#readObject



25
26
27
28
# File 'lib/kitchen/driver/vmpool_stores/base_store.rb', line 25

def read
  #info("Reading vmpool data")
  read_content
end

#rereadObject



30
31
32
# File 'lib/kitchen/driver/vmpool_stores/base_store.rb', line 30

def reread
  pool_data(true)
end

#saveObject



34
35
36
37
38
# File 'lib/kitchen/driver/vmpool_stores/base_store.rb', line 34

def save
  #info("Saving vmpool data")
  write_content
  read
end

#update(content = nil) ⇒ Object



13
14
15
16
17
# File 'lib/kitchen/driver/vmpool_stores/base_store.rb', line 13

def update(content = nil)
  #info("Updating vmpool data")
  write_content(content)
  read
end