From 3ff327af1f0bc61d0bc252f2a0f75f2beac9b446 Mon Sep 17 00:00:00 2001 From: Jian Li Date: Tue, 14 Mar 2017 17:02:19 +0900 Subject: [PATCH] [ONOS-6142] Add skeleton code for LISP extension addresses Change-Id: I692c09c28d561a13df5de6db79b979a2e820ff09 --- drivers/lisp/BUCK | 1 + drivers/lisp/pom.xml | 5 +++ .../lisp/extensions/LispAppDataAddress.java | 41 ++++++++++++++++++ .../lisp/extensions/LispAsAddress.java | 42 +++++++++++++++++++ .../lisp/extensions/LispGcAddress.java | 42 +++++++++++++++++++ .../lisp/extensions/LispListAddress.java | 42 +++++++++++++++++++ .../lisp/extensions/LispMulticastAddress.java | 42 +++++++++++++++++++ .../lisp/extensions/LispNatAddress.java | 42 +++++++++++++++++++ .../lisp/extensions/LispNonceAddress.java | 42 +++++++++++++++++++ .../lisp/extensions/LispSecurityAddress.java | 42 +++++++++++++++++++ .../lisp/extensions/LispSegmentAddress.java | 42 +++++++++++++++++++ .../lisp/extensions/LispSrcDstAddress.java | 42 +++++++++++++++++++ .../lisp/extensions/LispTeAddress.java | 42 +++++++++++++++++++ .../drivers/lisp/extensions/package-info.java | 20 +++++++++ 14 files changed, 487 insertions(+) create mode 100644 drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispAppDataAddress.java create mode 100644 drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispAsAddress.java create mode 100644 drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispGcAddress.java create mode 100644 drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispListAddress.java create mode 100644 drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispMulticastAddress.java create mode 100644 drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispNatAddress.java create mode 100644 drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispNonceAddress.java create mode 100644 drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispSecurityAddress.java create mode 100644 drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispSegmentAddress.java create mode 100644 drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispSrcDstAddress.java create mode 100644 drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispTeAddress.java create mode 100644 drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/package-info.java diff --git a/drivers/lisp/BUCK b/drivers/lisp/BUCK index b938b39dca..e5f7d2afb1 100644 --- a/drivers/lisp/BUCK +++ b/drivers/lisp/BUCK @@ -1,6 +1,7 @@ COMPILE_DEPS = [ '//lib:CORE_DEPS', '//protocols/lisp/api:onos-protocols-lisp-api', + '//apps/mappingmanagement/api:onos-apps-mappingmanagement-api', ] TEST_DEPS = [ diff --git a/drivers/lisp/pom.xml b/drivers/lisp/pom.xml index 615478fdc9..579b5bc09d 100644 --- a/drivers/lisp/pom.xml +++ b/drivers/lisp/pom.xml @@ -47,6 +47,11 @@ onos-lisp-api ${project.version} + + org.onosproject + onos-mapping-api + ${project.version} + \ No newline at end of file diff --git a/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispAppDataAddress.java b/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispAppDataAddress.java new file mode 100644 index 0000000000..7819a3b297 --- /dev/null +++ b/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispAppDataAddress.java @@ -0,0 +1,41 @@ +/* + * Copyright 2017-present Open Networking Laboratory + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onosproject.drivers.lisp.extensions; + +import org.onosproject.mapping.addresses.ExtensionMappingAddress; +import org.onosproject.mapping.addresses.ExtensionMappingAddressType; +import org.onosproject.net.flow.AbstractExtension; + +/** + * Implementation of LISP application data address. + */ +public class LispAppDataAddress extends AbstractExtension + implements ExtensionMappingAddress { + @Override + public ExtensionMappingAddressType type() { + return null; + } + + @Override + public byte[] serialize() { + return new byte[0]; + } + + @Override + public void deserialize(byte[] data) { + + } +} diff --git a/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispAsAddress.java b/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispAsAddress.java new file mode 100644 index 0000000000..4b1dfe9734 --- /dev/null +++ b/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispAsAddress.java @@ -0,0 +1,42 @@ +/* + * Copyright 2017-present Open Networking Laboratory + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.drivers.lisp.extensions; + +import org.onosproject.mapping.addresses.ExtensionMappingAddress; +import org.onosproject.mapping.addresses.ExtensionMappingAddressType; +import org.onosproject.net.flow.AbstractExtension; + +/** + * Implementation of LISP Autonomous System (AS) address. + */ +public class LispAsAddress extends AbstractExtension + implements ExtensionMappingAddress { + @Override + public ExtensionMappingAddressType type() { + return null; + } + + @Override + public byte[] serialize() { + return new byte[0]; + } + + @Override + public void deserialize(byte[] data) { + + } +} diff --git a/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispGcAddress.java b/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispGcAddress.java new file mode 100644 index 0000000000..48f4f4f4b4 --- /dev/null +++ b/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispGcAddress.java @@ -0,0 +1,42 @@ +/* + * Copyright 2017-present Open Networking Laboratory + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.drivers.lisp.extensions; + +import org.onosproject.mapping.addresses.ExtensionMappingAddress; +import org.onosproject.mapping.addresses.ExtensionMappingAddressType; +import org.onosproject.net.flow.AbstractExtension; + +/** + * Implementation of LISP Geo Coordinate (GC) address. + */ +public class LispGcAddress extends AbstractExtension + implements ExtensionMappingAddress { + @Override + public ExtensionMappingAddressType type() { + return null; + } + + @Override + public byte[] serialize() { + return new byte[0]; + } + + @Override + public void deserialize(byte[] data) { + + } +} diff --git a/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispListAddress.java b/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispListAddress.java new file mode 100644 index 0000000000..3bc7e46897 --- /dev/null +++ b/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispListAddress.java @@ -0,0 +1,42 @@ +/* + * Copyright 2017-present Open Networking Laboratory + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.drivers.lisp.extensions; + +import org.onosproject.mapping.addresses.ExtensionMappingAddress; +import org.onosproject.mapping.addresses.ExtensionMappingAddressType; +import org.onosproject.net.flow.AbstractExtension; + +/** + * Implementation of LISP list address. + */ +public class LispListAddress extends AbstractExtension + implements ExtensionMappingAddress { + @Override + public ExtensionMappingAddressType type() { + return null; + } + + @Override + public byte[] serialize() { + return new byte[0]; + } + + @Override + public void deserialize(byte[] data) { + + } +} diff --git a/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispMulticastAddress.java b/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispMulticastAddress.java new file mode 100644 index 0000000000..fc3e03bce1 --- /dev/null +++ b/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispMulticastAddress.java @@ -0,0 +1,42 @@ +/* + * Copyright 2017-present Open Networking Laboratory + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.drivers.lisp.extensions; + +import org.onosproject.mapping.addresses.ExtensionMappingAddress; +import org.onosproject.mapping.addresses.ExtensionMappingAddressType; +import org.onosproject.net.flow.AbstractExtension; + +/** + * Implementation of LISP multicast address. + */ +public class LispMulticastAddress extends AbstractExtension + implements ExtensionMappingAddress { + @Override + public ExtensionMappingAddressType type() { + return null; + } + + @Override + public byte[] serialize() { + return new byte[0]; + } + + @Override + public void deserialize(byte[] data) { + + } +} diff --git a/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispNatAddress.java b/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispNatAddress.java new file mode 100644 index 0000000000..a21c83ea06 --- /dev/null +++ b/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispNatAddress.java @@ -0,0 +1,42 @@ +/* + * Copyright 2017-present Open Networking Laboratory + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.drivers.lisp.extensions; + +import org.onosproject.mapping.addresses.ExtensionMappingAddress; +import org.onosproject.mapping.addresses.ExtensionMappingAddressType; +import org.onosproject.net.flow.AbstractExtension; + +/** + * Implementation of LISP Network Address Translation (NAT) address. + */ +public class LispNatAddress extends AbstractExtension + implements ExtensionMappingAddress { + @Override + public ExtensionMappingAddressType type() { + return null; + } + + @Override + public byte[] serialize() { + return new byte[0]; + } + + @Override + public void deserialize(byte[] data) { + + } +} diff --git a/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispNonceAddress.java b/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispNonceAddress.java new file mode 100644 index 0000000000..b516913cf1 --- /dev/null +++ b/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispNonceAddress.java @@ -0,0 +1,42 @@ +/* + * Copyright 2017-present Open Networking Laboratory + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.drivers.lisp.extensions; + +import org.onosproject.mapping.addresses.ExtensionMappingAddress; +import org.onosproject.mapping.addresses.ExtensionMappingAddressType; +import org.onosproject.net.flow.AbstractExtension; + +/** + * Implementation of LISP nonce address. + */ +public class LispNonceAddress extends AbstractExtension + implements ExtensionMappingAddress { + @Override + public ExtensionMappingAddressType type() { + return null; + } + + @Override + public byte[] serialize() { + return new byte[0]; + } + + @Override + public void deserialize(byte[] data) { + + } +} diff --git a/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispSecurityAddress.java b/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispSecurityAddress.java new file mode 100644 index 0000000000..1f1020509f --- /dev/null +++ b/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispSecurityAddress.java @@ -0,0 +1,42 @@ +/* + * Copyright 2017-present Open Networking Laboratory + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.drivers.lisp.extensions; + +import org.onosproject.mapping.addresses.ExtensionMappingAddress; +import org.onosproject.mapping.addresses.ExtensionMappingAddressType; +import org.onosproject.net.flow.AbstractExtension; + +/** + * Implementation LISP security address. + */ +public class LispSecurityAddress extends AbstractExtension + implements ExtensionMappingAddress { + @Override + public ExtensionMappingAddressType type() { + return null; + } + + @Override + public byte[] serialize() { + return new byte[0]; + } + + @Override + public void deserialize(byte[] data) { + + } +} diff --git a/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispSegmentAddress.java b/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispSegmentAddress.java new file mode 100644 index 0000000000..c48a80c96d --- /dev/null +++ b/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispSegmentAddress.java @@ -0,0 +1,42 @@ +/* + * Copyright 2017-present Open Networking Laboratory + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.drivers.lisp.extensions; + +import org.onosproject.mapping.addresses.ExtensionMappingAddress; +import org.onosproject.mapping.addresses.ExtensionMappingAddressType; +import org.onosproject.net.flow.AbstractExtension; + +/** + * Implementation of LISP segment address. + */ +public class LispSegmentAddress extends AbstractExtension + implements ExtensionMappingAddress { + @Override + public ExtensionMappingAddressType type() { + return null; + } + + @Override + public byte[] serialize() { + return new byte[0]; + } + + @Override + public void deserialize(byte[] data) { + + } +} diff --git a/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispSrcDstAddress.java b/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispSrcDstAddress.java new file mode 100644 index 0000000000..5dc892a9f6 --- /dev/null +++ b/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispSrcDstAddress.java @@ -0,0 +1,42 @@ +/* + * Copyright 2017-present Open Networking Laboratory + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.drivers.lisp.extensions; + +import org.onosproject.mapping.addresses.ExtensionMappingAddress; +import org.onosproject.mapping.addresses.ExtensionMappingAddressType; +import org.onosproject.net.flow.AbstractExtension; + +/** + * Implementation of LISP source and detination address. + */ +public class LispSrcDstAddress extends AbstractExtension + implements ExtensionMappingAddress { + @Override + public ExtensionMappingAddressType type() { + return null; + } + + @Override + public byte[] serialize() { + return new byte[0]; + } + + @Override + public void deserialize(byte[] data) { + + } +} diff --git a/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispTeAddress.java b/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispTeAddress.java new file mode 100644 index 0000000000..f5d892bdbd --- /dev/null +++ b/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/LispTeAddress.java @@ -0,0 +1,42 @@ +/* + * Copyright 2017-present Open Networking Laboratory + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.drivers.lisp.extensions; + +import org.onosproject.mapping.addresses.ExtensionMappingAddress; +import org.onosproject.mapping.addresses.ExtensionMappingAddressType; +import org.onosproject.net.flow.AbstractExtension; + +/** + * Implementation of LISP traffic engineering address. + */ +public final class LispTeAddress extends AbstractExtension + implements ExtensionMappingAddress { + @Override + public ExtensionMappingAddressType type() { + return null; + } + + @Override + public byte[] serialize() { + return new byte[0]; + } + + @Override + public void deserialize(byte[] data) { + + } +} diff --git a/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/package-info.java b/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/package-info.java new file mode 100644 index 0000000000..1c742200a8 --- /dev/null +++ b/drivers/lisp/src/main/java/org/onosproject/drivers/lisp/extensions/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2017-present Open Networking Laboratory + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Created by guni on 2017. 3. 14.. + */ +package org.onosproject.drivers.lisp.extensions; \ No newline at end of file