def test_positive_add_template(self):
        """Add provisioning template to operating system

        :id: 0ea9eb88-2d27-423d-a9d3-fdd788b4e28a

        :expectedresults: Provisioning template is added to Operating System

        :CaseLevel: Integration
        """
        template = make_template()
        os = make_os()
        OperatingSys.add_provisioning_template(
            {'provisioning-template': template['name'], 'id': os['id']}
        )
        os = OperatingSys.info({'id': os['id']})
        self.assertEqual(len(os['templates']), 1)
        template_name = os['templates'][0]
        self.assertTrue(template_name.startswith(template['name']))
示例#2
0
    def test_positive_add_template(self):
        """Add provisioning template to operating system

        :id: 0ea9eb88-2d27-423d-a9d3-fdd788b4e28a

        :expectedresults: Provisioning template is added to Operating System

        :CaseLevel: Integration
        """
        template = make_template()
        os = make_os()
        default_template_name = os['default-templates'][0]
        OperatingSys.add_provisioning_template(
            {'provisioning-template': template['name'], 'id': os['id']}
        )
        os = OperatingSys.info({'id': os['id']})
        assert len(os['templates']) == 2
        provision_template_name = f"{template['name']} ({template['type']})"
        assert default_template_name in os['templates']
        assert provision_template_name in os['templates']