コード例 #1
0
ファイル: test_ucsgmo.py プロジェクト: ypopivniak/ucsmsdk
def test_005_create_gmo_from_xml():
    xml_str = '''
    <faultInst descr="TCA: etherTxStats totalBytesDelta = 1005,
    raised above 0" dn="sys/chassis-1/slot-1/host/port-2/fault-F35275"
    status="modified"/>
    '''
    gmo = ucsmo.generic_mo_from_xml(xml_str)
    xml_element = gmo.to_xml()
    to_xml_str = xc.to_xml_str(xml_element)
コード例 #2
0
ファイル: test_ucsgmo.py プロジェクト: CiscoUcs/ucsmsdk
def test_005_create_gmo_from_xml():
    xml_str = '''
    <faultInst descr="TCA: etherTxStats totalBytesDelta = 1005,
    raised above 0" dn="sys/chassis-1/slot-1/host/port-2/fault-F35275"
    status="modified"/>
    '''
    gmo = ucsmo.generic_mo_from_xml(xml_str)
    xml_element = gmo.to_xml()
    to_xml_str = xc.to_xml_str(xml_element)
コード例 #3
0
ファイル: test_ucsgmo.py プロジェクト: CiscoUcs/ucsmsdk
def test_006_gmo_to_mo():
    xml_str = '''
    <faultInst descr="TCA: etherTxStats totalBytesDelta = 1005,
    raised above 0" dn="sys/chassis-1/slot-1/host/port-2/fault-F35275"
    status="modified"/>
    '''

    gmo = ucsmo.generic_mo_from_xml(xml_str)
    mo = gmo.to_mo()
    assert_equal(mo.code, "F35275")
コード例 #4
0
ファイル: test_ucsgmo.py プロジェクト: ypopivniak/ucsmsdk
def test_006_gmo_to_mo():
    xml_str = '''
    <faultInst descr="TCA: etherTxStats totalBytesDelta = 1005,
    raised above 0" dn="sys/chassis-1/slot-1/host/port-2/fault-F35275"
    status="modified"/>
    '''

    gmo = ucsmo.generic_mo_from_xml(xml_str)
    mo = gmo.to_mo()
    assert_equal(mo.code, "F35275")