71821d07f0a107eea2f8a8866155789a643d1a7f
[netvirt.git] / vpnservice / elanmanager / elanmanager-impl / src / test / java / org / opendaylight / netvirt / elanmanager / tests / ExpectedObjects.xtend
1 /*
2  * Copyright (c) 2016 Red Hat, Inc. and others. All rights reserved.
3  *
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
7  */
8 package org.opendaylight.netvirt.elanmanager.tests
9
10 import org.opendaylight.mdsal.binding.testutils.AssertDataObjects
11 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.ElanInstancesBuilder
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.ElanInterfacesBuilder
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.ElanInstanceBuilder
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.interfaces.ElanInterfaceBuilder
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.interfaces.elan._interface.StaticMacEntriesBuilder;
17
18 import static extension org.opendaylight.mdsal.binding.testutils.XtendBuilderExtensions.operator_doubleGreaterThan
19
20 /**
21  * Definitions of complex objects expected in tests.
22  *
23  * These were originally generated {@link AssertDataObjects#assertEqualBeans}.
24  */
25 class ExpectedObjects {
26
27     def static createElanInstance() {
28         new ElanInstancesBuilder >> [
29             elanInstance = #[
30                 new ElanInstanceBuilder >> [
31                     description = "TestElan description"
32                     elanInstanceName = "TestElanName"
33                     elanTag = 5000L
34                     macTimeout = 12345L
35                 ]
36             ]
37         ]
38     }
39
40     def static addElanInterface() {
41         new ElanInterfacesBuilder >> [
42             elanInterface = #[
43                 new ElanInterfaceBuilder >> [
44                     description = "..."
45                     elanInstanceName = "TestElanName"
46                     name = "TestElanInterfaceName"
47                     staticMacEntries = #[
48                         new StaticMacEntriesBuilder >> [
49                             macAddress = new PhysAddress("11:22:33:44:55:66")
50                         ]
51                     ]
52                 ]
53             ]
54         ]
55     }
56 }