Exemplo n.º 1
0
 def test_spanning_tree_state_vlan_disabled(self):
     stp_namespace = 'urn:brocade.com:mgmt:brocade-xstp'
     expected = '<config><interface-vlan xmlns="{0}"><interface><vlan>'\
                '<name>{1}</name><spanning-tree xmlns="{2}">'\
                '<stp-shutdown /></spanning-tree>'\
                '</vlan></interface></interface-vlan>'\
                '</config>'.format(self.namespace, self.vlan_id,
                                   stp_namespace)
     interface = self.interface
     result = interface.spanning_tree_state(int_type='vlan',
                                            name=self.vlan_id,
                                            enabled=False)
     result = ET.tostring(result)
     self.assertEquals(expected, result)
Exemplo n.º 2
0
 def test_spanning_tree_state_vlan_disabled(self):
     stp_namespace = 'urn:brocade.com:mgmt:brocade-xstp'
     expected = '<config><interface-vlan xmlns="{0}"><interface><vlan>'\
                '<name>{1}</name><spanning-tree xmlns="{2}">'\
                '<stp-shutdown /></spanning-tree>'\
                '</vlan></interface></interface-vlan>'\
                '</config>'.format(self.namespace, self.vlan_id,
                                   stp_namespace)
     interface = self.interface
     result = interface.spanning_tree_state(int_type='vlan',
                                            name=self.vlan_id,
                                            enabled=False)
     result = ET.tostring(result)
     self.assertEquals(expected, result)
Exemplo n.º 3
0
 def test_spanning_tree_state_phys_disabled(self):
     stp_namespace = 'urn:brocade.com:mgmt:brocade-xstp'
     expected = '<config><interface xmlns="{0}"><{1}><name>{2}</name>'\
                '<spanning-tree xmlns="{3}"><shutdown /></spanning-tree>'\
                '</{1}></interface></config>'.format(self.namespace,
                                                     self.phys_int_type,
                                                     self.phys_name,
                                                     stp_namespace)
     interface = self.interface
     result = interface.spanning_tree_state(int_type=self.phys_int_type,
                                            name=self.phys_name,
                                            enabled=False)
     result = ET.tostring(result)
     self.assertEquals(expected, result)
Exemplo n.º 4
0
 def test_spanning_tree_state_phys_disabled(self):
     stp_namespace = 'urn:brocade.com:mgmt:brocade-xstp'
     expected = '<config><interface xmlns="{0}"><{1}><name>{2}</name>'\
                '<spanning-tree xmlns="{3}"><shutdown /></spanning-tree>'\
                '</{1}></interface></config>'.format(self.namespace,
                                                     self.phys_int_type,
                                                     self.phys_name,
                                                     stp_namespace)
     interface = self.interface
     result = interface.spanning_tree_state(int_type=self.phys_int_type,
                                            name=self.phys_name,
                                            enabled=False)
     result = ET.tostring(result)
     self.assertEquals(expected, result)