Class: VagrantPlugins::AVF::CloudBoxMetadata

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant_provider_avf/cloud_box_metadata.rb

Constant Summary collapse

REPOSITORY_URL =
"https://github.com/sodini-io/vagrant-provider-avf".freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(box_name, repository_url: REPOSITORY_URL) ⇒ CloudBoxMetadata

Returns a new instance of CloudBoxMetadata.



10
11
12
13
# File 'lib/vagrant_provider_avf/cloud_box_metadata.rb', line 10

def initialize(box_name, repository_url: REPOSITORY_URL)
  @box_name = box_name.to_s
  @repository_url = repository_url
end

Instance Attribute Details

#box_nameObject (readonly)

Returns the value of attribute box_name.



8
9
10
# File 'lib/vagrant_provider_avf/cloud_box_metadata.rb', line 8

def box_name
  @box_name
end

Instance Method Details

#descriptionObject



24
25
26
27
28
29
30
# File 'lib/vagrant_provider_avf/cloud_box_metadata.rb', line 24

def description
  [
    "Curated #{display_name} ARM64 base box for the avf provider on Apple Silicon Macs.",
    "Requires the vagrant-provider-avf plugin.",
    "Source and documentation: #{@repository_url}"
  ].join("\n\n")
end

#short_descriptionObject



20
21
22
# File 'lib/vagrant_provider_avf/cloud_box_metadata.rb', line 20

def short_description
  "#{display_name} ARM64 for vagrant-provider-avf"
end

#validate!Object



15
16
17
18
# File 'lib/vagrant_provider_avf/cloud_box_metadata.rb', line 15

def validate!
  ReleaseTarget.new(@box_name).validate_publishable!
  self
end