def test_get_a_deployment_plan_osdp_by_name(self):
        self.resource.get_by.return_value = [self.DEPLOYMENT_PLAN]
        self.mock_ansible_module.params = PARAMS_GET_OSDP

        DeploymentPlanFactsModule().run()

        self.mock_ansible_module.exit_json.assert_called_once_with(
            changed=False,
            ansible_facts=dict(deployment_plans=[self.DEPLOYMENT_PLAN]))
    def test_get_a_deployment_plan_by_name(self):
        self.resource.get_by.return_value = [self.DEPLOYMENT_PLAN]
        self.mock_ansible_module.params = self.EXAMPLES[4][
            'image_streamer_deployment_plan_facts']

        DeploymentPlanFactsModule().run()

        self.mock_ansible_module.exit_json.assert_called_once_with(
            changed=False,
            ansible_facts=dict(deployment_plans=[self.DEPLOYMENT_PLAN]))
コード例 #3
0
    def test_get_a_deployment_plan_by_name(self):
        self.i3s.deployment_plans.get_by.return_value = [self.DEPLOYMENT_PLAN]
        self.mock_ansible_module.params = self.TASK_GET_BY_NAME

        DeploymentPlanFactsModule().run()

        self.mock_ansible_module.exit_json.assert_called_once_with(
            changed=False,
            ansible_facts=dict(deployment_plans=[self.DEPLOYMENT_PLAN])
        )