當前位置: 首頁>>代碼示例>>Python>>正文


Python PartitionTable.remove_operating_system方法代碼示例

本文整理匯總了Python中robottelo.cli.partitiontable.PartitionTable.remove_operating_system方法的典型用法代碼示例。如果您正苦於以下問題:Python PartitionTable.remove_operating_system方法的具體用法?Python PartitionTable.remove_operating_system怎麽用?Python PartitionTable.remove_operating_system使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在robottelo.cli.partitiontable.PartitionTable的用法示例。


在下文中一共展示了PartitionTable.remove_operating_system方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: test_positive_remove_os_by_id

# 需要導入模塊: from robottelo.cli.partitiontable import PartitionTable [as 別名]
# 或者: from robottelo.cli.partitiontable.PartitionTable import remove_operating_system [as 別名]
    def test_positive_remove_os_by_id(self):
        """Add an operating system to a partition table then remove it

        @Feature: Partition Table

        @Assert: Operating system is added then removed from partition table
        """
        ptable = make_partition_table({'content': gen_string("alpha", 10)})
        os = make_os()
        PartitionTable.add_operating_system({
            'id': ptable['id'],
            'operatingsystem-id': os['id'],
        })
        ptable = PartitionTable.info({'id': ptable['id']})
        self.assertIn(os['title'], ptable['operating-systems'])
        PartitionTable.remove_operating_system({
            'id': ptable['id'],
            'operatingsystem-id': os['id'],
        })
        ptable = PartitionTable.info({'id': ptable['id']})
        self.assertNotIn(os['title'], ptable['operating-systems'])
開發者ID:adammhaile,項目名稱:robottelo,代碼行數:23,代碼來源:test_partitiontable.py

示例2: test_positive_remove_os_by_name

# 需要導入模塊: from robottelo.cli.partitiontable import PartitionTable [as 別名]
# 或者: from robottelo.cli.partitiontable.PartitionTable import remove_operating_system [as 別名]
    def test_positive_remove_os_by_name(self):
        """Add an operating system to a partition table then remove it. Use
        names for removal

        @Feature: Partition Table

        @Assert: Operating system is added then removed from partition table
        """
        ptable = make_partition_table()
        os = make_os()
        PartitionTable.add_operating_system({
            'name': ptable['name'],
            'operatingsystem': os['title'],
        })
        ptable = PartitionTable.info({'name': ptable['name']})
        PartitionTable.remove_operating_system({
            'name': ptable['name'],
            'operatingsystem': os['title'],
        })
        ptable = PartitionTable.info({'name': ptable['name']})
        self.assertNotIn(os['title'], ptable['operating-systems'])
開發者ID:anarang,項目名稱:robottelo,代碼行數:23,代碼來源:test_partitiontable.py

示例3: test_remove_os_ptable

# 需要導入模塊: from robottelo.cli.partitiontable import PartitionTable [as 別名]
# 或者: from robottelo.cli.partitiontable.PartitionTable import remove_operating_system [as 別名]
    def test_remove_os_ptable(self):
        """@Test: Check if associated operating system can be removed

        @Feature: Partition Table - Add operating system

        @Assert: Operating system removed

        """
        ptable = make_partition_table({'content': gen_string("alpha", 10)})
        os = make_os()
        PartitionTable.add_operating_system({
            'id': ptable['id'],
            'operatingsystem-id': os['id'],
        })
        ptable = PartitionTable.info({'id': ptable['id']})
        self.assertIn(os['title'], ptable['operating-systems'])
        PartitionTable.remove_operating_system({
            'id': ptable['id'],
            'operatingsystem-id': os['id'],
        })
        ptable = PartitionTable.info({'id': ptable['id']})
        self.assertNotIn(os['title'], ptable['operating-systems'])
開發者ID:lpramuk,項目名稱:robottelo,代碼行數:24,代碼來源:test_partitiontable.py

示例4: test_positive_remove_os_by_name

# 需要導入模塊: from robottelo.cli.partitiontable import PartitionTable [as 別名]
# 或者: from robottelo.cli.partitiontable.PartitionTable import remove_operating_system [as 別名]
    def test_positive_remove_os_by_name(self):
        """Add an operating system to a partition table then remove it. Use
        names for removal

        @id: f7544419-af4c-4dcf-8673-cad472745794

        @Assert: Operating system is added then removed from partition table

        @CaseLevel: Integration
        """
        ptable = make_partition_table()
        os = make_os()
        PartitionTable.add_operating_system({
            'name': ptable['name'],
            'operatingsystem': os['title'],
        })
        ptable = PartitionTable.info({'name': ptable['name']})
        PartitionTable.remove_operating_system({
            'name': ptable['name'],
            'operatingsystem': os['title'],
        })
        ptable = PartitionTable.info({'name': ptable['name']})
        self.assertNotIn(os['title'], ptable['operating-systems'])
開發者ID:Ichimonji10,項目名稱:robottelo,代碼行數:25,代碼來源:test_partitiontable.py

示例5: test_positive_remove_os_by_id

# 需要導入模塊: from robottelo.cli.partitiontable import PartitionTable [as 別名]
# 或者: from robottelo.cli.partitiontable.PartitionTable import remove_operating_system [as 別名]
    def test_positive_remove_os_by_id(self):
        """Add an operating system to a partition table then remove it. Use IDs
        for removal

        @id: ee37be42-9ed3-44dd-9206-514e340e5524

        @Assert: Operating system is added then removed from partition table

        @CaseLevel: Integration
        """
        ptable = make_partition_table()
        os = make_os()
        PartitionTable.add_operating_system({
            'id': ptable['id'],
            'operatingsystem-id': os['id'],
        })
        ptable = PartitionTable.info({'id': ptable['id']})
        PartitionTable.remove_operating_system({
            'id': ptable['id'],
            'operatingsystem-id': os['id'],
        })
        ptable = PartitionTable.info({'id': ptable['id']})
        self.assertNotIn(os['title'], ptable['operating-systems'])
開發者ID:Ichimonji10,項目名稱:robottelo,代碼行數:25,代碼來源:test_partitiontable.py

示例6: test_removeoperatingsystem_ptable

# 需要導入模塊: from robottelo.cli.partitiontable import PartitionTable [as 別名]
# 或者: from robottelo.cli.partitiontable.PartitionTable import remove_operating_system [as 別名]
    def test_removeoperatingsystem_ptable(self):
        """@Test: Check if associated operating system can be removed

        @Feature: Partition Table - Add operating system

        @Assert: Operating system removed

        """
        content = gen_string("alpha", 10)
        name = gen_string("alpha", 10)
        try:
            ptable = make_partition_table({'name': name, 'content': content})
            os = make_os()
        except CLIFactoryError as err:
            self.fail(err)

        args = {
            'id': ptable['id'],
            'operatingsystem-id': os['id'],
        }

        result = PartitionTable.add_operating_system(args)
        self.assertEqual(result.return_code, 0, "Association Failed")
        self.assertEqual(len(result.stderr), 0,
                         "There should not be an exception here")

        result = PartitionTable.info({'id': ptable['id']})
        self.assertIn(os['title'],
                      result.stdout['operating-systems'])

        result = PartitionTable.remove_operating_system(args)
        self.assertEqual(result.return_code, 0, "Association Failed")
        self.assertEqual(len(result.stderr), 0,
                         "There should not be an exception here")

        result = PartitionTable.info({'id': ptable['id']})
        self.assertNotIn(
            os['title'],
            result.stdout['operating-systems'])
開發者ID:oshtaier,項目名稱:robottelo,代碼行數:41,代碼來源:test_partitiontable.py


注:本文中的robottelo.cli.partitiontable.PartitionTable.remove_operating_system方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。