Add parameters to ex_create_address Signed-off-by: Quentin Pradet <[email protected]>
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/8a3de717 Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/8a3de717 Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/8a3de717 Branch: refs/heads/trunk Commit: 8a3de717efdd904006015b0372fdc0973001094e Parents: a119e39 Author: Jeremy Solarz <[email protected]> Authored: Fri Feb 23 10:00:45 2018 +0000 Committer: Quentin Pradet <[email protected]> Committed: Sun Feb 25 09:00:55 2018 +0400 ---------------------------------------------------------------------- libcloud/compute/drivers/gce.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/8a3de717/libcloud/compute/drivers/gce.py ---------------------------------------------------------------------- diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py index 395cc36..38ee948 100644 --- a/libcloud/compute/drivers/gce.py +++ b/libcloud/compute/drivers/gce.py @@ -2820,7 +2820,8 @@ class GCENodeDriver(NodeDriver): return list_zones def ex_create_address(self, name, region=None, address=None, - description=None): + description=None, address_type='EXTERNAL', + subnetwork=None): """ Create a static address in a region, or a global address. @@ -2838,6 +2839,19 @@ class GCENodeDriver(NodeDriver): :keyword description: Optional descriptive comment. :type description: ``str`` or ``None`` + :keyword address_type: Optional The type of address to reserve, + either INTERNAL or EXTERNAL. If unspecified, + defaults to EXTERNAL. + :type description: ``str`` + + :keyword subnetwork: Optional The URL of the subnetwork in which to + reserve the address. If an IP address is + specified, it must be within the subnetwork's + IP range. This field can only be used with + INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER + purposes. + :type description: ``str`` + :return: Static Address object :rtype: :class:`GCEAddress` """
