Merge lp:~devcamcar/nova-adminclient/latest_client into lp:nova-adminclient

Proposed by Devin Carlen
Status: Merged
Approved by: Devin Carlen
Approved revision: 5
Merged at revision: 4
Proposed branch: lp:~devcamcar/nova-adminclient/latest_client
Merge into: lp:nova-adminclient
Diff against target: 85 lines (+26/-6)
2 files modified
nova_adminclient/client.py (+23/-2)
setup.py (+3/-4)
To merge this branch: bzr merge lp:~devcamcar/nova-adminclient/latest_client
Reviewer Review Type Date Requested Status
Devin Carlen Approve
Review via email: mp+55660@code.launchpad.net

Description of the change

Incorporated latest changes from nova's adminclient.

To post a comment you must log in.
Revision history for this message
Devin Carlen (devcamcar) wrote :

approve

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'nova_adminclient/client.py'
--- nova_adminclient/client.py 2011-03-16 04:52:32 +0000
+++ nova_adminclient/client.py 2011-03-31 01:42:23 +0000
@@ -15,7 +15,6 @@
15# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the15# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16# License for the specific language governing permissions and limitations16# License for the specific language governing permissions and limitations
17# under the License.17# under the License.
18
19"""18"""
20Nova User API client library.19Nova User API client library.
21"""20"""
@@ -265,6 +264,20 @@
265 else:264 else:
266 setattr(self, name, str(value))265 setattr(self, name, str(value))
267266
267class StatusResponse(object):
268 def __init__(self, connection=None):
269 self.connection = connection
270 self.status = None
271
272 def __repr__(self):
273 return 'Status:%s' % self.status
274
275 def startElement(self, name, attrs, connection):
276 return None
277
278 def endElement(self, name, value, connection):
279 setattr(self, name, str(value))
280
268281
269class NovaAdminClient(object):282class NovaAdminClient(object):
270283
@@ -326,7 +339,7 @@
326 def get_user(self, name):339 def get_user(self, name):
327 """Grab a single user by name."""340 """Grab a single user by name."""
328 try:341 try:
329 return self.apiconn.get_object('DescribeUser',342 user = self.apiconn.get_object('DescribeUser',
330 {'Name': name},343 {'Name': name},
331 UserInfo)344 UserInfo)
332 except boto.exception.BotoServerError, e:345 except boto.exception.BotoServerError, e:
@@ -334,6 +347,9 @@
334 return None347 return None
335 raise348 raise
336349
350 if user.username != None:
351 return user
352
337 def has_user(self, username):353 def has_user(self, username):
338 """Determine if user exists."""354 """Determine if user exists."""
339 return self.get_user(username) != None355 return self.get_user(username) != None
@@ -475,3 +491,8 @@
475 """Grabs the list of all users."""491 """Grabs the list of all users."""
476 return self.apiconn.get_list('DescribeInstanceTypes', {},492 return self.apiconn.get_list('DescribeInstanceTypes', {},
477 [('item', InstanceType)])493 [('item', InstanceType)])
494
495 def disable_project_credentials(self, project):
496 """Revoke project credentials and kill the cloudpipe/vpn instance."""
497 return self.apiconn.get_object('DisableProjectCredentials',
498 {'Project': project}, StatusResponse)
478499
=== modified file 'setup.py' (properties changed: -x to +x)
--- setup.py 2011-03-30 15:57:16 +0000
+++ setup.py 2011-03-31 01:42:23 +0000
@@ -17,17 +17,16 @@
17# under the License.17# under the License.
1818
19import os19import os
20from setuptools import setup20from setuptools import setup, find_packages
21
2221
23setup(name = "nova-adminclient",22setup(name = "nova-adminclient",
24 version = "0.1.3",23 version = "0.1.5",
25 license = 'Apache License (2.0)',24 license = 'Apache License (2.0)',
26 description = "client for administering OpenStack Nova",25 description = "client for administering OpenStack Nova",
27 author = 'OpenStack',26 author = 'OpenStack',
28 author_email = 'nova@lists.launchpad.net',27 author_email = 'nova@lists.launchpad.net',
29 url='http://www.openstack.org',28 url='http://www.openstack.org',
30 packages = ['nova_adminclient'],29 packages = find_packages(),
31 install_requires = ['setuptools', 'boto==1.9b'],30 install_requires = ['setuptools', 'boto==1.9b'],
32 classifiers = [31 classifiers = [
33 'Development Status :: 5 - Production/Stable',32 'Development Status :: 5 - Production/Stable',

Subscribers

People subscribed via source and target branches

to all changes: