diff options
Diffstat (limited to 'v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/RoutingCustomizer.java')
-rw-r--r-- | v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/RoutingCustomizer.java | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/RoutingCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/RoutingCustomizer.java index 8d930d80c..718afc0e1 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/RoutingCustomizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/RoutingCustomizer.java @@ -53,10 +53,9 @@ public class RoutingCustomizer extends VppApiCustomizer implements ChildWriterCu public void writeCurrentAttributes(@Nonnull final InstanceIdentifier<Routing> id, @Nonnull final Routing dataAfter, @Nonnull final Context writeContext) throws WriteFailedException.CreateFailedException { - final Interface ifc = (Interface) writeContext.get(InterfaceCustomizer.IFC_AFTER_CTX); try { - setRouting(ifc.getName(), dataAfter); + setRouting(id.firstKeyOf(Interface.class).getName(), dataAfter); } catch (VppApiInvocationException e) { LOG.warn("Update of Routing failed", e); throw new WriteFailedException.CreateFailedException(id, dataAfter, e); @@ -68,12 +67,10 @@ public class RoutingCustomizer extends VppApiCustomizer implements ChildWriterCu @Nonnull final Routing dataBefore, @Nonnull final Routing dataAfter, @Nonnull final Context writeContext) throws WriteFailedException.UpdateFailedException { - final Interface ifcBefore = (Interface) writeContext.get(InterfaceCustomizer.IFC_BEFORE_CTX); - final Interface ifcAfter = (Interface) writeContext.get(InterfaceCustomizer.IFC_BEFORE_CTX); try { // TODO handle updates properly - setRouting(ifcAfter.getName(), dataAfter); + setRouting(id.firstKeyOf(Interface.class).getName(), dataAfter); } catch (VppApiInvocationException e) { LOG.warn("Update of Routing failed", e); throw new WriteFailedException.UpdateFailedException(id, dataBefore, dataAfter, e); |