Search in sources :

Example 1 with FeatureBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.extensions.rev160617.service.provider.features.attributes.features.FeatureBuilder in project netvirt by opendaylight.

the class NeutronvpnManager method configureFeatures.

private void configureFeatures() {
    InstanceIdentifier<Feature> iid = InstanceIdentifier.builder(Neutron.class).child(Features.class).child(Feature.class, new FeatureKey(OperationalPortStatus.class)).build();
    Feature feature = new FeatureBuilder().setKey(new FeatureKey(OperationalPortStatus.class)).build();
    try {
        SingleTransactionDataBroker.syncWrite(dataBroker, LogicalDatastoreType.OPERATIONAL, iid, feature);
    } catch (TransactionCommitFailedException e) {
        LOG.warn("Error configuring feature {}", feature, e);
    }
}
Also used : FeatureBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.extensions.rev160617.service.provider.features.attributes.features.FeatureBuilder) TransactionCommitFailedException(org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException) Feature(org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.extensions.rev160617.service.provider.features.attributes.features.Feature) Neutron(org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.rev150712.Neutron) FeatureKey(org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.extensions.rev160617.service.provider.features.attributes.features.FeatureKey)

Aggregations

TransactionCommitFailedException (org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException)1 Feature (org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.extensions.rev160617.service.provider.features.attributes.features.Feature)1 FeatureBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.extensions.rev160617.service.provider.features.attributes.features.FeatureBuilder)1 FeatureKey (org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.extensions.rev160617.service.provider.features.attributes.features.FeatureKey)1 Neutron (org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.rev150712.Neutron)1