lib/vagrant-subutai/blueprint/variables_controller.rb in vagrant-subutai-7.0.3 vs lib/vagrant-subutai/blueprint/variables_controller.rb in vagrant-subutai-7.0.4
- old
+ new
@@ -206,11 +206,11 @@
if mode == Configs::Blueprint::MODE::PEER
containers.each do |container|
node = {}
node['hostname'] = container.hostname
node['quota'] = {'containerSize' => container.container_size}
- node['templateId'] = Rest::Gorjun.template_id(container.name, container.owner)
+ node['templateId'] = Rest::Bazaar.template_id(container.name, container.owner)
node['resourceHostId'] = rh_id
node['peerId'] = peer_id
nodes << node
end
@@ -220,11 +220,11 @@
elsif mode == Configs::Blueprint::MODE::BAZAAR
containers.each do |container|
node = {}
node['hostname'] = container.hostname
node['quota'] = {'containerSize' => container.container_size}
- node['templateId'] = Rest::Gorjun.template_id(container.name, container.owner)
+ node['templateId'] = Rest::Bazaar.template_id(container.name, container.owner)
node['resourceHostId'] = rh_id
node['templateName'] = container.name
node['peerId'] = peer_id
nodes << node
end
@@ -294,11 +294,11 @@
# @return Domain Model or nil
def domain
@json[KEYS[:containers]].each do |container|
if container.key?(KEYS[:port_mapping])
container[KEYS[:port_mapping]].each do |port_map|
- if port_map[KEYS[:protocol]] == 'HTTP' || port_map[KEYS[:protocol]] == 'http'
+ if port_map[KEYS[:protocol]].downcase == 'http' || port_map[KEYS[:protocol]].downcase == 'tcp'
domain = VagrantSubutai::Models::Domain.new
domain.protocol = port_map[KEYS[:protocol]]
domain.name = value(port_map[KEYS[:domain]])
domain.internal_port = port_map[KEYS[:internal_port]]
@@ -316,10 +316,10 @@
# Gets input variable
# @params variable json object
def get_input(variable_json)
if variable_json[KEYS[:type]] == 'enum'
- Put.info "\nEnter your container size (Ex: #{variable_json[KEYS[:default]]}): "
+ Put.info "\n#{variable_json[KEYS[:description]]} (Ex: #{variable_json[KEYS[:default]]}): "
validations = variable_json[KEYS[:validation]].split(',')
temp = nil
validations.each_with_index do |validation, index|
if Configs::Blueprint::CONTAINER_SIZES.include?(validation) && @available_ram >= Configs::Quota::RESOURCE[validation.strip.to_sym][:RAM] && @available_disk >= Configs::Quota::RESOURCE[validation.strip.to_sym][:DISK]
\ No newline at end of file