[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:14 UTC 2013
The following commit has been merged in the master branch:
commit 607c82244be02723745489edd829c246e7702700
Author: Garrett Holmstrom <gholms at fedoraproject.org>
Date: Mon Feb 18 23:21:21 2013 -0800
Port ResyncMFADevice
diff --git a/bin/euare-userresyncmfadevice b/bin/euare-userresyncmfadevice
index 587c686..b0d3139 100755
--- a/bin/euare-userresyncmfadevice
+++ b/bin/euare-userresyncmfadevice
@@ -1,7 +1,6 @@
-#!/usr/bin/python
+#!/usr/bin/python -tt
import euca2ools.commands.euare.resyncmfadevice
if __name__ == '__main__':
- r = euca2ools.commands.euare.resyncmfadevice.ResyncMFADevice()
- r.main_cli()
+ euca2ools.commands.euare.resyncmfadevice.ResyncMFADevice.run()
diff --git a/euca2ools/commands/euare/resyncmfadevice.py b/euca2ools/commands/euare/resyncmfadevice.py
index dccb313..2fb63ae 100644
--- a/euca2ools/commands/euare/resyncmfadevice.py
+++ b/euca2ools/commands/euare/resyncmfadevice.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,60 +27,23 @@
# 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 ResyncMFADevice(AWSQueryRequest):
-
- ServiceClass = euca2ools.commands.euare.Euare
- Description = """ResyncMFADevice"""
- Params = [Param(
- name='UserName',
- short_name='u',
- long_name='user-name',
- ptype='string',
- optional=False,
- doc=""" Name of the User whose MFA device you want to resynchronize. """
- ,
- ), Param(
- name='SerialNumber',
- short_name='s',
- long_name='serial-number',
- ptype='string',
- optional=False,
- doc=""" Serial number that uniquely identifies the MFA device. """
- ,
- ), Param(
- name='AuthenticationCode1',
- short_name='a',
- long_name='authentication-code1',
- ptype='string',
- optional=False,
- doc=""" An authentication code emitted by the device. """,
- ), Param(
- name='AuthenticationCode2',
- short_name=None,
- long_name='authentication-code2',
- ptype='string',
- optional=False,
- doc=""" A subsequent authentication code emitted by the device. """
- ,
- )]
+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 ResyncMFADevice(EuareRequest):
+ DESCRIPTION = 'Re-synchronize an MFA device with the server'
+ ARGS = [Arg('-u', '--user-name', dest='UserName', metavar='USER',
+ required=True,
+ help='user to re-synchronize the MFA device for (required)'),
+ Arg('-s', '--serial-number', dest='SerialNumber', metavar='SERIAL',
+ required=True,
+ help='serial number of the MFA device (required)'),
+ Arg('-c1', dest='AuthenticationCode1', metavar='CODE',
+ required=True, help='''an authentication code emitted by the
+ MFA device (required)'''),
+ Arg('-c2', dest='AuthenticationCode2', metavar='CODE',
+ required=True, help='''a subsequent authentication code emitted
+ by the MFA device (required)'''),
+ DELEGATE]
--
managing cloud instances for Eucalyptus
More information about the pkg-eucalyptus-commits
mailing list