[pkg-eucalyptus-commits] [SCM] managing cloud instances for Eucalyptus branch, master, updated. 3.0.0-alpha3-257-g1da8e3a

Garrett Holmstrom gholms at fedoraproject.org
Sun Jun 16 02:30:16 UTC 2013


The following commit has been merged in the master branch:
commit 73136de62e27eefc43c34b7f6d2b15e2b003c12a
Author: Garrett Holmstrom <gholms at fedoraproject.org>
Date:   Mon Feb 18 23:56:48 2013 -0800

    Port UpdateSigningCertificate

diff --git a/bin/euare-usermodcert b/bin/euare-usermodcert
index 6d28f4d..551669c 100755
--- a/bin/euare-usermodcert
+++ b/bin/euare-usermodcert
@@ -1,7 +1,6 @@
-#!/usr/bin/python
+#!/usr/bin/python -tt
 
 import euca2ools.commands.euare.updatesigningcertificate
 
 if __name__ == '__main__':
-    r = euca2ools.commands.euare.updatesigningcertificate.UpdateSigningCertificate()
-    r.main_cli()
+    euca2ools.commands.euare.updatesigningcertificate.UpdateSigningCertificate.run()
diff --git a/euca2ools/commands/euare/updatesigningcertificate.py b/euca2ools/commands/euare/updatesigningcertificate.py
index 5e62b7d..49a1a32 100644
--- a/euca2ools/commands/euare/updatesigningcertificate.py
+++ b/euca2ools/commands/euare/updatesigningcertificate.py
@@ -1,6 +1,6 @@
 # Software License Agreement (BSD License)
 #
-# Copyright (c) 2009-2011, Eucalyptus Systems, Inc.
+# Copyright (c) 2009-2013, Eucalyptus Systems, Inc.
 # All rights reserved.
 #
 # Redistribution and use of this software in source and binary forms, with or
@@ -27,58 +27,19 @@
 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 # POSSIBILITY OF SUCH DAMAGE.
-#
-# Author: Neil Soman neil at eucalyptus.com
-#         Mitch Garnaat mgarnaat at eucalyptus.com
-
-from boto.roboto.awsqueryrequest import AWSQueryRequest
-from boto.roboto.param import Param
-import euca2ools.commands.euare
-import euca2ools.utils
-
-
-class UpdateSigningCertificate(AWSQueryRequest):
-
-    ServiceClass = euca2ools.commands.euare.Euare
 
-    Description = """UpdateSigningCertificate"""
-    Params = [Param(
-        name='UserName',
-        short_name='u',
-        long_name='user-name',
-        ptype='string',
-        optional=True,
-        doc=""" Name of the User the signing certificate belongs to. """ ,
-        ), Param(
-        name='CertificateId',
-        short_name='c',
-        long_name='certificate-id',
-        ptype='string',
-        optional=False,
-        doc=""" The ID of the signing certificate you want to update. """ ,
-        ), Param(
-        name='Status',
-        short_name='s',
-        long_name='status',
-        ptype='enum',
-        choices=['Active', 'Inactive'],
-        optional=False,
-        doc=""" The status you want to assign to the certificate. Active means the certificate can be used for API calls to AWS, while Inactive means the certificate cannot be used. """ ,
-        ), Param(
-        name='DelegateAccount',
-        short_name=None,
-        long_name='delegate',
-        ptype='string',
-        optional=True,
-        doc=""" [Eucalyptus extension] Process this command as if the administrator of the specified account had run it. This option is only usable by cloud administrators. """,
-        )]
+from requestbuilder import Arg
+from . import EuareRequest, DELEGATE
 
-    def cli_formatter(self, data):
-        pass
-    
-    def main(self, **args):
-        return self.send(**args)
 
-    def main_cli(self):
-        euca2ools.utils.print_version_if_necessary()
-        self.do_cli()
+class UpdateSigningCertificate(EuareRequest):
+    DESCRIPTION = ('Change the status of a signing certificate from Active to '
+                   'Inactive, or vice versa')
+    ARGS = [Arg('-u', '--user-name', dest='UserName', metavar='USER',
+                help='''user owning the signing certificate to update (default:
+                        current user)'''),
+            Arg('-c', '--certificate-id', dest='CertificateId', metavar='CERT',
+                required=True, help='ID of the signing certificate to update'),
+            Arg('-s', '--status', dest='Status', choices=('Active', 'Inactive'),
+                required=True, help='status to assign to the certificate'),
+            DELEGATE]

-- 
managing cloud instances for Eucalyptus



More information about the pkg-eucalyptus-commits mailing list