Skip to content

Commit

Permalink
Move evaluation for send_keys to Deployment class.
Browse files Browse the repository at this point in the history
  • Loading branch information
rbvermaa committed Jul 18, 2016
1 parent 7e14c4d commit f727d25
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nixops/backends/__init__.py
Expand Up @@ -8,6 +8,7 @@
import nixops.util
import nixops.resources
import nixops.ssh_util
from pprint import pprint

class MachineDefinition(nixops.resources.ResourceDefinition):
"""Base class for NixOps machine definitions."""
Expand All @@ -30,6 +31,7 @@ def _extract_key_options(x):

self.keys = {k.get("name"): _extract_key_options(k) for k in
xml.findall("attrs/attr[@name='keys']/attrs/attr")}
pprint(self.keys)


class MachineState(nixops.resources.ResourceState):
Expand Down
1 change: 1 addition & 0 deletions nixops/deployment.py
Expand Up @@ -1125,6 +1125,7 @@ def rename(self, name, new_name):

def send_keys(self, include=[], exclude=[]):
"""Send LUKS encryption keys to machines."""
self.evaluate()

def worker(m):
if not should_do(m, include, exclude): return
Expand Down

0 comments on commit f727d25

Please sign in to comment.