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


The following commit has been merged in the master branch:
commit 288c5887cb57752550c10b44a5ce7a81e9d7d0de
Author: Garrett Holmstrom <gholms at fedoraproject.org>
Date:   Mon Feb 18 21:07:41 2013 -0800

    Port GetLdapSyncStatus

diff --git a/bin/euare-getldapsyncstatus b/bin/euare-getldapsyncstatus
index fca64b6..17aed0a 100755
--- a/bin/euare-getldapsyncstatus
+++ b/bin/euare-getldapsyncstatus
@@ -1,7 +1,6 @@
-#!/usr/bin/python
+#!/usr/bin/python -tt
 
 import euca2ools.commands.euare.getldapsyncstatus
 
 if __name__ == '__main__':
-    r = euca2ools.commands.euare.getldapsyncstatus.GetLdapSyncStatus()
-    r.main_cli()
+    euca2ools.commands.euare.getldapsyncstatus.GetLdapSyncStatus.run()
diff --git a/euca2ools/commands/euare/getldapsyncstatus.py b/euca2ools/commands/euare/getldapsyncstatus.py
index 708d542..7f44ed5 100644
--- a/euca2ools/commands/euare/getldapsyncstatus.py
+++ b/euca2ools/commands/euare/getldapsyncstatus.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,29 +27,14 @@
 # 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 GetLdapSyncStatus(AWSQueryRequest):
-
-    ServiceClass = euca2ools.commands.euare.Euare
-
-    Description = """GetLdapSyncStatus"""
-    Params = []
 
-    def cli_formatter(self, data):
-        print "SyncEnabled\t", data.SyncEnabled
-        print "InSync\t", data.InSync
+from requestbuilder.mixins import TabifyingCommand
+from . import EuareRequest
 
-    def main(self, **args):
-        return self.send(**args)
+class GetLdapSyncStatus(EuareRequest, TabifyingCommand):
+    DESCRIPTION = ("[Eucalyptus only] Describe the server's current LDAP "
+                   "synchronization status. This command is only usable by "
+                   "cloud administrators.")
 
-    def main_cli(self):
-        euca2ools.utils.print_version_if_necessary()
-        self.do_cli()
+    def print_result(self, result):
+        print self.tabify(('SyncEnabled', result.get('SyncEnabled')))

-- 
managing cloud instances for Eucalyptus



More information about the pkg-eucalyptus-commits mailing list