[Python-modules-commits] [python-shade] 01/03: Import python-shade_0.6.1.orig.tar.gz

Clint Byrum spamaps at moszumanska.debian.org
Mon Nov 9 22:29:48 UTC 2015


This is an automated email from the git hooks/post-receive script.

spamaps pushed a commit to branch master
in repository python-shade.

commit 1e9a7916d40badd1cfa3f4ae1b132d5af37b416d
Author: Clint Byrum <clint at fewbar.com>
Date:   Mon Nov 9 14:29:05 2015 -0800

    Import python-shade_0.6.1.orig.tar.gz
---
 .coveragerc                                    |    7 +
 .mailmap                                       |    3 +
 .testr.conf                                    |    7 +
 AUTHORS                                        |   14 +
 CONTRIBUTING.rst                               |   44 +
 ChangeLog                                      |  207 ++
 HACKING.rst                                    |    4 +
 LICENSE                                        |  175 ++
 MANIFEST.in                                    |    6 +
 PKG-INFO                                       |   70 +
 README.rst                                     |   49 +
 doc/source/conf.py                             |   36 +
 doc/source/contributing.rst                    |    1 +
 doc/source/index.rst                           |   25 +
 doc/source/installation.rst                    |   12 +
 doc/source/usage.rst                           |   17 +
 requirements.txt                               |   17 +
 setup.cfg                                      |   33 +
 setup.py                                       |   21 +
 shade.egg-info/PKG-INFO                        |   70 +
 shade.egg-info/SOURCES.txt                     |   50 +
 shade.egg-info/dependency_links.txt            |    1 +
 shade.egg-info/not-zip-safe                    |    1 +
 shade.egg-info/pbr.json                        |    1 +
 shade.egg-info/requires.txt                    |   14 +
 shade.egg-info/top_level.txt                   |    1 +
 shade/__init__.py                              | 2753 ++++++++++++++++++++++++
 shade/_tasks.py                                |  308 +++
 shade/exc.py                                   |   36 +
 shade/meta.py                                  |  200 ++
 shade/task_manager.py                          |  103 +
 shade/tests/__init__.py                        |    0
 shade/tests/base.py                            |   53 +
 shade/tests/fakes.py                           |   59 +
 shade/tests/functional/__init__.py             |    0
 shade/tests/functional/hooks/post_test_hook.sh |   29 +
 shade/tests/functional/test_compute.py         |   70 +
 shade/tests/functional/test_image.py           |   49 +
 shade/tests/functional/util.py                 |   38 +
 shade/tests/unit/__init__.py                   |    0
 shade/tests/unit/base.py                       |   42 +
 shade/tests/unit/test_caching.py               |  342 +++
 shade/tests/unit/test_create_server.py         |  140 ++
 shade/tests/unit/test_delete_server.py         |   81 +
 shade/tests/unit/test_meta.py                  |  215 ++
 shade/tests/unit/test_operator_noauth.py       |   49 +
 shade/tests/unit/test_rebuild_server.py        |  105 +
 shade/tests/unit/test_shade.py                 |  800 +++++++
 shade/tests/unit/test_task_manager.py          |   42 +
 test-requirements.txt                          |   13 +
 tox.ini                                        |   38 +
 51 files changed, 6451 insertions(+)

diff --git a/.coveragerc b/.coveragerc
new file mode 100644
index 0000000..078cf72
--- /dev/null
+++ b/.coveragerc
@@ -0,0 +1,7 @@
+[run]
+branch = True
+source = shade
+omit = shade/tests/*
+
+[report]
+ignore-errors = True
diff --git a/.mailmap b/.mailmap
new file mode 100644
index 0000000..cc92f17
--- /dev/null
+++ b/.mailmap
@@ -0,0 +1,3 @@
+# Format is:
+# <preferred e-mail> <other e-mail 1>
+# <preferred e-mail> <other e-mail 2>
\ No newline at end of file
diff --git a/.testr.conf b/.testr.conf
new file mode 100644
index 0000000..3ce7ec2
--- /dev/null
+++ b/.testr.conf
@@ -0,0 +1,7 @@
+[DEFAULT]
+test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
+             OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
+             OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
+             ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./shade/tests/unit} $LISTOPT $IDOPTION
+test_id_option=--load-list $IDFILE
+test_list_option=--list
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..6d01fc9
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,14 @@
+Adam Gandelman <adamg at ubuntu.com>
+Clint Byrum <clint at fewbar.com>
+David Shrewsbury <shrewsbury.dave at gmail.com>
+Davide Guerri <davide.guerri at gmail.com>
+Devananda van der Veen <devananda.vdv at gmail.com>
+Ghe Rivero <ghe.rivero at hp.com>
+Gregory Haynes <greg at greghaynes.net>
+James E. Blair <jeblair at hp.com>
+Joshua Harlow <harlowja at yahoo-inc.com>
+Julia Kreger <juliaashleykreger at gmail.com>
+Monty Taylor <mordred at inaugust.com>
+Ricardo Carrillo Cruz <ricardo.carrillo.cruz at gmail.com>
+Timothy Chavez <timothy.chavez at hp.com>
+Yolanda Robla <yolanda.robla-mota at hp.com>
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
new file mode 100644
index 0000000..798b5b5
--- /dev/null
+++ b/CONTRIBUTING.rst
@@ -0,0 +1,44 @@
+.. _contributing:
+
+=====================
+Contributing to shade
+=====================
+
+If you're interested in contributing to the shade project,
+the following will help get you started.
+
+Contributor License Agreement
+-----------------------------
+
+.. index::
+   single: license; agreement
+
+In order to contribute to the shade project, you need to have
+signed OpenStack's contributor's agreement.
+
+.. seealso::
+
+   * http://wiki.openstack.org/HowToContribute
+   * http://wiki.openstack.org/CLA
+
+Project Hosting Details
+-------------------------
+
+Project Documentation
+    http://docs.openstack.org/infra/shade/
+
+Bug tracker
+    http://storyboard.openstack.org
+
+Mailing list (prefix subjects with ``[shade]`` for faster responses)
+    http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-infra
+
+Code Hosting
+    https://git.openstack.org/cgit/openstack-infra/shade
+
+Code Review
+    https://review.openstack.org/#/q/status:open+project:openstack-infra/shade,n,z
+
+    Please read `GerritWorkflow`_ before sending your first patch for review.
+
+.. _GerritWorkflow: https://wiki.openstack.org/wiki/GerritWorkflow
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..1ea0fb1
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,207 @@
+CHANGES
+=======
+
+0.6.1
+-----
+
+* Stop leaking server objects
+* Use fakes instead of mocks for data objects
+* Update images API for get/list/search interface
+* Rewrite extension checking methods
+* Update server API for get/list/search interface
+* Fix delete_server when wait=True
+* Return Bunch objects instead of plain dicts
+
+0.6.0
+-----
+
+* Switch tasks vs put on a boolean config flag
+* Enhance the OperatorCloud constructor
+* Convert node_set_provision_state to task
+* Update recent Ironic exceptions
+* Enhance error message in update_machine
+* Rename get_endpoint() to get_session_endpoint()
+* Make warlock filtering match dict filtering
+* Fix exception re-raise during task execution for py34
+* Add more tests for server metadata processing
+* Add thread sync points to Task
+* Add early service fail and active check method
+* Add a method for getting an endpoint
+* Raise a shade exception on broken volumes
+* Split exceptions into their own file
+* Add minor OperatorCloud documentation
+* Allow for int or string ID comparisons
+* Change ironic maintenance method to align with power method
+* Add Ironic machine power state pass-through
+* Update secgroup API for new get/list/search API
+* Fix functional tests to run against live clouds
+* Add functional tests for create_image
+* Do not cache unsteady state images
+* Add tests and invalidation for glance v2 upload
+* Allow complex filtering with embedded dicts
+* Call super in OpenStackCloudException
+* Add Ironic maintenance state pass-through
+* Add update_machine method
+* Replace e.message with str(e)
+* Update flavor API for new get/list/search API
+* Add a docstring to the Task class
+* Remove REST links from inventory metadata
+* Have get_image_name return an image_name
+* Fix get_hostvars_from_server for volume API update
+* Add test for create_image with glance v1
+* Explicitly request cloud name in test_caching
+* Add test for caching in list_images
+* Test flavor cache and add invalidation
+* Fix major update_user issues
+* create_user should return the user created
+* Test that deleting user invalidates user cache
+* Use new getters in update_subnet and update_router
+* Update volume API for new getters and dict retval
+* Search methods for networks, subnets and routers
+* Update unregister_machine to use tasks
+* Invalidate user cache on user create
+* Update register_machine to use tasks
+* Add test of OperatorCloud auth_type=None
+* Allow name or ID for update_router()
+* Allow name or ID for update_subnet()
+* Add test for user_cache
+* MonkeyPatch time.sleep in unit tests to avoid wait
+* Add patch_machine method and operator unit test substrate
+* Wrap ironicclient methods that leak objects
+* Basic test for meta method obj_list_to_dict
+* Change Ironic node lookups to support names
+* Add meta method obj_list_to_dict
+* Add test for invalidation after delete
+* Deprecate use of cache in list_volumes
+* Invalidate volume list cache when creating
+* Make cache key generator ignore cache argument
+* Add get_subnet() method
+* Add API method update_subnet()
+* Add API method delete_subnet()
+* Add API method create_subnet()
+* Unsteady state in volume list should prevent cache
+* Test volume list caching
+* Allow passing config into shade.openstack_cloud
+* Refactor caching to allow per-method invalidate
+* Add tests for caching
+* Rename auth_plugin to auth_type
+* Update os-client-config min version
+* Fix volume operations
+* Fix exception in update_router()
+* Add API auto-generation based on docstrings
+
+0.5.0
+-----
+
+* Fix docs nit - make it clear the arg is a string
+* Poll on the actual image showing up
+* Add delete_image call
+* Skip passing in timeout to glance if it's not set
+* Add some unit test for create_server
+* Migrate API calls to task management
+* Fix naming inconsistencies in rebuild_server tests
+* Add task management framework
+* Namespace caching per cloud
+* Allow for passing cache class in as a parameter
+* Add 'rebuild' to shade
+* Let router update to specify external gw net ID
+* Create swift container if it does not exist
+* Fix a use of in where it should be equality
+* Disable warnings about old Rackspace certificates
+* Pass socket timeout to all of the Client objects
+* Add methods for logical router management
+* Add api-level timeout parameter
+* Custom exception needs str representation
+
+0.4.0
+-----
+
+* Add basic unit test for shade.openstack_cloud
+* Small fixes found working on ansible modules
+* Disable dogpile.cache if cache_interval is None
+* Add support for keystone projects
+* Fix up and document input parameters
+* Handle image name for boot from volume
+* Clean up race condition in functional tests
+* Add initial compute functional tests to Shade
+* Add cover to .gitignore
+* Add ironic node deployment support
+* Align cert, key, cacert and verify with requests
+* Add methods to create and delete networks
+* Add behavior to enable ironic noauth mode
+* Reorder envlist to avoid the rm -fr .testrepository when running tox -epy34
+
+0.3.0
+-----
+
+* Make image processing work for v2
+* Utilize dogpile.cache for caching
+* Add support for volume attach/detach
+* Do not allow to pass *-cache on init
+* Import from v2 instead of v1_1
+* Add unit test for meta.get_groups_from_server
+* Add unit tests for meta module
+* Add a method to create image snapshots from nova
+* Return extra information for debugging on failures
+* Don't try to add an IP if there is one
+* Revamp README file
+* Add hasExtension method to check cloud capabilities
+* Don't compare images when image is None
+* Add service_catalog property
+* Remove unnecessary container creation
+* Make is_object_stale() a public method
+* Fix broken object hashing
+* Adds some more swift operations
+* Adds get_network() and list_networks function
+* Add support for creating/deleting volumes
+* Get auth token lazily
+* Pass service_name to nova_client constructor
+* Create a neutron client
+* Port to use keystone sessions and auth plugins
+* Add consistent methods for returning dicts
+* Add get_flavor method
+* Make get_image return None
+* Use the "iterate timeout" idiom from nodepool
+* Fix obj_to_dict type filtering
+* Adds a method to get security group
+* Pull in improvements from nodepool
+* Remove positional args to create_server
+* Don't include deleted images by default
+* Add image upload support
+* Refactor glance version call into method
+* Support uploading swift objects
+* Debug log any time we re-raise an exception
+* Remove py26 support
+* Explain obj_to_dict
+* Fix python3 unittests
+* Change meta info to be an Infra project
+* Fix flake8 errors and turn off hacking
+* Fix up copyright headers
+* Add better caching around volumes
+* Support boot from volume
+* Make get_image work on name or id
+* Add some additional server meta munging
+* Support injecting mount-point meta info
+* Move ironic node create/delete logic into shade
+* Refactor ironic commands into OperatorCloud class
+* fix typo in create_server
+* Don't die if we didn't grab a floating ip
+* Process flavor and image names
+* Stop prefixing values with slugify
+* Don't access object members on a None
+* Make all of the compute logic work
+* Add delete and get server name
+* Fixed up a bunch of flake8 warnings
+* Add in server metadata routines
+* Plumb through a small name change for args
+* Consume project_name from os-client-config
+* add Ironic client
+* Updates to use keystone session
+* Discover Trove API version
+* Offload config to the os-client-config library
+* Add example code to README
+* Add volumes and config file parsing
+* Fix log invocations
+* Remove some extra lines from the README
+* Add the initial library code
+* Initial cookiecutter repo
diff --git a/HACKING.rst b/HACKING.rst
new file mode 100644
index 0000000..7f3d256
--- /dev/null
+++ b/HACKING.rst
@@ -0,0 +1,4 @@
+shade Style Commandments
+===============================================
+
+Read the OpenStack Style Commandments http://docs.openstack.org/developer/hacking/
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..67db858
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,175 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..90f8a7a
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1,6 @@
+include AUTHORS
+include ChangeLog
+exclude .gitignore
+exclude .gitreview
+
+global-exclude *.pyc
\ No newline at end of file
diff --git a/PKG-INFO b/PKG-INFO
new file mode 100644
index 0000000..d7bb31c
--- /dev/null
+++ b/PKG-INFO
@@ -0,0 +1,70 @@
+Metadata-Version: 1.1
+Name: shade
+Version: 0.6.1
+Summary: Client library for operating OpenStack clouds
+Home-page: http://ci.openstack.org/
+Author: OpenStack Infrastructure Team
+Author-email: openstack-infra at lists.openstack.org
+License: UNKNOWN
+Description: shade
+        =====
+        
+        shade is a simple client library for operating OpenStack clouds. The
+        key word here is *simple*. Clouds can do many many many things - but there are
+        probably only about 10 of them that most people care about with any
+        regularity. If you want to do complicated things, you should probably use
+        the lower level client libraries - or even the REST API directly. However,
+        if what you want is to be able to write an application that talks to clouds
+        no matter what crazy choices the deployer has made in an attempt to be
+        more hipster than their self-entitled narcissist peers, then shade is for you.
+        
+        shade started its life as some code inside of ansible. ansible has a bunch
+        of different OpenStack related modules, and there was a ton of duplicated
+        code. Eventually, between refactoring that duplication into an internal
+        library, and adding logic and features that the OpenStack Infra team had
+        developed to run client applications at scale, it turned out that we'd written
+        nine-tenths of what we'd need to have a standalone library.
+        
+        example
+        -------
+        
+        Sometimes an example is nice.
+        ::
+        
+          from shade import *
+          import time
+        
+          # Initialize cloud
+          # Cloud configs are read with os-client-config
+          cloud = openstack_cloud('mordred')
+        
+          # OpenStackCloud object has an interface exposing OpenStack services methods
+          print cloud.list_servers()
+          s = cloud.list_servers()[0]
+        
+          # But you can also access the underlying python-*client objects
+          cinder = cloud.cinder_client
+          volumes = cinder.volumes.list()
+          volume_id = [v for v in volumes if v['status'] == 'available'][0]['id']
+          nova = cloud.nova_client
+          print nova.volumes.create_server_volume(s['id'], volume_id, None)
+          attachments = []
+          print volume_id
+          while not attachments:
+              print "Waiting for attach to finish"
+              time.sleep(1)
+              attachments = cinder.volumes.get(volume_id).attachments
+          print attachments
+        
+        
+Platform: UNKNOWN
+Classifier: Environment :: OpenStack
+Classifier: Intended Audience :: Information Technology
+Classifier: Intended Audience :: System Administrators
+Classifier: License :: OSI Approved :: Apache Software License
+Classifier: Operating System :: POSIX :: Linux
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.4
diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..dcda824
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,49 @@
+shade
+=====
+
+shade is a simple client library for operating OpenStack clouds. The
+key word here is *simple*. Clouds can do many many many things - but there are
+probably only about 10 of them that most people care about with any
+regularity. If you want to do complicated things, you should probably use
+the lower level client libraries - or even the REST API directly. However,
+if what you want is to be able to write an application that talks to clouds
+no matter what crazy choices the deployer has made in an attempt to be
+more hipster than their self-entitled narcissist peers, then shade is for you.
+
+shade started its life as some code inside of ansible. ansible has a bunch
+of different OpenStack related modules, and there was a ton of duplicated
+code. Eventually, between refactoring that duplication into an internal
+library, and adding logic and features that the OpenStack Infra team had
+developed to run client applications at scale, it turned out that we'd written
+nine-tenths of what we'd need to have a standalone library.
+
+example
+-------
+
+Sometimes an example is nice.
+::
+
+  from shade import *
+  import time
+
+  # Initialize cloud
+  # Cloud configs are read with os-client-config
+  cloud = openstack_cloud('mordred')
+
+  # OpenStackCloud object has an interface exposing OpenStack services methods
+  print cloud.list_servers()
+  s = cloud.list_servers()[0]
+
+  # But you can also access the underlying python-*client objects
+  cinder = cloud.cinder_client
+  volumes = cinder.volumes.list()
+  volume_id = [v for v in volumes if v['status'] == 'available'][0]['id']
+  nova = cloud.nova_client
+  print nova.volumes.create_server_volume(s['id'], volume_id, None)
+  attachments = []
+  print volume_id
+  while not attachments:
+      print "Waiting for attach to finish"
+      time.sleep(1)
+      attachments = cinder.volumes.get(volume_id).attachments
+  print attachments
diff --git a/doc/source/conf.py b/doc/source/conf.py
new file mode 100755
index 0000000..bbebf47
--- /dev/null
+++ b/doc/source/conf.py
@@ -0,0 +1,36 @@
+import os
+import sys
+
+sys.path.insert(0, os.path.abspath('../..'))
+
+extensions = ['sphinx.ext.autodoc', 'oslosphinx']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'shade'
+copyright = u'2014 Hewlett-Packard Development Company, L.P.'
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+add_module_names = True
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = '%sdoc' % project
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title, author, documentclass
+# [howto/manual]).
+latex_documents = [
+    ('index',
+     '%s.tex' % project,
+     u'%s Documentation' % project,
+     u'Monty Taylor', 'manual'),
+]
diff --git a/doc/source/contributing.rst b/doc/source/contributing.rst
new file mode 100644
index 0000000..8cb3146
--- /dev/null
+++ b/doc/source/contributing.rst
@@ -0,0 +1 @@
+.. include:: ../../CONTRIBUTING.rst
\ No newline at end of file
diff --git a/doc/source/index.rst b/doc/source/index.rst
new file mode 100644
index 0000000..15a603f
--- /dev/null
+++ b/doc/source/index.rst
@@ -0,0 +1,25 @@
+.. shade documentation master file, created by
+   sphinx-quickstart on Tue Jul  9 22:26:36 2013.
+   You can adapt this file completely to your liking, but it should at least
+   contain the root `toctree` directive.
+
+Welcome to shade's documentation!
+========================================================
+
+Contents:
+
+.. toctree::
+   :maxdepth: 2
+
+   installation
+   usage
+   contributing
+
+.. include:: ../../README.rst
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
diff --git a/doc/source/installation.rst b/doc/source/installation.rst
new file mode 100644
index 0000000..a7b1bc3
--- /dev/null
+++ b/doc/source/installation.rst
@@ -0,0 +1,12 @@
+============
+Installation
+============
+
+At the command line::
+
+    $ pip install shade
+
+Or, if you have virtualenvwrapper installed::
+
+    $ mkvirtualenv shade
+    $ pip install shade
\ No newline at end of file
diff --git a/doc/source/usage.rst b/doc/source/usage.rst
new file mode 100644
index 0000000..55a2631
--- /dev/null
+++ b/doc/source/usage.rst
@@ -0,0 +1,17 @@
+=====
+Usage
+=====
+
+To use shade in a project::
+
+	import shade
+
+.. warning::
+  Several of the API methods return a ``dict`` that describe a resource.
+  It is possible to access keys of the dict as an attribute (e.g.,
+  ``server.id`` instead of ``server['id']``) to maintain some backward
+  compatibility, but attribute access is deprecated. New code should
+  assume a normal dictionary and access values via key.
+
+.. automodule:: shade
+   :members:
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..7cca7ea
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,17 @@
+pbr>=0.5.21,<1.0
+
+bunch
+jsonpatch
+os-client-config>=0.8.1
+six
+
+python-novaclient>=2.21.0
+python-keystoneclient>=0.11.0
+python-glanceclient
+python-cinderclient
+python-neutronclient>=2.3.10
+python-troveclient
+python-ironicclient>=0.5.1
+python-swiftclient
+
+dogpile.cache>=0.5.3
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 0000000..56f2f94
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,33 @@
+[metadata]
+name = shade
+summary = Client library for operating OpenStack clouds
+description-file = 
+	README.rst
+author = OpenStack Infrastructure Team
+author-email = openstack-infra at lists.openstack.org
+home-page = http://ci.openstack.org/
+classifier = 
+	Environment :: OpenStack
+	Intended Audience :: Information Technology
+	Intended Audience :: System Administrators
+	License :: OSI Approved :: Apache Software License
+	Operating System :: POSIX :: Linux
+	Programming Language :: Python
+	Programming Language :: Python :: 2
+	Programming Language :: Python :: 2.7
+	Programming Language :: Python :: 3
+	Programming Language :: Python :: 3.4
+
+[build_sphinx]
+source-dir = doc/source
+build-dir = doc/build
+all_files = 1
+
+[upload_sphinx]
+upload-dir = doc/build/html
+
+[egg_info]
+tag_svn_revision = 0
+tag_build = 
+tag_date = 0
+
diff --git a/setup.py b/setup.py
new file mode 100755
index 0000000..c0a24ea
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,21 @@
+#!/usr/bin/env python
+# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import setuptools
+
+setuptools.setup(
+    setup_requires=['pbr'],
+    pbr=True)
diff --git a/shade.egg-info/PKG-INFO b/shade.egg-info/PKG-INFO
new file mode 100644
index 0000000..d7bb31c
--- /dev/null
+++ b/shade.egg-info/PKG-INFO
@@ -0,0 +1,70 @@
+Metadata-Version: 1.1
+Name: shade
+Version: 0.6.1
+Summary: Client library for operating OpenStack clouds
+Home-page: http://ci.openstack.org/
+Author: OpenStack Infrastructure Team
+Author-email: openstack-infra at lists.openstack.org
+License: UNKNOWN
+Description: shade
+        =====
+        
+        shade is a simple client library for operating OpenStack clouds. The
+        key word here is *simple*. Clouds can do many many many things - but there are
+        probably only about 10 of them that most people care about with any
+        regularity. If you want to do complicated things, you should probably use
+        the lower level client libraries - or even the REST API directly. However,
+        if what you want is to be able to write an application that talks to clouds
+        no matter what crazy choices the deployer has made in an attempt to be
+        more hipster than their self-entitled narcissist peers, then shade is for you.
+        
+        shade started its life as some code inside of ansible. ansible has a bunch
+        of different OpenStack related modules, and there was a ton of duplicated
+        code. Eventually, between refactoring that duplication into an internal
+        library, and adding logic and features that the OpenStack Infra team had
+        developed to run client applications at scale, it turned out that we'd written
+        nine-tenths of what we'd need to have a standalone library.
+        
+        example
+        -------
+        
+        Sometimes an example is nice.
+        ::
+        
+          from shade import *
+          import time
+        
+          # Initialize cloud
+          # Cloud configs are read with os-client-config
+          cloud = openstack_cloud('mordred')
+        
+          # OpenStackCloud object has an interface exposing OpenStack services methods
+          print cloud.list_servers()
+          s = cloud.list_servers()[0]
+        
+          # But you can also access the underlying python-*client objects
+          cinder = cloud.cinder_client
+          volumes = cinder.volumes.list()
+          volume_id = [v for v in volumes if v['status'] == 'available'][0]['id']
+          nova = cloud.nova_client
+          print nova.volumes.create_server_volume(s['id'], volume_id, None)
+          attachments = []
+          print volume_id
+          while not attachments:
+              print "Waiting for attach to finish"
+              time.sleep(1)
+              attachments = cinder.volumes.get(volume_id).attachments
+          print attachments
+        
+        
+Platform: UNKNOWN
+Classifier: Environment :: OpenStack
+Classifier: Intended Audience :: Information Technology
+Classifier: Intended Audience :: System Administrators
+Classifier: License :: OSI Approved :: Apache Software License
+Classifier: Operating System :: POSIX :: Linux
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.7
... 5814 lines suppressed ...

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-shade.git



More information about the Python-modules-commits mailing list