23 | * Potential uses: 24 | *
31 | * { 32 | * <object_id>: [<event_type>, ...], 33 | * ... 34 | * } 35 | *36 | */ 37 | public static final String SUBSCRIPTION_TABLE = "Subscription Table"; 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/org/o3project/odenos/remoteobject/rest/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 NEC Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.o3project.odenos.remoteobject.rest; 18 | 19 | -------------------------------------------------------------------------------- /src/main/java/org/o3project/odenos/remoteobject/rest/servlet/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 NEC Corporation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.o3project.odenos.remoteobject.rest.servlet; 18 | 19 | -------------------------------------------------------------------------------- /src/main/python/org/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/main/python/org/o3project/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/main/python/org/o3project/odenos/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/main/python/org/o3project/odenos/core/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/main/python/org/o3project/odenos/core/component/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/main/python/org/o3project/odenos/core/component/driver.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | from org.o3project.odenos.core.component.logic import Logic 18 | 19 | 20 | class Driver(Logic): 21 | CONNECTION_TYPES = "original:1" 22 | 23 | def __init__(self, object_id, dispatcher): 24 | self._super_type = Driver.__name__ 25 | super(Driver, self).__init__(object_id, dispatcher) 26 | -------------------------------------------------------------------------------- /src/main/python/org/o3project/odenos/core/component/network/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/main/python/org/o3project/odenos/core/component/network/flow/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/main/python/org/o3project/odenos/core/component/network/flow/basic/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/main/python/org/o3project/odenos/core/component/network/flow/basic/flow_action.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | 18 | class FlowAction(object): 19 | # property key 20 | TYPE = "type" 21 | 22 | def __init__(self, type_): 23 | self._body = { 24 | self.TYPE: type_ 25 | } 26 | 27 | @property 28 | def type(self): 29 | return self._body[self.TYPE] 30 | -------------------------------------------------------------------------------- /src/main/python/org/o3project/odenos/core/component/network/flow/basic/flow_action_output.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | from org.o3project.odenos.core.component.network.flow.basic.flow_action import ( 18 | FlowAction 19 | ) 20 | 21 | 22 | class FlowActionOutput(FlowAction): 23 | # property key 24 | OUTPUT = "output" 25 | 26 | def __init__(self, type_, output): 27 | super(FlowActionOutput, self).__init__(type_) 28 | self._body[self.OUTPUT] = output 29 | 30 | @property 31 | def output(self): 32 | return self._body[self.OUTPUT] 33 | 34 | @classmethod 35 | def create_from_packed(cls, packed): 36 | return cls(packed[cls.TYPE], packed[cls.OUTPUT]) 37 | 38 | def packed_object(self): 39 | return self._body 40 | -------------------------------------------------------------------------------- /src/main/python/org/o3project/odenos/core/component/network/flow/ofpflow/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/main/python/org/o3project/odenos/core/component/network/flow/ofpflow/ofp_flow_action_copy_ttl_In.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | from org.o3project.odenos.core.component.network.flow.basic.flow_action import ( 18 | FlowAction 19 | ) 20 | 21 | 22 | class OFPFlowActionCopyTtlIn(FlowAction): 23 | 24 | def __init__(self, type_): 25 | super(OFPFlowActionCopyTtlIn, self).__init__(type_) 26 | 27 | @classmethod 28 | def create_from_packed(cls, packed): 29 | return cls(packed[cls.TYPE]) 30 | 31 | def packed_object(self): 32 | return self._body 33 | -------------------------------------------------------------------------------- /src/main/python/org/o3project/odenos/core/component/network/flow/ofpflow/ofp_flow_action_copy_ttl_out.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | from org.o3project.odenos.core.component.network.flow.basic.flow_action import ( 18 | FlowAction 19 | ) 20 | 21 | 22 | class OFPFlowActionCopyTtlOut(FlowAction): 23 | 24 | def __init__(self, type_): 25 | super(OFPFlowActionCopyTtlOut, self).__init__(type_) 26 | 27 | @classmethod 28 | def create_from_packed(cls, packed): 29 | return cls(packed[cls.TYPE]) 30 | 31 | def packed_object(self): 32 | return self._body 33 | -------------------------------------------------------------------------------- /src/main/python/org/o3project/odenos/core/component/network/flow/ofpflow/ofp_flow_action_dec_ip_ttl.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | from org.o3project.odenos.core.component.network.flow.basic.flow_action import ( 18 | FlowAction 19 | ) 20 | 21 | 22 | class OFPFlowActionDecIpTtl(FlowAction): 23 | 24 | def __init__(self, type_): 25 | super(OFPFlowActionDecIpTtl, self).__init__(type_) 26 | 27 | @classmethod 28 | def create_from_packed(cls, packed): 29 | return cls(packed[cls.TYPE]) 30 | 31 | def packed_object(self): 32 | return self._body 33 | -------------------------------------------------------------------------------- /src/main/python/org/o3project/odenos/core/component/network/flow/ofpflow/ofp_flow_action_dec_mpls_ttl.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | from org.o3project.odenos.core.component.network.flow.basic.flow_action import ( 18 | FlowAction 19 | ) 20 | 21 | 22 | class OFPFlowActionDecMplsTtl(FlowAction): 23 | 24 | def __init__(self, type_): 25 | super(OFPFlowActionDecMplsTtl, self).__init__(type_) 26 | 27 | @classmethod 28 | def create_from_packed(cls, packed): 29 | return cls(packed[cls.TYPE]) 30 | 31 | def packed_object(self): 32 | return self._body 33 | -------------------------------------------------------------------------------- /src/main/python/org/o3project/odenos/core/component/network/flow/ofpflow/ofp_flow_action_pop_pbb.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | from org.o3project.odenos.core.component.network.flow.basic.flow_action import ( 18 | FlowAction 19 | ) 20 | 21 | 22 | class OFPFlowActionPopPbb(FlowAction): 23 | 24 | def __init__(self, type_): 25 | super(OFPFlowActionPopPbb, self).__init__(type_) 26 | 27 | @classmethod 28 | def create_from_packed(cls, packed): 29 | return cls(packed[cls.TYPE]) 30 | 31 | def packed_object(self): 32 | return self._body 33 | -------------------------------------------------------------------------------- /src/main/python/org/o3project/odenos/core/component/network/flow/ofpflow/ofp_flow_action_pop_vlan.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | from org.o3project.odenos.core.component.network.flow.basic.flow_action import ( 18 | FlowAction 19 | ) 20 | 21 | 22 | class OFPFlowActionPopVlan(FlowAction): 23 | 24 | def __init__(self, type_): 25 | super(OFPFlowActionPopVlan, self).__init__(type_) 26 | 27 | @classmethod 28 | def create_from_packed(cls, packed): 29 | return cls(packed[cls.TYPE]) 30 | 31 | def packed_object(self): 32 | return self._body 33 | -------------------------------------------------------------------------------- /src/main/python/org/o3project/odenos/core/component/network/packet/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/main/python/org/o3project/odenos/core/component/network/packet/in_packet_added.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | 18 | class InPacketAdded(object): 19 | TYPE = "InPacketAdded" 20 | 21 | # property key 22 | ID = "id" 23 | 24 | def __init__(self, id_): 25 | self.__id = id_ 26 | 27 | @property 28 | def id(self): 29 | return self.__id 30 | 31 | @classmethod 32 | def create_from_packed(cls, packed): 33 | return cls(packed[cls.ID]) 34 | -------------------------------------------------------------------------------- /src/main/python/org/o3project/odenos/core/component/network/packet/out_packet_added.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | 18 | class OutPacketAdded(object): 19 | TYPE = "OutPacketAdded" 20 | 21 | # property key 22 | ID = "id" 23 | 24 | def __init__(self, id_): 25 | self.__id = id_ 26 | 27 | @property 28 | def id(self): 29 | return self.__id 30 | 31 | @classmethod 32 | def create_from_packed(cls, packed): 33 | return cls(packed[cls.ID]) 34 | -------------------------------------------------------------------------------- /src/main/python/org/o3project/odenos/core/component/network/packet/packet.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | 18 | class Packet(object): 19 | # property key 20 | PACKET_ID = "packet_id" 21 | TYPE = "type" 22 | ATTRIBUTES = "attributes" 23 | 24 | def __init__(self, id_, type_, attributes): 25 | self._body = { 26 | self.PACKET_ID: id_, 27 | self.TYPE: type_, 28 | self.ATTRIBUTES: attributes 29 | } 30 | 31 | @property 32 | def packet_id(self): 33 | return self._body[self.PACKET_ID] 34 | 35 | @property 36 | def type(self): 37 | return self._body[self.TYPE] 38 | 39 | @property 40 | def attributes(self): 41 | return self._body[self.ATTRIBUTES] 42 | -------------------------------------------------------------------------------- /src/main/python/org/o3project/odenos/core/component/network/topology/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/main/python/org/o3project/odenos/core/manager/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2015 NEC Corporation. # 3 | # # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); # 5 | # you may not use this file except in compliance with the License. # 6 | # You may obtain a copy of the License at # 7 | # # 8 | # http://www.apache.org/licenses/LICENSE-2.0 # 9 | # # 10 | # Unless required by applicable law or agreed to in writing, software # 11 | # distributed under the License is distributed on an "AS IS" BASIS, # 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 13 | # See the License for the specific language governing permissions and # 14 | # limitations under the License. # 15 | 16 | -------------------------------------------------------------------------------- /src/main/python/org/o3project/odenos/core/util/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2015 NEC Corporation. # 3 | # # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); # 5 | # you may not use this file except in compliance with the License. # 6 | # You may obtain a copy of the License at # 7 | # # 8 | # http://www.apache.org/licenses/LICENSE-2.0 # 9 | # # 10 | # Unless required by applicable law or agreed to in writing, software # 11 | # distributed under the License is distributed on an "AS IS" BASIS, # 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 13 | # See the License for the specific language governing permissions and # 14 | # limitations under the License. # 15 | 16 | -------------------------------------------------------------------------------- /src/main/python/org/o3project/odenos/remoteobject/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/main/python/org/o3project/odenos/remoteobject/event/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/main/python/org/o3project/odenos/remoteobject/manager/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/main/python/org/o3project/odenos/remoteobject/manager/component/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/main/python/org/o3project/odenos/remoteobject/manager/component/event/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/main/python/org/o3project/odenos/remoteobject/manager/system/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/main/python/org/o3project/odenos/remoteobject/manager/system/event/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/main/python/org/o3project/odenos/remoteobject/message/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/main/python/org/o3project/odenos/remoteobject/message/event.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | 18 | class Event: 19 | 20 | def __init__(self, publisher_id, event_type, event_body): 21 | self.publisher_id = publisher_id 22 | self.event_type = event_type 23 | self.txid = '*' 24 | self.body = event_body 25 | 26 | @classmethod 27 | def create_from_packed(cls, packed): 28 | packed.pop(2) 29 | return cls(*packed) 30 | 31 | def packed_object(self): 32 | body = self.body 33 | if hasattr(body, "packed_object"): 34 | body = self.body.packed_object() 35 | return (self.publisher_id, self.event_type, self.txid, body) 36 | -------------------------------------------------------------------------------- /src/main/python/org/o3project/odenos/remoteobject/transport/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/main/ruby/.rubocop.yml: -------------------------------------------------------------------------------- 1 | inherit_from: .rubocop_todo.yml 2 | -------------------------------------------------------------------------------- /src/main/ruby/org/o3project/odenos.rb: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2015 NEC Corporation. # 3 | # # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); # 5 | # you may not use this file except in compliance with the License. # 6 | # You may obtain a copy of the License at # 7 | # # 8 | # http://www.apache.org/licenses/LICENSE-2.0 # 9 | # # 10 | # Unless required by applicable law or agreed to in writing, software # 11 | # distributed under the License is distributed on an "AS IS" BASIS, # 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 13 | # See the License for the specific language governing permissions and # 14 | # limitations under the License. # 15 | 16 | $LOAD_PATH << File.expand_path(File.dirname(__FILE__)) 17 | 18 | require 'odenos/component' 19 | require 'odenos/remoteobject' 20 | require 'odenos/core' 21 | -------------------------------------------------------------------------------- /src/main/ruby/org/o3project/odenos/component.rb: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2015 NEC Corporation. # 3 | # # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); # 5 | # you may not use this file except in compliance with the License. # 6 | # You may obtain a copy of the License at # 7 | # # 8 | # http://www.apache.org/licenses/LICENSE-2.0 # 9 | # # 10 | # Unless required by applicable law or agreed to in writing, software # 11 | # distributed under the License is distributed on an "AS IS" BASIS, # 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 13 | # See the License for the specific language governing permissions and # 14 | # limitations under the License. # 15 | 16 | require 'odenos/core/component/component' 17 | -------------------------------------------------------------------------------- /src/main/ruby/org/o3project/odenos/component/driver.rb: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2015 NEC Corporation. # 3 | # # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); # 5 | # you may not use this file except in compliance with the License. # 6 | # You may obtain a copy of the License at # 7 | # # 8 | # http://www.apache.org/licenses/LICENSE-2.0 # 9 | # # 10 | # Unless required by applicable law or agreed to in writing, software # 11 | # distributed under the License is distributed on an "AS IS" BASIS, # 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 13 | # See the License for the specific language governing permissions and # 14 | # limitations under the License. # 15 | 16 | require 'odenos/component/driver/driver' 17 | -------------------------------------------------------------------------------- /src/main/ruby/org/o3project/odenos/component/driver/driver.rb: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | require 'odenos/core/component' 18 | require 'odenos/remoteobject' 19 | require 'odenos/core/util' 20 | require 'odenos/core/component/logic' 21 | 22 | module Odenos 23 | module Component 24 | module Driver 25 | class Driver < Odenos::Component::Logic 26 | include Odenos::Util 27 | def initialize(remote_object_id, dispatcher) 28 | debug 'Driver#initialize' 29 | @super_type = 'Driver' 30 | @connection_types = 'original:1' 31 | super 32 | end 33 | end 34 | end 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /src/main/ruby/org/o3project/odenos/component/driver/of_driver.rb: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2015 NEC Corporation. # 3 | # # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); # 5 | # you may not use this file except in compliance with the License. # 6 | # You may obtain a copy of the License at # 7 | # # 8 | # http://www.apache.org/licenses/LICENSE-2.0 # 9 | # # 10 | # Unless required by applicable law or agreed to in writing, software # 11 | # distributed under the License is distributed on an "AS IS" BASIS, # 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 13 | # See the License for the specific language governing permissions and # 14 | # limitations under the License. # 15 | 16 | require 'odenos/component/driver/of_driver/monkey_patch' 17 | require 'odenos/component/driver/of_driver/transactions' 18 | require 'odenos/component/driver/of_driver/flow_entry' 19 | require 'odenos/component/driver/of_driver/openflow_controller' 20 | require 'odenos/component/driver/of_driver/request_errors' 21 | require 'odenos/component/driver/of_driver/flow_map' 22 | require 'odenos/component/driver/of_driver/openflow_driver' 23 | require 'odenos/component/driver/of_driver/request_helpers' 24 | require 'odenos/component/driver/of_driver/topology_map' 25 | -------------------------------------------------------------------------------- /src/main/ruby/org/o3project/odenos/component/driver/of_driver/ruby_topology.rb: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2015 NEC Corporation. # 3 | # # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); # 5 | # you may not use this file except in compliance with the License. # 6 | # You may obtain a copy of the License at # 7 | # # 8 | # http://www.apache.org/licenses/LICENSE-2.0 # 9 | # # 10 | # Unless required by applicable law or agreed to in writing, software # 11 | # distributed under the License is distributed on an "AS IS" BASIS, # 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 13 | # See the License for the specific language governing permissions and # 14 | # limitations under the License. # 15 | 16 | require 'odenos/component/driver/of_driver/ruby_topology/link' 17 | require 'odenos/component/driver/of_driver/ruby_topology/topology-controller' 18 | require 'odenos/component/driver/of_driver/ruby_topology/topology' 19 | -------------------------------------------------------------------------------- /src/main/ruby/org/o3project/odenos/component/driver/of_driver/ruby_topology/trema-extensions/port.rb: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2015 NEC Corporation. # 3 | # # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); # 5 | # you may not use this file except in compliance with the License. # 6 | # You may obtain a copy of the License at # 7 | # # 8 | # http://www.apache.org/licenses/LICENSE-2.0 # 9 | # # 10 | # Unless required by applicable law or agreed to in writing, software # 11 | # distributed under the License is distributed on an "AS IS" BASIS, # 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 13 | # See the License for the specific language governing permissions and # 14 | # limitations under the License. # 15 | 16 | require 'odenos/component/driver/of_driver/ruby_topology/trema-extensions/port/predicates' 17 | 18 | module Trema 19 | class Port 20 | include TremaExtensions::Port 21 | end 22 | end 23 | 24 | ### Local variables: 25 | ### mode: Ruby 26 | ### coding: utf-8-unix 27 | ### indent-tabs-mode: nil 28 | ### End: 29 | -------------------------------------------------------------------------------- /src/main/ruby/org/o3project/odenos/component/driver/of_driver/ruby_topology/trema-extensions/port/predicates.rb: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2015 NEC Corporation. # 3 | # # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); # 5 | # you may not use this file except in compliance with the License. # 6 | # You may obtain a copy of the License at # 7 | # # 8 | # http://www.apache.org/licenses/LICENSE-2.0 # 9 | # # 10 | # Unless required by applicable law or agreed to in writing, software # 11 | # distributed under the License is distributed on an "AS IS" BASIS, # 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 13 | # See the License for the specific language governing permissions and # 14 | # limitations under the License. # 15 | 16 | require 'trema' 17 | 18 | module TremaExtensions 19 | module Port 20 | def local? 21 | number == Trema::Controller::OFPP_LOCAL 22 | end 23 | end 24 | end 25 | 26 | ### Local variables: 27 | ### mode: Ruby 28 | ### coding: utf-8-unix 29 | ### indent-tabs-mode: nil 30 | ### End: 31 | -------------------------------------------------------------------------------- /src/main/ruby/org/o3project/odenos/core.rb: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2015 NEC Corporation. # 3 | # # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); # 5 | # you may not use this file except in compliance with the License. # 6 | # You may obtain a copy of the License at # 7 | # # 8 | # http://www.apache.org/licenses/LICENSE-2.0 # 9 | # # 10 | # Unless required by applicable law or agreed to in writing, software # 11 | # distributed under the License is distributed on an "AS IS" BASIS, # 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 13 | # See the License for the specific language governing permissions and # 14 | # limitations under the License. # 15 | 16 | require 'odenos/core/component' 17 | require 'odenos/core/util' 18 | -------------------------------------------------------------------------------- /src/main/ruby/org/o3project/odenos/core/component.rb: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2015 NEC Corporation. # 3 | # # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); # 5 | # you may not use this file except in compliance with the License. # 6 | # You may obtain a copy of the License at # 7 | # # 8 | # http://www.apache.org/licenses/LICENSE-2.0 # 9 | # # 10 | # Unless required by applicable law or agreed to in writing, software # 11 | # distributed under the License is distributed on an "AS IS" BASIS, # 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 13 | # See the License for the specific language governing permissions and # 14 | # limitations under the License. # 15 | 16 | require 'odenos/core/component/component' 17 | require 'odenos/core/component/logic' 18 | require 'odenos/core/component/network_interface' 19 | require 'odenos/core/component/network_component_entity' 20 | require 'odenos/core/component/system_manager_interface' 21 | -------------------------------------------------------------------------------- /src/main/ruby/org/o3project/odenos/core/odenos.rb: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2015 NEC Corporation. # 3 | # # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); # 5 | # you may not use this file except in compliance with the License. # 6 | # You may obtain a copy of the License at # 7 | # # 8 | # http://www.apache.org/licenses/LICENSE-2.0 # 9 | # # 10 | # Unless required by applicable law or agreed to in writing, software # 11 | # distributed under the License is distributed on an "AS IS" BASIS, # 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 13 | # See the License for the specific language governing permissions and # 14 | # limitations under the License. # 15 | 16 | $LOAD_PATH.unshift File.expand_path(File.join File.dirname(__FILE__), '../../') 17 | 18 | require 'rubygems' 19 | require 'odenos/component/driver/of_driver' 20 | require 'odenos/component/driver/of_driver/openflow_controller' 21 | require 'odenos/remoteobject/manager/of_component_manager' 22 | -------------------------------------------------------------------------------- /src/main/ruby/org/o3project/odenos/core/util.rb: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2015 NEC Corporation. # 3 | # # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); # 5 | # you may not use this file except in compliance with the License. # 6 | # You may obtain a copy of the License at # 7 | # # 8 | # http://www.apache.org/licenses/LICENSE-2.0 # 9 | # # 10 | # Unless required by applicable law or agreed to in writing, software # 11 | # distributed under the License is distributed on an "AS IS" BASIS, # 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 13 | # See the License for the specific language governing permissions and # 14 | # limitations under the License. # 15 | 16 | require 'odenos/core/util/array_accessor' 17 | require 'odenos/core/util/logger' 18 | require 'odenos/core/util/object_array' 19 | require 'odenos/core/util/request_parser' 20 | require 'odenos/core/util/hash_accessor' 21 | require 'odenos/core/util/meta_helper' 22 | require 'odenos/core/util/object_hash' 23 | -------------------------------------------------------------------------------- /src/main/ruby/org/o3project/odenos/core/util/meta_helper.rb: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2015 NEC Corporation. # 3 | # # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); # 5 | # you may not use this file except in compliance with the License. # 6 | # You may obtain a copy of the License at # 7 | # # 8 | # http://www.apache.org/licenses/LICENSE-2.0 # 9 | # # 10 | # Unless required by applicable law or agreed to in writing, software # 11 | # distributed under the License is distributed on an "AS IS" BASIS, # 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 13 | # See the License for the specific language governing permissions and # 14 | # limitations under the License. # 15 | 16 | module Odenos 17 | module Util 18 | module MetaHelper 19 | def self.class_from_string(str) 20 | str.split('::').reduce(Object) do |mod, class_name| 21 | mod.const_get(class_name) 22 | end 23 | end 24 | 25 | def self.parent_module(cls) 26 | mod_path = cls.to_s.split('::') 27 | mod_path.pop 28 | mod_path.reduce(Object) do |mod, class_name| 29 | mod.const_get(class_name) 30 | end 31 | end 32 | 33 | def self.simple_class(cls) 34 | cls.to_s.split('::').last 35 | end 36 | end 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /src/main/ruby/org/o3project/odenos/remoteobject.rb: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2015 NEC Corporation. # 3 | # # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); # 5 | # you may not use this file except in compliance with the License. # 6 | # You may obtain a copy of the License at # 7 | # # 8 | # http://www.apache.org/licenses/LICENSE-2.0 # 9 | # # 10 | # Unless required by applicable law or agreed to in writing, software # 11 | # distributed under the License is distributed on an "AS IS" BASIS, # 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 13 | # See the License for the specific language governing permissions and # 14 | # limitations under the License. # 15 | 16 | require 'odenos/remoteobject/component_connection' 17 | require 'odenos/remoteobject/event' 18 | require 'odenos/remoteobject/remote_object' 19 | require 'odenos/remoteobject/response' 20 | require 'odenos/remoteobject/component_connection_logic_and_network' 21 | require 'odenos/remoteobject/message_dispatcher' 22 | require 'odenos/remoteobject/request' 23 | require 'odenos/remoteobject/transport' 24 | require 'odenos/remoteobject/manager' 25 | -------------------------------------------------------------------------------- /src/main/ruby/org/o3project/odenos/remoteobject/component_connection.rb: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2015 NEC Corporation. # 3 | # # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); # 5 | # you may not use this file except in compliance with the License. # 6 | # You may obtain a copy of the License at # 7 | # # 8 | # http://www.apache.org/licenses/LICENSE-2.0 # 9 | # # 10 | # Unless required by applicable law or agreed to in writing, software # 11 | # distributed under the License is distributed on an "AS IS" BASIS, # 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 13 | # See the License for the specific language governing permissions and # 14 | # limitations under the License. # 15 | 16 | require 'odenos/core/util' 17 | 18 | module Odenos 19 | module Core 20 | class ComponentConnection < Odenos::Util::TypedObjectHash 21 | hash_accessor :object, :connection_type, :state 22 | 23 | def component_connection_id 24 | @object[:id] 25 | end 26 | 27 | def component_connection_id=(v) 28 | @object[:id] = v 29 | end 30 | 31 | module State 32 | INITIALIZING = 'initializing' 33 | RUNNING = 'running' 34 | FINALIZING = 'finalizing' 35 | ERROR = 'error' 36 | NONE = 'none' 37 | end 38 | 39 | def initialize(initial_hash = {}) 40 | super(initial_hash) 41 | end 42 | end 43 | end 44 | end 45 | -------------------------------------------------------------------------------- /src/main/ruby/org/o3project/odenos/remoteobject/component_connection_logic_and_network.rb: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2015 NEC Corporation. # 3 | # # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); # 5 | # you may not use this file except in compliance with the License. # 6 | # You may obtain a copy of the License at # 7 | # # 8 | # http://www.apache.org/licenses/LICENSE-2.0 # 9 | # # 10 | # Unless required by applicable law or agreed to in writing, software # 11 | # distributed under the License is distributed on an "AS IS" BASIS, # 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 13 | # See the License for the specific language governing permissions and # 14 | # limitations under the License. # 15 | 16 | require 'odenos/remoteobject/component_connection' 17 | 18 | module Odenos 19 | module Core 20 | class LogicAndNetwork < Odenos::Core::ComponentConnection 21 | hash_accessor :object, :logic_id, :network_id 22 | 23 | def initialize(initial_hash = {}) 24 | super(initial_hash) 25 | end 26 | end 27 | end 28 | end 29 | -------------------------------------------------------------------------------- /src/main/ruby/org/o3project/odenos/remoteobject/manager.rb: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2015 NEC Corporation. # 3 | # # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); # 5 | # you may not use this file except in compliance with the License. # 6 | # You may obtain a copy of the License at # 7 | # # 8 | # http://www.apache.org/licenses/LICENSE-2.0 # 9 | # # 10 | # Unless required by applicable law or agreed to in writing, software # 11 | # distributed under the License is distributed on an "AS IS" BASIS, # 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 13 | # See the License for the specific language governing permissions and # 14 | # limitations under the License. # 15 | 16 | require 'odenos/remoteobject/manager/component_manager' 17 | -------------------------------------------------------------------------------- /src/test/python/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/test/python/org/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/test/python/org/o3project/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/test/python/org/o3project/odenos/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/test/python/org/o3project/odenos/core/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/test/python/org/o3project/odenos/core/component/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/test/python/org/o3project/odenos/core/component/network/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/test/python/org/o3project/odenos/core/component/network/flow/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2015 NEC Corporation. # 3 | # # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); # 5 | # you may not use this file except in compliance with the License. # 6 | # You may obtain a copy of the License at # 7 | # # 8 | # http://www.apache.org/licenses/LICENSE-2.0 # 9 | # # 10 | # Unless required by applicable law or agreed to in writing, software # 11 | # distributed under the License is distributed on an "AS IS" BASIS, # 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 13 | # See the License for the specific language governing permissions and # 14 | # limitations under the License. # 15 | 16 | -------------------------------------------------------------------------------- /src/test/python/org/o3project/odenos/core/component/network/flow/basic/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2015 NEC Corporation. # 3 | # # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); # 5 | # you may not use this file except in compliance with the License. # 6 | # You may obtain a copy of the License at # 7 | # # 8 | # http://www.apache.org/licenses/LICENSE-2.0 # 9 | # # 10 | # Unless required by applicable law or agreed to in writing, software # 11 | # distributed under the License is distributed on an "AS IS" BASIS, # 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 13 | # See the License for the specific language governing permissions and # 14 | # limitations under the License. # 15 | 16 | -------------------------------------------------------------------------------- /src/test/python/org/o3project/odenos/core/component/network/flow/basic/test_flow_action.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | from org.o3project.odenos.core.component.network.flow.basic.flow_action\ 18 | import FlowAction 19 | import unittest 20 | 21 | 22 | class FlowActionTest(unittest.TestCase): 23 | Type = "FlowActionOutput" 24 | 25 | def setUp(self): 26 | self.target = FlowAction(self.Type) 27 | 28 | def tearDown(self): 29 | self.target = None 30 | 31 | def test_constructor(self): 32 | self.assertEqual(self.target._body[self.target.TYPE], self.Type) 33 | 34 | def test_type(self): 35 | self.assertEqual(self.target.type, self.Type) 36 | 37 | if __name__ == '__main__': 38 | unittest.main() -------------------------------------------------------------------------------- /src/test/python/org/o3project/odenos/core/component/network/flow/ofpflow/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/test/python/org/o3project/odenos/core/component/network/packet/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/test/python/org/o3project/odenos/core/component/network/topology/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/test/python/org/o3project/odenos/core/manager/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/test/python/org/o3project/odenos/core/util/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/test/python/org/o3project/odenos/remoteobject/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/test/python/org/o3project/odenos/remoteobject/event/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/test/python/org/o3project/odenos/remoteobject/manager/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2015 NEC Corporation. # 3 | # # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); # 5 | # you may not use this file except in compliance with the License. # 6 | # You may obtain a copy of the License at # 7 | # # 8 | # http://www.apache.org/licenses/LICENSE-2.0 # 9 | # # 10 | # Unless required by applicable law or agreed to in writing, software # 11 | # distributed under the License is distributed on an "AS IS" BASIS, # 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 13 | # See the License for the specific language governing permissions and # 14 | # limitations under the License. # 15 | 16 | -------------------------------------------------------------------------------- /src/test/python/org/o3project/odenos/remoteobject/manager/component/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | # Copyright 2015 NEC Corporation. # 3 | # # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); # 5 | # you may not use this file except in compliance with the License. # 6 | # You may obtain a copy of the License at # 7 | # # 8 | # http://www.apache.org/licenses/LICENSE-2.0 # 9 | # # 10 | # Unless required by applicable law or agreed to in writing, software # 11 | # distributed under the License is distributed on an "AS IS" BASIS, # 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 13 | # See the License for the specific language governing permissions and # 14 | # limitations under the License. # 15 | 16 | -------------------------------------------------------------------------------- /src/test/python/org/o3project/odenos/remoteobject/manager/component/event/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/test/python/org/o3project/odenos/remoteobject/manager/system/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/test/python/org/o3project/odenos/remoteobject/manager/system/event/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/test/python/org/o3project/odenos/remoteobject/message/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/test/python/org/o3project/odenos/remoteobject/transport/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | # Copyright 2015 NEC Corporation. # 4 | # # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); # 6 | # you may not use this file except in compliance with the License. # 7 | # You may obtain a copy of the License at # 8 | # # 9 | # http://www.apache.org/licenses/LICENSE-2.0 # 10 | # # 11 | # Unless required by applicable law or agreed to in writing, software # 12 | # distributed under the License is distributed on an "AS IS" BASIS, # 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 14 | # See the License for the specific language governing permissions and # 15 | # limitations under the License. # 16 | 17 | -------------------------------------------------------------------------------- /src/test/resources/odenos_messaging.conf: -------------------------------------------------------------------------------- 1 | # 2 | # MessageDispatcher parameters tuning 3 | # 4 | 5 | pubsub.client=org.o3project.odenos.remoteobject.messagingclient.redis.Client 6 | 7 | # SUBSCRIBER QUEUE SIZE 8 | subscriber.queue.size=911 9 | # SUBSCRIBER POOL SIZE (i.e., maximumPoolSize) 10 | subscriber.pool.size=110 11 | 12 | # PUBLISHER QUEUE SIZE 13 | publisher.queue.size=1234 14 | 15 | # MAX REMOTE REQUEST SIMULTANEOUS TRANSACTIONS 16 | remote.transactions.max=4321 17 | # REMOTE REQUEST TIMEOUT (in sec) 18 | remote.transactions.timeout=99 19 | --------------------------------------------------------------------------------