@@ -10,6 +10,7 @@ class Image(PoolElement):
1010 'update' : 'image.update' ,
1111 'enable' : 'image.enable' ,
1212 'publish' : 'image.publish' ,
13+ 'chmod' : 'image.chmod' ,
1314 'chown' : 'image.chown' ,
1415 'persistent' : 'image.persistent' ,
1516 'clone' : 'image.clone' ,
@@ -152,6 +153,34 @@ def chown(self, uid, gid):
152153 """
153154 self .client .call (self .METHODS ['chown' ], self .id , uid , gid )
154155
156+ def chmod (self , owner_u , owner_m , owner_a , group_u , group_m , group_a , other_u , other_m , other_a ):
157+ """
158+ Changes the permission bits
159+
160+ Arguments
161+
162+ ``owner_u``
163+ User USE bit. Set to -1 to leave current value
164+ ``owner_m``
165+ User MANAGE bit. Set to -1 to leave current value
166+ ``owner_a``
167+ User ADMIN bit. Set to -1 to leave current value
168+ ``group_u``
169+ Group USE bit. Set to -1 to leave current value
170+ ``group_m``
171+ Group MANAGE bit. Set to -1 to leave current value
172+ ``group_a``
173+ Group ADMIN bit. Set to -1 to leave current value
174+ ``other_u``
175+ Other USE bit. Set to -1 to leave current value
176+ ``other_m``
177+ Other MANAGE bit. Set to -1 to leave current value
178+ ``other_a``
179+ Other ADMIN bit. Set to -1 to leave current value
180+ """
181+ self .client .call (self .METHODS ['chmod' ], self .id , owner_u , owner_m , owner_a , group_u , group_m , group_a , other_u ,
182+ other_m , other_a )
183+
155184 def clone (self , name = '' , datastore_id = - 1 ):
156185 """
157186 Creates a clone of an image
0 commit comments