def _test(self): '''[TCMS#178442 test] Move cds2 to cluster2''' RHUIManagerCds.move_cds(self.rs.Instances["RHUA"][0], [self.rs.Instances["CDS"][2].private_hostname], "Cluster2") '''[TCMS#178442 test] Check that cds2 moved to cluster2''' cds0 = RhuiCds( hostname=self.rs.Instances["CDS"][0].private_hostname, cluster='Cluster1', repos=['repo1']) cds1 = RhuiCds( hostname=self.rs.Instances["CDS"][1].private_hostname, cluster='Cluster2', repos=['repo1'] ) cds2 = RhuiCds( hostname=self.rs.Instances["CDS"][2].private_hostname, cluster='Cluster2', repos=['repo1'] ) nose.tools.assert_equal(sorted(RHUIManagerCds.info(self.rs.Instances["RHUA"][0], ["Cluster1", "Cluster2"])), sorted([cds0, cds1, cds2])) '''[TCMS#178442 test] Check pulp-admin and rhui cluster info are the same''' nose.tools.assert_equals(sorted(PulpAdmin.cds_list(self.rs.Instances["RHUA"][0])), sorted(RHUIManagerCds.info(self.rs.Instances["RHUA"][0], ['Cluster1', 'Cluster2'])))
def _test(self): '''[TCMS#178466 test] Check cds info screen ''' cds0 = RhuiCds( hostname=self.rs.Instances["CDS"][0].private_hostname, cluster="Cluster1", repos=[ "repo1", "Red Hat Update Infrastructure 2 (RPMs) (6Server-x86_64)" ]) cds1 = RhuiCds( hostname=self.rs.Instances["CDS"][1].private_hostname, cluster="Cluster2", repos=[ "repo1", "Red Hat Update Infrastructure 2 (RPMs) (6Server-x86_64)" ]) nose.tools.assert_equal( sorted( RHUIManagerCds.info(self.rs.Instances["RHUA"][0], ["Cluster1", "Cluster2"])), sorted([cds0, cds1])) '''[TCMS#178466 test] Check pulp-admin cds list and rhui cds info are the same ''' pulp_cdses = PulpAdmin.cds_list(self.rs.Instances["RHUA"][0]) rhui_cdses = RHUIManagerCds.info(self.rs.Instances["RHUA"][0], ["Cluster1", "Cluster2"]) nose.tools.assert_equals(sorted(pulp_cdses), sorted(rhui_cdses))
def _test(self): '''[TCMS#178442 test] Move cds2 to cluster2''' RHUIManagerCds.move_cds(self.rs.Instances["RHUA"][0], [self.rs.Instances["CDS"][2].private_hostname], "Cluster2") '''[TCMS#178442 test] Check that cds2 moved to cluster2''' cds0 = RhuiCds(hostname=self.rs.Instances["CDS"][0].private_hostname, cluster='Cluster1', repos=['repo1']) cds1 = RhuiCds(hostname=self.rs.Instances["CDS"][1].private_hostname, cluster='Cluster2', repos=['repo1']) cds2 = RhuiCds(hostname=self.rs.Instances["CDS"][2].private_hostname, cluster='Cluster2', repos=['repo1']) nose.tools.assert_equal( sorted( RHUIManagerCds.info(self.rs.Instances["RHUA"][0], ["Cluster1", "Cluster2"])), sorted([cds0, cds1, cds2])) '''[TCMS#178442 test] Check pulp-admin and rhui cluster info are the same''' nose.tools.assert_equals( sorted(PulpAdmin.cds_list(self.rs.Instances["RHUA"][0])), sorted( RHUIManagerCds.info(self.rs.Instances["RHUA"][0], ['Cluster1', 'Cluster2'])))
def _test(self): """[TCMS#178439 test] move the cds to cluster_b""" RHUIManagerCds.move_cds(self.rs.Instances["RHUA"][0], [self.rs.Instances["CDS"][0].private_hostname], self.cluster_b) """[TCMS#178439 test] assert cluster_a no longer exists in pulp and cluster_b contains the cds""" cdses = PulpAdmin.cds_list(self.rs.Instances["RHUA"][0]) cds = Cds(name=self.rs.Instances["CDS"][0].private_hostname, hostname=self.rs.Instances["CDS"][0].private_hostname, description='RHUI CDS', cluster=self.cluster_b) nose.tools.assert_equals(cdses, [cds]) """[TCMS#178439 test] assert pulp and rhui cds list is the same (i.e. cluster_a no longer exists in RHUI)""" rhui_cdses = RHUIManagerCds.info(self.rs.Instances["RHUA"][0], [self.cluster_b]) pulp_cdses = PulpAdmin.cds_list(self.rs.Instances["RHUA"][0]) nose.tools.assert_equals(rhui_cdses, pulp_cdses)
def _test(self): '''[TCMS#293061 test] Check CDS info screen''' rhui_cds = RhuiCds( hostname=self.rs.Instances["CDS"][0].private_hostname, description='RHUI CDS', cluster='Cluster1', repos=["repo1"]) nose.tools.assert_equal(RHUIManagerCds.info(self.rs.Instances["RHUA"][0], ["Cluster1"]), [rhui_cds]) '''[TCMS#293061 test] Check pulp-admin and rhui cluster info are the same''' nose.tools.assert_equal(PulpAdmin.cds_list(self.rs.Instances["RHUA"][0]), RHUIManagerCds.info(self.rs.Instances["RHUA"][0], ['Cluster1']))
def _test(self): '''[TCMS#293061 test] Check CDS info screen''' rhui_cds = RhuiCds( hostname=self.rs.Instances["CDS"][0].private_hostname, description='RHUI CDS', cluster='Cluster1', repos=["repo1"]) nose.tools.assert_equal( RHUIManagerCds.info(self.rs.Instances["RHUA"][0], ["Cluster1"]), [rhui_cds]) '''[TCMS#293061 test] Check pulp-admin and rhui cluster info are the same''' nose.tools.assert_equal( PulpAdmin.cds_list(self.rs.Instances["RHUA"][0]), RHUIManagerCds.info(self.rs.Instances["RHUA"][0], ['Cluster1']))
def _test(self): '''[TCMS#178464 test] Check cds info screen ''' cds = RhuiCds( hostname=self.rs.Instances["CDS"][0].private_hostname, cluster="Cluster1", repos=["repo1"] ) nose.tools.assert_equal(RHUIManagerCds.info(self.rs.Instances["RHUA"][0], ["Cluster1"]), [cds]) '''[TCMS#178464 test] Check pulp-admin cds list ''' nose.tools.assert_equals(PulpAdmin.cds_list(self.rs.Instances["RHUA"][0]), RHUIManagerCds.info(self.rs.Instances["RHUA"][0], ["Cluster1"])) '''[TCMS#178464 test] Check certs created for custom repo ''' Expect.ping_pong(self.rs.Instances["RHUA"][0], "test -f /etc/pki/pulp/content/repo1/consumer-repo1.cert && echo SUCCESS", "[^ ]SUCCESS") Expect.ping_pong(self.rs.Instances["RHUA"][0], "test -f /etc/pki/pulp/content/repo1/consumer-repo1.ca && echo SUCCESS", "[^ ]SUCCESS")
def _test(self): '''[TCMS#178466 test] Check cds info screen ''' cds0 = RhuiCds( hostname=self.rs.Instances["CDS"][0].private_hostname, cluster="Cluster1", repos=["repo1", "Red Hat Update Infrastructure 2 (RPMs) (6Server-x86_64)"] ) cds1 = RhuiCds( hostname=self.rs.Instances["CDS"][1].private_hostname, cluster="Cluster2", repos=["repo1", "Red Hat Update Infrastructure 2 (RPMs) (6Server-x86_64)"] ) nose.tools.assert_equal(sorted(RHUIManagerCds.info(self.rs.Instances["RHUA"][0], ["Cluster1", "Cluster2"])), sorted([cds0, cds1])) '''[TCMS#178466 test] Check pulp-admin cds list and rhui cds info are the same ''' pulp_cdses = PulpAdmin.cds_list(self.rs.Instances["RHUA"][0]) rhui_cdses = RHUIManagerCds.info(self.rs.Instances["RHUA"][0], ["Cluster1", "Cluster2"]) nose.tools.assert_equals(sorted(pulp_cdses), sorted(rhui_cdses))
def _test(self): '''[TCMS#178462 test] Check cds info screen ''' rhui_cds = RhuiCds(name=self.rs.Instances["CDS"][0].private_hostname, hostname=self.rs.Instances["CDS"][0].private_hostname, description='RHUI CDS', cluster='Cluster1', repos=['Red Hat Update Infrastructure 2 (RPMs) (6Server-x86_64)'], client_hostname=self.rs.Instances["CDS"][0].private_hostname) nose.tools.assert_equal(RHUIManagerCds.info(self.rs.Instances["RHUA"][0], ["Cluster1"]), [rhui_cds]) '''[TCMS#178462 test] Check pulp-admin cds list ''' cdses = PulpAdmin.cds_list(self.rs.Instances["RHUA"][0]) nose.tools.eq_(cdses, [rhui_cds]) '''[TCMS#178462 test] Check certs created for RH repo ''' Expect.ping_pong(self.rs.Instances["RHUA"][0], "test -f /etc/pki/pulp/content/rhel-x86_64-6-rhui-2-rpms-6Server-x86_64/consumer-rhel-x86_64-6-rhui-2-rpms-6Server-x86_64.ca && echo SUCCESS", "[^ ]SUCCESS") Expect.ping_pong(self.rs.Instances["RHUA"][0], "test -f /etc/pki/pulp/content/rhel-x86_64-6-rhui-2-rpms-6Server-x86_64/feed-rhel-x86_64-6-rhui-2-rpms-6Server-x86_64.cert && echo SUCCESS", "[^ ]SUCCESS") Expect.ping_pong(self.rs.Instances["RHUA"][0], "test -f /etc/pki/pulp/content/rhel-x86_64-6-rhui-2-rpms-6Server-x86_64/feed-rhel-x86_64-6-rhui-2-rpms-6Server-x86_64.ca && echo SUCCESS", "[^ ]SUCCESS") Expect.ping_pong(self.rs.Instances["RHUA"][0], "test -f /etc/pki/pulp/content/rhel-x86_64-6-rhui-2-rpms-6Server-x86_64/consumer-rhel-x86_64-6-rhui-2-rpms-6Server-x86_64.cert && echo SUCCESS", "[^ ]SUCCESS")
def _test(self): '''[TCMS#178464 test] Check cds info screen ''' cds = RhuiCds(hostname=self.rs.Instances["CDS"][0].private_hostname, cluster="Cluster1", repos=["repo1"]) nose.tools.assert_equal( RHUIManagerCds.info(self.rs.Instances["RHUA"][0], ["Cluster1"]), [cds]) '''[TCMS#178464 test] Check pulp-admin cds list ''' nose.tools.assert_equals( PulpAdmin.cds_list(self.rs.Instances["RHUA"][0]), RHUIManagerCds.info(self.rs.Instances["RHUA"][0], ["Cluster1"])) '''[TCMS#178464 test] Check certs created for custom repo ''' Expect.ping_pong( self.rs.Instances["RHUA"][0], "test -f /etc/pki/pulp/content/repo1/consumer-repo1.cert && echo SUCCESS", "[^ ]SUCCESS") Expect.ping_pong( self.rs.Instances["RHUA"][0], "test -f /etc/pki/pulp/content/repo1/consumer-repo1.ca && echo SUCCESS", "[^ ]SUCCESS")
def _test(self): '''[TCMS#178465 test] Check repos are associated ''' cds = RhuiCds(hostname=self.rs.Instances["CDS"][0].private_hostname, cluster="Cluster1", repos=["repo1", "repo2"]) nose.tools.assert_equal( RHUIManagerCds.info(self.rs.Instances["RHUA"][0], ["Cluster1"]), [cds]) '''[TCMS#178465 test] Unassociate repo1 from cluster ''' RHUIManagerCds.unassociate_repo_cds(self.rs.Instances["RHUA"][0], "Cluster1", ["repo1"]) '''[TCMS#178465 test] Check repo1 has been unassociated''' cds = RhuiCds(hostname=self.rs.Instances["CDS"][0].private_hostname, cluster="Cluster1", repos=["repo2"]) nose.tools.assert_equal( RHUIManagerCds.info(self.rs.Instances["RHUA"][0], ["Cluster1"]), [cds]) '''[TCMS#178465 test] Check pulp-admin cds list and rhui cluster info are the same''' pulp_cdses = PulpAdmin.cds_list(self.rs.Instances["RHUA"][0]) rhui_cdses = RHUIManagerCds.info(self.rs.Instances["RHUA"][0], ["Cluster1"]) nose.tools.assert_equals(pulp_cdses, rhui_cdses)
def _test(self): '''[TCMS#178465 test] Check repos are associated ''' cds = RhuiCds( hostname=self.rs.Instances["CDS"][0].private_hostname, cluster="Cluster1", repos=["repo1", "repo2"] ) nose.tools.assert_equal(RHUIManagerCds.info(self.rs.Instances["RHUA"][0], ["Cluster1"]), [cds]) '''[TCMS#178465 test] Unassociate repo1 from cluster ''' RHUIManagerCds.unassociate_repo_cds(self.rs.Instances["RHUA"][0], "Cluster1", ["repo1"]) '''[TCMS#178465 test] Check repo1 has been unassociated''' cds = RhuiCds( hostname=self.rs.Instances["CDS"][0].private_hostname, cluster="Cluster1", repos=["repo2"] ) nose.tools.assert_equal(RHUIManagerCds.info(self.rs.Instances["RHUA"][0], ["Cluster1"]), [cds]) '''[TCMS#178465 test] Check pulp-admin cds list and rhui cluster info are the same''' pulp_cdses = PulpAdmin.cds_list(self.rs.Instances["RHUA"][0]) rhui_cdses = RHUIManagerCds.info(self.rs.Instances["RHUA"][0], ["Cluster1"]) nose.tools.assert_equals(pulp_cdses, rhui_cdses)