2 * Copyright (c) 2017 Ericsson India Global Services Pvt Ltd. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.genius.itm.tests.xtend;
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rev160406.transport.zones.TransportZoneBuilder;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rev160406.transport.zones.transport.zone.SubnetsBuilder;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rev160406.transport.zones.transport.zone.subnets.VtepsBuilder;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.TunnelTypeVxlan;
15 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
16 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address;
17 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix;
18 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix;
19 import org.opendaylight.genius.itm.tests.ItmTestConstants;
20 import org.opendaylight.genius.itm.globals.ITMConstants;
22 import static extension org.opendaylight.mdsal.binding.testutils.XtendBuilderExtensions.operator_doubleGreaterThan
24 class ExpectedTransportZoneObjects {
26 static def newTransportZone() {
27 new TransportZoneBuilder >> [
29 tunnelType = TunnelTypeVxlan
31 new SubnetsBuilder >> [
32 gatewayIp = new IpAddress( new Ipv4Address(ITMConstants.DUMMY_GATEWAY_IP) )
33 prefix = new IpPrefix( new Ipv4Prefix(ITMConstants.DUMMY_PREFIX) )
34 vlanId = ITMConstants.DUMMY_VLANID
38 dpnId = ItmTestConstants.INT_DEF_BR_DPID
39 ipAddress = new IpAddress( new Ipv4Address(ItmTestConstants.NB_TZ_TEP_IP) )
40 portname = ITMConstants.DUMMY_PORT
48 static def updatedTransportZone() {
49 new TransportZoneBuilder >> [
51 tunnelType = TunnelTypeVxlan
53 new SubnetsBuilder >> [
54 gatewayIp = new IpAddress( new Ipv4Address(ITMConstants.DUMMY_GATEWAY_IP) )
55 prefix = new IpPrefix( new Ipv4Prefix(ITMConstants.DUMMY_PREFIX) )
56 vlanId = ITMConstants.DUMMY_VLANID
60 dpnId = ItmTestConstants.INT_DEF_BR_DPID
61 ipAddress = new IpAddress( new Ipv4Address(ItmTestConstants.DEF_TZ_TEP_IP) )
62 portname = ITMConstants.DUMMY_PORT