Revision ca6e2c63 kamaki/cli.py

b/kamaki/cli.py
749 749
                self.client.set_object_meta(object, {metakey:metavalue})
750 750

  
751 751
@command(api='storage')
752
class store_set_account_meta(_store_account_command):
753
    """Set (replace) account meta-content"""
754

  
755
    def main(self, metakey, metaval, *moreargs):
756
        super(store_set_account_meta, self).main()
757
        if len(moreargs)%2 == 1:
758
            print('Parameter %s will be ignored' % moreargs[-1])
759
        pairs = dict_from_args(*moreargs)
760
        pairs[metakey] = metaval
761
        self.client.set_account_meta(pairs)
762

  
763
@command(api='storage')
764
class store_set_container_meta(_store_account_command):
765
    """Set (replace) container meta-content"""
766

  
767
    def main(self, container, metakey, metaval, *moreargs):
768
        super(store_set_container_meta, self).main()
769
        self.client.container = container
770
        if len(moreargs)%2 == 1:
771
            print('Parameter %s will be ignored' % moreargs[-1])
772
        pairs = dict_from_args(*moreargs)
773
        pairs[metakey] = metaval
774
        print(unicode(pairs))
775

  
776
@command(api='storage')
777 752
class store_policy(_store_account_command):
778 753
    """Get  policy for account [, container [or object]]"""
779 754

  

Also available in: Unified diff