def test_positive_list_smartvariables_by_name(self): """List all smart variables using hostgroup name :id: 2b0da695-57fa-4f91-b164-e1ff60076c26 :expectedresults: Smart variable from puppet class is listed :CaseLevel: Integration """ # Create hostgroup with associated puppet class hostgroup = make_hostgroup({ 'puppet-classes': self.puppet_classes[0]['name'], 'environment': self.env['name'], 'content-view': self.cv['name'], 'query-organization': self.org['name'], }) # Create smart variable smart_variable = make_smart_variable( {'puppet-class': self.puppet_classes[0]['name']}) # Verify that affected sc-param is listed hg_variables = HostGroup.smart_variables( {'hostgroup': hostgroup['name']}) self.assertIn(smart_variable['id'], [sv['id'] for sv in hg_variables])
def test_positive_list_smartvariables_by_id(self): """List all smart variables using hostgroup id :id: 1d614441-7ef9-4fdb-a8e7-2f1c1054bf2f :expectedresults: Smart variable from puppet class is listed :CaseLevel: Integration """ # Create hostgroup with associated puppet class hostgroup = make_hostgroup({ 'puppet-classes': self.puppet_classes[0]['name'], 'environment': self.env['name'], 'content-view': self.cv['name'], 'query-organization': self.org['name'], }) # Create smart variable smart_variable = make_smart_variable( {'puppet-class': self.puppet_classes[0]['name']}) # Verify that affected sc-param is listed hg_variables = HostGroup.smart_variables( {'hostgroup-id': hostgroup['id']}) self.assertIn(smart_variable['id'], [sv['id'] for sv in hg_variables])
def test_positive_list_variables_by_hostgroup_id(self): """List all smart variables associated to hostgroup by hostgroup id @id: 0f167c4c-e4de-4b66-841f-d5a9e410391e @assert: Smart Variables listed for specific HostGroup by hostgroup id. @CaseLevel: Integration """ make_smart_variable({'puppet-class': self.puppet_class['name']}) hostgroup = make_hostgroup({ 'environment-id': self.env['id'], 'puppet-class-ids': self.puppet_class['id'] }) hostgroup_smart_variables = HostGroup.smart_variables({ u'hostgroup-id': hostgroup['id']}) self.assertGreater(len(hostgroup_smart_variables), 0)
def test_positive_list_variables_by_hostgroup_id(self): """List all smart variables associated to hostgroup by hostgroup id @id: 0f167c4c-e4de-4b66-841f-d5a9e410391e @assert: Smart Variables listed for specific HostGroup by hostgroup id. @CaseLevel: Integration """ make_smart_variable({'puppet-class': self.puppet['name']}) hostgroup = make_hostgroup({ 'environment-id': self.env['id'], 'puppet-class-ids': self.puppet['id'] }) hostgroup_smart_variables = HostGroup.smart_variables( {u'hostgroup-id': hostgroup['id']}) self.assertGreater(len(hostgroup_smart_variables), 0)
def test_positive_list_variables_by_hostgroup_name(self): """List all smart variables associated to hostgroup by hostgroup name @id: cb69abe0-2349-4114-91e9-ef93f261dc50 @assert: Smart Variables listed for specific HostGroup by hostgroup name. @CaseLevel: Integration """ make_smart_variable({'puppet-class': self.puppet_class['name']}) hostgroup = make_hostgroup({ 'environment-id': self.env['id'], 'puppet-class-ids': self.puppet_class['id'] }) hostgroup_smart_variables = HostGroup.smart_variables({ u'hostgroup': hostgroup['name']}) self.assertGreater(len(hostgroup_smart_variables), 0)
def test_positive_list_variables_by_hostgroup_name(self): """List all smart variables associated to hostgroup by hostgroup name @id: cb69abe0-2349-4114-91e9-ef93f261dc50 @assert: Smart Variables listed for specific HostGroup by hostgroup name. @CaseLevel: Integration """ make_smart_variable({'puppet-class': self.puppet['name']}) hostgroup = make_hostgroup({ 'environment-id': self.env['id'], 'puppet-class-ids': self.puppet['id'] }) hostgroup_smart_variables = HostGroup.smart_variables( {u'hostgroup': hostgroup['name']}) self.assertGreater(len(hostgroup_smart_variables), 0)
def test_positive_list_smartvariables_by_name(self): """List all smart variables using hostgroup name :id: 2b0da695-57fa-4f91-b164-e1ff60076c26 :expectedresults: Smart variable from puppet class is listed :Caselevel: Integration """ # Create hostgroup with associated puppet class hostgroup = make_hostgroup({ 'puppet-classes': self.puppet_classes[0]['name'], 'environment': self.env['name'], 'content-view': self.cv['name'], 'query-organization': self.org['name'], }) # Create smart variable smart_variable = make_smart_variable( {'puppet-class': self.puppet_classes[0]['name']}) # Verify that affected sc-param is listed hg_variables = HostGroup.smart_variables( {'hostgroup': hostgroup['name']}) self.assertIn(smart_variable['id'], [sv['id'] for sv in hg_variables])
def test_positive_list_smartvariables_by_id(self): """List all smart variables using hostgroup id :id: 1d614441-7ef9-4fdb-a8e7-2f1c1054bf2f :expectedresults: Smart variable from puppet class is listed :Caselevel: Integration """ # Create hostgroup with associated puppet class hostgroup = make_hostgroup({ 'puppet-classes': self.puppet_classes[0]['name'], 'environment': self.env['name'], 'content-view': self.cv['name'], 'query-organization': self.org['name'], }) # Create smart variable smart_variable = make_smart_variable( {'puppet-class': self.puppet_classes[0]['name']}) # Verify that affected sc-param is listed hg_variables = HostGroup.smart_variables( {'hostgroup-id': hostgroup['id']}) self.assertIn(smart_variable['id'], [sv['id'] for sv in hg_variables])