[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:09 UTC 2013


The following commit has been merged in the master branch:
commit 2e6fb879dc9689c2286a089513969046e7c64bfa
Author: Garrett Holmstrom <gholms at fedoraproject.org>
Date:   Mon Feb 18 17:51:24 2013 -0800

    Port DeleteAccountAlias

diff --git a/bin/euare-accountaliasdelete b/bin/euare-accountaliasdelete
index 43efbf9..00bcb94 100755
--- a/bin/euare-accountaliasdelete
+++ b/bin/euare-accountaliasdelete
@@ -1,7 +1,6 @@
-#!/usr/bin/python
+#!/usr/bin/python -tt
 
 import euca2ools.commands.euare.deleteaccountalias
 
 if __name__ == '__main__':
-    r = euca2ools.commands.euare.deleteaccountalias.DeleteAccountAlias()
-    r.main_cli()
+    euca2ools.commands.euare.deleteaccountalias.DeleteAccountAlias.run()
diff --git a/euca2ools/commands/euare/deleteaccountalias.py b/euca2ools/commands/euare/deleteaccountalias.py
index 89b4da0..fd62cc7 100644
--- a/euca2ools/commands/euare/deleteaccountalias.py
+++ b/euca2ools/commands/euare/deleteaccountalias.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,43 +27,13 @@
 # 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: 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 DeleteAccountAlias(AWSQueryRequest):
-
-    ServiceClass = euca2ools.commands.euare.Euare
-
-    Name = 'DeleteAccountAlias'
-    Description = 'Delete an alias for your account'
-    Params = [
-        Param(name='AccountAlias',
-              short_name='a',
-              long_name='account-alias',
-              ptype='string',
-              optional=False,
-              doc="""The alias to be deleted."""),
-        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. """)
-        ]
-
 
-    def cli_formatter(self, data):
-        pass
+from requestbuilder import Arg
+from . import EuareRequest, DELEGATE
 
-    def main(self, **args):
-        return self.send(**args)
 
-    def main_cli(self):
-        euca2ools.utils.print_version_if_necessary()
-        self.do_cli()
+class DeleteAccountAlias(EuareRequest):
+    DESCRIPTION = "Delete an account's alias, a.k.a. its account name"
+    ARGS = [Arg('-a', '--account-alias', dest='AccountAlias', metavar='ALIAS',
+                required=True, help='name of the alias to delete (required)'),
+            DELEGATE]

-- 
managing cloud instances for Eucalyptus



More information about the pkg-eucalyptus-commits mailing list