Skip to content

Commit

Permalink
implemented default do not check mac addr #141
Browse files Browse the repository at this point in the history
  • Loading branch information
jadilet committed Jan 22, 2019
1 parent 9a228f1 commit 1d6d028
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions lib/vagrant-subutai/packer/subutai_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ module SubutaiConfig
BRIDGE_VMWARE
BRIDGE_KVM
BRIDGE_HYPERV
CHECK_MAC
].freeze

GENERATED_PARAMETERS = %i[
Expand Down Expand Up @@ -112,10 +113,10 @@ module SubutaiConfig
LIBVIRT_POOL: 'default', # Libvirt pool name
BLUEPRINT_NO_AUTO: false, # Auto provision blueprints if present

# Configuration parameters below have not been implemented
SUBUTAI_DESKTOP: false, # install desktop with tray and p2p client
SUBUTAI_MAN_TMPL: nil, # provision alternative management template
APT_PROXY_URL: nil, # configure apt proxy URL
APT_PROXY_URL: nil, # configure apt proxy URL
CHECK_MAC: false, # mac addr checks

# provider with value
hyper_v: 'hyperv',
Expand Down Expand Up @@ -354,7 +355,7 @@ def self.do_network(provider)
if @bridged && get(:_SSH_PORT).nil? && write?

put(:_BASE_MAC, find_mac(provider), true) \
if @bridged && get(:_BASE_MAC).nil? && write?
if @bridged && get(:_BASE_MAC).nil? && write? && get(:CHECK_MAC)

put(:_BRIDGED, @bridged, true) if write?

Expand Down
3 changes: 2 additions & 1 deletion lib/vagrant-subutai/packer/subutai_validation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ module SubutaiValidation
"BRIDGE_PARALLELS": :string,
"BRIDGE_VMWARE": :string,
"BRIDGE_KVM": :string,
"BRIDGE_HYPERV": :string
"BRIDGE_HYPERV": :string,
"CHECK_MAC": :bool
}.freeze

def self.validate(key, value)
Expand Down

0 comments on commit 1d6d028

Please sign in to comment.