repository_name
stringlengths
5
67
func_path_in_repository
stringlengths
4
234
func_name
stringlengths
0
314
whole_func_string
stringlengths
52
3.87M
language
stringclasses
6 values
func_code_string
stringlengths
52
3.87M
func_documentation_string
stringlengths
1
47.2k
func_code_url
stringlengths
85
339
pycontribs/pyrax
pyrax/cloudloadbalancers.py
CloudLoadBalancerClient.allowed_domains
def allowed_domains(self): """ This property lists the allowed domains for a load balancer. The allowed domains are restrictions set for the allowed domain names used for adding load balancer nodes. In order to submit a domain name as an address for the load balancer node to add...
python
def allowed_domains(self): """ This property lists the allowed domains for a load balancer. The allowed domains are restrictions set for the allowed domain names used for adding load balancer nodes. In order to submit a domain name as an address for the load balancer node to add...
This property lists the allowed domains for a load balancer. The allowed domains are restrictions set for the allowed domain names used for adding load balancer nodes. In order to submit a domain name as an address for the load balancer node to add, the user must verify that the domain ...
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/cloudloadbalancers.py#L1267-L1284
pycontribs/pyrax
pyrax/cloudloadbalancers.py
CloudLoadBalancerClient.algorithms
def algorithms(self): """ Returns a list of available load balancing algorithms. """ if self._algorithms is None: uri = "/loadbalancers/algorithms" resp, body = self.method_get(uri) self._algorithms = [alg["name"] for alg in body["algorithms"]] ...
python
def algorithms(self): """ Returns a list of available load balancing algorithms. """ if self._algorithms is None: uri = "/loadbalancers/algorithms" resp, body = self.method_get(uri) self._algorithms = [alg["name"] for alg in body["algorithms"]] ...
Returns a list of available load balancing algorithms.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/cloudloadbalancers.py#L1288-L1296
pycontribs/pyrax
pyrax/cloudloadbalancers.py
CloudLoadBalancerClient.protocols
def protocols(self): """ Returns a list of available load balancing protocols. """ if self._protocols is None: uri = "/loadbalancers/protocols" resp, body = self.method_get(uri) self._protocols = [proto["name"] for proto in body["protocols"]] r...
python
def protocols(self): """ Returns a list of available load balancing protocols. """ if self._protocols is None: uri = "/loadbalancers/protocols" resp, body = self.method_get(uri) self._protocols = [proto["name"] for proto in body["protocols"]] r...
Returns a list of available load balancing protocols.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/cloudloadbalancers.py#L1300-L1308
pycontribs/pyrax
pyrax/cloudloadbalancers.py
CloudLoadBalancerClient.update
def update(self, loadbalancer, name=None, algorithm=None, protocol=None, halfClosed=None, port=None, timeout=None, httpsRedirect=None): """ Provides a way to modify the following attributes of a load balancer: - name - algorithm - protocol - ha...
python
def update(self, loadbalancer, name=None, algorithm=None, protocol=None, halfClosed=None, port=None, timeout=None, httpsRedirect=None): """ Provides a way to modify the following attributes of a load balancer: - name - algorithm - protocol - ha...
Provides a way to modify the following attributes of a load balancer: - name - algorithm - protocol - halfClosed - port - timeout - httpsRedirect
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/cloudloadbalancers.py#L1312-L1326
pycontribs/pyrax
pyrax/cloudloadbalancers.py
CloudLoadBalancerClient.add_connection_throttle
def add_connection_throttle(self, loadbalancer, maxConnectionRate=None, maxConnections=None, minConnections=None, rateInterval=None): """ Updates the connection throttling information for the load balancer with the supplied values. At least one of the parameters must be supplied. ...
python
def add_connection_throttle(self, loadbalancer, maxConnectionRate=None, maxConnections=None, minConnections=None, rateInterval=None): """ Updates the connection throttling information for the load balancer with the supplied values. At least one of the parameters must be supplied. ...
Updates the connection throttling information for the load balancer with the supplied values. At least one of the parameters must be supplied.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/cloudloadbalancers.py#L1447-L1455
pycontribs/pyrax
pyrax/cloudloadbalancers.py
CloudLoadBalancerClient.update_ssl_termination
def update_ssl_termination(self, loadbalancer, securePort=None, enabled=None, secureTrafficOnly=None): """ Updates existing SSL termination information for the load balancer without affecting the existing certificates/keys. """ return loadbalancer.update_ssl_terminati...
python
def update_ssl_termination(self, loadbalancer, securePort=None, enabled=None, secureTrafficOnly=None): """ Updates existing SSL termination information for the load balancer without affecting the existing certificates/keys. """ return loadbalancer.update_ssl_terminati...
Updates existing SSL termination information for the load balancer without affecting the existing certificates/keys.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/cloudloadbalancers.py#L1491-L1498
pycontribs/pyrax
pyrax/cloudloadbalancers.py
CloudLoadBalancerClient.delete_metadata_for_node
def delete_metadata_for_node(self, loadbalancer, node, keys=None): """ Deletes metadata items specified by the 'keys' parameter for the specified node. If no value for 'keys' is provided, all metadata is deleted. """ return loadbalancer.delete_metadata_for_node(node, keys...
python
def delete_metadata_for_node(self, loadbalancer, node, keys=None): """ Deletes metadata items specified by the 'keys' parameter for the specified node. If no value for 'keys' is provided, all metadata is deleted. """ return loadbalancer.delete_metadata_for_node(node, keys...
Deletes metadata items specified by the 'keys' parameter for the specified node. If no value for 'keys' is provided, all metadata is deleted.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/cloudloadbalancers.py#L1572-L1578
pycontribs/pyrax
samples/autoscale/create_scaling_group.py
safe_int
def safe_int(val, allow_zero=True): """ This function converts the six.moves.input values to integers. It handles invalid entries, and optionally forbids values of zero. """ try: ret = int(val) except ValueError: print("Sorry, '%s' is not a valid integer." % val) return F...
python
def safe_int(val, allow_zero=True): """ This function converts the six.moves.input values to integers. It handles invalid entries, and optionally forbids values of zero. """ try: ret = int(val) except ValueError: print("Sorry, '%s' is not a valid integer." % val) return F...
This function converts the six.moves.input values to integers. It handles invalid entries, and optionally forbids values of zero.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/samples/autoscale/create_scaling_group.py#L33-L46
pycontribs/pyrax
pyrax/exceptions.py
from_response
def from_response(response, body): """ Return an instance of a ClientException or subclass based on an httplib2 response. Usage:: resp, body = http.request(...) if resp.status_code != 200: raise exception_from_response(resp, body) """ if isinstance(response, dict): ...
python
def from_response(response, body): """ Return an instance of a ClientException or subclass based on an httplib2 response. Usage:: resp, body = http.request(...) if resp.status_code != 200: raise exception_from_response(resp, body) """ if isinstance(response, dict): ...
Return an instance of a ClientException or subclass based on an httplib2 response. Usage:: resp, body = http.request(...) if resp.status_code != 200: raise exception_from_response(resp, body)
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/exceptions.py#L451-L491
pycontribs/pyrax
pyrax/image.py
assure_image
def assure_image(fnc): """ Converts a image ID passed as the 'image' parameter to a image object. """ @wraps(fnc) def _wrapped(self, img, *args, **kwargs): if not isinstance(img, Image): # Must be the ID img = self._manager.get(img) return fnc(self, img, *args...
python
def assure_image(fnc): """ Converts a image ID passed as the 'image' parameter to a image object. """ @wraps(fnc) def _wrapped(self, img, *args, **kwargs): if not isinstance(img, Image): # Must be the ID img = self._manager.get(img) return fnc(self, img, *args...
Converts a image ID passed as the 'image' parameter to a image object.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/image.py#L34-L44
pycontribs/pyrax
pyrax/image.py
ImageManager.list
def list(self, limit=None, marker=None, name=None, visibility=None, member_status=None, owner=None, tag=None, status=None, size_min=None, size_max=None, sort_key=None, sort_dir=None, return_raw=False): """ Returns a list of resource objects. Pagination is supported th...
python
def list(self, limit=None, marker=None, name=None, visibility=None, member_status=None, owner=None, tag=None, status=None, size_min=None, size_max=None, sort_key=None, sort_dir=None, return_raw=False): """ Returns a list of resource objects. Pagination is supported th...
Returns a list of resource objects. Pagination is supported through the optional 'marker' and 'limit' parameters. Filtering the returned value is possible by specifying values for any of the other parameters.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/image.py#L204-L220
pycontribs/pyrax
pyrax/image.py
ImageManager.list_all
def list_all(self, name=None, visibility=None, member_status=None, owner=None, tag=None, status=None, size_min=None, size_max=None, sort_key=None, sort_dir=None): """ Returns all of the images in one call, rather than in paginated batches. """ def strip_version(u...
python
def list_all(self, name=None, visibility=None, member_status=None, owner=None, tag=None, status=None, size_min=None, size_max=None, sort_key=None, sort_dir=None): """ Returns all of the images in one call, rather than in paginated batches. """ def strip_version(u...
Returns all of the images in one call, rather than in paginated batches.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/image.py#L223-L252
pycontribs/pyrax
pyrax/image.py
ImageManager.create
def create(self, name, img_format=None, img_container_format=None, data=None, container=None, obj=None, metadata=None): """ Creates a new image with the specified name. The image data can either be supplied directly in the 'data' parameter, or it can be an image stored in the...
python
def create(self, name, img_format=None, img_container_format=None, data=None, container=None, obj=None, metadata=None): """ Creates a new image with the specified name. The image data can either be supplied directly in the 'data' parameter, or it can be an image stored in the...
Creates a new image with the specified name. The image data can either be supplied directly in the 'data' parameter, or it can be an image stored in the object storage service. In the case of the latter, you can either supply the container and object names, or simply a StorageObject refe...
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/image.py#L255-L290
pycontribs/pyrax
pyrax/image.py
ImageManager.update
def update(self, img, value_dict): """ Accepts an image reference (object or ID) and dictionary of key/value pairs, where the key is an attribute of the image, and the value is the desired new value for that image. NOTE: There is a bug in Glance where the 'add' operation return...
python
def update(self, img, value_dict): """ Accepts an image reference (object or ID) and dictionary of key/value pairs, where the key is an attribute of the image, and the value is the desired new value for that image. NOTE: There is a bug in Glance where the 'add' operation return...
Accepts an image reference (object or ID) and dictionary of key/value pairs, where the key is an attribute of the image, and the value is the desired new value for that image. NOTE: There is a bug in Glance where the 'add' operation returns a 409 if the property already exists, which c...
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/image.py#L294-L316
pycontribs/pyrax
pyrax/image.py
ImageManager.update_image_member
def update_image_member(self, img_id, status): """ Updates the image whose ID is given with the status specified. This must be called by the user whose project_id is in the members for the image. If called by the owner of the image, an InvalidImageMember exception will be raised....
python
def update_image_member(self, img_id, status): """ Updates the image whose ID is given with the status specified. This must be called by the user whose project_id is in the members for the image. If called by the owner of the image, an InvalidImageMember exception will be raised....
Updates the image whose ID is given with the status specified. This must be called by the user whose project_id is in the members for the image. If called by the owner of the image, an InvalidImageMember exception will be raised. Valid values for 'status' include: pending ...
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/image.py#L319-L345
pycontribs/pyrax
pyrax/image.py
ImageMemberManager.create
def create(self, name, *args, **kwargs): """ Need to wrap the default call to handle exceptions. """ try: return super(ImageMemberManager, self).create(name, *args, **kwargs) except Exception as e: if e.http_status == 403: raise exc.Unshara...
python
def create(self, name, *args, **kwargs): """ Need to wrap the default call to handle exceptions. """ try: return super(ImageMemberManager, self).create(name, *args, **kwargs) except Exception as e: if e.http_status == 403: raise exc.Unshara...
Need to wrap the default call to handle exceptions.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/image.py#L361-L371
pycontribs/pyrax
pyrax/image.py
ImageTasksManager._create_body
def _create_body(self, name, img=None, cont=None, img_format=None, img_name=None): """ Used to create a new task. Since tasks don't have names, the required 'name' parameter is used for the type of task: 'import' or 'export'. """ img = utils.get_id(img) cont =...
python
def _create_body(self, name, img=None, cont=None, img_format=None, img_name=None): """ Used to create a new task. Since tasks don't have names, the required 'name' parameter is used for the type of task: 'import' or 'export'. """ img = utils.get_id(img) cont =...
Used to create a new task. Since tasks don't have names, the required 'name' parameter is used for the type of task: 'import' or 'export'.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/image.py#L398-L417
pycontribs/pyrax
pyrax/image.py
ImageTasksManager.create
def create(self, name, *args, **kwargs): """ Standard task creation, but first check for the existence of the containers, and raise an exception if they don't exist. """ cont = kwargs.get("cont") if cont: # Verify that it exists. If it doesn't, a NoSuchContain...
python
def create(self, name, *args, **kwargs): """ Standard task creation, but first check for the existence of the containers, and raise an exception if they don't exist. """ cont = kwargs.get("cont") if cont: # Verify that it exists. If it doesn't, a NoSuchContain...
Standard task creation, but first check for the existence of the containers, and raise an exception if they don't exist.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/image.py#L420-L433
pycontribs/pyrax
pyrax/image.py
JSONSchemaManager.images
def images(self): """ Returns a json-schema document that represents an image members entity, which is a container of image member entities. """ uri = "/%s/images" % self.uri_base resp, resp_body = self.api.method_get(uri) return resp_body
python
def images(self): """ Returns a json-schema document that represents an image members entity, which is a container of image member entities. """ uri = "/%s/images" % self.uri_base resp, resp_body = self.api.method_get(uri) return resp_body
Returns a json-schema document that represents an image members entity, which is a container of image member entities.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/image.py#L448-L455
pycontribs/pyrax
pyrax/image.py
JSONSchemaManager.image
def image(self): """ Returns a json-schema document that represents a single image entity. """ uri = "/%s/image" % self.uri_base resp, resp_body = self.api.method_get(uri) return resp_body
python
def image(self): """ Returns a json-schema document that represents a single image entity. """ uri = "/%s/image" % self.uri_base resp, resp_body = self.api.method_get(uri) return resp_body
Returns a json-schema document that represents a single image entity.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/image.py#L458-L464
pycontribs/pyrax
pyrax/image.py
JSONSchemaManager.image_members
def image_members(self): """ Returns a json-schema document that represents an image members entity (a container of member entities). """ uri = "/%s/members" % self.uri_base resp, resp_body = self.api.method_get(uri) return resp_body
python
def image_members(self): """ Returns a json-schema document that represents an image members entity (a container of member entities). """ uri = "/%s/members" % self.uri_base resp, resp_body = self.api.method_get(uri) return resp_body
Returns a json-schema document that represents an image members entity (a container of member entities).
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/image.py#L467-L474
pycontribs/pyrax
pyrax/image.py
JSONSchemaManager.image_member
def image_member(self): """ Returns a json-schema document that represents an image member entity. (a container of member entities). """ uri = "/%s/member" % self.uri_base resp, resp_body = self.api.method_get(uri) return resp_body
python
def image_member(self): """ Returns a json-schema document that represents an image member entity. (a container of member entities). """ uri = "/%s/member" % self.uri_base resp, resp_body = self.api.method_get(uri) return resp_body
Returns a json-schema document that represents an image member entity. (a container of member entities).
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/image.py#L477-L484
pycontribs/pyrax
pyrax/image.py
JSONSchemaManager.image_tasks
def image_tasks(self): """ Returns a json-schema document that represents a container of tasks entities. """ uri = "/%s/tasks" % self.uri_base resp, resp_body = self.api.method_get(uri) return resp_body
python
def image_tasks(self): """ Returns a json-schema document that represents a container of tasks entities. """ uri = "/%s/tasks" % self.uri_base resp, resp_body = self.api.method_get(uri) return resp_body
Returns a json-schema document that represents a container of tasks entities.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/image.py#L487-L494
pycontribs/pyrax
pyrax/image.py
JSONSchemaManager.image_task
def image_task(self): """ Returns a json-schema document that represents an task entity. """ uri = "/%s/task" % self.uri_base resp, resp_body = self.api.method_get(uri) return resp_body
python
def image_task(self): """ Returns a json-schema document that represents an task entity. """ uri = "/%s/task" % self.uri_base resp, resp_body = self.api.method_get(uri) return resp_body
Returns a json-schema document that represents an task entity.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/image.py#L497-L503
pycontribs/pyrax
pyrax/image.py
ImageClient._configure_manager
def _configure_manager(self): """ Create the manager to handle queues. """ self._manager = ImageManager(self, resource_class=Image, response_key="", plural_response_key="images", uri_base="images") self._tasks_manager = ImageTasksManager(self, reso...
python
def _configure_manager(self): """ Create the manager to handle queues. """ self._manager = ImageManager(self, resource_class=Image, response_key="", plural_response_key="images", uri_base="images") self._tasks_manager = ImageTasksManager(self, reso...
Create the manager to handle queues.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/image.py#L514-L525
pycontribs/pyrax
pyrax/image.py
ImageClient.list
def list(self, limit=None, marker=None, name=None, visibility=None, member_status=None, owner=None, tag=None, status=None, size_min=None, size_max=None, sort_key=None, sort_dir=None): """ Returns a list of resource objects. Pagination is supported through the optional 'ma...
python
def list(self, limit=None, marker=None, name=None, visibility=None, member_status=None, owner=None, tag=None, status=None, size_min=None, size_max=None, sort_key=None, sort_dir=None): """ Returns a list of resource objects. Pagination is supported through the optional 'ma...
Returns a list of resource objects. Pagination is supported through the optional 'marker' and 'limit' parameters. Filtering the returned value is possible by specifying values for any of the other parameters.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/image.py#L528-L539
pycontribs/pyrax
pyrax/image.py
ImageClient.list_all
def list_all(self, name=None, visibility=None, member_status=None, owner=None, tag=None, status=None, size_min=None, size_max=None, sort_key=None, sort_dir=None): """ Returns all of the images in one call, rather than in paginated batches. The same filtering options avail...
python
def list_all(self, name=None, visibility=None, member_status=None, owner=None, tag=None, status=None, size_min=None, size_max=None, sort_key=None, sort_dir=None): """ Returns all of the images in one call, rather than in paginated batches. The same filtering options avail...
Returns all of the images in one call, rather than in paginated batches. The same filtering options available in list() apply here, with the obvious exception of limit and marker.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/image.py#L542-L553
pycontribs/pyrax
pyrax/image.py
ImageClient.create
def create(self, name, img_format=None, data=None, container=None, obj=None, metadata=None): """ Creates a new image with the specified name. The image data can either be supplied directly in the 'data' parameter, or it can be an image stored in the object storage service. In...
python
def create(self, name, img_format=None, data=None, container=None, obj=None, metadata=None): """ Creates a new image with the specified name. The image data can either be supplied directly in the 'data' parameter, or it can be an image stored in the object storage service. In...
Creates a new image with the specified name. The image data can either be supplied directly in the 'data' parameter, or it can be an image stored in the object storage service. In the case of the latter, you can either supply the container and object names, or simply a StorageObject refe...
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/image.py#L565-L575
pycontribs/pyrax
pyrax/image.py
ImageClient.export_task
def export_task(self, img, cont): """ Creates a task to export the specified image to the swift container named in the 'cont' parameter. If the container does not exist, a NoSuchContainer exception is raised. The 'img' parameter can be either an Image object or the ID of an ...
python
def export_task(self, img, cont): """ Creates a task to export the specified image to the swift container named in the 'cont' parameter. If the container does not exist, a NoSuchContainer exception is raised. The 'img' parameter can be either an Image object or the ID of an ...
Creates a task to export the specified image to the swift container named in the 'cont' parameter. If the container does not exist, a NoSuchContainer exception is raised. The 'img' parameter can be either an Image object or the ID of an image. If these do not correspond to a valid image...
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/image.py#L670-L680
pycontribs/pyrax
pyrax/image.py
ImageClient.import_task
def import_task(self, img, cont, img_format=None, img_name=None): """ Creates a task to import the specified image from the swift container named in the 'cont' parameter. The new image will be named the same as the object in the container unless you specify a value for the 'img_n...
python
def import_task(self, img, cont, img_format=None, img_name=None): """ Creates a task to import the specified image from the swift container named in the 'cont' parameter. The new image will be named the same as the object in the container unless you specify a value for the 'img_n...
Creates a task to import the specified image from the swift container named in the 'cont' parameter. The new image will be named the same as the object in the container unless you specify a value for the 'img_name' parameter. By default it is assumed that the image is in 'vhd' format; i...
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/image.py#L683-L694
pycontribs/pyrax
pyrax/__init__.py
set_setting
def set_setting(key, val, env=None): """ Changes the value of the specified key in the current environment, or in another environment if specified. """ return settings.set(key, val, env=env)
python
def set_setting(key, val, env=None): """ Changes the value of the specified key in the current environment, or in another environment if specified. """ return settings.set(key, val, env=env)
Changes the value of the specified key in the current environment, or in another environment if specified.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/__init__.py#L376-L381
pycontribs/pyrax
pyrax/__init__.py
create_context
def create_context(id_type=None, env=None, username=None, password=None, tenant_id=None, tenant_name=None, api_key=None, verify_ssl=None): """ Returns an instance of the specified identity class, or if none is specified, an instance of the current setting for 'identity_class'. You may optionall...
python
def create_context(id_type=None, env=None, username=None, password=None, tenant_id=None, tenant_name=None, api_key=None, verify_ssl=None): """ Returns an instance of the specified identity class, or if none is specified, an instance of the current setting for 'identity_class'. You may optionall...
Returns an instance of the specified identity class, or if none is specified, an instance of the current setting for 'identity_class'. You may optionally set the environment by passing the name of that environment in the 'env' parameter.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/__init__.py#L390-L403
pycontribs/pyrax
pyrax/__init__.py
_create_identity
def _create_identity(id_type=None, username=None, password=None, tenant_id=None, tenant_name=None, api_key=None, verify_ssl=None, return_context=False): """ Creates an instance of the current identity_class and assigns it to the module-level name 'identity' by default. If 'return_con...
python
def _create_identity(id_type=None, username=None, password=None, tenant_id=None, tenant_name=None, api_key=None, verify_ssl=None, return_context=False): """ Creates an instance of the current identity_class and assigns it to the module-level name 'identity' by default. If 'return_con...
Creates an instance of the current identity_class and assigns it to the module-level name 'identity' by default. If 'return_context' is True, the module-level 'identity' is untouched, and instead the instance is returned.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/__init__.py#L406-L429
pycontribs/pyrax
pyrax/__init__.py
_assure_identity
def _assure_identity(fnc): """Ensures that the 'identity' attribute is not None.""" def _wrapped(*args, **kwargs): if identity is None: _create_identity() return fnc(*args, **kwargs) return _wrapped
python
def _assure_identity(fnc): """Ensures that the 'identity' attribute is not None.""" def _wrapped(*args, **kwargs): if identity is None: _create_identity() return fnc(*args, **kwargs) return _wrapped
Ensures that the 'identity' attribute is not None.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/__init__.py#L432-L438
pycontribs/pyrax
pyrax/__init__.py
_require_auth
def _require_auth(fnc): """Authentication decorator.""" @wraps(fnc) @_assure_identity def _wrapped(*args, **kwargs): if not identity.authenticated: msg = "Authentication required before calling '%s'." % fnc.__name__ raise exc.NotAuthenticated(msg) return fnc(*args...
python
def _require_auth(fnc): """Authentication decorator.""" @wraps(fnc) @_assure_identity def _wrapped(*args, **kwargs): if not identity.authenticated: msg = "Authentication required before calling '%s'." % fnc.__name__ raise exc.NotAuthenticated(msg) return fnc(*args...
Authentication decorator.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/__init__.py#L441-L450
pycontribs/pyrax
pyrax/__init__.py
_safe_region
def _safe_region(region=None, context=None): """Value to use when no region is specified.""" ret = region or settings.get("region") context = context or identity if not ret: # Nothing specified; get the default from the identity object. if not context: _create_identity() ...
python
def _safe_region(region=None, context=None): """Value to use when no region is specified.""" ret = region or settings.get("region") context = context or identity if not ret: # Nothing specified; get the default from the identity object. if not context: _create_identity() ...
Value to use when no region is specified.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/__init__.py#L453-L469
pycontribs/pyrax
pyrax/__init__.py
auth_with_token
def auth_with_token(token, tenant_id=None, tenant_name=None, region=None): """ If you already have a valid token and either a tenant ID or name, you can call this to configure the identity and available services. """ global regions, services identity.auth_with_token(token, tenant_id=tenant_id, ...
python
def auth_with_token(token, tenant_id=None, tenant_name=None, region=None): """ If you already have a valid token and either a tenant ID or name, you can call this to configure the identity and available services. """ global regions, services identity.auth_with_token(token, tenant_id=tenant_id, ...
If you already have a valid token and either a tenant ID or name, you can call this to configure the identity and available services.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/__init__.py#L473-L483
pycontribs/pyrax
pyrax/__init__.py
set_credentials
def set_credentials(username, api_key=None, password=None, region=None, tenant_id=None, authenticate=True): """ Set the credentials directly, and then try to authenticate. If the region is passed, it will authenticate against the proper endpoint for that region, and set the default region for c...
python
def set_credentials(username, api_key=None, password=None, region=None, tenant_id=None, authenticate=True): """ Set the credentials directly, and then try to authenticate. If the region is passed, it will authenticate against the proper endpoint for that region, and set the default region for c...
Set the credentials directly, and then try to authenticate. If the region is passed, it will authenticate against the proper endpoint for that region, and set the default region for connections.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/__init__.py#L487-L503
pycontribs/pyrax
pyrax/__init__.py
set_credential_file
def set_credential_file(cred_file, region=None, authenticate=True): """ Read in the credentials from the supplied file path, and then try to authenticate. The file should be a standard config file in one of the following formats: For Keystone authentication: [keystone] username = my...
python
def set_credential_file(cred_file, region=None, authenticate=True): """ Read in the credentials from the supplied file path, and then try to authenticate. The file should be a standard config file in one of the following formats: For Keystone authentication: [keystone] username = my...
Read in the credentials from the supplied file path, and then try to authenticate. The file should be a standard config file in one of the following formats: For Keystone authentication: [keystone] username = myusername password = 1234567890abcdef tenant_id = abcdef123456789...
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/__init__.py#L507-L533
pycontribs/pyrax
pyrax/__init__.py
keyring_auth
def keyring_auth(username=None, region=None, authenticate=True): """ Use the password stored within the keyring to authenticate. If a username is supplied, that name is used; otherwise, the keyring_username value from the config file is used. If there is no username defined, or if the keyring modul...
python
def keyring_auth(username=None, region=None, authenticate=True): """ Use the password stored within the keyring to authenticate. If a username is supplied, that name is used; otherwise, the keyring_username value from the config file is used. If there is no username defined, or if the keyring modul...
Use the password stored within the keyring to authenticate. If a username is supplied, that name is used; otherwise, the keyring_username value from the config file is used. If there is no username defined, or if the keyring module is not installed, or there is no password set for the given username, t...
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/__init__.py#L536-L563
pycontribs/pyrax
pyrax/__init__.py
clear_credentials
def clear_credentials(): """De-authenticate by clearing all the names back to None.""" global identity, regions, services, cloudservers, cloudfiles, cloud_cdn global cloud_loadbalancers, cloud_databases, cloud_blockstorage, cloud_dns global cloud_networks, cloud_monitoring, autoscale, images, queues ...
python
def clear_credentials(): """De-authenticate by clearing all the names back to None.""" global identity, regions, services, cloudservers, cloudfiles, cloud_cdn global cloud_loadbalancers, cloud_databases, cloud_blockstorage, cloud_dns global cloud_networks, cloud_monitoring, autoscale, images, queues ...
De-authenticate by clearing all the names back to None.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/__init__.py#L587-L606
pycontribs/pyrax
pyrax/__init__.py
connect_to_services
def connect_to_services(region=None): """Establishes authenticated connections to the various cloud APIs.""" global cloudservers, cloudfiles, cloud_loadbalancers, cloud_databases global cloud_blockstorage, cloud_dns, cloud_networks, cloud_monitoring global autoscale, images, queues, cloud_cdn clouds...
python
def connect_to_services(region=None): """Establishes authenticated connections to the various cloud APIs.""" global cloudservers, cloudfiles, cloud_loadbalancers, cloud_databases global cloud_blockstorage, cloud_dns, cloud_networks, cloud_monitoring global autoscale, images, queues, cloud_cdn clouds...
Establishes authenticated connections to the various cloud APIs.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/__init__.py#L620-L636
pycontribs/pyrax
pyrax/__init__.py
_get_service_endpoint
def _get_service_endpoint(context, svc, region=None, public=True): """ Parses the services dict to get the proper endpoint for the given service. """ region = _safe_region(region) # If a specific context is passed, use that. Otherwise, use the global # identity reference. context = context o...
python
def _get_service_endpoint(context, svc, region=None, public=True): """ Parses the services dict to get the proper endpoint for the given service. """ region = _safe_region(region) # If a specific context is passed, use that. Otherwise, use the global # identity reference. context = context o...
Parses the services dict to get the proper endpoint for the given service.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/__init__.py#L639-L655
pycontribs/pyrax
pyrax/__init__.py
connect_to_cloudservers
def connect_to_cloudservers(region=None, context=None, verify_ssl=None, **kwargs): """Creates a client for working with cloud servers.""" context = context or identity _cs_auth_plugin.discover_auth_systems() id_type = get_setting("identity_type") if id_type != "keystone": auth_plugin = _cs_a...
python
def connect_to_cloudservers(region=None, context=None, verify_ssl=None, **kwargs): """Creates a client for working with cloud servers.""" context = context or identity _cs_auth_plugin.discover_auth_systems() id_type = get_setting("identity_type") if id_type != "keystone": auth_plugin = _cs_a...
Creates a client for working with cloud servers.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/__init__.py#L658-L727
pycontribs/pyrax
pyrax/__init__.py
connect_to_cloudfiles
def connect_to_cloudfiles(region=None, public=None): """Creates a client for working with CloudFiles/Swift.""" if public is None: is_public = not bool(get_setting("use_servicenet")) else: is_public = public ret = _create_client(ep_name="object_store", region=region, public=is...
python
def connect_to_cloudfiles(region=None, public=None): """Creates a client for working with CloudFiles/Swift.""" if public is None: is_public = not bool(get_setting("use_servicenet")) else: is_public = public ret = _create_client(ep_name="object_store", region=region, public=is...
Creates a client for working with CloudFiles/Swift.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/__init__.py#L730-L743
pycontribs/pyrax
pyrax/__init__.py
connect_to_cloud_cdn
def connect_to_cloud_cdn(region=None): """Creates a client for working with cloud loadbalancers.""" global default_region # (nicholaskuechler/keekz) 2017-11-30 - Not a very elegant solution... # Cloud CDN only exists in 2 regions: DFW and LON # But this isn't playing nicely with the identity service...
python
def connect_to_cloud_cdn(region=None): """Creates a client for working with cloud loadbalancers.""" global default_region # (nicholaskuechler/keekz) 2017-11-30 - Not a very elegant solution... # Cloud CDN only exists in 2 regions: DFW and LON # But this isn't playing nicely with the identity service...
Creates a client for working with cloud loadbalancers.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/__init__.py#L767-L785
pycontribs/pyrax
pyrax/__init__.py
connect_to_images
def connect_to_images(region=None, public=True): """Creates a client for working with Images.""" return _create_client(ep_name="image", region=region, public=public)
python
def connect_to_images(region=None, public=True): """Creates a client for working with Images.""" return _create_client(ep_name="image", region=region, public=public)
Creates a client for working with Images.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/__init__.py#L818-L820
pycontribs/pyrax
pyrax/__init__.py
connect_to_queues
def connect_to_queues(region=None, public=True): """Creates a client for working with Queues.""" return _create_client(ep_name="queues", region=region, public=public)
python
def connect_to_queues(region=None, public=True): """Creates a client for working with Queues.""" return _create_client(ep_name="queues", region=region, public=public)
Creates a client for working with Queues.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/__init__.py#L823-L825
pycontribs/pyrax
pyrax/__init__.py
Settings.get
def get(self, key, env=None): """ Returns the config setting for the specified environment. If no environment is specified, the value for the current environment is returned. If an unknown key or environment is passed, None is returned. """ if env is None: env...
python
def get(self, key, env=None): """ Returns the config setting for the specified environment. If no environment is specified, the value for the current environment is returned. If an unknown key or environment is passed, None is returned. """ if env is None: env...
Returns the config setting for the specified environment. If no environment is specified, the value for the current environment is returned. If an unknown key or environment is passed, None is returned.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/__init__.py#L183-L207
pycontribs/pyrax
pyrax/__init__.py
Settings.set
def set(self, key, val, env=None): """ Changes the value for the setting specified by 'key' to the new value. By default this will change the current environment, but you can change values in other environments by passing the name of that environment as the 'env' parameter. ...
python
def set(self, key, val, env=None): """ Changes the value for the setting specified by 'key' to the new value. By default this will change the current environment, but you can change values in other environments by passing the name of that environment as the 'env' parameter. ...
Changes the value for the setting specified by 'key' to the new value. By default this will change the current environment, but you can change values in other environments by passing the name of that environment as the 'env' parameter.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/__init__.py#L210-L242
pycontribs/pyrax
pyrax/__init__.py
Settings.read_config
def read_config(self, config_file): """ Parses the specified configuration file and stores the values. Raises an InvalidConfigurationFile exception if the file is not well-formed. """ cfg = ConfigParser.SafeConfigParser() try: cfg.read(config_file) exc...
python
def read_config(self, config_file): """ Parses the specified configuration file and stores the values. Raises an InvalidConfigurationFile exception if the file is not well-formed. """ cfg = ConfigParser.SafeConfigParser() try: cfg.read(config_file) exc...
Parses the specified configuration file and stores the values. Raises an InvalidConfigurationFile exception if the file is not well-formed.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/__init__.py#L272-L343
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSRecord.update
def update(self, data=None, priority=None, ttl=None, comment=None): """ Modifies this record. """ return self.manager.update_record(self.domain_id, self, data=data, priority=priority, ttl=ttl, comment=comment)
python
def update(self, data=None, priority=None, ttl=None, comment=None): """ Modifies this record. """ return self.manager.update_record(self.domain_id, self, data=data, priority=priority, ttl=ttl, comment=comment)
Modifies this record.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L70-L75
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSDomain.delete
def delete(self, delete_subdomains=False): """ Deletes this domain and all of its resource records. If this domain has subdomains, each subdomain will now become a root domain. If you wish to also delete any subdomains, pass True to 'delete_subdomains'. """ self.manager.d...
python
def delete(self, delete_subdomains=False): """ Deletes this domain and all of its resource records. If this domain has subdomains, each subdomain will now become a root domain. If you wish to also delete any subdomains, pass True to 'delete_subdomains'. """ self.manager.d...
Deletes this domain and all of its resource records. If this domain has subdomains, each subdomain will now become a root domain. If you wish to also delete any subdomains, pass True to 'delete_subdomains'.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L97-L103
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSDomain.update
def update(self, emailAddress=None, ttl=None, comment=None): """ Provides a way to modify the following attributes of a domain entry: - email address - ttl setting - comment """ return self.manager.update_domain(self, emailAddress=emailAddress,...
python
def update(self, emailAddress=None, ttl=None, comment=None): """ Provides a way to modify the following attributes of a domain entry: - email address - ttl setting - comment """ return self.manager.update_domain(self, emailAddress=emailAddress,...
Provides a way to modify the following attributes of a domain entry: - email address - ttl setting - comment
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L151-L160
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSDomain.list_subdomains
def list_subdomains(self, limit=None, offset=None): """ Returns a list of all subdomains for this domain. """ return self.manager.list_subdomains(self, limit=limit, offset=offset)
python
def list_subdomains(self, limit=None, offset=None): """ Returns a list of all subdomains for this domain. """ return self.manager.list_subdomains(self, limit=limit, offset=offset)
Returns a list of all subdomains for this domain.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L163-L167
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSDomain.list_records
def list_records(self, limit=None, offset=None): """ Returns a list of all records configured for this domain. """ return self.manager.list_records(self, limit=limit, offset=offset)
python
def list_records(self, limit=None, offset=None): """ Returns a list of all records configured for this domain. """ return self.manager.list_records(self, limit=limit, offset=offset)
Returns a list of all records configured for this domain.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L170-L174
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSDomain.search_records
def search_records(self, record_type, name=None, data=None): """ Returns a list of all records configured for this domain that match the supplied search criteria. """ return self.manager.search_records(self, record_type=record_type, name=name, data=data)
python
def search_records(self, record_type, name=None, data=None): """ Returns a list of all records configured for this domain that match the supplied search criteria. """ return self.manager.search_records(self, record_type=record_type, name=name, data=data)
Returns a list of all records configured for this domain that match the supplied search criteria.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L177-L183
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSDomain.find_record
def find_record(self, record_type, name=None, data=None): """ Returns a single record for this domain that matches the supplied search criteria. If no record matches, a DomainRecordNotFound exception will be raised. If more than one matches, a DomainRecordNotUnique exception wil...
python
def find_record(self, record_type, name=None, data=None): """ Returns a single record for this domain that matches the supplied search criteria. If no record matches, a DomainRecordNotFound exception will be raised. If more than one matches, a DomainRecordNotUnique exception wil...
Returns a single record for this domain that matches the supplied search criteria. If no record matches, a DomainRecordNotFound exception will be raised. If more than one matches, a DomainRecordNotUnique exception will be raised.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L186-L201
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSDomain.update_record
def update_record(self, record, data=None, priority=None, ttl=None, comment=None): """ Modifies an existing record for this domain. """ return self.manager.update_record(self, record, data=data, priority=priority, ttl=ttl, comment=comment)
python
def update_record(self, record, data=None, priority=None, ttl=None, comment=None): """ Modifies an existing record for this domain. """ return self.manager.update_record(self, record, data=data, priority=priority, ttl=ttl, comment=comment)
Modifies an existing record for this domain.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L228-L234
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSManager._create_body
def _create_body(self, name, emailAddress, ttl=3600, comment=None, subdomains=None, records=None): """ Creates the appropriate dict for creating a new domain. """ if subdomains is None: subdomains = [] if records is None: records = [] b...
python
def _create_body(self, name, emailAddress, ttl=3600, comment=None, subdomains=None, records=None): """ Creates the appropriate dict for creating a new domain. """ if subdomains is None: subdomains = [] if records is None: records = [] b...
Creates the appropriate dict for creating a new domain.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L301-L322
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSManager._reset_paging
def _reset_paging(self, service, body=None): """ Resets the internal attributes when there is no current paging request. """ if service == "all": for svc in self._paging.keys(): svc_dct = self._paging[svc] svc_dct["next_uri"] = svc_dct["prev_ur...
python
def _reset_paging(self, service, body=None): """ Resets the internal attributes when there is no current paging request. """ if service == "all": for svc in self._paging.keys(): svc_dct = self._paging[svc] svc_dct["next_uri"] = svc_dct["prev_ur...
Resets the internal attributes when there is no current paging request.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L342-L368
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSManager.list
def list(self, limit=None, offset=None): """Gets a list of all domains, or optionally a page of domains.""" uri = "/%s%s" % (self.uri_base, self._get_pagination_qs(limit, offset)) return self._list(uri)
python
def list(self, limit=None, offset=None): """Gets a list of all domains, or optionally a page of domains.""" uri = "/%s%s" % (self.uri_base, self._get_pagination_qs(limit, offset)) return self._list(uri)
Gets a list of all domains, or optionally a page of domains.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L382-L385
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSManager._list
def _list(self, uri, obj_class=None, list_all=False): """ Handles the communication with the API when getting a full listing of the resources managed by this class. """ resp, resp_body = self._retry_get(uri) if obj_class is None: obj_class = self.resource_clas...
python
def _list(self, uri, obj_class=None, list_all=False): """ Handles the communication with the API when getting a full listing of the resources managed by this class. """ resp, resp_body = self._retry_get(uri) if obj_class is None: obj_class = self.resource_clas...
Handles the communication with the API when getting a full listing of the resources managed by this class.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L388-L407
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSManager.list_previous_page
def list_previous_page(self): """ When paging through results, this will return the previous page, using the same limit. If there are no more results, a NoMoreResults exception will be raised. """ uri = self._paging.get("domain", {}).get("prev_uri") if uri is None...
python
def list_previous_page(self): """ When paging through results, this will return the previous page, using the same limit. If there are no more results, a NoMoreResults exception will be raised. """ uri = self._paging.get("domain", {}).get("prev_uri") if uri is None...
When paging through results, this will return the previous page, using the same limit. If there are no more results, a NoMoreResults exception will be raised.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L410-L420
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSManager.list_next_page
def list_next_page(self): """ When paging through results, this will return the next page, using the same limit. If there are no more results, a NoMoreResults exception will be raised. """ uri = self._paging.get("domain", {}).get("next_uri") if uri is None: ...
python
def list_next_page(self): """ When paging through results, this will return the next page, using the same limit. If there are no more results, a NoMoreResults exception will be raised. """ uri = self._paging.get("domain", {}).get("next_uri") if uri is None: ...
When paging through results, this will return the next page, using the same limit. If there are no more results, a NoMoreResults exception will be raised.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L423-L433
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSManager._get
def _get(self, uri): """ Handles the communication with the API when getting a specific resource managed by this class. Because DNS returns a different format for the body, the BaseManager method must be overridden here. """ uri = "%s?showRecords=false&showSubdom...
python
def _get(self, uri): """ Handles the communication with the API when getting a specific resource managed by this class. Because DNS returns a different format for the body, the BaseManager method must be overridden here. """ uri = "%s?showRecords=false&showSubdom...
Handles the communication with the API when getting a specific resource managed by this class. Because DNS returns a different format for the body, the BaseManager method must be overridden here.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L436-L447
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSManager._retry_get
def _retry_get(self, uri): """ Handles GET calls to the Cloud DNS API in order to retry on empty body responses. """ for i in six.moves.range(DEFAULT_RETRY): resp, body = self.api.method_get(uri) if body: return resp, body # Tried t...
python
def _retry_get(self, uri): """ Handles GET calls to the Cloud DNS API in order to retry on empty body responses. """ for i in six.moves.range(DEFAULT_RETRY): resp, body = self.api.method_get(uri) if body: return resp, body # Tried t...
Handles GET calls to the Cloud DNS API in order to retry on empty body responses.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L449-L460
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSManager._async_call
def _async_call(self, uri, body=None, method="GET", error_class=None, has_response=True, *args, **kwargs): """ Handles asynchronous call/responses for the DNS API. Returns the response headers and body if the call was successful. If an error status is returned, and the 'erro...
python
def _async_call(self, uri, body=None, method="GET", error_class=None, has_response=True, *args, **kwargs): """ Handles asynchronous call/responses for the DNS API. Returns the response headers and body if the call was successful. If an error status is returned, and the 'erro...
Handles asynchronous call/responses for the DNS API. Returns the response headers and body if the call was successful. If an error status is returned, and the 'error_class' parameter is specified, that class of error will be raised with the details from the response. If no error class i...
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L462-L518
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSManager._process_async_error
def _process_async_error(self, resp_body, error_class): """ The DNS API does not return a consistent format for their error messages. This abstracts out the differences in order to present a single unified message in the exception to be raised. """ def _fmt_error(err): ...
python
def _process_async_error(self, resp_body, error_class): """ The DNS API does not return a consistent format for their error messages. This abstracts out the differences in order to present a single unified message in the exception to be raised. """ def _fmt_error(err): ...
The DNS API does not return a consistent format for their error messages. This abstracts out the differences in order to present a single unified message in the exception to be raised.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L521-L542
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSManager._create
def _create(self, uri, body, records=None, subdomains=None, return_none=False, return_raw=False, **kwargs): """ Handles the communication with the API when creating a new resource managed by this class. Since DNS works completely differently for create() than the other ...
python
def _create(self, uri, body, records=None, subdomains=None, return_none=False, return_raw=False, **kwargs): """ Handles the communication with the API when creating a new resource managed by this class. Since DNS works completely differently for create() than the other ...
Handles the communication with the API when creating a new resource managed by this class. Since DNS works completely differently for create() than the other APIs, this method overrides the default BaseManager behavior. If 'records' are supplied, they should be a list of dicts. Each ...
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L545-L573
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSManager.delete
def delete(self, domain, delete_subdomains=False): """ Deletes the specified domain and all of its resource records. If the domain has subdomains, each subdomain will now become a root domain. If you wish to also delete any subdomains, pass True to 'delete_subdomains'. """ ...
python
def delete(self, domain, delete_subdomains=False): """ Deletes the specified domain and all of its resource records. If the domain has subdomains, each subdomain will now become a root domain. If you wish to also delete any subdomains, pass True to 'delete_subdomains'. """ ...
Deletes the specified domain and all of its resource records. If the domain has subdomains, each subdomain will now become a root domain. If you wish to also delete any subdomains, pass True to 'delete_subdomains'.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L576-L586
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSManager.findall
def findall(self, **kwargs): """ Finds all items with attributes matching ``**kwargs``. Normally this isn't very efficient, since the default action is to load the entire list and then filter on the Python side, but the DNS API provides a more efficient search option when filter...
python
def findall(self, **kwargs): """ Finds all items with attributes matching ``**kwargs``. Normally this isn't very efficient, since the default action is to load the entire list and then filter on the Python side, but the DNS API provides a more efficient search option when filter...
Finds all items with attributes matching ``**kwargs``. Normally this isn't very efficient, since the default action is to load the entire list and then filter on the Python side, but the DNS API provides a more efficient search option when filtering on name. So if the filter is on name,...
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L589-L606
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSManager.changes_since
def changes_since(self, domain, date_or_datetime): """ Gets the changes for a domain since the specified date/datetime. The date can be one of: - a Python datetime object - a Python date object - a string in the format 'YYYY-MM-YY HH:MM:SS' - a str...
python
def changes_since(self, domain, date_or_datetime): """ Gets the changes for a domain since the specified date/datetime. The date can be one of: - a Python datetime object - a Python date object - a string in the format 'YYYY-MM-YY HH:MM:SS' - a str...
Gets the changes for a domain since the specified date/datetime. The date can be one of: - a Python datetime object - a Python date object - a string in the format 'YYYY-MM-YY HH:MM:SS' - a string in the format 'YYYY-MM-YY' It returns a list of dicts, who...
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L609-L637
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSManager.export_domain
def export_domain(self, domain): """ Provides the BIND (Berkeley Internet Name Domain) 9 formatted contents of the requested domain. This call is for a single domain only, and as such, does not provide subdomain information. Sample export: {u'accountId': 000000, ...
python
def export_domain(self, domain): """ Provides the BIND (Berkeley Internet Name Domain) 9 formatted contents of the requested domain. This call is for a single domain only, and as such, does not provide subdomain information. Sample export: {u'accountId': 000000, ...
Provides the BIND (Berkeley Internet Name Domain) 9 formatted contents of the requested domain. This call is for a single domain only, and as such, does not provide subdomain information. Sample export: {u'accountId': 000000, u'contentType': u'BIND_9', u'co...
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L640-L658
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSManager.import_domain
def import_domain(self, domain_data): """ Takes a string in the BIND 9 format and creates a new domain. See the 'export_domain()' method for a description of the format. """ uri = "/domains/import" body = {"domains": [{ "contentType": "BIND_9", ...
python
def import_domain(self, domain_data): """ Takes a string in the BIND 9 format and creates a new domain. See the 'export_domain()' method for a description of the format. """ uri = "/domains/import" body = {"domains": [{ "contentType": "BIND_9", ...
Takes a string in the BIND 9 format and creates a new domain. See the 'export_domain()' method for a description of the format.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L661-L673
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSManager.update_domain
def update_domain(self, domain, emailAddress=None, ttl=None, comment=None): """ Provides a way to modify the following attributes of a domain record: - email address - ttl setting - comment """ if not any((emailAddress, ttl, comment)): ...
python
def update_domain(self, domain, emailAddress=None, ttl=None, comment=None): """ Provides a way to modify the following attributes of a domain record: - email address - ttl setting - comment """ if not any((emailAddress, ttl, comment)): ...
Provides a way to modify the following attributes of a domain record: - email address - ttl setting - comment
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L676-L698
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSManager.list_subdomains
def list_subdomains(self, domain, limit=None, offset=None): """ Returns a list of all subdomains of the specified domain. """ # The commented-out uri is the official API, but it is # horribly slow. # uri = "/domains/%s/subdomains" % utils.get_id(domain) uri = "/dom...
python
def list_subdomains(self, domain, limit=None, offset=None): """ Returns a list of all subdomains of the specified domain. """ # The commented-out uri is the official API, but it is # horribly slow. # uri = "/domains/%s/subdomains" % utils.get_id(domain) uri = "/dom...
Returns a list of all subdomains of the specified domain.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L701-L712
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSManager.list_subdomains_previous_page
def list_subdomains_previous_page(self): """ When paging through subdomain results, this will return the previous page, using the same limit. If there are no more results, a NoMoreResults exception will be raised. """ uri = self._paging.get("subdomain", {}).get("prev_uri"...
python
def list_subdomains_previous_page(self): """ When paging through subdomain results, this will return the previous page, using the same limit. If there are no more results, a NoMoreResults exception will be raised. """ uri = self._paging.get("subdomain", {}).get("prev_uri"...
When paging through subdomain results, this will return the previous page, using the same limit. If there are no more results, a NoMoreResults exception will be raised.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L724-L734
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSManager.list_subdomains_next_page
def list_subdomains_next_page(self): """ When paging through subdomain results, this will return the next page, using the same limit. If there are no more results, a NoMoreResults exception will be raised. """ uri = self._paging.get("subdomain", {}).get("next_uri") ...
python
def list_subdomains_next_page(self): """ When paging through subdomain results, this will return the next page, using the same limit. If there are no more results, a NoMoreResults exception will be raised. """ uri = self._paging.get("subdomain", {}).get("next_uri") ...
When paging through subdomain results, this will return the next page, using the same limit. If there are no more results, a NoMoreResults exception will be raised.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L737-L747
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSManager.list_records
def list_records(self, domain, limit=None, offset=None): """ Returns a list of all records configured for the specified domain. """ uri = "/domains/%s/records%s" % (utils.get_id(domain), self._get_pagination_qs(limit, offset)) return self._list_records(uri)
python
def list_records(self, domain, limit=None, offset=None): """ Returns a list of all records configured for the specified domain. """ uri = "/domains/%s/records%s" % (utils.get_id(domain), self._get_pagination_qs(limit, offset)) return self._list_records(uri)
Returns a list of all records configured for the specified domain.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L750-L756
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSManager.list_records_previous_page
def list_records_previous_page(self): """ When paging through record results, this will return the previous page, using the same limit. If there are no more results, a NoMoreResults exception will be raised. """ uri = self._paging.get("record", {}).get("prev_uri") ...
python
def list_records_previous_page(self): """ When paging through record results, this will return the previous page, using the same limit. If there are no more results, a NoMoreResults exception will be raised. """ uri = self._paging.get("record", {}).get("prev_uri") ...
When paging through record results, this will return the previous page, using the same limit. If there are no more results, a NoMoreResults exception will be raised.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L773-L783
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSManager.list_records_next_page
def list_records_next_page(self): """ When paging through record results, this will return the next page, using the same limit. If there are no more results, a NoMoreResults exception will be raised. """ uri = self._paging.get("record", {}).get("next_uri") if uri ...
python
def list_records_next_page(self): """ When paging through record results, this will return the next page, using the same limit. If there are no more results, a NoMoreResults exception will be raised. """ uri = self._paging.get("record", {}).get("next_uri") if uri ...
When paging through record results, this will return the next page, using the same limit. If there are no more results, a NoMoreResults exception will be raised.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L786-L795
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSManager.search_records
def search_records(self, domain, record_type, name=None, data=None): """ Returns a list of all records configured for the specified domain that match the supplied search criteria. """ search_params = [] if name: search_params.append("name=%s" % name) i...
python
def search_records(self, domain, record_type, name=None, data=None): """ Returns a list of all records configured for the specified domain that match the supplied search criteria. """ search_params = [] if name: search_params.append("name=%s" % name) i...
Returns a list of all records configured for the specified domain that match the supplied search criteria.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L798-L824
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSManager.add_records
def add_records(self, domain, records): """ Adds the records to this domain. Each record should be a dict with the following keys: - type (required) - name (required) - data (required) - ttl (optional) - comment (optional) -...
python
def add_records(self, domain, records): """ Adds the records to this domain. Each record should be a dict with the following keys: - type (required) - name (required) - data (required) - ttl (optional) - comment (optional) -...
Adds the records to this domain. Each record should be a dict with the following keys: - type (required) - name (required) - data (required) - ttl (optional) - comment (optional) - priority (required for MX and SRV records; forbidden otherw...
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L827-L850
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSManager.get_record
def get_record(self, domain, record): """ Gets the full information for an existing record for this domain. """ rec_id = utils.get_id(record) domain_id = utils.get_id(domain) uri = "/domains/%s/records/%s" % (domain_id, rec_id) resp, resp_body = self._retry_get(ur...
python
def get_record(self, domain, record): """ Gets the full information for an existing record for this domain. """ rec_id = utils.get_id(record) domain_id = utils.get_id(domain) uri = "/domains/%s/records/%s" % (domain_id, rec_id) resp, resp_body = self._retry_get(ur...
Gets the full information for an existing record for this domain.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L853-L862
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSManager.update_record
def update_record(self, domain, record, data=None, priority=None, ttl=None, comment=None): """ Modifies an existing record for a domain. """ rdict = {"id": record.id, "name": record.name, } pdict = {"data": data, "priori...
python
def update_record(self, domain, record, data=None, priority=None, ttl=None, comment=None): """ Modifies an existing record for a domain. """ rdict = {"id": record.id, "name": record.name, } pdict = {"data": data, "priori...
Modifies an existing record for a domain.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L865-L879
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSManager.update_records
def update_records(self, domain, records): """ Modifies an existing records for a domain. """ if not isinstance(records, list): raise TypeError("Expected records of type list") uri = "/domains/%s/records" % utils.get_id(domain) resp, resp_body = self._async_ca...
python
def update_records(self, domain, records): """ Modifies an existing records for a domain. """ if not isinstance(records, list): raise TypeError("Expected records of type list") uri = "/domains/%s/records" % utils.get_id(domain) resp, resp_body = self._async_ca...
Modifies an existing records for a domain.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L882-L892
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSManager.delete_record
def delete_record(self, domain, record): """ Deletes an existing record for a domain. """ uri = "/domains/%s/records/%s" % (utils.get_id(domain), utils.get_id(record)) resp, resp_body = self._async_call(uri, method="DELETE", error_class=exc.DomainR...
python
def delete_record(self, domain, record): """ Deletes an existing record for a domain. """ uri = "/domains/%s/records/%s" % (utils.get_id(domain), utils.get_id(record)) resp, resp_body = self._async_call(uri, method="DELETE", error_class=exc.DomainR...
Deletes an existing record for a domain.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L895-L903
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSManager._get_ptr_details
def _get_ptr_details(self, device, device_type): """ Takes a device and device type and returns the corresponding HREF link and service name for use with PTR record management. """ context = self.api.identity region = self.api.region_name if device_type.lower().st...
python
def _get_ptr_details(self, device, device_type): """ Takes a device and device type and returns the corresponding HREF link and service name for use with PTR record management. """ context = self.api.identity region = self.api.region_name if device_type.lower().st...
Takes a device and device type and returns the corresponding HREF link and service name for use with PTR record management.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L906-L922
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSManager._resolve_device_type
def _resolve_device_type(self, device): """ Given a device, determines if it is a CloudServer, a CloudLoadBalancer, or an invalid device. """ try: from tests.unit import fakes server_types = (pyrax.CloudServer, fakes.FakeServer) lb_types = (Clo...
python
def _resolve_device_type(self, device): """ Given a device, determines if it is a CloudServer, a CloudLoadBalancer, or an invalid device. """ try: from tests.unit import fakes server_types = (pyrax.CloudServer, fakes.FakeServer) lb_types = (Clo...
Given a device, determines if it is a CloudServer, a CloudLoadBalancer, or an invalid device.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L925-L946
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSManager.list_ptr_records
def list_ptr_records(self, device): """ Returns a list of all PTR records configured for this device. """ device_type = self._resolve_device_type(device) href, svc_name = self._get_ptr_details(device, device_type) uri = "/rdns/%s?href=%s" % (svc_name, href) try: ...
python
def list_ptr_records(self, device): """ Returns a list of all PTR records configured for this device. """ device_type = self._resolve_device_type(device) href, svc_name = self._get_ptr_details(device, device_type) uri = "/rdns/%s?href=%s" % (svc_name, href) try: ...
Returns a list of all PTR records configured for this device.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L949-L962
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSManager.add_ptr_records
def add_ptr_records(self, device, records): """ Adds one or more PTR records to the specified device. """ device_type = self._resolve_device_type(device) href, svc_name = self._get_ptr_details(device, device_type) if not isinstance(records, (list, tuple)): rec...
python
def add_ptr_records(self, device, records): """ Adds one or more PTR records to the specified device. """ device_type = self._resolve_device_type(device) href, svc_name = self._get_ptr_details(device, device_type) if not isinstance(records, (list, tuple)): rec...
Adds one or more PTR records to the specified device.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L965-L1001
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSManager.update_ptr_record
def update_ptr_record(self, device, record, domain_name, data=None, ttl=None, comment=None): """ Updates a PTR record with the supplied values. """ device_type = self._resolve_device_type(device) href, svc_name = self._get_ptr_details(device, device_type) try:...
python
def update_ptr_record(self, device, record, domain_name, data=None, ttl=None, comment=None): """ Updates a PTR record with the supplied values. """ device_type = self._resolve_device_type(device) href, svc_name = self._get_ptr_details(device, device_type) try:...
Updates a PTR record with the supplied values.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L1004-L1040
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSManager.delete_ptr_records
def delete_ptr_records(self, device, ip_address=None): """ Deletes the PTR records for the specified device. If 'ip_address' is supplied, only the PTR records with that IP address will be deleted. """ device_type = self._resolve_device_type(device) href, svc_name = self._...
python
def delete_ptr_records(self, device, ip_address=None): """ Deletes the PTR records for the specified device. If 'ip_address' is supplied, only the PTR records with that IP address will be deleted. """ device_type = self._resolve_device_type(device) href, svc_name = self._...
Deletes the PTR records for the specified device. If 'ip_address' is supplied, only the PTR records with that IP address will be deleted.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L1043-L1056
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSClient._configure_manager
def _configure_manager(self): """ Creates a manager to handle the instances, and another to handle flavors. """ self._manager = CloudDNSManager(self, resource_class=CloudDNSDomain, response_key="domains", plural_response_key="domains", uri_base="do...
python
def _configure_manager(self): """ Creates a manager to handle the instances, and another to handle flavors. """ self._manager = CloudDNSManager(self, resource_class=CloudDNSDomain, response_key="domains", plural_response_key="domains", uri_base="do...
Creates a manager to handle the instances, and another to handle flavors.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L1066-L1073
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSClient.method_get
def method_get(self, uri, **kwargs): """ Overload the method_get function in order to retry on empty body responses from the Cloud DNS API """ for i in six.moves.range(3): resp, body = super(CloudDNSClient, self).method_get(uri, **kwargs) if body: ...
python
def method_get(self, uri, **kwargs): """ Overload the method_get function in order to retry on empty body responses from the Cloud DNS API """ for i in six.moves.range(3): resp, body = super(CloudDNSClient, self).method_get(uri, **kwargs) if body: ...
Overload the method_get function in order to retry on empty body responses from the Cloud DNS API
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L1075-L1085
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSClient.list
def list(self, limit=None, offset=None): """Returns a list of all resources.""" return self._manager.list(limit=limit, offset=offset)
python
def list(self, limit=None, offset=None): """Returns a list of all resources.""" return self._manager.list(limit=limit, offset=offset)
Returns a list of all resources.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L1105-L1107
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSClient.update_domain
def update_domain(self, domain, emailAddress=None, ttl=None, comment=None): """ Provides a way to modify the following attributes of a domain record: - email address - ttl setting - comment """ return domain.update(emailAddress=emailAddress, ...
python
def update_domain(self, domain, emailAddress=None, ttl=None, comment=None): """ Provides a way to modify the following attributes of a domain record: - email address - ttl setting - comment """ return domain.update(emailAddress=emailAddress, ...
Provides a way to modify the following attributes of a domain record: - email address - ttl setting - comment
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L1186-L1195
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSClient.list_subdomains
def list_subdomains(self, domain, limit=None, offset=None): """ Returns a list of all subdomains for the specified domain. """ return domain.list_subdomains(limit=limit, offset=offset)
python
def list_subdomains(self, domain, limit=None, offset=None): """ Returns a list of all subdomains for the specified domain. """ return domain.list_subdomains(limit=limit, offset=offset)
Returns a list of all subdomains for the specified domain.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L1209-L1213
pycontribs/pyrax
pyrax/clouddns.py
CloudDNSClient.get_subdomain_iterator
def get_subdomain_iterator(self, domain, limit=None, offset=None): """ Returns an iterator that will return each available subdomain for the specified domain. If there are more than the limit of 100 subdomains, the iterator will continue to fetch subdomains from the API until all ...
python
def get_subdomain_iterator(self, domain, limit=None, offset=None): """ Returns an iterator that will return each available subdomain for the specified domain. If there are more than the limit of 100 subdomains, the iterator will continue to fetch subdomains from the API until all ...
Returns an iterator that will return each available subdomain for the specified domain. If there are more than the limit of 100 subdomains, the iterator will continue to fetch subdomains from the API until all subdomains have been returned.
https://github.com/pycontribs/pyrax/blob/9ddfd5064b3a292d7337906f3b2d5dce95b50b99/pyrax/clouddns.py#L1216-L1223