1515
1616
1717class Image (resource .Resource ):
18+ resources_key = 'images'
1819 resource_key = 'image'
19- base_path = '/cloudimages/action '
20+ base_path = '/cloudimages'
2021
2122 allow_create = True
23+ allow_list = True
24+
2225 #: Method for creating a resource (POST, PUT)
2326 create_method = "POST"
2427
28+ _query_mapping = resource .QueryParameters ('limit' , 'id' ,
29+ 'name' , 'status' ,
30+ '__isregistered' ,
31+ '__imagetype' ,
32+ '__whole_image' ,
33+ '__system__cmkid' ,
34+ 'protected' ,
35+ 'visibility' ,
36+ 'owner' ,
37+ 'container_format' ,
38+ 'disk_format' ,
39+ 'min_disk' ,
40+ 'min_ram' ,
41+ '__os_bit' ,
42+ '__platform' ,
43+ 'marker' ,
44+ 'sort_key' ,
45+ 'sort_dir' ,
46+ '__os_type' ,
47+ 'tag' ,
48+ 'member_status' ,
49+ '__support_kvm' ,
50+ '__support_xen' ,
51+ '__support_largememory' ,
52+ '__support_diskintensive' ,
53+ '__support_highperformance' ,
54+ '__support_xen_gpu_type' ,
55+ '__support_kvm_gpu_type' ,
56+ '__support_xen_hana' ,
57+ '__support_kvm_infiniband' ,
58+ 'virtual_env_type' ,
59+ 'enterprise_project_id' )
60+
2561 name = resource .Body ('name' )
2662 description = resource .Body ('description' )
2763 os_type = resource .Body ('os_type' )
@@ -39,7 +75,18 @@ class Image(resource.Resource):
3975 image_tags = resource .Body ('image_tags' , type = list )
4076 data_images = resource .Body ('data_images' , type = list )
4177 job_id = resource .Body ('job_id' )
78+ status = resource .Body ('status' )
79+ visibility = resource .Body ('visibility' )
80+ created_at = resource .Body ('created_at' )
81+ updated_at = resource .Body ('updated_at' )
82+ container_format = resource .Body ('container_format' )
83+ disk_format = resource .Body ('disk_format' )
84+ member_status = resource .Body ('member_status' )
85+ virtual_env_type = resource .Body ('virtual_env_type' )
86+ enterprise_project_id = resource .Body ('enterprise_project_id' )
87+ protected = resource .Body ('protected' , type = bool )
4288
4389 def create (self , session , prepend_key = False , base_path = None ):
4490 # Overriden here to override prepend_key default value
45- return super (Image , self ).create (session , prepend_key , base_path )
91+ return super (Image , self ).create (session , prepend_key , base_path
92+ + '/action' )
0 commit comments