Revision 8cd7d0df src/cli/one_helper/onehost_helper.rb

View differences:

src/cli/one_helper/onehost_helper.rb
20 20

  
21 21
class OneHostHelper < OpenNebulaHelper::OneHelper
22 22
    TEMPLATE_XPATH  = '//HOST/TEMPLATE'
23
    HYBRID = {
24
        :ec2 => {
25
            :help => <<-EOT.unindent,
26
                #-----------------------------------------------------------------------
27
                # Supported EC2 AUTH ATTRIBUTTES:
28
                #
29
                #  REGION_NAME = <the name of the ec2 region>
30
                #
31
                #  EC2_ACCESS = <Your ec2 access key id>
32
                #  EC2_SECRET = <Your ec2 secret key>
33
                #
34
                #  CAPACITY = [
35
                #    M1SMALL  = <number of machines m1.small>,
36
                #    M1XLARGE = <number of machines m1.xlarge>,
37
                #    M1LARGE  = <number of machines m1.large>
38
                #  ]
39
                #
40
                # You can set any machine type supported by ec2
41
                # See your ec2_driver.conf for more information
42
                #
43
                #-----------------------------------------------------------------------
44
                EOT
45
        }
46
    }
47

  
48

  
23 49
    VERSION_XPATH   = "#{TEMPLATE_XPATH}/VERSION"
24 50

  
25 51
    def self.rname
......
164 190
        table
165 191
    end
166 192

  
193
    def set_hybrid(type, path)
194
        k = type.to_sym
195
        if HYBRID.key?(k)
196
            str = path.nil? ?  OpenNebulaHelper.editor_input(HYBRID[k][:help]): File.read(path)
197
        end
198
    end
167 199

  
168 200
    NUM_THREADS = 15
169 201
    def sync(host_ids, options)

Also available in: Unified diff