Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
[LIBCLOUD-614] multiple bugfixes and improvements to GCE #360
…argetpool: multiple bugfixes Fix #1: targetpool = driver.ex_get_targetpool('tpname') targetpool.add_node(node) node.destroy() # targetpool still contains the node targetpool = driver.ex_get_targetpool('tpname') # targetpool.nodes contains node uri string (in addition to possible other node objects) # as produced by _to_targetpool because the node is in the pool but is destroyed targetpool.remove_node(node) # raises an exception, removes the node nevertheless. Expected behavior: remove the node, return true Fix #2: targetpool.add(node) targetpool.add(node) # targetpool.nodes contains 2 copies of node # actual targetpool resource on the GCE side doesn't contain 2 copies Expected behavior: no duplicates in targetpool.nodes, the node list matches GCE side Fix/Improvement #3: Allow specifying nodes by fully-qualified node uri in add_node and remove_node. if tp.nodes: tp.remove_node(tp.nodes) # fails if the node in the list doesn't exist exoected behavior: should be able to remove any node from the list GCE allows adding non-existent nodes to the targetpool and doesn't automatically remove nodes from the pool if you delete them. libcloud should support doing the same.
…hcheck. The requests were malformed and thus did nothing.
…al addresses to static ones.
…tests; fix documentation and test fixtures for health checks
…s = , preserve behavior for sourceRanges = None, preserve default value. GCE documentation states that firewall allows traffic if it matches either sourceRanges or sourceTags values. Thus, sourceRanges =  is a valid parameter value. Although it would be better to simply set ["0.0.0.0/0"] as the default, for minimal API breakage, None value is still supported.
Sorry about the lint.
BTW this summer I had spent tens of hours testing GCE driver for completeness
And libcloud now has another happy "client": NixOps deployment tool.
As far as I'm concerned, the GCE driver may not be complete, but it's very