mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
change get_raw replacement regex from />/ to /=>/ for output XML
This commit is contained in:
parent
c7348b2b36
commit
c7dcc272c3
1 changed files with 13 additions and 13 deletions
|
@ -48,24 +48,24 @@ module Fog
|
|||
return "CPU=#{vcpu.to_f/10}\n" unless cpu
|
||||
return "CPU=#{vcpu}\n" if cpu.to_i > vcpu.to_i
|
||||
"CPU=#{cpu}\n"
|
||||
end
|
||||
end
|
||||
|
||||
def get_vcpu
|
||||
self.vcpu = 1 unless vcpu
|
||||
"VCPU=#{vcpu}\n"
|
||||
end
|
||||
end
|
||||
|
||||
def get_memory
|
||||
self.memory = 128 unless memory
|
||||
"MEMORY=#{memory}\n"
|
||||
end
|
||||
end
|
||||
|
||||
def get_raw
|
||||
return "" unless raw
|
||||
ret = "RAW=#{raw}\n"
|
||||
ret.gsub!(/\{/, '[')
|
||||
ret.gsub!(/\}/, ']')
|
||||
ret.gsub!(/>/,'')
|
||||
ret.gsub!(/=>/,'=')
|
||||
ret
|
||||
end
|
||||
|
||||
|
@ -82,7 +82,7 @@ module Fog
|
|||
ret.gsub!(/\{/, '[')
|
||||
ret.gsub!(/\}/, ']')
|
||||
ret.gsub!(/>/,'')
|
||||
ret
|
||||
ret
|
||||
end
|
||||
|
||||
def get_os
|
||||
|
@ -91,16 +91,16 @@ module Fog
|
|||
ret.gsub!(/\{/, '[')
|
||||
ret.gsub!(/\}/, ']')
|
||||
ret.gsub!(/>/,'')
|
||||
ret
|
||||
ret
|
||||
end
|
||||
|
||||
def get_graphics
|
||||
return "" unless graphics
|
||||
return "" unless graphics
|
||||
ret = "GRAPHICS=#{graphics}\n"
|
||||
ret.gsub!(/\{/, '[')
|
||||
ret.gsub!(/\}/, ']')
|
||||
ret.gsub!(/>/,'')
|
||||
ret
|
||||
ret
|
||||
end
|
||||
|
||||
def get_nic
|
||||
|
@ -115,26 +115,26 @@ module Fog
|
|||
#ret.gsub!(/\{/, '[')
|
||||
#ret.gsub!(/\}/, ']')
|
||||
#ret.gsub!(/>/,'')
|
||||
ret
|
||||
ret
|
||||
end
|
||||
|
||||
def get_sched_ds_requirements
|
||||
return "" unless sched_ds_requirements
|
||||
return "" unless sched_ds_requirements
|
||||
%Q|SCHED_DS_REQUIREMENTS="#{sched_ds_requirements.gsub(/"/){ %q(\") }}"\n|
|
||||
end
|
||||
|
||||
def get_sched_ds_rank
|
||||
return "" unless sched_ds_rank
|
||||
return "" unless sched_ds_rank
|
||||
%Q|SCHED_DS_RANK="#{sched_ds_rank.gsub(/"/){ %q(\") }}"\n|
|
||||
end
|
||||
|
||||
def get_sched_requirements
|
||||
return "" unless sched_requirements
|
||||
return "" unless sched_requirements
|
||||
%Q|SCHED_REQUIREMENTS="#{sched_requirements.gsub(/"/){ %q(\") }}"\n|
|
||||
end
|
||||
|
||||
def get_sched_rank
|
||||
return "" unless sched_rank
|
||||
return "" unless sched_rank
|
||||
%Q|SCHED_RANK="#{sched_rank.gsub(/"/){ %q(\") }}"\n|
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue