Revision 4b298efd

View differences:

src/oca/ruby/OpenNebula/Cluster.rb
42 42
        # ---------------------------------------------------------------------
43 43
        # XML-RPC Methods for the User Object
44 44
        # ---------------------------------------------------------------------
45
        
46
        # Retrieves the information of the given Cluster.
45 47
        def info()
46 48
            super(CLUSTER_METHODS[:info], 'CLUSTER')
47 49
        end
48 50

  
51
        # Allocates a new Cluster in OpenNebula
52
        #
53
        # +clustername+ A string containing the name of the Cluster.
49 54
        def allocate(clustername)
50 55
            super(CLUSTER_METHODS[:allocate], clustername)
51 56
        end
52 57

  
58
        # Deletes the Cluster
53 59
        def delete()
54 60
            super(CLUSTER_METHODS[:delete])
55 61
        end
56 62

  
63
        # Add a host to the cluster
64
        #
65
        # +host_id+ ID of the Host to be added to the Cluster
57 66
        def add_host(host_id)
58 67
            return Error.new('ID not defined') if !@pe_id
59 68

  
......
63 72
            return rc
64 73
        end
65 74

  
75
        # Remove a host from the cluster
76
        #
77
        # +host_id+ ID of the Host to be removed from the Cluster
66 78
        def remove_host(host_id)
67 79
            return Error.new('ID not defined') if !@pe_id
68 80

  
src/oca/ruby/OpenNebula/ClusterPool.rb
27 27
        # ---------------------------------------------------------------------
28 28
        # XML-RPC Methods for the User Object
29 29
        # ---------------------------------------------------------------------
30

  
30
        
31
        # Retrieves all the Clusters in the pool.
31 32
        def info()
32 33
            super(CLUSTER_POOL_METHODS[:info])
33 34
        end
src/oca/ruby/OpenNebula/Host.rb
52 52
        #######################################################################
53 53
        # XML-RPC Methods for the Host
54 54
        #######################################################################
55
        
56
        # Retrieves the information of the given Host.
55 57
        def info()
56 58
            super(HOST_METHODS[:info], 'HOST')
57 59
        end
58 60

  
61
        # Allocates a new Host in OpenNebula
62
        #
63
        # +hostname+ A string containing the name of the new Host.
64
        #
65
        # +im+ A string containing the name of the im_driver
66
        #
67
        # +vmm+ A string containing the name of the vmm_driver
68
        #
69
        # +tm+ A string containing the name of the tm_driver
59 70
        def allocate(hostname,im,vmm,tm)
60 71
            super(HOST_METHODS[:allocate],hostname,im,vmm,tm)
61 72
        end
62 73

  
74
        # Deletes the Host
63 75
        def delete()
64 76
            super(HOST_METHODS[:delete])
65 77
        end
66 78

  
79
        # Enables the Host
67 80
        def enable()
68 81
            set_enabled(true)
69 82
        end
70 83

  
84
        # Disables the Host
71 85
        def disable()
72 86
            set_enabled(false)
73 87
        end
src/oca/ruby/OpenNebula/HostPool.rb
28 28
        # XML-RPC Methods for the Host Pool 
29 29
        #######################################################################
30 30

  
31
        # Retrieves all the Hosts in the pool.
31 32
        def info()
32 33
            super(HOST_POOL_METHODS[:info])
33 34
        end
src/oca/ruby/OpenNebula/Image.rb
62 62
        # XML-RPC Methods for the Image Object
63 63
        #######################################################################
64 64

  
65
        # Retrieves the information of the given Image.
65 66
        def info()
66 67
            super(IMAGE_METHODS[:info], 'IMAGE')
67 68
        end
68 69

  
70
        # Allocates a new Image in OpenNebula
71
        #
72
        # +description+ A string containing the template of the Image.
69 73
        def allocate(description)
70 74
            super(IMAGE_METHODS[:allocate],description)
71 75
        end
72 76

  
77
        # Modifies an image attribute
78
        #
79
        # +name+ Name of the attribute to be changed
80
        #
81
        # +value+ New value for the attribute
73 82
        def update(name, value)
74 83
            super(IMAGE_METHODS[:update], name, value)
75 84
        end
76 85

  
86
        # Deletes an Image attribute
87
        #
88
        # +name+ Name of the attribute to be deleted
77 89
        def remove_attr(name)
78 90
            do_rm_attr(name)
79 91
        end
80 92

  
93
        # Enables an Image
81 94
        def enable
82 95
            set_enabled(true)
83 96
        end
84 97

  
98
        # Disables an Image
85 99
        def disable
86 100
            set_enabled(false)
87 101
        end
88 102

  
103
        # Publishes the Image, to be used by other users
89 104
        def publish
90 105
            set_publish(true)
91 106
        end
92 107

  
108
        # Unplubishes the Image
93 109
        def unpublish
94 110
            set_publish(false)
95 111
        end
96 112

  
113
        # Deletes the Image
97 114
        def delete()
98 115
            super(IMAGE_METHODS[:delete])
99 116
        end
src/oca/ruby/OpenNebula/ImagePool.rb
31 31
        # XML-RPC Methods for the Image Object
32 32
        #######################################################################
33 33

  
34
        # Retrieves all or part of the Images in the pool.
34 35
        def info()
35 36
            super(IMAGE_POOL_METHODS[:info],@user_id)
36 37
        end
src/oca/ruby/OpenNebula/User.rb
41 41
        # ---------------------------------------------------------------------
42 42
        # XML-RPC Methods for the User Object
43 43
        # ---------------------------------------------------------------------
44
        
45
        # Retrieves the information of the given User.
44 46
        def info()
45 47
            super(USER_METHODS[:info], 'USER')
46 48
        end
47 49

  
50
        # Allocates a new User in OpenNebula
51
        #
52
        # +username+ Name of the new user.
53
        #
54
        # +password+ Password for the new user
48 55
        def allocate(username, password)
49 56
            super(USER_METHODS[:allocate], username, password)
50 57
        end
51 58

  
59
        # Deletes the User
52 60
        def delete()
53 61
            super(USER_METHODS[:delete])
54 62
        end
55 63

  
64
        # Changes the password of the given User
65
        #
66
        # +password+ String containing the new password
56 67
        def passwd(password)
57 68
            return Error.new('ID not defined') if !@pe_id
58 69

  
src/oca/ruby/OpenNebula/UserPool.rb
28 28
        # XML-RPC Methods for the User Object
29 29
        # ---------------------------------------------------------------------
30 30

  
31
        # Retrieves all the Users in the pool.
31 32
        def info()
32 33
            super(USER_POOL_METHODS[:info])
33 34
        end
src/oca/ruby/OpenNebula/VirtualMachine.rb
98 98
        # XML-RPC Methods for the Virtual Machine Object
99 99
        #######################################################################
100 100

  
101
        # Retrieves the information of the given VirtualMachine.
101 102
        def info()
102 103
            super(VM_METHODS[:info], 'VM')
103 104
        end
104

  
105
        
106
        # Allocates a new VirtualMachine in OpenNebula
107
        #
108
        # +description+ A string containing the template of the VirtualMachine.
105 109
        def allocate(description)
106 110
            super(VM_METHODS[:allocate],description)
107 111
        end
108

  
112
        
113
        # Initiates the instance of the VM on the target host.
114
        #
115
        # +host_id+ The host id (hid) of the target host where
116
        # the VM will be instantiated.
109 117
        def deploy(host_id)
110 118
            return Error.new('ID not defined') if !@pe_id
111 119

  
......
115 123
            return rc
116 124
        end
117 125

  
126
        # Shutdowns an already deployed VM
118 127
        def shutdown
119 128
            action('shutdown')
120 129
        end
121 130

  
131
        # Cancels a running VM
122 132
        def cancel
123 133
            action('cancel')
124 134
        end
125 135

  
136
        # Sets a VM to hold state, scheduler will not deploy it
126 137
        def hold
127 138
            action('hold')
128 139
        end
129 140

  
141
        # Releases a VM from hold state
130 142
        def release
131 143
            action('release')
132 144
        end
133 145

  
146
        # Stops a running VM
134 147
        def stop
135 148
            action('stop')
136 149
        end
137 150

  
151
        # Saves a running VM
138 152
        def suspend
139 153
            action('suspend')
140 154
        end
141 155

  
156
        # Resumes the execution of a saved VM
142 157
        def resume
143 158
            action('resume')
144 159
        end
145 160

  
161
        # Deletes a VM from the pool and DB
146 162
        def finalize
147 163
            action('finalize')
148 164
        end
149 165

  
166
        # Resubmits the VM after failure
150 167
        def restart
151 168
            action('restart')
152 169
        end
153 170

  
171
        # Saves a running VM and starts it again in the specified host
154 172
        def migrate(host_id)
155 173
            return Error.new('ID not defined') if !@pe_id
156 174

  
......
160 178
            return rc
161 179
        end
162 180

  
181
        # Migrates a running VM to another host without downtime
163 182
        def live_migrate(host_id)
164 183
            return Error.new('ID not defined') if !@pe_id
165 184

  
......
169 188
            return rc
170 189
        end
171 190
        
191
        # Set the specified vm's disk to be saved in a new image 
192
        # when the VirtualMachine shutdowns
193
        #
194
        # +disk_id+ ID of the disk to be saved
195
        #
196
        # +image_id+ ID of the new image where the disk will be saved
172 197
        def save_as(disk_id, image_id)
173 198
            return Error.new('ID not defined') if !@pe_id
174 199

  
src/oca/ruby/OpenNebula/VirtualMachinePool.rb
30 30
        #######################################################################
31 31
        # XML-RPC Methods for the Virtual Network Object
32 32
        #######################################################################
33

  
33
        
34
        # Retrieves all or part of the VirtualMachines in the pool.
34 35
        def info()
35 36
            super(VM_POOL_METHODS[:info],@user_id)
36 37
        end
src/oca/ruby/OpenNebula/VirtualNetwork.rb
40 40
        # XML-RPC Methods for the Virtual Network Object
41 41
        #######################################################################
42 42

  
43
        # Retrieves the information of the given VirtualNetwork.
43 44
        def info()
44 45
            super(VN_METHODS[:info], 'VNET')
45 46
        end
46 47

  
48
        # Allocates a new VirtualNetwork in OpenNebula
49
        #
50
        # +description+ A string containing the template of the VirtualNetwork.
47 51
        def allocate(description)
48 52
            super(VN_METHODS[:allocate],description)
49 53
        end
50

  
54
        
55
        # Publishes the VirtualNetwork, to be used by other users
51 56
        def publish
52 57
            set_publish(true)
53 58
        end
54 59

  
60
        # Unplubishes the VirtualNetwork
55 61
        def unpublish
56 62
            set_publish(false)
57 63
        end
58 64

  
65
        # Deletes the VirtualNetwork
59 66
        def delete()
60 67
            super(VN_METHODS[:delete])
61 68
        end
src/oca/ruby/OpenNebula/VirtualNetworkPool.rb
31 31
        # XML-RPC Methods for the Virtual Network Object
32 32
        #######################################################################
33 33

  
34
        # Retrieves all or part of the VirtualNetwork in the pool.
34 35
        def info()
35 36
            super(VN_POOL_METHODS[:info],@user_id)
36 37
        end

Also available in: Unified diff