diff --git a/wally/discover/openstack.py b/wally/discover/openstack.py
index bb128c3..88e8656 100644
--- a/wally/discover/openstack.py
+++ b/wally/discover/openstack.py
@@ -1,18 +1,19 @@
 import socket
 import logging
-from typing import Iterable, Dict, Any
+from typing import Dict, Any, List
 
 
 from novaclient.client import Client
 
-from ..node import NodeInfo
-from wally.utils import parse_creds
+from ..node_interfaces import NodeInfo
+from ..config import ConfigBlock
+from ..utils import parse_creds
 
 
 logger = logging.getLogger("wally.discover")
 
 
-def get_floating_ip(vm) -> str:
+def get_floating_ip(vm: Any) -> str:
     """Get VM floating IP address"""
 
     for net_name, ifaces in vm.addresses.items():
@@ -34,22 +35,21 @@
         return "ssh://{}@{}::{}".format(user, ip, key)
 
 
-def discover_vms(client: Client, search_opts) -> Iterable[NodeInfo]:
+def discover_vms(client: Client, search_opts: Dict) -> List[NodeInfo]:
     """Discover virtual machines"""
     user, password, key = parse_creds(search_opts.pop('auth'))
 
     servers = client.servers.list(search_opts=search_opts)
     logger.debug("Found %s openstack vms" % len(servers))
 
-    nodes = []
+    nodes = []  # type: List[NodeInfo]
     for server in servers:
         ip = get_floating_ip(server)
-        nodes.append(NodeInfo(get_ssh_url(user, password, ip, key), ["test_vm"]))
-
+        nodes.append(NodeInfo(get_ssh_url(user, password, ip, key), roles={"test_vm"}))
     return nodes
 
 
-def discover_services(client: Client, opts: Dict[str, Any]) -> Iterable[NodeInfo]:
+def discover_services(client: Client, opts: Dict[str, Any]) -> List[NodeInfo]:
     """Discover openstack services for given cluster"""
     user, password, key = parse_creds(opts.pop('auth'))
 
@@ -63,15 +63,16 @@
         for s in opts['service']:
             services.extend(client.services.list(binary=s))
 
-    host_services_mapping = {}
+    host_services_mapping = {}  # type: Dict[str, [str]]
 
     for service in services:
         ip = socket.gethostbyname(service.host)
-        host_services_mapping[ip].append(service.binary)
+        host_services_mapping.get(ip, []).append(service.binary)
 
     logger.debug("Found %s openstack service nodes" %
                  len(host_services_mapping))
-    nodes = []
+
+    nodes = []  # type: List[NodeInfo]
     for host, services in host_services_mapping.items():
         ssh_url = get_ssh_url(user, password, host, key)
         nodes.append(NodeInfo(ssh_url, services))
@@ -79,7 +80,7 @@
     return nodes
 
 
-def discover_openstack_nodes(conn_details: Dict[str, str], conf: Dict[str, Any]) -> Iterable[NodeInfo]:
+def discover_openstack_nodes(conn_details: Dict[str, str], conf: ConfigBlock) -> List[NodeInfo]:
     """Discover vms running in openstack
     conn_details - dict with openstack connection details -
         auth_url, api_key (password), username
