package org.opendaylight.groupbasedpolicy.neutron.mapper.infrastructure;
+import com.google.common.base.Preconditions;
+
import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.groupbasedpolicy.util.IidFactory;
import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.policy.EndpointGroup;
import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.policy.endpoint.group.ConsumerNamedSelector;
-import com.google.common.base.Preconditions;
-
public class NetworkClient extends ServiceUtil {
private static final Name NETWORK_CLIENT_EPG_NAME = new Name("NETWORK_CLIENT");
private static final Description NETWORK_CLIENT_EPG_DESC = new Description("Represents DHCP and DNS clients.");
/**
- * ID of {@link #EPG}
+ * ID of {@link #EPG}.
*/
public static final EndpointGroupId EPG_ID = new EndpointGroupId("ccc5e444-573c-11e5-885d-feff819cdc9f");
/**
- * Network-client endpoint-group consuming no contract
+ * Network-client endpoint-group consuming no contract.
*/
public static final EndpointGroup EPG;
}
/**
- * Puts {@link #EPG} to {@link LogicalDatastoreType#CONFIGURATION}
+ * Puts {@link #EPG} to {@link LogicalDatastoreType#CONFIGURATION}.
*
* @param tenantId location of {@link #EPG}
- * @param wTx transaction where {@link #EPG} is written
+ * @param writeTx transaction where {@link #EPG} is written
*/
- public static void writeNetworkClientEntitiesToTenant(TenantId tenantId, WriteTransaction wTx) {
- wTx.put(LogicalDatastoreType.CONFIGURATION, IidFactory.endpointGroupIid(tenantId, EPG_ID), EPG, true);
+ public static void writeNetworkClientEntitiesToTenant(TenantId tenantId, WriteTransaction writeTx) {
+ writeTx.put(LogicalDatastoreType.CONFIGURATION, IidFactory.endpointGroupIid(tenantId, EPG_ID), EPG, true);
}
/**
- * Puts consumer-named-selector to {@link #EPG} in {@link LogicalDatastoreType#CONFIGURATION}
+ * Puts consumer-named-selector to {@link #EPG} in {@link LogicalDatastoreType#CONFIGURATION}.
*
* @param tenantId tenantId location of {@link #EPG}
* @param consumerNamedSelector is added to {@link #EPG}
- * @param wTx transaction where the given consumer-named-selector is written
+ * @param writeTx transaction where the given consumer-named-selector is written
*/
public static void writeConsumerNamedSelector(TenantId tenantId, ConsumerNamedSelector consumerNamedSelector,
- WriteTransaction wTx) {
+ WriteTransaction writeTx) {
Preconditions.checkNotNull(consumerNamedSelector);
- wTx.put(LogicalDatastoreType.CONFIGURATION,
+ writeTx.put(LogicalDatastoreType.CONFIGURATION,
IidFactory.consumerNamedSelectorIid(tenantId, EPG_ID, consumerNamedSelector.getName()),
consumerNamedSelector, true);
}