Fixed typo.

This commit is contained in:
Timur Nurlygayanov 2013-02-21 15:02:09 -05:00
parent ee6fc07b83
commit 97aa4ca978
4 changed files with 6 additions and 10 deletions

View File

@ -25,10 +25,6 @@ from django.utils.decorators import available_attrs
from windcclient.v1 import client as windc_client
__all__ = ('datacenter_get','datacenter_list',
'datacenter_create','datacenter_delete')
LOG = logging.getLogger(__name__)

View File

@ -33,7 +33,7 @@ logger = logging.getLogger(__name__)
class HTTPClient(httplib2.Http):
USER_AGENT = 'python-balancerclient'
USER_AGENT = 'python-windcclient'
def __init__(self, endpoint=None, token=None, username=None,
password=None, tenant_name=None, tenant_id=None,

View File

@ -19,7 +19,6 @@ from windcclient.common import base
class DC(base.Resource):
"""Represent load balancer device instance."""
def __repr__(self):
return "<DC(%s)>" % self._info

View File

@ -19,6 +19,7 @@ from windcclient.common import base
class DCService(base.Resource):
def __repr__(self):
return "<Service(%s)>" % self._info
@ -27,22 +28,22 @@ class DCServiceManager(base.Manager):
resource_class = DCService
def list(self, datacenter):
return self._list('/datacenters/%s' % base.getid(datacenter),
return self._list("/datacenters/%s/services" % base.getid(datacenter),
'services')
def create(self, datacenter, name, **extra):
body = {'name': name,}
body.update(extra)
return self._create('/datacenters/%s' % base.getid(datacenter),
return self._create("/datacenters/%s/services" % base.getid(datacenter),
body, 'service')
def delete(self, datacenter, service):
return self._delete("/datacenters/%s/%s" % \
return self._delete("/datacenters/%s/services/%s" % \
(base.getid(datacenter),
base.getid(service)))
def get(self, datacenter, service):
return self._get("/datacenters/%s/%s" % \
return self._get("/datacenters/%s/services/%s" % \
(base.getid(datacenter),
base.getid(service)),
'service')