Revision 08748d73 snf-cyclades-app/synnefo/tools/burnin.py

b/snf-cyclades-app/synnefo/tools/burnin.py
619 619
        cls.servername = "%s%s for %s" % (SNF_TEST_PREFIX, TEST_RUN_ID, imagename)
620 620

  
621 621
        #Dictionary initialization for the vms credentials
622

  
622 623
        cls.serverid = dict()
623 624
        cls.username = dict()
624 625
        cls.password = dict()
625 626

  
626

  
627 627
    def _get_ipv4(self, server):
628 628
    
629 629
        """Get the public IPv4 of a server from the detailed server info"""
......
647 647
            return "root"
648 648

  
649 649

  
650
    def test_0001_submit_create_server_A(self):
650
    def test_00001_submit_create_server_A(self):
651 651
        """Test submit create server request"""
652 652
        serverA = self.client.create_server(self.servername, self.flavorid,
653 653
                                           self.imageid, personality=None)
......
658 658
        self.assertEqual(serverA["status"], "BUILD")
659 659

  
660 660
        # Update class attributes to reflect data on building server
661
        cls = type(self)
662
        cls.serverid['A'] = serverA["id"]
663
        cls.username['A'] = None
664
        cls.password['A'] = serverA["adminPass"]
661
        self.serverid['A'] = serverA["id"]
662
        self.username['A'] = None
663
        self.password['A'] = serverA["adminPass"]
665 664

  
666 665
    
667
    def test_0001_submit_create_server_B(self):
666
    def test_00001_submit_create_server_B(self):
668 667
        """Test submit create server request"""
669 668
        serverB = self.client.create_server(self.servername, self.flavorid,
670 669
                                           self.imageid, personality=None)
......
675 674
        self.assertEqual(serverB["status"], "BUILD")
676 675

  
677 676
        # Update class attributes to reflect data on building server
678
        cls = type(self)
679
        cls.serverid['B'] = serverB["id"]
680
        cls.username['B'] = None
681
        cls.password['B'] = serverB["adminPass"]
677
        self.serverid['B'] = serverB["id"]
678
        self.username['B'] = None
679
        self.password['B'] = serverB["adminPass"]
682 680

  
683 681
    def test_0001_serverA_becomes_active(self):
684 682
        """Test server becomes ACTIVE"""
......
759 757
    def test_002a_setup_interface_A(self):
760 758

  
761 759
        server = self.client.get_server_details(self.serverid['A'])
762
        image = self.client.get_image_details(self.serverid['A'])
760
        image = self.client.get_image_details(self.imageid)
763 761
        os = image['metadata']['values']['os']
764 762
        loginname = image["metadata"]["values"].get("users", None)
765 763
        hostip = self._get_ipv4(server) 
......
783 781
    def test_002b_setup_interface_B(self):
784 782

  
785 783
        server = self.client.get_server_details(self.serverid['B'])
786
        image = self.client.get_image_details(self.serverid['B'])
784
        image = self.client.get_image_details(self.imageid)
787 785
        os = image['metadata']['values']['os']
788 786
        loginname = image["metadata"]["values"].get("users", None)
789 787
        hostip = self._get_ipv4(server) 
......
809 807
        """Ping serverB from serverA to test if connection exists"""
810 808

  
811 809
        server = self.client.get_server_details(self.serverid['A'])
812
        image = self.client.get_image_details(self.serverid['A'])
810
        image = self.client.get_image_details(self.imageid)
813 811
        os = image['metadata']['values']['os']
814 812
        loginname = image["metadata"]["values"].get("users", None)
815 813
        

Also available in: Unified diff