+@command(api='glance')
+class glance_members(object):
+ """get image members"""
+
+ def main(self, image_id):
+ members = self.client.list_members(image_id)
+ for member in members:
+ print member['member_id']
+
+
+@command(api='glance')
+class glance_shared(object):
+ """list shared images"""
+
+ def main(self, member):
+ images = self.client.list_shared(member)
+ for image in images:
+ print image['image_id']
+
+
+@command(api='glance')
+class glance_addmember(object):
+ """add a member to an image"""
+
+ def main(self, image_id, member):
+ self.client.add_member(image_id, member)
+
+
+@command(api='glance')
+class glance_delmember(object):
+ """remove a member from an image"""
+
+ def main(self, image_id, member):
+ self.client.remove_member(image_id, member)
+
+
+@command(api='glance')
+class glance_setmembers(object):
+ """set the members of an image"""
+
+ def main(self, image_id, *member):
+ self.client.set_members(image_id, member)
+
+