Revision 6bf572d7 src/sunstone/models/OpenNebulaJSON/VirtualMachineJSON.rb

View differences:

src/sunstone/models/OpenNebulaJSON/VirtualMachineJSON.rb
64 64
                 when "chmod"        then self.chmod_octet(action_hash['params'])
65 65
                 when "attachdisk"   then self.attachdisk(action_hash['params'])
66 66
                 when "detachdisk"   then self.detachdisk(action_hash['params'])
67
                 when "attachnic"    then self.attachnic(action_hash['params'])
68
                 when "detachnic"    then self.detachnic(action_hash['params'])
67 69
                 when "update"       then self.update(action_hash['params'])
68 70
                 when "rename"       then self.rename(action_hash['params'])
69 71
                 else
......
111 113
            super(params['disk_id'].to_i)
112 114
        end
113 115

  
116
        def attachnic(params=Hash.new)
117
            template_json = params['nic_template']
118
            template = template_to_str(template_json)
119
            super(template)
120
        end
121

  
122
        def detachnic(params=Hash.new)
123
            super(params['nic_id'].to_i)
124
        end
125

  
114 126
        def update(params=Hash.new)
115 127
            super(params['template_raw'])
116 128
        end

Also available in: Unified diff