Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am EdLeafe on github.
  • I am edleafe (https://keybase.io/edleafe) on keybase.
  • I have a public key whose fingerprint is A1C9 E21C 6C97 69BD B46A A39D A320 B5CA 1CC1 9A8B

To claim this, I am signing this object:

In file included from ../../../SRC/.gcc-extra-ppl/src/Polyhedron_public.cc:30:0:
../../../SRC/.gcc-extra-ppl/src/wrap_assign.hh: In function 'void Parma_Polyhedra_Library::Implementation::wrap_assign_col(PSET&, const PSET&, const Parma_Polyhedra_Library::Variables_Set&, std::vector<Parma_Polyhedra_Library::Implementation::Wrap_Dim_Translations>::const_iterator, std::vector<Parma_Polyhedra_Library::Implementation::Wrap_Dim_Translations>::const_iterator, Parma_Polyhedra_Library::Bounded_Integer_Type_Width, Parma_Polyhedra_Library::Coefficient_traits_template<__gmp_expr<__mpz_struct [1], __mpz_struct [1]> >::const_reference, Parma_Polyhedra_Library::Coefficient_traits_template<__gmp_expr<__mpz_struct [1], __mpz_struct [1]> >::const_reference, const Parma_Polyhedra_Library::Constraint_System*, Parma_Polyhedra_Library::Coefficient&) [with PSET = Parma_Polyhedra_Library::C_Polyhedron, std::vector<Parma_Polyhedra_Library::Implementation::Wrap_Dim_Translations>::const_iterator = __gnu_cxx::__normal_iterator<const Par
ed@MGM6AEDV7M:~/projects/scrap$ pip install 'git+git://github.com/rackspace/pyrax.git'
Downloading/unpacking git+git://github.com/rackspace/pyrax.git
Cloning git://github.com/rackspace/pyrax.git to /var/folders/lx/78wjnywd1qv00w_bysbg5qxh0000gq/T/pip-5EA7t4-build
Running setup.py egg_info for package from git+git://github.com/rackspace/pyrax.git
Downloading/unpacking python-novaclient>=2.13.0 (from pyrax==1.6.2)
Downloading python-novaclient-2.15.0.tar.gz (302kB): 302kB downloaded
Running setup.py egg_info for package python-novaclient
Installed /Users/ed/.virtualenvs/wooo/build/python-novaclient/pbr-0.5.23-py2.7.egg
******************************************************************
Starting at Sun Jul 7 14:27:10 2013
******************************************************************
Creating the database instance...
Current value of status: BUILD (elapsed: 0.2 seconds) progress=None
Current value of status: BUILD (elapsed: 20.8 seconds) progress=None
Current value of status: BUILD (elapsed: 41.4 seconds) progress=None
Current value of status: BUILD (elapsed: 62.0 seconds) progress=None
Current value of status: BUILD (elapsed: 82.3 seconds) progress=None
In [1]: import pyrax; pyrax.keyring_auth(); cs = pyrax.cloudservers; cf = pyrax.cloudfiles; cdb = pyrax.cloud_databases; dns = pyrax.cloud_dns; clb = pyrax.cloud_loadbalancers; cm=pyrax.cloud_monitoring
In [2]: cf.get_container('bogus')
---------------------------------------------------------------------------
NoSuchContainer Traceback (most recent call last)
<ipython-input-2-eab615a189da> in <module>()
----> 1 cf.get_container('bogus')
/Users/ed/projects/pyrax/pyrax/cf_wrapper/client.pyc in _wrapped(*args, **kwargs)
48 if bad_container:
import pyrax
pyrax.keyring_auth()
cf = pyrax.cloudfiles
my_folder = "/path/to/folder"
container = cf.get_container("my container")
cf.sync_folder_to_container(my_folder, container)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import pyrax
pyrax.keyring_auth()
cs = pyrax.cloudservers
[private]
identity_type = keystone
region = RegionOne
custom_user_agent =
debug = True
auth_endpoint = http://192.168.0.1:5000/v2.0/
tenant_name = demo
tenant_id = abc123456
keyring_username = demo
def _checkSizer(self):
"""Makes sure the sizer is created before setting props that need it."""
if self.Sizer is None:
self.Sizer = self.SizerClass(Parent=self)
self.Sizer.Orientation = self.Orientation
self.Sizer.Caption = self.Caption

#pyrax

pyrax is the Python SDK for OpenStack-based cloud providers, and includes support for additional services provided by Rackspace.

Installation

Installation works the same as any Python package:

pip install pyrax

If you are not using virtualenv, you will need to run the above as an admin.