def test_CreatePxeEnvironment_Debug(self):

        playbookYaml = self._getCreationPlaybookYaml()

        # Run the playbook
        tasksToDebug = [
            "Get SMART Proxy info", "Create a Domain for the PXE environment",
            "Create a Subnet for the tftp PXE environment",
            "Create an Architecture for the PXE environment",
            "Create an Installation for the PXE environment",
            "Create an Operating System for the PXE environment",
            "Download PXELinux Provisioning Template",
            "Download Answer File Template",
            "Create the PXELinux Provisioning Template and link it with the PXE Operating System",
            "Create the Answer File and link it with the PXE Operating System",
            "Link the Operating System with the Partition Table, Provisioning Tamplate, and Answer File",
            "Link the PXE PXELinux Provisioning Template with the Operating System",
            "Link the Answer File with the Operating System",
            "Set the default Provisioning Template for the PXE Operating system",
            "Set the default Answer File for the PXE Operating system",
            "Create the PXE Boot Host"
        ]

        # As we are debugging the tasks, if a task fails an exception will be raised
        playbook_results = AnsibleUtility.test_playbook(
            playbookYaml, tasksToDebug)
Ejemplo n.º 2
0
    def _DestroyPxeBootHost_Debug(self):

        playbookYaml = self._getDestructionPlaybookYaml()

        # As we are debugging the tasks, if a task fails an exception will be raised
        playbook_results = AnsibleUtility.test_playbook(
            playbookYaml, self.tasksToDebug)
    def test_CreatePxeEnvironment_NoDebug(self):

        playbookYaml = self._getCreationPlaybookYaml()

        # Run the playbook
        tasksToDebug = []
        tasksToDebug.append("Create PXE Operating system")

        playbook_results = AnsibleUtility.test_playbook(
            playbookYaml, tasksToDebug)
    def _run_ansible_forman_module(self, record, state):

        playbookYaml = self._generate_playbook(
            self.moduleName,
            self.apiUrl,
            self.username,
            self.password,
            self.verifySsl,
            record,
            state)

        # Run the module, get the results
        cleanup = True
        result = AnsibleUtility.test_playbook(playbookYaml, [self.taskName], cleanup, [self.modulePath])

        return result
    def test_DestroyPxeEnvironment_Debug(self):

        playbookYaml = self._getDestructionPlaybookYaml()

        # Run the playbook
        tasksToDebug = [
            "UnLink the PXE Operating System with the provisioning templates",
            "Unlink the PXE Boot Partitioning Table with the PXE Operating System",
            "Delete PXE Boot Partitioning Table",
            "Unlink the PXE PXELinux Provisioning Template with the PXE Operating System",
            "Delete the PXE PXELinux Provisioning Template",
            "Delete PXE OS Answer File",
            "Unlink the PXE OS Answer File with the PXE Operating System",
            "Delete the default Provisioning Template for the PXE Operating system",
            "Delete PXE Operating System",
            "Unlink PXE Boot Subnet from the smart proxy",
            "Delete PXE Boot Subnet",
            "Unlink PXE Boot Domain with the SMART Proxy",
            "Delete PXE Boot Domain", "Delete PXE Boot Architecture",
            "Delete PXE Boot Installation Media"
        ]

        playbook_results = AnsibleUtility.test_playbook(
            playbookYaml, tasksToDebug)
    def test_CreatePxeclient_NoDebug(self):

        playbookYaml = self._getCreationPlaybookYaml()

        # As we are debugging the tasks, if a task fails an exception will be raised
        playbook_results = AnsibleUtility.run_playbook(playbookYaml)
Ejemplo n.º 7
0
    def _DestroyPxeBootHost_NoDebug(self):

        playbookYaml = self._getDestructionPlaybookYaml()
        playbook_results = AnsibleUtility.run_playbook(playbookYaml)
Ejemplo n.º 8
0
    def _CreatePxeBootHost_NoDebug(self):

        playbookYaml = self._getCreationPlaybookYaml()
        playbook_results = AnsibleUtility.run_playbook(playbookYaml)