def test_unknown_mo(): from ucsmsdk.ucsmo import GenericMo static_setup() ref_mo = GenericMo(class_id="unknown", parent_mo_or_dn="parent_dn", dn="sys/unknown", unknown="") ref_mo._handle = ref_handle ref_mos = [ref_mo] diff_mo = GenericMo(class_id="unknown", parent_mo_or_dn="parent_dn", dn="sys/unknown", unknown="yyy") diff_mo._handle = diff_handle diff_mos = [diff_mo] difference = compare_ucs_mo(ref_mos, diff_mos) write_mo_diff(difference) assert_equal(len(difference), 0)
def test_unknown_mo_noversionfilter(): from ucsmsdk.ucsmo import GenericMo static_setup() ref_mo = GenericMo(class_id="unknown", parent_mo_or_dn="parent_dn", dn="sys/unknown", unknown="") ref_mo._handle = ref_handle ref_mos = [ref_mo] diff_mo = GenericMo(class_id="unknown", parent_mo_or_dn="parent_dn", dn="sys/unknown", unknown="yyy") diff_mo._handle = diff_handle diff_mos = [diff_mo] difference = compare_ucs_mo(ref_mos, diff_mos, version_filter=False) write_mo_diff(difference) assert_equal(len(difference), 1) assert_equal(len(difference[0].diff_property), 1)