本文整理匯總了Python中cfme.services.catalogs.catalog_item.CatalogBundle.update方法的典型用法代碼示例。如果您正苦於以下問題:Python CatalogBundle.update方法的具體用法?Python CatalogBundle.update怎麽用?Python CatalogBundle.update使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類cfme.services.catalogs.catalog_item.CatalogBundle
的用法示例。
在下文中一共展示了CatalogBundle.update方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_service_circular_reference
# 需要導入模塊: from cfme.services.catalogs.catalog_item import CatalogBundle [as 別名]
# 或者: from cfme.services.catalogs.catalog_item.CatalogBundle import update [as 別名]
def test_service_circular_reference(catalog_item):
bundle_name = "first_" + fauxfactory.gen_alphanumeric()
catalog_bundle = CatalogBundle(name=bundle_name, description="catalog_bundle",
display_in=True, catalog=catalog_item.catalog, dialog=catalog_item.dialog)
catalog_bundle.create([catalog_item.name])
sec_bundle_name = "sec_" + fauxfactory.gen_alphanumeric()
sec_catalog_bundle = CatalogBundle(name=sec_bundle_name, description="catalog_bundle",
display_in=True, catalog=catalog_item.catalog,
dialog=catalog_item.dialog)
sec_catalog_bundle.create([bundle_name])
with error.expected("Error during 'Resource Add': Adding resource <{}> to Service <{}> "
"will create a circular reference".format(sec_bundle_name, bundle_name)):
catalog_bundle.update({'description': "edit_desc",
'cat_item': sec_catalog_bundle.name})
示例2: test_service_circular_reference
# 需要導入模塊: from cfme.services.catalogs.catalog_item import CatalogBundle [as 別名]
# 或者: from cfme.services.catalogs.catalog_item.CatalogBundle import update [as 別名]
def test_service_circular_reference(catalog_item):
bundle_name = "first_" + generate_random_string()
catalog_bundle = CatalogBundle(name=bundle_name, description="catalog_bundle",
display_in=True, catalog=catalog_item.catalog, dialog=catalog_item.dialog)
catalog_bundle.create([catalog_item.name])
sec_bundle_name = "sec_" + generate_random_string()
sec_catalog_bundle = CatalogBundle(name=sec_bundle_name, description="catalog_bundle",
display_in=True, catalog=catalog_item.catalog,
dialog=catalog_item.dialog)
sec_catalog_bundle.create([bundle_name])
with error.expected("Error during 'Resource Add': Adding resource <%s> to Service <%s> "
"will create a circular reference" % (sec_bundle_name, bundle_name)):
catalog_bundle.update({'description': "edit_desc",
'cat_item': sec_catalog_bundle.name})