# Author: Milan Kubik

import logging

from ipaqe_provision_hosts.backend.base import IDMBackendBase

log = logging.getLogger(__name__)


class DummyBackend(IDMBackendBase):

    def __init__(self, config=None):
        log.debug("Instantiating DummyBackend")
        super(DummyBackend, self).__init__(config)

    def provision_resources(self, n):
        log.debug("Generating %d dummy hosts", n)
        data = {
            'dns': '8.8.8.8',
            'hosts': [
                {
                    'name':
                    'dummy-host-{index:03d}.example.com'.format(index=i),
                    'domain_hint':
                    'dummy-domain-{index:03d}.example.com'.format(index=i),
                }
                for i in range(n)
            ]
        }

        return data

    def delete_resources(self):
        log.debug("DummyBackend.delete_resources called")
        return True

@@ -414,38 +414,8 @@
 = %7B%0A
-            'dns': '8.8.8.8',%0A
     
@@ -741,16 +741,42 @@
      %7D%0A%0A
+        self._vms = data%0A%0A
         

Remove the dns settings from dummy backend