Beispiel #1
0
    def test_positive_list_variables_by_host_id(self):
        """List all smart variables associated to host by host id.

        @id: ee2e994b-2a6d-4069-a2f7-e244a3134772

        @assert: Smart Variables listed for specific Host by host id.

        @CaseLevel: Integration
        """
        make_smart_variable({'puppet-class': self.puppet['name']})
        Host.update({
            u'name': self.host_name,
            u'puppet-classes': self.puppet['name']
        })
        host_id = Host.info({u'name': self.host_name})['id']
        host_smart_variables_list = Host.smart_variables({u'host-id': host_id})
        self.assertGreater(len(host_smart_variables_list), 0)
Beispiel #2
0
    def test_positive_list_variables_by_host_name(self):
        """List all smart variables associated to host by hostname.

        @id: ee0da54c-ab60-4dde-8e1f-d548b52bac73

        @assert: Smart Variables listed for specific Host by hostname.

        @CaseLevel: Integration
        """
        make_smart_variable({'puppet-class': self.puppet['name']})
        Host.update({
            u'name': self.host_name,
            u'puppet-classes': self.puppet['name']
        })
        host_smart_variables_list = Host.smart_variables(
            {u'host': self.host_name})
        self.assertGreater(len(host_smart_variables_list), 0)
    def test_positive_list_variables_by_host_name(self):
        """List all smart variables associated to host by hostname.

        @id: ee0da54c-ab60-4dde-8e1f-d548b52bac73

        @assert: Smart Variables listed for specific Host by hostname.

        @CaseLevel: Integration
        """
        make_smart_variable({'puppet-class': self.puppet_class['name']})
        host = entities.Host(organization=self.org['id']).create()
        Host.update({
            u'name': host.name,
            u'environment': self.env['name'],
            u'puppet-classes': self.puppet_class['name'],
        })
        host_smart_variables_list = Host.smart_variables({
            u'host': host.name})
        self.assertGreater(len(host_smart_variables_list), 0)
    def test_positive_list_variables_by_host_id(self):
        """List all smart variables associated to host by host id.

        @id: ee2e994b-2a6d-4069-a2f7-e244a3134772

        @assert: Smart Variables listed for specific Host by host id.

        @CaseLevel: Integration
        """
        make_smart_variable({'puppet-class': self.puppet_class['name']})
        host = entities.Host(organization=self.org['id']).create()
        Host.update({
            u'name': host.name,
            u'environment': self.env['name'],
            u'puppet-classes': self.puppet_class['name'],
        })
        host_smart_variables_list = Host.smart_variables({
            u'host-id': host.id})
        self.assertGreater(len(host_smart_variables_list), 0)