Committed by
Gerrit Code Review
Cleanup of trimming on NetConf replies.
Change-Id: I7d3b031893328af33949bea4166423434ded1424
Showing
1 changed file
with
4 additions
and
8 deletions
| ... | @@ -58,8 +58,7 @@ public class InterfaceConfigCiscoIosImpl extends AbstractHandlerBehaviour | ... | @@ -58,8 +58,7 @@ public class InterfaceConfigCiscoIosImpl extends AbstractHandlerBehaviour |
| 58 | .data().deviceId()).getSession(); | 58 | .data().deviceId()).getSession(); |
| 59 | String reply; | 59 | String reply; |
| 60 | try { | 60 | try { |
| 61 | - //TODO remove XML triming if preceeds in Session | 61 | + reply = session.requestSync(addInterfaceToVlanBuilder(intf, vlanId)); |
| 62 | - reply = session.requestSync(addInterfaceToVlanBuilder(intf, vlanId)).trim(); | ||
| 63 | } catch (NetconfException e) { | 62 | } catch (NetconfException e) { |
| 64 | log.error("Failed to configure VLAN ID {} on device {} interface {}.", | 63 | log.error("Failed to configure VLAN ID {} on device {} interface {}.", |
| 65 | vlanId, deviceId, intf, e); | 64 | vlanId, deviceId, intf, e); |
| ... | @@ -122,8 +121,7 @@ public class InterfaceConfigCiscoIosImpl extends AbstractHandlerBehaviour | ... | @@ -122,8 +121,7 @@ public class InterfaceConfigCiscoIosImpl extends AbstractHandlerBehaviour |
| 122 | .data().deviceId()).getSession(); | 121 | .data().deviceId()).getSession(); |
| 123 | String reply; | 122 | String reply; |
| 124 | try { | 123 | try { |
| 125 | - //TODO remove XML triming if preceeds in Session | 124 | + reply = session.requestSync(removeInterfaceFromVlanBuilder(intf, vlanId)); |
| 126 | - reply = session.requestSync(removeInterfaceFromVlanBuilder(intf, vlanId)).trim(); | ||
| 127 | } catch (NetconfException e) { | 125 | } catch (NetconfException e) { |
| 128 | log.error("Failed to remove VLAN ID {} from device {} interface {}.", | 126 | log.error("Failed to remove VLAN ID {} from device {} interface {}.", |
| 129 | vlanId, deviceId, intf, e); | 127 | vlanId, deviceId, intf, e); |
| ... | @@ -185,8 +183,7 @@ public class InterfaceConfigCiscoIosImpl extends AbstractHandlerBehaviour | ... | @@ -185,8 +183,7 @@ public class InterfaceConfigCiscoIosImpl extends AbstractHandlerBehaviour |
| 185 | .data().deviceId()).getSession(); | 183 | .data().deviceId()).getSession(); |
| 186 | String reply; | 184 | String reply; |
| 187 | try { | 185 | try { |
| 188 | - //TODO remove XML triming if preceeds in Session | 186 | + reply = session.requestSync(addTrunkInterfaceBuilder(intf, vlanId)); |
| 189 | - reply = session.requestSync(addTrunkInterfaceBuilder(intf, vlanId)).trim(); | ||
| 190 | } catch (NetconfException e) { | 187 | } catch (NetconfException e) { |
| 191 | log.error("Failed to configure trunk mode for VLAN ID {} on device {} interface {}.", | 188 | log.error("Failed to configure trunk mode for VLAN ID {} on device {} interface {}.", |
| 192 | vlanId, deviceId, intf, e); | 189 | vlanId, deviceId, intf, e); |
| ... | @@ -250,8 +247,7 @@ public class InterfaceConfigCiscoIosImpl extends AbstractHandlerBehaviour | ... | @@ -250,8 +247,7 @@ public class InterfaceConfigCiscoIosImpl extends AbstractHandlerBehaviour |
| 250 | .data().deviceId()).getSession(); | 247 | .data().deviceId()).getSession(); |
| 251 | String reply; | 248 | String reply; |
| 252 | try { | 249 | try { |
| 253 | - //TODO remove XML triming if preceeds in Session | 250 | + reply = session.requestSync(removeTrunkInterfaceBuilder(intf, vlanId)); |
| 254 | - reply = session.requestSync(removeTrunkInterfaceBuilder(intf, vlanId)).trim(); | ||
| 255 | } catch (NetconfException e) { | 251 | } catch (NetconfException e) { |
| 256 | log.error("Failed to remove trunk mode for VLAN ID {} on device {} interface {}.", | 252 | log.error("Failed to remove trunk mode for VLAN ID {} on device {} interface {}.", |
| 257 | vlanId, deviceId, intf, e); | 253 | vlanId, deviceId, intf, e); | ... | ... |
-
Please register or login to post a comment