Skip to content

Commit

Permalink
libcloud's EC2 driver now offers ex_get_metadata_for_node() instead.
Browse files Browse the repository at this point in the history
 * TODO: Generalize this to work with other drivers.  Unfortunately,
         custom instance tags (or metadata) seem to be treated
         differently vendor by vendor.
  • Loading branch information
achimnol committed Aug 5, 2017
1 parent 2d7408b commit ff1def5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions geofront/backends/cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,12 @@ def __getitem__(self, alias: str) -> Remote:
@singledispatch
def supports_metadata(driver: NodeDriver) -> bool:
"""Whether this drive type supports metadata?"""
return callable(getattr(driver, 'ex_get_metadata', None))
return callable(getattr(driver, 'ex_get_metadata_for_node', None))


@singledispatch
def get_metadata(driver: NodeDriver, node: Node) -> Mapping[str, object]:
return driver.ex_get_metadata(node)
return driver.ex_get_metadata_for_node(node)


@supports_metadata.register(GCENodeDriver)
Expand Down

0 comments on commit ff1def5

Please sign in to comment.