diff --git a/apps/calendar/pom.xml b/apps/calendar/pom.xml index e6b7987101..dd73c99788 100644 --- a/apps/calendar/pom.xml +++ b/apps/calendar/pom.xml @@ -1,21 +1,18 @@ diff --git a/apps/foo/src/main/resources/org/onlab/onos/foo/FooComponent.properties b/apps/foo/src/main/resources/org/onlab/onos/foo/FooComponent.properties index 4563d0ae36..b010e37d61 100644 --- a/apps/foo/src/main/resources/org/onlab/onos/foo/FooComponent.properties +++ b/apps/foo/src/main/resources/org/onlab/onos/foo/FooComponent.properties @@ -1,20 +1,17 @@ # -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you 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 +# Copyright 2014 Open Networking Laboratory # -# http://www.apache.org/licenses/LICENSE-2.0 +# 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 # -# 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. +# 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. # livetribe.slp.da.expired.services.purge.period=60 livetribe.slp.sa.client.connect.address=127.0.0.1 diff --git a/apps/fwd/pom.xml b/apps/fwd/pom.xml index 4594f5a50c..e05c3c3ec4 100644 --- a/apps/fwd/pom.xml +++ b/apps/fwd/pom.xml @@ -1,21 +1,18 @@ diff --git a/apps/metrics/pom.xml b/apps/metrics/pom.xml index 02ccdab2c7..41d8cebecc 100644 --- a/apps/metrics/pom.xml +++ b/apps/metrics/pom.xml @@ -1,21 +1,18 @@ diff --git a/apps/mobility/pom.xml b/apps/mobility/pom.xml index c1c00457ff..24df897630 100644 --- a/apps/mobility/pom.xml +++ b/apps/mobility/pom.xml @@ -1,21 +1,18 @@ ingressPorts1 = intent1.getIngressPorts(); - Set ingressPorts2 = intent2.getIngressPorts(); - SwitchPort egressPort1 = intent1.getEgressPort(); - SwitchPort egressPort2 = intent2.getEgressPort(); - return Objects.equal(match1, match2) && - Objects.equal(action1, action2) && - Objects.equal(egressPort1, egressPort2) && - Objects.equal(ingressPorts1, ingressPorts2);*/ - return Objects.equal(intent1.selector(), intent2.selector()) && + return Objects.equal(intent1.appId(), intent2.appId()) && + Objects.equal(intent1.selector(), intent2.selector()) && Objects.equal(intent1.treatment(), intent2.treatment()) && Objects.equal(intent1.ingressPoints(), intent2.ingressPoints()) && Objects.equal(intent1.egressPoint(), intent2.egressPoint()); diff --git a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/SdnIp.java b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/SdnIp.java index a6669abf73..0f6e38a6ee 100644 --- a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/SdnIp.java +++ b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/SdnIp.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.sdnip; @@ -80,6 +77,10 @@ public class SdnIp implements SdnIpService { router = new Router(appId, intentService, hostService, config, interfaceService); router.start(); + // Manually set the router as the leader to allow testing + // TODO change this when we get a leader election + router.leaderChanged(true); + bgpSessionManager = new BgpSessionManager(router); bgpSessionManager.startUp(2000); // TODO @@ -102,6 +103,11 @@ public class SdnIp implements SdnIpService { return router.getRoutes(); } + @Override + public void modifyPrimary(boolean isPrimary) { + router.leaderChanged(isPrimary); + } + static String dpidToUri(String dpid) { return "of:" + dpid.replace(":", ""); } diff --git a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/SdnIpService.java b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/SdnIpService.java index 7f6144cd73..936b7e8cd6 100644 --- a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/SdnIpService.java +++ b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/SdnIpService.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.sdnip; @@ -39,4 +36,12 @@ public interface SdnIpService { * @return the SDN-IP routes */ public Collection getRoutes(); + + /** + * Changes whether this SDN-IP instance is the primary or not based on the + * boolean parameter. + * + * @param isPrimary true if the instance is primary, false if it is not + */ + public void modifyPrimary(boolean isPrimary); } diff --git a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/bgp/BgpConstants.java b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/bgp/BgpConstants.java index 9ce33fe92c..92f4f07607 100644 --- a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/bgp/BgpConstants.java +++ b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/bgp/BgpConstants.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.sdnip.bgp; diff --git a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/bgp/BgpFrameDecoder.java b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/bgp/BgpFrameDecoder.java index 42bcb19b5f..339e46c9ef 100644 --- a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/bgp/BgpFrameDecoder.java +++ b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/bgp/BgpFrameDecoder.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.sdnip.bgp; diff --git a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/bgp/BgpRouteEntry.java b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/bgp/BgpRouteEntry.java index 133d5c9af9..21e8a88ee6 100644 --- a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/bgp/BgpRouteEntry.java +++ b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/bgp/BgpRouteEntry.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.sdnip.bgp; diff --git a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/bgp/BgpSession.java b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/bgp/BgpSession.java index a2e9625704..a6f33290c3 100644 --- a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/bgp/BgpSession.java +++ b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/bgp/BgpSession.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.sdnip.bgp; @@ -1597,7 +1594,7 @@ public class BgpSession extends SimpleChannelHandler { // // Parse the KEEPALIVE message: nothing to do // - log.debug("BGP RX KEEPALIVE message from {}", remoteAddress); + log.trace("BGP RX KEEPALIVE message from {}", remoteAddress); // Start the Session Timeout timer restartSessionTimeoutTimer(ctx); diff --git a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/bgp/BgpSessionManager.java b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/bgp/BgpSessionManager.java index b483f14fa5..1b5dfb5bb2 100644 --- a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/bgp/BgpSessionManager.java +++ b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/bgp/BgpSessionManager.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.sdnip.bgp; diff --git a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/bgp/package-info.java b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/bgp/package-info.java index 64ec5e5fd0..da7fdd69e9 100644 --- a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/bgp/package-info.java +++ b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/bgp/package-info.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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. */ /** diff --git a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/cli/BgpRoutesListCommand.java b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/cli/BgpRoutesListCommand.java index c4915bb88c..260cfe6030 100644 --- a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/cli/BgpRoutesListCommand.java +++ b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/cli/BgpRoutesListCommand.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.sdnip.cli; diff --git a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/cli/PrimaryChangeCommand.java b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/cli/PrimaryChangeCommand.java new file mode 100644 index 0000000000..5b20238afb --- /dev/null +++ b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/cli/PrimaryChangeCommand.java @@ -0,0 +1,25 @@ +package org.onlab.onos.sdnip.cli; + +import org.apache.karaf.shell.commands.Argument; +import org.apache.karaf.shell.commands.Command; +import org.onlab.onos.cli.AbstractShellCommand; +import org.onlab.onos.sdnip.SdnIpService; + +/** + * Command to change whether this SDNIP instance is primary or not. + */ +@Command(scope = "onos", name = "sdnip-set-primary", + description = "Changes the primary status of this SDN-IP instance") +public class PrimaryChangeCommand extends AbstractShellCommand { + + @Argument(index = 0, name = "isPrimary", + description = "True if this instance should be primary, false if not", + required = true, multiValued = false) + boolean isPrimary = false; + + @Override + protected void execute() { + get(SdnIpService.class).modifyPrimary(isPrimary); + } + +} diff --git a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/cli/RoutesListCommand.java b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/cli/RoutesListCommand.java index d81a587261..0c4445300f 100644 --- a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/cli/RoutesListCommand.java +++ b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/cli/RoutesListCommand.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.sdnip.cli; diff --git a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/BgpPeer.java b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/BgpPeer.java index 86782bf410..92d48f707c 100644 --- a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/BgpPeer.java +++ b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/BgpPeer.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.sdnip.config; diff --git a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/BgpSpeaker.java b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/BgpSpeaker.java index 8aad97f97c..38356002f8 100644 --- a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/BgpSpeaker.java +++ b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/BgpSpeaker.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.sdnip.config; diff --git a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/Configuration.java b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/Configuration.java index cf71bc1608..394a55a045 100644 --- a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/Configuration.java +++ b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/Configuration.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.sdnip.config; diff --git a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/Interface.java b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/Interface.java index 829cffaf7f..88de214dbf 100644 --- a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/Interface.java +++ b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/Interface.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.sdnip.config; diff --git a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/InterfaceAddress.java b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/InterfaceAddress.java index d06a7c9b81..588b03c1ad 100644 --- a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/InterfaceAddress.java +++ b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/InterfaceAddress.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.sdnip.config; diff --git a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/SdnIpConfigReader.java b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/SdnIpConfigReader.java index 6f582f7a36..ff697e36f3 100644 --- a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/SdnIpConfigReader.java +++ b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/SdnIpConfigReader.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.sdnip.config; diff --git a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/SdnIpConfigService.java b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/SdnIpConfigService.java index 5c16a774ff..6ad4bbba44 100644 --- a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/SdnIpConfigService.java +++ b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/SdnIpConfigService.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.sdnip.config; diff --git a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/package-info.java b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/package-info.java index 34bc826c4e..672066784b 100644 --- a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/package-info.java +++ b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/config/package-info.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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. */ /** diff --git a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/package-info.java b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/package-info.java index e40269a99b..a488412f3f 100644 --- a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/package-info.java +++ b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/package-info.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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. */ /** diff --git a/apps/sdnip/src/main/resources/OSGI-INF/blueprint/shell-config.xml b/apps/sdnip/src/main/resources/OSGI-INF/blueprint/shell-config.xml index f8a2416d46..773ead6a2e 100644 --- a/apps/sdnip/src/main/resources/OSGI-INF/blueprint/shell-config.xml +++ b/apps/sdnip/src/main/resources/OSGI-INF/blueprint/shell-config.xml @@ -1,20 +1,17 @@ @@ -25,5 +22,8 @@ + + + diff --git a/apps/sdnip/src/test/java/org/onlab/onos/sdnip/HostToInterfaceAdaptorTest.java b/apps/sdnip/src/test/java/org/onlab/onos/sdnip/HostToInterfaceAdaptorTest.java index a42cd871c9..2a65616dd2 100644 --- a/apps/sdnip/src/test/java/org/onlab/onos/sdnip/HostToInterfaceAdaptorTest.java +++ b/apps/sdnip/src/test/java/org/onlab/onos/sdnip/HostToInterfaceAdaptorTest.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.sdnip; diff --git a/apps/sdnip/src/test/java/org/onlab/onos/sdnip/IntentSyncTest.java b/apps/sdnip/src/test/java/org/onlab/onos/sdnip/IntentSyncTest.java new file mode 100644 index 0000000000..45b0c903aa --- /dev/null +++ b/apps/sdnip/src/test/java/org/onlab/onos/sdnip/IntentSyncTest.java @@ -0,0 +1,406 @@ +package org.onlab.onos.sdnip; + +import static org.easymock.EasyMock.anyObject; +import static org.easymock.EasyMock.createMock; +import static org.easymock.EasyMock.expect; +import static org.easymock.EasyMock.expectLastCall; +import static org.easymock.EasyMock.replay; +import static org.easymock.EasyMock.reset; +import static org.easymock.EasyMock.verify; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import java.util.HashSet; +import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; + +import org.junit.Before; +import org.junit.Test; +import org.onlab.junit.TestUtils; +import org.onlab.junit.TestUtils.TestUtilsException; +import org.onlab.onos.core.ApplicationId; +import org.onlab.onos.net.ConnectPoint; +import org.onlab.onos.net.DefaultHost; +import org.onlab.onos.net.DeviceId; +import org.onlab.onos.net.Host; +import org.onlab.onos.net.HostId; +import org.onlab.onos.net.HostLocation; +import org.onlab.onos.net.PortNumber; +import org.onlab.onos.net.flow.DefaultTrafficSelector; +import org.onlab.onos.net.flow.DefaultTrafficTreatment; +import org.onlab.onos.net.flow.TrafficSelector; +import org.onlab.onos.net.flow.TrafficTreatment; +import org.onlab.onos.net.host.HostListener; +import org.onlab.onos.net.host.HostService; +import org.onlab.onos.net.host.InterfaceIpAddress; +import org.onlab.onos.net.intent.Intent; +import org.onlab.onos.net.intent.IntentService; +import org.onlab.onos.net.intent.IntentState; +import org.onlab.onos.net.intent.MultiPointToSinglePointIntent; +import org.onlab.onos.net.provider.ProviderId; +import org.onlab.onos.sdnip.config.Interface; +import org.onlab.packet.Ethernet; +import org.onlab.packet.IpAddress; +import org.onlab.packet.IpPrefix; +import org.onlab.packet.MacAddress; +import org.onlab.packet.VlanId; + +import com.google.common.collect.Sets; +import com.googlecode.concurrenttrees.radix.node.concrete.DefaultByteArrayNodeFactory; +import com.googlecode.concurrenttrees.radixinverted.ConcurrentInvertedRadixTree; +import com.googlecode.concurrenttrees.radixinverted.InvertedRadixTree; + +/** + * This class tests the intent synchronization function in Router class. + */ +public class IntentSyncTest { + + private InterfaceService interfaceService; + private IntentService intentService; + private HostService hostService; + + private static final ConnectPoint SW1_ETH1 = new ConnectPoint( + DeviceId.deviceId("of:0000000000000001"), + PortNumber.portNumber(1)); + + private static final ConnectPoint SW2_ETH1 = new ConnectPoint( + DeviceId.deviceId("of:0000000000000002"), + PortNumber.portNumber(1)); + + private static final ConnectPoint SW3_ETH1 = new ConnectPoint( + DeviceId.deviceId("of:0000000000000003"), + PortNumber.portNumber(1)); + + private Router router; + + private static final ApplicationId APPID = new ApplicationId() { + @Override + public short id() { + return 1; + } + + @Override + public String name() { + return "SDNIP"; + } + }; + + @Before + public void setUp() throws Exception { + setUpInterfaceService(); + setUpHostService(); + intentService = createMock(IntentService.class); + + router = new Router(APPID, intentService, + hostService, null, interfaceService); + } + + /** + * Sets up InterfaceService. + */ + private void setUpInterfaceService() { + + interfaceService = createMock(InterfaceService.class); + + Set interfaces = Sets.newHashSet(); + + Set interfaceIpAddresses1 = Sets.newHashSet(); + interfaceIpAddresses1.add(new InterfaceIpAddress( + IpAddress.valueOf("192.168.10.101"), + IpPrefix.valueOf("192.168.10.0/24"))); + Interface sw1Eth1 = new Interface(SW1_ETH1, + interfaceIpAddresses1, MacAddress.valueOf("00:00:00:00:00:01")); + interfaces.add(sw1Eth1); + + Set interfaceIpAddresses2 = Sets.newHashSet(); + interfaceIpAddresses2.add(new InterfaceIpAddress( + IpAddress.valueOf("192.168.20.101"), + IpPrefix.valueOf("192.168.20.0/24"))); + Interface sw2Eth1 = new Interface(SW2_ETH1, + interfaceIpAddresses2, MacAddress.valueOf("00:00:00:00:00:02")); + interfaces.add(sw2Eth1); + + Set interfaceIpAddresses3 = Sets.newHashSet(); + interfaceIpAddresses3.add(new InterfaceIpAddress( + IpAddress.valueOf("192.168.30.101"), + IpPrefix.valueOf("192.168.30.0/24"))); + Interface sw3Eth1 = new Interface(SW3_ETH1, + interfaceIpAddresses3, MacAddress.valueOf("00:00:00:00:00:03")); + interfaces.add(sw3Eth1); + + expect(interfaceService.getInterface(SW1_ETH1)).andReturn( + sw1Eth1).anyTimes(); + expect(interfaceService.getInterface(SW2_ETH1)).andReturn( + sw2Eth1).anyTimes(); + expect(interfaceService.getInterface(SW3_ETH1)).andReturn( + sw3Eth1).anyTimes(); + expect(interfaceService.getInterfaces()).andReturn( + interfaces).anyTimes(); + replay(interfaceService); + } + + /** + * Sets up the host service with details of hosts. + */ + private void setUpHostService() { + hostService = createMock(HostService.class); + + hostService.addListener(anyObject(HostListener.class)); + expectLastCall().anyTimes(); + + IpAddress host1Address = IpAddress.valueOf("192.168.10.1"); + Host host1 = new DefaultHost(ProviderId.NONE, HostId.NONE, + MacAddress.valueOf("00:00:00:00:00:01"), VlanId.NONE, + new HostLocation(SW1_ETH1, 1), + Sets.newHashSet(host1Address)); + + expect(hostService.getHostsByIp(host1Address)) + .andReturn(Sets.newHashSet(host1)).anyTimes(); + hostService.startMonitoringIp(host1Address); + expectLastCall().anyTimes(); + + + IpAddress host2Address = IpAddress.valueOf("192.168.20.1"); + Host host2 = new DefaultHost(ProviderId.NONE, HostId.NONE, + MacAddress.valueOf("00:00:00:00:00:02"), VlanId.NONE, + new HostLocation(SW2_ETH1, 1), + Sets.newHashSet(host2Address)); + + expect(hostService.getHostsByIp(host2Address)) + .andReturn(Sets.newHashSet(host2)).anyTimes(); + hostService.startMonitoringIp(host2Address); + expectLastCall().anyTimes(); + + + IpAddress host3Address = IpAddress.valueOf("192.168.30.1"); + Host host3 = new DefaultHost(ProviderId.NONE, HostId.NONE, + MacAddress.valueOf("00:00:00:00:00:03"), VlanId.NONE, + new HostLocation(SW3_ETH1, 1), + Sets.newHashSet(host3Address)); + + expect(hostService.getHostsByIp(host3Address)) + .andReturn(Sets.newHashSet(host3)).anyTimes(); + hostService.startMonitoringIp(host3Address); + expectLastCall().anyTimes(); + + + replay(hostService); + } + + /** + * This method tests the behavior of intent Synchronizer. + * + * @throws TestUtilsException + */ + @Test + public void testIntentSync() throws TestUtilsException { + + // + // Construct routes and intents. + // This test simulates the following cases during the master change + // time interval: + // 1. RouteEntry1 did not change and the intent also did not change. + // 2. RouteEntry2 was deleted, but the intent was not deleted. + // 3. RouteEntry3 was newly added, and the intent was also submitted. + // 4. RouteEntry4 was updated to RouteEntry4Update, and the intent was + // also updated to a new one. + // 5. RouteEntry5 did not change, but its intent id changed. + // 6. RouteEntry6 was newly added, but the intent was not submitted. + // + RouteEntry routeEntry1 = new RouteEntry( + IpPrefix.valueOf("1.1.1.0/24"), + IpAddress.valueOf("192.168.10.1")); + + RouteEntry routeEntry2 = new RouteEntry( + IpPrefix.valueOf("2.2.2.0/24"), + IpAddress.valueOf("192.168.20.1")); + + RouteEntry routeEntry3 = new RouteEntry( + IpPrefix.valueOf("3.3.3.0/24"), + IpAddress.valueOf("192.168.30.1")); + + RouteEntry routeEntry4 = new RouteEntry( + IpPrefix.valueOf("4.4.4.0/24"), + IpAddress.valueOf("192.168.30.1")); + + RouteEntry routeEntry4Update = new RouteEntry( + IpPrefix.valueOf("4.4.4.0/24"), + IpAddress.valueOf("192.168.20.1")); + + RouteEntry routeEntry5 = new RouteEntry( + IpPrefix.valueOf("5.5.5.0/24"), + IpAddress.valueOf("192.168.10.1")); + + RouteEntry routeEntry6 = new RouteEntry( + IpPrefix.valueOf("6.6.6.0/24"), + IpAddress.valueOf("192.168.10.1")); + + RouteEntry routeEntry7 = new RouteEntry( + IpPrefix.valueOf("7.7.7.0/24"), + IpAddress.valueOf("192.168.10.1")); + + MultiPointToSinglePointIntent intent1 = intentBuilder( + routeEntry1.prefix(), "00:00:00:00:00:01", SW1_ETH1); + MultiPointToSinglePointIntent intent2 = intentBuilder( + routeEntry2.prefix(), "00:00:00:00:00:02", SW2_ETH1); + MultiPointToSinglePointIntent intent3 = intentBuilder( + routeEntry3.prefix(), "00:00:00:00:00:03", SW3_ETH1); + MultiPointToSinglePointIntent intent4 = intentBuilder( + routeEntry4.prefix(), "00:00:00:00:00:03", SW3_ETH1); + MultiPointToSinglePointIntent intent4Update = intentBuilder( + routeEntry4Update.prefix(), "00:00:00:00:00:02", SW2_ETH1); + MultiPointToSinglePointIntent intent5 = intentBuilder( + routeEntry5.prefix(), "00:00:00:00:00:01", SW1_ETH1); + MultiPointToSinglePointIntent intent7 = intentBuilder( + routeEntry7.prefix(), "00:00:00:00:00:01", SW1_ETH1); + + // Compose a intent, which is equal to intent5 but the id is different. + MultiPointToSinglePointIntent intent5New = + staticIntentBuilder(intent5, routeEntry5, "00:00:00:00:00:01"); + assertTrue(TestUtils.callMethod(router, + "compareMultiPointToSinglePointIntents", + new Class[] {MultiPointToSinglePointIntent.class, + MultiPointToSinglePointIntent.class}, + intent5, intent5New).equals(true)); + assertFalse(intent5.equals(intent5New)); + + MultiPointToSinglePointIntent intent6 = intentBuilder( + routeEntry6.prefix(), "00:00:00:00:00:01", SW1_ETH1); + + // Set up the bgpRoutes and pushedRouteIntents fields in Router class + InvertedRadixTree bgpRoutes = + new ConcurrentInvertedRadixTree<>( + new DefaultByteArrayNodeFactory()); + bgpRoutes.put(RouteEntry.createBinaryString(routeEntry1.prefix()), + routeEntry1); + bgpRoutes.put(RouteEntry.createBinaryString(routeEntry3.prefix()), + routeEntry3); + bgpRoutes.put(RouteEntry.createBinaryString(routeEntry4Update.prefix()), + routeEntry4Update); + bgpRoutes.put(RouteEntry.createBinaryString(routeEntry5.prefix()), + routeEntry5); + bgpRoutes.put(RouteEntry.createBinaryString(routeEntry6.prefix()), + routeEntry6); + bgpRoutes.put(RouteEntry.createBinaryString(routeEntry7.prefix()), + routeEntry7); + TestUtils.setField(router, "bgpRoutes", bgpRoutes); + + ConcurrentHashMap + pushedRouteIntents = new ConcurrentHashMap<>(); + pushedRouteIntents.put(routeEntry1.prefix(), intent1); + pushedRouteIntents.put(routeEntry3.prefix(), intent3); + pushedRouteIntents.put(routeEntry4Update.prefix(), intent4Update); + pushedRouteIntents.put(routeEntry5.prefix(), intent5New); + pushedRouteIntents.put(routeEntry6.prefix(), intent6); + pushedRouteIntents.put(routeEntry7.prefix(), intent7); + TestUtils.setField(router, "pushedRouteIntents", pushedRouteIntents); + + // Set up expectation + reset(intentService); + Set intents = new HashSet(); + intents.add(intent1); + expect(intentService.getIntentState(intent1.id())) + .andReturn(IntentState.INSTALLED).anyTimes(); + intents.add(intent2); + expect(intentService.getIntentState(intent2.id())) + .andReturn(IntentState.INSTALLED).anyTimes(); + intents.add(intent4); + expect(intentService.getIntentState(intent4.id())) + .andReturn(IntentState.INSTALLED).anyTimes(); + intents.add(intent5); + expect(intentService.getIntentState(intent5.id())) + .andReturn(IntentState.INSTALLED).anyTimes(); + intents.add(intent7); + expect(intentService.getIntentState(intent7.id())) + .andReturn(IntentState.WITHDRAWING).anyTimes(); + expect(intentService.getIntents()).andReturn(intents).anyTimes(); + + intentService.withdraw(intent2); + intentService.submit(intent3); + intentService.withdraw(intent4); + intentService.submit(intent4Update); + intentService.submit(intent6); + intentService.submit(intent7); + replay(intentService); + + // Start the test + router.leaderChanged(true); + TestUtils.callMethod(router, "syncIntents", new Class[] {}); + + // Verify + assertEquals(router.getRoutes().size(), 6); + assertTrue(router.getRoutes().contains(routeEntry1)); + assertTrue(router.getRoutes().contains(routeEntry3)); + assertTrue(router.getRoutes().contains(routeEntry4Update)); + assertTrue(router.getRoutes().contains(routeEntry5)); + assertTrue(router.getRoutes().contains(routeEntry6)); + + assertEquals(router.getPushedRouteIntents().size(), 6); + assertTrue(router.getPushedRouteIntents().contains(intent1)); + assertTrue(router.getPushedRouteIntents().contains(intent3)); + assertTrue(router.getPushedRouteIntents().contains(intent4Update)); + assertTrue(router.getPushedRouteIntents().contains(intent5)); + assertTrue(router.getPushedRouteIntents().contains(intent6)); + + verify(intentService); + } + + /** + * MultiPointToSinglePointIntent builder. + * + * @param ipPrefix the ipPrefix to match + * @param nextHopMacAddress to which the destination MAC address in packet + * should be rewritten + * @param egressPoint to which packets should be sent + * @return the constructed MultiPointToSinglePointIntent + */ + private MultiPointToSinglePointIntent intentBuilder(IpPrefix ipPrefix, + String nextHopMacAddress, ConnectPoint egressPoint) { + + TrafficSelector.Builder selectorBuilder = + DefaultTrafficSelector.builder(); + selectorBuilder.matchEthType(Ethernet.TYPE_IPV4).matchIPDst(ipPrefix); + + TrafficTreatment.Builder treatmentBuilder = + DefaultTrafficTreatment.builder(); + treatmentBuilder.setEthDst(MacAddress.valueOf(nextHopMacAddress)); + + Set ingressPoints = new HashSet(); + for (Interface intf : interfaceService.getInterfaces()) { + if (!intf.equals(interfaceService.getInterface(egressPoint))) { + ConnectPoint srcPort = intf.connectPoint(); + ingressPoints.add(srcPort); + } + } + MultiPointToSinglePointIntent intent = + new MultiPointToSinglePointIntent(APPID, + selectorBuilder.build(), treatmentBuilder.build(), + ingressPoints, egressPoint); + return intent; + } + + /** + * A static MultiPointToSinglePointIntent builder, the returned intent is + * equal to the input intent except that the id is different. + * + * + * @param intent the intent to be used for building a new intent + * @param routeEntry the relative routeEntry of the intent + * @return the newly constructed MultiPointToSinglePointIntent + * @throws TestUtilsException + */ + private MultiPointToSinglePointIntent staticIntentBuilder( + MultiPointToSinglePointIntent intent, RouteEntry routeEntry, + String nextHopMacAddress) throws TestUtilsException { + + // Use a different egress ConnectPoint with that in intent + // to generate a different id + MultiPointToSinglePointIntent intentNew = intentBuilder( + routeEntry.prefix(), nextHopMacAddress, SW2_ETH1); + TestUtils.setField(intentNew, "egressPoint", intent.egressPoint()); + TestUtils.setField(intentNew, + "ingressPoints", intent.ingressPoints()); + return intentNew; + } +} diff --git a/apps/sdnip/src/test/java/org/onlab/onos/sdnip/PeerConnectivityManagerTest.java b/apps/sdnip/src/test/java/org/onlab/onos/sdnip/PeerConnectivityManagerTest.java index 118a04e24f..d21bb2e639 100644 --- a/apps/sdnip/src/test/java/org/onlab/onos/sdnip/PeerConnectivityManagerTest.java +++ b/apps/sdnip/src/test/java/org/onlab/onos/sdnip/PeerConnectivityManagerTest.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.sdnip; diff --git a/apps/sdnip/src/test/java/org/onlab/onos/sdnip/RouteEntryTest.java b/apps/sdnip/src/test/java/org/onlab/onos/sdnip/RouteEntryTest.java index 1cecd06dc8..9af90a75d6 100644 --- a/apps/sdnip/src/test/java/org/onlab/onos/sdnip/RouteEntryTest.java +++ b/apps/sdnip/src/test/java/org/onlab/onos/sdnip/RouteEntryTest.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.sdnip; diff --git a/apps/sdnip/src/test/java/org/onlab/onos/sdnip/RouterTest.java b/apps/sdnip/src/test/java/org/onlab/onos/sdnip/RouterTest.java index 581144ef4f..b361123a1b 100644 --- a/apps/sdnip/src/test/java/org/onlab/onos/sdnip/RouterTest.java +++ b/apps/sdnip/src/test/java/org/onlab/onos/sdnip/RouterTest.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.sdnip; diff --git a/apps/sdnip/src/test/java/org/onlab/onos/sdnip/RouterTestWithAsyncArp.java b/apps/sdnip/src/test/java/org/onlab/onos/sdnip/RouterTestWithAsyncArp.java index e4854f32fb..2ea5f17f50 100644 --- a/apps/sdnip/src/test/java/org/onlab/onos/sdnip/RouterTestWithAsyncArp.java +++ b/apps/sdnip/src/test/java/org/onlab/onos/sdnip/RouterTestWithAsyncArp.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.sdnip; import static org.easymock.EasyMock.anyObject; diff --git a/apps/sdnip/src/test/java/org/onlab/onos/sdnip/bgp/AsPathTest.java b/apps/sdnip/src/test/java/org/onlab/onos/sdnip/bgp/AsPathTest.java index 20b2e23800..fd5a017f46 100644 --- a/apps/sdnip/src/test/java/org/onlab/onos/sdnip/bgp/AsPathTest.java +++ b/apps/sdnip/src/test/java/org/onlab/onos/sdnip/bgp/AsPathTest.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.sdnip.bgp; diff --git a/apps/sdnip/src/test/java/org/onlab/onos/sdnip/bgp/BgpRouteEntryTest.java b/apps/sdnip/src/test/java/org/onlab/onos/sdnip/bgp/BgpRouteEntryTest.java index 7bbabeb9eb..aa54874334 100644 --- a/apps/sdnip/src/test/java/org/onlab/onos/sdnip/bgp/BgpRouteEntryTest.java +++ b/apps/sdnip/src/test/java/org/onlab/onos/sdnip/bgp/BgpRouteEntryTest.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.sdnip.bgp; diff --git a/apps/sdnip/src/test/java/org/onlab/onos/sdnip/bgp/BgpSessionManagerTest.java b/apps/sdnip/src/test/java/org/onlab/onos/sdnip/bgp/BgpSessionManagerTest.java index a6463e7e72..4b288af45b 100644 --- a/apps/sdnip/src/test/java/org/onlab/onos/sdnip/bgp/BgpSessionManagerTest.java +++ b/apps/sdnip/src/test/java/org/onlab/onos/sdnip/bgp/BgpSessionManagerTest.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.sdnip.bgp; diff --git a/apps/sdnip/src/test/java/org/onlab/onos/sdnip/bgp/PathSegmentTest.java b/apps/sdnip/src/test/java/org/onlab/onos/sdnip/bgp/PathSegmentTest.java index 404a905544..f11d668706 100644 --- a/apps/sdnip/src/test/java/org/onlab/onos/sdnip/bgp/PathSegmentTest.java +++ b/apps/sdnip/src/test/java/org/onlab/onos/sdnip/bgp/PathSegmentTest.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.sdnip.bgp; diff --git a/apps/sdnip/src/test/java/org/onlab/onos/sdnip/bgp/TestBgpPeerChannelHandler.java b/apps/sdnip/src/test/java/org/onlab/onos/sdnip/bgp/TestBgpPeerChannelHandler.java index 3602f26e58..a946c48801 100644 --- a/apps/sdnip/src/test/java/org/onlab/onos/sdnip/bgp/TestBgpPeerChannelHandler.java +++ b/apps/sdnip/src/test/java/org/onlab/onos/sdnip/bgp/TestBgpPeerChannelHandler.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.sdnip.bgp; diff --git a/apps/sdnip/src/test/java/org/onlab/onos/sdnip/bgp/TestBgpPeerFrameDecoder.java b/apps/sdnip/src/test/java/org/onlab/onos/sdnip/bgp/TestBgpPeerFrameDecoder.java index 222d11f693..970f0ed051 100644 --- a/apps/sdnip/src/test/java/org/onlab/onos/sdnip/bgp/TestBgpPeerFrameDecoder.java +++ b/apps/sdnip/src/test/java/org/onlab/onos/sdnip/bgp/TestBgpPeerFrameDecoder.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.sdnip.bgp; diff --git a/apps/tvue/pom.xml b/apps/tvue/pom.xml index 1e704e2ca7..1fab26e0dc 100644 --- a/apps/tvue/pom.xml +++ b/apps/tvue/pom.xml @@ -1,21 +1,18 @@ JAX-RS Service com.sun.jersey.spi.container.servlet.ServletContainer - com.sun.jersey.config.property.packages - org.onlab.onos.tvue + com.sun.jersey.config.property.resourceConfigClass + com.sun.jersey.api.core.ClassNamesResourceConfig + + + + com.sun.jersey.config.property.classnames + org.onlab.onos.tvue.TopologyResource 10 diff --git a/apps/tvue/src/main/webapp/index.html b/apps/tvue/src/main/webapp/index.html index 2be8429aeb..15f7c20044 100644 --- a/apps/tvue/src/main/webapp/index.html +++ b/apps/tvue/src/main/webapp/index.html @@ -1,21 +1,18 @@ diff --git a/apps/tvue/src/main/webapp/libs/d3.v3.min.js b/apps/tvue/src/main/webapp/libs/d3.v3.min.js index 96396a4cf8..d314f4d4a7 100644 --- a/apps/tvue/src/main/webapp/libs/d3.v3.min.js +++ b/apps/tvue/src/main/webapp/libs/d3.v3.min.js @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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. */ !function(){function n(n,t){return t>n?-1:n>t?1:n>=t?0:0/0}function t(n){return null!=n&&!isNaN(n)}function r(n){return{left:function(t,r,e,u){for(arguments.length<3&&(e=0),arguments.length<4&&(u=t.length);u>e;){var i=e+u>>>1;n(t[i],r)<0?e=i+1:u=i}return e},right:function(t,r,e,u){for(arguments.length<3&&(e=0),arguments.length<4&&(u=t.length);u>e;){var i=e+u>>>1;n(t[i],r)>0?u=i:e=i+1}return e}}}function e(n){return n.length}function u(n){for(var t=1;n*t%1;)t*=10;return t}function i(n,t){try{for(var r in t)Object.defineProperty(n.prototype,r,{value:t[r],enumerable:!1})}catch(e){n.prototype=t}}function o(){}function a(n){return sa+n in this}function c(n){return n=sa+n,n in this&&delete this[n]}function s(){var n=[];return this.forEach(function(t){n.push(t)}),n}function l(){var n=0;for(var t in this)t.charCodeAt(0)===la&&++n;return n}function f(){for(var n in this)if(n.charCodeAt(0)===la)return!1;return!0}function h(){}function g(n,t,r){return function(){var e=r.apply(t,arguments);return e===t?n:e}}function p(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.substring(1);for(var r=0,e=fa.length;e>r;++r){var u=fa[r]+t;if(u in n)return u}}function v(){}function d(){}function m(n){function t(){for(var t,e=r,u=-1,i=e.length;++ur;r++)for(var u,i=n[r],o=0,a=i.length;a>o;o++)(u=i[o])&&t(u,o,r);return n}function U(n){return ga(n,Ma),n}function j(n){var t,r;return function(e,u,i){var o,a=n[i].update,c=a.length;for(i!=r&&(r=i,t=0),u>=t&&(t=u+1);!(o=a[t])&&++t0&&(n=n.substring(0,a));var s=ba.get(n);return s&&(n=s,c=I),a?t?u:e:t?v:i}function O(n,t){return function(r){var e=Bo.event;Bo.event=r,t[0]=this.__data__;try{n.apply(this,t)}finally{Bo.event=e}}}function I(n,t){var r=O(n,t);return function(n){var t=this,e=n.relatedTarget;e&&(e===t||8&e.compareDocumentPosition(t))||r.call(t,n)}}function Y(){var n=".dragsuppress-"+ ++Sa,t="click"+n,r=Bo.select(Qo).on("touchmove"+n,y).on("dragstart"+n,y).on("selectstart"+n,y);if(wa){var e=Ko.style,u=e[wa];e[wa]="none"}return function(i){function o(){r.on(t,null)}r.on(n,null),wa&&(e[wa]=u),i&&(r.on(t,function(){y(),o()},!0),setTimeout(o,0))}}function Z(n,t){t.changedTouches&&(t=t.changedTouches[0]);var r=n.ownerSVGElement||n;if(r.createSVGPoint){var e=r.createSVGPoint();return e.x=t.clientX,e.y=t.clientY,e=e.matrixTransform(n.getScreenCTM().inverse()),[e.x,e.y]}var u=n.getBoundingClientRect();return[t.clientX-u.left-n.clientLeft,t.clientY-u.top-n.clientTop]}function V(){return Bo.event.changedTouches[0].identifier}function $(){return Bo.event.target}function X(){return Qo}function B(n){return n>0?1:0>n?-1:0}function J(n,t,r){return(t[0]-n[0])*(r[1]-n[1])-(t[1]-n[1])*(r[0]-n[0])}function W(n){return n>1?0:-1>n?ka:Math.acos(n)}function G(n){return n>1?Aa:-1>n?-Aa:Math.asin(n)}function K(n){return((n=Math.exp(n))-1/n)/2}function Q(n){return((n=Math.exp(n))+1/n)/2}function nt(n){return((n=Math.exp(2*n))-1)/(n+1)}function tt(n){return(n=Math.sin(n/2))*n}function rt(){}function et(n,t,r){return new ut(n,t,r)}function ut(n,t,r){this.h=n,this.s=t,this.l=r}function it(n,t,r){function e(n){return n>360?n-=360:0>n&&(n+=360),60>n?i+(o-i)*n/60:180>n?o:240>n?i+(o-i)*(240-n)/60:i}function u(n){return Math.round(255*e(n))}var i,o;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,r=0>r?0:r>1?1:r,o=.5>=r?r*(1+t):r+t-r*t,i=2*r-o,yt(u(n+120),u(n),u(n-120))}function ot(n,t,r){return new at(n,t,r)}function at(n,t,r){this.h=n,this.c=t,this.l=r}function ct(n,t,r){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),st(r,Math.cos(n*=za)*t,Math.sin(n)*t)}function st(n,t,r){return new lt(n,t,r)}function lt(n,t,r){this.l=n,this.a=t,this.b=r}function ft(n,t,r){var e=(n+16)/116,u=e+t/500,i=e-r/200;return u=gt(u)*Oa,e=gt(e)*Ia,i=gt(i)*Ya,yt(vt(3.2404542*u-1.5371385*e-.4985314*i),vt(-.969266*u+1.8760108*e+.041556*i),vt(.0556434*u-.2040259*e+1.0572252*i))}function ht(n,t,r){return n>0?ot(Math.atan2(r,t)*La,Math.sqrt(t*t+r*r),n):ot(0/0,0/0,n)}function gt(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function pt(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function vt(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function dt(n){return yt(n>>16,255&n>>8,255&n)}function mt(n){return dt(n)+""}function yt(n,t,r){return new xt(n,t,r)}function xt(n,t,r){this.r=n,this.g=t,this.b=r}function Mt(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function _t(n,t,r){var e,u,i,o=0,a=0,c=0;if(e=/([a-z]+)\((.*)\)/i.exec(n))switch(u=e[2].split(","),e[1]){case"hsl":return r(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(kt(u[0]),kt(u[1]),kt(u[2]))}return(i=$a.get(n))?t(i.r,i.g,i.b):(null==n||"#"!==n.charAt(0)||isNaN(i=parseInt(n.substring(1),16))||(4===n.length?(o=(3840&i)>>4,o=o>>4|o,a=240&i,a=a>>4|a,c=15&i,c=c<<4|c):7===n.length&&(o=(16711680&i)>>16,a=(65280&i)>>8,c=255&i)),t(o,a,c))}function bt(n,t,r){var e,u,i=Math.min(n/=255,t/=255,r/=255),o=Math.max(n,t,r),a=o-i,c=(o+i)/2;return a?(u=.5>c?a/(o+i):a/(2-o-i),e=n==o?(t-r)/a+(r>t?6:0):t==o?(r-n)/a+2:(n-t)/a+4,e*=60):(e=0/0,u=c>0&&1>c?0:e),et(e,u,c)}function wt(n,t,r){n=St(n),t=St(t),r=St(r);var e=pt((.4124564*n+.3575761*t+.1804375*r)/Oa),u=pt((.2126729*n+.7151522*t+.072175*r)/Ia),i=pt((.0193339*n+.119192*t+.9503041*r)/Ya);return st(116*u-16,500*(e-u),200*(u-i))}function St(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function kt(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function Et(n){return"function"==typeof n?n:function(){return n}}function At(n){return n}function Ct(n){return function(t,r,e){return 2===arguments.length&&"function"==typeof r&&(e=r,r=null),Nt(t,r,n,e)}}function Nt(n,t,r,e){function u(){var n,t=c.status;if(!t&&c.responseText||t>=200&&300>t||304===t){try{n=r.call(i,c)}catch(e){return o.error.call(i,e),void 0}o.load.call(i,n)}else o.error.call(i,c)}var i={},o=Bo.dispatch("beforesend","progress","load","error"),a={},c=new XMLHttpRequest,s=null;return!Qo.XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(n)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=u:c.onreadystatechange=function(){c.readyState>3&&u()},c.onprogress=function(n){var t=Bo.event;Bo.event=n;try{o.progress.call(i,c)}finally{Bo.event=t}},i.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?a[n]:(null==t?delete a[n]:a[n]=t+"",i)},i.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",i):t},i.responseType=function(n){return arguments.length?(s=n,i):s},i.response=function(n){return r=n,i},["get","post"].forEach(function(n){i[n]=function(){return i.send.apply(i,[n].concat(Wo(arguments)))}}),i.send=function(r,e,u){if(2===arguments.length&&"function"==typeof e&&(u=e,e=null),c.open(r,n,!0),null==t||"accept"in a||(a.accept=t+",*/*"),c.setRequestHeader)for(var l in a)c.setRequestHeader(l,a[l]);return null!=t&&c.overrideMimeType&&c.overrideMimeType(t),null!=s&&(c.responseType=s),null!=u&&i.on("error",u).on("load",function(n){u(null,n)}),o.beforesend.call(i,c),c.send(null==e?null:e),i},i.abort=function(){return c.abort(),i},Bo.rebind(i,o,"on"),null==e?i:i.get(zt(e))}function zt(n){return 1===n.length?function(t,r){n(null==t?r:null)}:n}function Lt(){var n=Tt(),t=qt()-n;t>24?(isFinite(t)&&(clearTimeout(Wa),Wa=setTimeout(Lt,t)),Ja=0):(Ja=1,Ka(Lt))}function Tt(){var n=Date.now();for(Ga=Xa;Ga;)n>=Ga.t&&(Ga.f=Ga.c(n-Ga.t)),Ga=Ga.n;return n}function qt(){for(var n,t=Xa,r=1/0;t;)t.f?t=n?n.n=t.n:Xa=t.n:(t.t8?function(n){return n/r}:function(n){return n*r},symbol:n}}function Pt(n){var t=n.decimal,r=n.thousands,e=n.grouping,u=n.currency,i=e?function(n){for(var t=n.length,u=[],i=0,o=e[0];t>0&&o>0;)u.push(n.substring(t-=o,t+o)),o=e[i=(i+1)%e.length];return u.reverse().join(r)}:At;return function(n){var r=nc.exec(n),e=r[1]||" ",o=r[2]||">",a=r[3]||"",c=r[4]||"",s=r[5],l=+r[6],f=r[7],h=r[8],g=r[9],p=1,v="",d="",m=!1;switch(h&&(h=+h.substring(1)),(s||"0"===e&&"="===o)&&(s=e="0",o="=",f&&(l-=Math.floor((l-1)/4))),g){case"n":f=!0,g="g";break;case"%":p=100,d="%",g="f";break;case"p":p=100,d="%",g="r";break;case"b":case"o":case"x":case"X":"#"===c&&(v="0"+g.toLowerCase());case"c":case"d":m=!0,h=0;break;case"s":p=-1,g="r"}"$"===c&&(v=u[0],d=u[1]),"r"!=g||h||(g="g"),null!=h&&("g"==g?h=Math.max(1,Math.min(21,h)):("e"==g||"f"==g)&&(h=Math.max(0,Math.min(20,h)))),g=tc.get(g)||Ut;var y=s&&f;return function(n){var r=d;if(m&&n%1)return"";var u=0>n||0===n&&0>1/n?(n=-n,"-"):a;if(0>p){var c=Bo.formatPrefix(n,h);n=c.scale(n),r=c.symbol+d}else n*=p;n=g(n,h);var x=n.lastIndexOf("."),M=0>x?n:n.substring(0,x),_=0>x?"":t+n.substring(x+1);!s&&f&&(M=i(M));var b=v.length+M.length+_.length+(y?0:u.length),w=l>b?new Array(b=l-b+1).join(e):"";return y&&(M=i(w+M)),u+=v,n=M+_,("<"===o?u+n+w:">"===o?w+u+n:"^"===o?w.substring(0,b>>=1)+u+n+w.substring(b):u+(y?n:w+n))+r}}}function Ut(n){return n+""}function jt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Ht(n,t,r){function e(t){var r=n(t),e=i(r,1);return e-t>t-r?r:e}function u(r){return t(r=n(new ec(r-1)),1),r}function i(n,r){return t(n=new ec(+n),r),n}function o(n,e,i){var o=u(n),a=[];if(i>1)for(;e>o;)r(o)%i||a.push(new Date(+o)),t(o,1);else for(;e>o;)a.push(new Date(+o)),t(o,1);return a}function a(n,t,r){try{ec=jt;var e=new jt;return e._=n,o(e,t,r)}finally{ec=Date}}n.floor=n,n.round=e,n.ceil=u,n.offset=i,n.range=o;var c=n.utc=Ft(n);return c.floor=c,c.round=Ft(e),c.ceil=Ft(u),c.offset=Ft(i),c.range=a,n}function Ft(n){return function(t,r){try{ec=jt;var e=new jt;return e._=t,n(e,r)._}finally{ec=Date}}}function Ot(n){function t(n){function t(t){for(var r,u,i,o=[],a=-1,c=0;++aa;){if(e>=s)return-1;if(u=t.charCodeAt(a++),37===u){if(o=t.charAt(a++),i=N[o in ic?t.charAt(a++):o],!i||(e=i(n,r,e))<0)return-1}else if(u!=r.charCodeAt(e++))return-1}return e}function e(n,t,r){b.lastIndex=0;var e=b.exec(t.substring(r));return e?(n.w=w.get(e[0].toLowerCase()),r+e[0].length):-1}function u(n,t,r){M.lastIndex=0;var e=M.exec(t.substring(r));return e?(n.w=_.get(e[0].toLowerCase()),r+e[0].length):-1}function i(n,t,r){E.lastIndex=0;var e=E.exec(t.substring(r));return e?(n.m=A.get(e[0].toLowerCase()),r+e[0].length):-1}function o(n,t,r){S.lastIndex=0;var e=S.exec(t.substring(r));return e?(n.m=k.get(e[0].toLowerCase()),r+e[0].length):-1}function a(n,t,e){return r(n,C.c.toString(),t,e)}function c(n,t,e){return r(n,C.x.toString(),t,e)}function s(n,t,e){return r(n,C.X.toString(),t,e)}function l(n,t,r){var e=x.get(t.substring(r,r+=2).toLowerCase());return null==e?-1:(n.p=e,r)}var f=n.dateTime,h=n.date,g=n.time,p=n.periods,v=n.days,d=n.shortDays,m=n.months,y=n.shortMonths;t.utc=function(n){function r(n){try{ec=jt;var t=new ec;return t._=n,e(t)}finally{ec=Date}}var e=t(n);return r.parse=function(n){try{ec=jt;var t=e.parse(n);return t&&t._}finally{ec=Date}},r.toString=e.toString,r},t.multi=t.utc.multi=ar;var x=Bo.map(),M=Yt(v),_=Zt(v),b=Yt(d),w=Zt(d),S=Yt(m),k=Zt(m),E=Yt(y),A=Zt(y);p.forEach(function(n,t){x.set(n.toLowerCase(),t)});var C={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return y[n.getMonth()]},B:function(n){return m[n.getMonth()]},c:t(f),d:function(n,t){return It(n.getDate(),t,2)},e:function(n,t){return It(n.getDate(),t,2)},H:function(n,t){return It(n.getHours(),t,2)},I:function(n,t){return It(n.getHours()%12||12,t,2)},j:function(n,t){return It(1+rc.dayOfYear(n),t,3)},L:function(n,t){return It(n.getMilliseconds(),t,3)},m:function(n,t){return It(n.getMonth()+1,t,2)},M:function(n,t){return It(n.getMinutes(),t,2)},p:function(n){return p[+(n.getHours()>=12)]},S:function(n,t){return It(n.getSeconds(),t,2)},U:function(n,t){return It(rc.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return It(rc.mondayOfYear(n),t,2)},x:t(h),X:t(g),y:function(n,t){return It(n.getFullYear()%100,t,2)},Y:function(n,t){return It(n.getFullYear()%1e4,t,4)},Z:ir,"%":function(){return"%"}},N={a:e,A:u,b:i,B:o,c:a,d:Qt,e:Qt,H:tr,I:tr,j:nr,L:ur,m:Kt,M:rr,p:l,S:er,U:$t,w:Vt,W:Xt,x:c,X:s,y:Jt,Y:Bt,Z:Wt,"%":or};return t}function It(n,t,r){var e=0>n?"-":"",u=(e?-n:n)+"",i=u.length;return e+(r>i?new Array(r-i+1).join(t)+u:u)}function Yt(n){return new RegExp("^(?:"+n.map(Bo.requote).join("|")+")","i")}function Zt(n){for(var t=new o,r=-1,e=n.length;++r68?1900:2e3)}function Kt(n,t,r){oc.lastIndex=0;var e=oc.exec(t.substring(r,r+2));return e?(n.m=e[0]-1,r+e[0].length):-1}function Qt(n,t,r){oc.lastIndex=0;var e=oc.exec(t.substring(r,r+2));return e?(n.d=+e[0],r+e[0].length):-1}function nr(n,t,r){oc.lastIndex=0;var e=oc.exec(t.substring(r,r+3));return e?(n.j=+e[0],r+e[0].length):-1}function tr(n,t,r){oc.lastIndex=0;var e=oc.exec(t.substring(r,r+2));return e?(n.H=+e[0],r+e[0].length):-1}function rr(n,t,r){oc.lastIndex=0;var e=oc.exec(t.substring(r,r+2));return e?(n.M=+e[0],r+e[0].length):-1}function er(n,t,r){oc.lastIndex=0;var e=oc.exec(t.substring(r,r+2));return e?(n.S=+e[0],r+e[0].length):-1}function ur(n,t,r){oc.lastIndex=0;var e=oc.exec(t.substring(r,r+3));return e?(n.L=+e[0],r+e[0].length):-1}function ir(n){var t=n.getTimezoneOffset(),r=t>0?"-":"+",e=~~(ca(t)/60),u=ca(t)%60;return r+It(e,"0",2)+It(u,"0",2)}function or(n,t,r){ac.lastIndex=0;var e=ac.exec(t.substring(r,r+1));return e?r+e[0].length:-1}function ar(n){for(var t=n.length,r=-1;++r=0?1:-1,a=o*r,c=Math.cos(t),s=Math.sin(t),l=i*s,f=u*c+l*Math.cos(a),h=l*o*Math.sin(a);gc.add(Math.atan2(h,f)),e=n,u=c,i=s}var t,r,e,u,i;pc.point=function(o,a){pc.point=n,e=(t=o)*za,u=Math.cos(a=(r=a)*za/2+ka/4),i=Math.sin(a)},pc.lineEnd=function(){n(t,r)}}function pr(n){var t=n[0],r=n[1],e=Math.cos(r);return[e*Math.cos(t),e*Math.sin(t),Math.sin(r)]}function vr(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function dr(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function mr(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function yr(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function xr(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function Mr(n){return[Math.atan2(n[1],n[0]),G(n[2])]}function _r(n,t){return ca(n[0]-t[0])a;++a)u.point((r=n[a])[0],r[1]);return u.lineEnd(),void 0}var c=new zr(r,n,null,!0),s=new zr(r,null,c,!1);c.o=s,i.push(c),o.push(s),c=new zr(e,n,null,!1),s=new zr(e,null,c,!0),c.o=s,i.push(c),o.push(s)}}),o.sort(t),Nr(i),Nr(o),i.length){for(var a=0,c=r,s=o.length;s>a;++a)o[a].e=c=!c;for(var l,f,h=i[0];;){for(var g=h,p=!0;g.v;)if((g=g.n)===h)return;l=g.z,u.lineStart();do{if(g.v=g.o.v=!0,g.e){if(p)for(var a=0,s=l.length;s>a;++a)u.point((f=l[a])[0],f[1]);else e(g.x,g.n.x,1,u);g=g.n}else{if(p){l=g.p.z;for(var a=l.length-1;a>=0;--a)u.point((f=l[a])[0],f[1])}else e(g.x,g.p.x,-1,u);g=g.p}g=g.o,l=g.z,p=!p}while(!g.v);u.lineEnd()}}}function Nr(n){if(t=n.length){for(var t,r,e=0,u=n[0];++e0){for(_||(i.polygonStart(),_=!0),i.lineStart();++o1&&2&t&&r.push(r.pop().concat(r.shift())),g.push(r.filter(Tr))}var g,p,v,d=t(i),m=u.invert(e[0],e[1]),y={point:o,lineStart:c,lineEnd:s,polygonStart:function(){y.point=l,y.lineStart=f,y.lineEnd=h,g=[],p=[]},polygonEnd:function(){y.point=o,y.lineStart=c,y.lineEnd=s,g=Bo.merge(g);var n=Dr(m,p);g.length?(_||(i.polygonStart(),_=!0),Cr(g,Rr,n,r,i)):n&&(_||(i.polygonStart(),_=!0),i.lineStart(),r(null,null,1,i),i.lineEnd()),_&&(i.polygonEnd(),_=!1),g=p=null},sphere:function(){i.polygonStart(),i.lineStart(),r(null,null,1,i),i.lineEnd(),i.polygonEnd()}},x=qr(),M=t(x),_=!1;return y}}function Tr(n){return n.length>1}function qr(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,r){n.push([t,r])},lineEnd:v,buffer:function(){var r=t;return t=[],n=null,r},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Rr(n,t){return((n=n.x)[0]<0?n[1]-Aa-Ca:Aa-n[1])-((t=t.x)[0]<0?t[1]-Aa-Ca:Aa-t[1])}function Dr(n,t){var r=n[0],e=n[1],u=[Math.sin(r),-Math.cos(r),0],i=0,o=0;gc.reset();for(var a=0,c=t.length;c>a;++a){var s=t[a],l=s.length;if(l)for(var f=s[0],h=f[0],g=f[1]/2+ka/4,p=Math.sin(g),v=Math.cos(g),d=1;;){d===l&&(d=0),n=s[d];var m=n[0],y=n[1]/2+ka/4,x=Math.sin(y),M=Math.cos(y),_=m-h,b=_>=0?1:-1,w=b*_,S=w>ka,k=p*x;if(gc.add(Math.atan2(k*b*Math.sin(w),v*M+k*Math.cos(w))),i+=S?_+b*Ea:_,S^h>=r^m>=r){var E=dr(pr(f),pr(n));xr(E);var A=dr(u,E);xr(A);var C=(S^_>=0?-1:1)*G(A[2]);(e>C||e===C&&(E[0]||E[1]))&&(o+=S^_>=0?1:-1)}if(!d++)break;h=m,p=x,v=M,f=n}}return(-Ca>i||Ca>i&&0>gc)^1&o}function Pr(n){var t,r=0/0,e=0/0,u=0/0;return{lineStart:function(){n.lineStart(),t=1},point:function(i,o){var a=i>0?ka:-ka,c=ca(i-r);ca(c-ka)0?Aa:-Aa),n.point(u,e),n.lineEnd(),n.lineStart(),n.point(a,e),n.point(i,e),t=0):u!==a&&c>=ka&&(ca(r-u)Ca?Math.atan((Math.sin(t)*(i=Math.cos(e))*Math.sin(r)-Math.sin(e)*(u=Math.cos(t))*Math.sin(n))/(u*i*o)):(t+e)/2}function jr(n,t,r,e){var u;if(null==n)u=r*Aa,e.point(-ka,u),e.point(0,u),e.point(ka,u),e.point(ka,0),e.point(ka,-u),e.point(0,-u),e.point(-ka,-u),e.point(-ka,0),e.point(-ka,u);else if(ca(n[0]-t[0])>Ca){var i=n[0]i}function r(n){var r,i,c,s,l;return{lineStart:function(){s=c=!1,l=1},point:function(f,h){var g,p=[f,h],v=t(f,h),d=o?v?0:u(f,h):v?u(f+(0>f?ka:-ka),h):0;if(!r&&(s=c=v)&&n.lineStart(),v!==c&&(g=e(r,p),(_r(r,g)||_r(p,g))&&(p[0]+=Ca,p[1]+=Ca,v=t(p[0],p[1]))),v!==c)l=0,v?(n.lineStart(),g=e(p,r),n.point(g[0],g[1])):(g=e(r,p),n.point(g[0],g[1]),n.lineEnd()),r=g;else if(a&&r&&o^v){var m;d&i||!(m=e(p,r,!0))||(l=0,o?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!v||r&&_r(r,p)||n.point(p[0],p[1]),r=p,c=v,i=d},lineEnd:function(){c&&n.lineEnd(),r=null},clean:function(){return l|(s&&c)<<1}}}function e(n,t,r){var e=pr(n),u=pr(t),o=[1,0,0],a=dr(e,u),c=vr(a,a),s=a[0],l=c-s*s;if(!l)return!r&&n;var f=i*c/l,h=-i*s/l,g=dr(o,a),p=yr(o,f),v=yr(a,h);mr(p,v);var d=g,m=vr(p,d),y=vr(d,d),x=m*m-y*(vr(p,p)-1);if(!(0>x)){var M=Math.sqrt(x),_=yr(d,(-m-M)/y);if(mr(_,p),_=Mr(_),!r)return _;var b,w=n[0],S=t[0],k=n[1],E=t[1];w>S&&(b=w,w=S,S=b);var A=S-w,C=ca(A-ka)A;if(!C&&k>E&&(b=k,k=E,E=b),N?C?k+E>0^_[1]<(ca(_[0]-w)ka^(w<=_[0]&&_[0]<=S)){var z=yr(d,(-m+M)/y);return mr(z,p),[_,Mr(z)]}}}function u(t,r){var e=o?n:ka-n,u=0;return-e>t?u|=1:t>e&&(u|=2),-e>r?u|=4:r>e&&(u|=8),u}var i=Math.cos(n),o=i>0,a=ca(i)>Ca,c=ge(n,6*za);return Lr(t,r,c,o?[0,-n]:[-ka,n-ka])}function Fr(n,t,r,e){return function(u){var i,o=u.a,a=u.b,c=o.x,s=o.y,l=a.x,f=a.y,h=0,g=1,p=l-c,v=f-s;if(i=n-c,p||!(i>0)){if(i/=p,0>p){if(h>i)return;g>i&&(g=i)}else if(p>0){if(i>g)return;i>h&&(h=i)}if(i=r-c,p||!(0>i)){if(i/=p,0>p){if(i>g)return;i>h&&(h=i)}else if(p>0){if(h>i)return;g>i&&(g=i)}if(i=t-s,v||!(i>0)){if(i/=v,0>v){if(h>i)return;g>i&&(g=i)}else if(v>0){if(i>g)return;i>h&&(h=i)}if(i=e-s,v||!(0>i)){if(i/=v,0>v){if(i>g)return;i>h&&(h=i)}else if(v>0){if(h>i)return;g>i&&(g=i)}return h>0&&(u.a={x:c+h*p,y:s+h*v}),1>g&&(u.b={x:c+g*p,y:s+g*v}),u}}}}}}function Or(n,t,r,e){function u(e,u){return ca(e[0]-n)0?0:3:ca(e[0]-r)0?2:1:ca(e[1]-t)0?1:0:u>0?3:2}function i(n,t){return o(n.x,t.x)}function o(n,t){var r=u(n,1),e=u(t,1);return r!==e?r-e:0===r?t[1]-n[1]:1===r?n[0]-t[0]:2===r?n[1]-t[1]:t[0]-n[0]}return function(a){function c(n){for(var t=0,r=d.length,e=n[1],u=0;r>u;++u)for(var i,o=1,a=d[u],c=a.length,s=a[0];c>o;++o)i=a[o],s[1]<=e?i[1]>e&&J(s,i,n)>0&&++t:i[1]<=e&&J(s,i,n)<0&&--t,s=i;return 0!==t}function s(i,a,c,s){var l=0,f=0;if(null==i||(l=u(i,c))!==(f=u(a,c))||o(i,a)<0^c>0){do s.point(0===l||3===l?n:r,l>1?e:t);while((l=(l+c+4)%4)!==f)}else s.point(a[0],a[1])}function l(u,i){return u>=n&&r>=u&&i>=t&&e>=i}function f(n,t){l(n,t)&&a.point(n,t)}function h(){N.point=p,d&&d.push(m=[]),S=!0,w=!1,_=b=0/0}function g(){v&&(p(y,x),M&&w&&A.rejoin(),v.push(A.buffer())),N.point=f,w&&a.lineEnd()}function p(n,t){n=Math.max(-Cc,Math.min(Cc,n)),t=Math.max(-Cc,Math.min(Cc,t));var r=l(n,t);if(d&&m.push([n,t]),S)y=n,x=t,M=r,S=!1,r&&(a.lineStart(),a.point(n,t));else if(r&&w)a.point(n,t);else{var e={a:{x:_,y:b},b:{x:n,y:t}};C(e)?(w||(a.lineStart(),a.point(e.a.x,e.a.y)),a.point(e.b.x,e.b.y),r||a.lineEnd(),k=!1):r&&(a.lineStart(),a.point(n,t),k=!1)}_=n,b=t,w=r}var v,d,m,y,x,M,_,b,w,S,k,E=a,A=qr(),C=Fr(n,t,r,e),N={point:f,lineStart:h,lineEnd:g,polygonStart:function(){a=A,v=[],d=[],k=!0},polygonEnd:function(){a=E,v=Bo.merge(v);var t=c([n,e]),r=k&&t,u=v.length;(r||u)&&(a.polygonStart(),r&&(a.lineStart(),s(null,null,1,a),a.lineEnd()),u&&Cr(v,i,t,s,a),a.polygonEnd()),v=d=m=null}};return N}}function Ir(n,t){function r(r,e){return r=n(r,e),t(r[0],r[1])}return n.invert&&t.invert&&(r.invert=function(r,e){return r=t.invert(r,e),r&&n.invert(r[0],r[1])}),r}function Yr(n){var t=0,r=ka/3,e=ie(n),u=e(t,r);return u.parallels=function(n){return arguments.length?e(t=n[0]*ka/180,r=n[1]*ka/180):[180*(t/ka),180*(r/ka)]},u}function Zr(n,t){function r(n,t){var r=Math.sqrt(i-2*u*Math.sin(t))/u;return[r*Math.sin(n*=u),o-r*Math.cos(n)]}var e=Math.sin(n),u=(e+Math.sin(t))/2,i=1+e*(2*u-e),o=Math.sqrt(i)/u;return r.invert=function(n,t){var r=o-t;return[Math.atan2(n,r)/u,G((i-(n*n+r*r)*u*u)/(2*u))]},r}function Vr(){function n(n,t){zc+=u*n-e*t,e=n,u=t}var t,r,e,u;Dc.point=function(i,o){Dc.point=n,t=e=i,r=u=o},Dc.lineEnd=function(){n(t,r)}}function $r(n,t){Lc>n&&(Lc=n),n>qc&&(qc=n),Tc>t&&(Tc=t),t>Rc&&(Rc=t)}function Xr(){function n(n,t){o.push("M",n,",",t,i)}function t(n,t){o.push("M",n,",",t),a.point=r}function r(n,t){o.push("L",n,",",t)}function e(){a.point=n}function u(){o.push("Z")}var i=Br(4.5),o=[],a={point:n,lineStart:function(){a.point=t},lineEnd:e,polygonStart:function(){a.lineEnd=u},polygonEnd:function(){a.lineEnd=e,a.point=n},pointRadius:function(n){return i=Br(n),a},result:function(){if(o.length){var n=o.join("");return o=[],n}}};return a}function Br(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Jr(n,t){mc+=n,yc+=t,++xc}function Wr(){function n(n,e){var u=n-t,i=e-r,o=Math.sqrt(u*u+i*i);Mc+=o*(t+n)/2,_c+=o*(r+e)/2,bc+=o,Jr(t=n,r=e)}var t,r;Uc.point=function(e,u){Uc.point=n,Jr(t=e,r=u)}}function Gr(){Uc.point=Jr}function Kr(){function n(n,t){var r=n-e,i=t-u,o=Math.sqrt(r*r+i*i);Mc+=o*(e+n)/2,_c+=o*(u+t)/2,bc+=o,o=u*n-e*t,wc+=o*(e+n),Sc+=o*(u+t),kc+=3*o,Jr(e=n,u=t)}var t,r,e,u;Uc.point=function(i,o){Uc.point=n,Jr(t=e=i,r=u=o)},Uc.lineEnd=function(){n(t,r)}}function Qr(n){function t(t,r){n.moveTo(t,r),n.arc(t,r,o,0,Ea)}function r(t,r){n.moveTo(t,r),a.point=e}function e(t,r){n.lineTo(t,r)}function u(){a.point=t}function i(){n.closePath()}var o=4.5,a={point:t,lineStart:function(){a.point=r},lineEnd:u,polygonStart:function(){a.lineEnd=i},polygonEnd:function(){a.lineEnd=u,a.point=t},pointRadius:function(n){return o=n,a},result:v};return a}function ne(n){function t(n){return(a?e:r)(n)}function r(t){return ee(t,function(r,e){r=n(r,e),t.point(r[0],r[1])})}function e(t){function r(r,e){r=n(r,e),t.point(r[0],r[1])}function e(){x=0/0,S.point=i,t.lineStart()}function i(r,e){var i=pr([r,e]),o=n(r,e);u(x,M,y,_,b,w,x=o[0],M=o[1],y=r,_=i[0],b=i[1],w=i[2],a,t),t.point(x,M)}function o(){S.point=r,t.lineEnd()}function c(){e(),S.point=s,S.lineEnd=l}function s(n,t){i(f=n,h=t),g=x,p=M,v=_,d=b,m=w,S.point=i}function l(){u(x,M,y,_,b,w,g,p,f,v,d,m,a,t),S.lineEnd=o,o()}var f,h,g,p,v,d,m,y,x,M,_,b,w,S={point:r,lineStart:e,lineEnd:o,polygonStart:function(){t.polygonStart(),S.lineStart=c},polygonEnd:function(){t.polygonEnd(),S.lineStart=e}};return S}function u(t,r,e,a,c,s,l,f,h,g,p,v,d,m){var y=l-t,x=f-r,M=y*y+x*x;if(M>4*i&&d--){var _=a+g,b=c+p,w=s+v,S=Math.sqrt(_*_+b*b+w*w),k=Math.asin(w/=S),E=ca(ca(w)-1)i||ca((y*z+x*L)/M-.5)>.3||o>a*g+c*p+s*v)&&(u(t,r,e,a,c,s,C,N,E,_/=S,b/=S,w,d,m),m.point(C,N),u(C,N,E,_,b,w,l,f,h,g,p,v,d,m))}}var i=.5,o=Math.cos(30*za),a=16;return t.precision=function(n){return arguments.length?(a=(i=n*n)>0&&16,t):Math.sqrt(i)},t}function te(n){var t=ne(function(t,r){return n([t*La,r*La])});return function(n){return oe(t(n))}}function re(n){this.stream=n}function ee(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function ue(n){return ie(function(){return n})()}function ie(n){function t(n){return n=a(n[0]*za,n[1]*za),[n[0]*h+c,s-n[1]*h]}function r(n){return n=a.invert((n[0]-c)/h,(s-n[1])/h),n&&[n[0]*La,n[1]*La]}function e(){a=Ir(o=se(m,y,x),i);var n=i(v,d);return c=g-n[0]*h,s=p+n[1]*h,u() }function u(){return l&&(l.valid=!1,l=null),t}var i,o,a,c,s,l,f=ne(function(n,t){return n=i(n,t),[n[0]*h+c,s-n[1]*h]}),h=150,g=480,p=250,v=0,d=0,m=0,y=0,x=0,M=Ac,_=At,b=null,w=null;return t.stream=function(n){return l&&(l.valid=!1),l=oe(M(o,f(_(n)))),l.valid=!0,l},t.clipAngle=function(n){return arguments.length?(M=null==n?(b=n,Ac):Hr((b=+n)*za),u()):b},t.clipExtent=function(n){return arguments.length?(w=n,_=n?Or(n[0][0],n[0][1],n[1][0],n[1][1]):At,u()):w},t.scale=function(n){return arguments.length?(h=+n,e()):h},t.translate=function(n){return arguments.length?(g=+n[0],p=+n[1],e()):[g,p]},t.center=function(n){return arguments.length?(v=n[0]%360*za,d=n[1]%360*za,e()):[v*La,d*La]},t.rotate=function(n){return arguments.length?(m=n[0]%360*za,y=n[1]%360*za,x=n.length>2?n[2]%360*za:0,e()):[m*La,y*La,x*La]},Bo.rebind(t,f,"precision"),function(){return i=n.apply(this,arguments),t.invert=i.invert&&r,e()}}function oe(n){return ee(n,function(t,r){n.point(t*za,r*za)})}function ae(n,t){return[n,t]}function ce(n,t){return[n>ka?n-Ea:-ka>n?n+Ea:n,t]}function se(n,t,r){return n?t||r?Ir(fe(n),he(t,r)):fe(n):t||r?he(t,r):ce}function le(n){return function(t,r){return t+=n,[t>ka?t-Ea:-ka>t?t+Ea:t,r]}}function fe(n){var t=le(n);return t.invert=le(-n),t}function he(n,t){function r(n,t){var r=Math.cos(t),a=Math.cos(n)*r,c=Math.sin(n)*r,s=Math.sin(t),l=s*e+a*u;return[Math.atan2(c*i-l*o,a*e-s*u),G(l*i+c*o)]}var e=Math.cos(n),u=Math.sin(n),i=Math.cos(t),o=Math.sin(t);return r.invert=function(n,t){var r=Math.cos(t),a=Math.cos(n)*r,c=Math.sin(n)*r,s=Math.sin(t),l=s*i-c*o;return[Math.atan2(c*i+s*o,a*e+l*u),G(l*e-a*u)]},r}function ge(n,t){var r=Math.cos(n),e=Math.sin(n);return function(u,i,o,a){var c=o*t;null!=u?(u=pe(r,u),i=pe(r,i),(o>0?i>u:u>i)&&(u+=o*Ea)):(u=n+o*Ea,i=n-.5*c);for(var s,l=u;o>0?l>i:i>l;l-=c)a.point((s=Mr([r,-e*Math.cos(l),-e*Math.sin(l)]))[0],s[1])}}function pe(n,t){var r=pr(t);r[0]-=n,xr(r);var e=W(-r[1]);return((-r[2]<0?-e:e)+2*Math.PI-Ca)%(2*Math.PI)}function ve(n,t,r){var e=Bo.range(n,t-Ca,r).concat(t);return function(n){return e.map(function(t){return[n,t]})}}function de(n,t,r){var e=Bo.range(n,t-Ca,r).concat(t);return function(n){return e.map(function(t){return[t,n]})}}function me(n){return n.source}function ye(n){return n.target}function xe(n,t,r,e){var u=Math.cos(t),i=Math.sin(t),o=Math.cos(e),a=Math.sin(e),c=u*Math.cos(n),s=u*Math.sin(n),l=o*Math.cos(r),f=o*Math.sin(r),h=2*Math.asin(Math.sqrt(tt(e-t)+u*o*tt(r-n))),g=1/Math.sin(h),p=h?function(n){var t=Math.sin(n*=h)*g,r=Math.sin(h-n)*g,e=r*c+t*l,u=r*s+t*f,o=r*i+t*a;return[Math.atan2(u,e)*La,Math.atan2(o,Math.sqrt(e*e+u*u))*La]}:function(){return[n*La,t*La]};return p.distance=h,p}function Me(){function n(n,u){var i=Math.sin(u*=za),o=Math.cos(u),a=ca((n*=za)-t),c=Math.cos(a);jc+=Math.atan2(Math.sqrt((a=o*Math.sin(a))*a+(a=e*i-r*o*c)*a),r*i+e*o*c),t=n,r=i,e=o}var t,r,e;Hc.point=function(u,i){t=u*za,r=Math.sin(i*=za),e=Math.cos(i),Hc.point=n},Hc.lineEnd=function(){Hc.point=Hc.lineEnd=v}}function _e(n,t){function r(t,r){var e=Math.cos(t),u=Math.cos(r),i=n(e*u);return[i*u*Math.sin(t),i*Math.sin(r)]}return r.invert=function(n,r){var e=Math.sqrt(n*n+r*r),u=t(e),i=Math.sin(u),o=Math.cos(u);return[Math.atan2(n*i,e*o),Math.asin(e&&r*i/e)]},r}function be(n,t){function r(n,t){o>0?-Aa+Ca>t&&(t=-Aa+Ca):t>Aa-Ca&&(t=Aa-Ca);var r=o/Math.pow(u(t),i);return[r*Math.sin(i*n),o-r*Math.cos(i*n)]}var e=Math.cos(n),u=function(n){return Math.tan(ka/4+n/2)},i=n===t?Math.sin(n):Math.log(e/Math.cos(t))/Math.log(u(t)/u(n)),o=e*Math.pow(u(n),i)/i;return i?(r.invert=function(n,t){var r=o-t,e=B(i)*Math.sqrt(n*n+r*r);return[Math.atan2(n,r)/i,2*Math.atan(Math.pow(o/e,1/i))-Aa]},r):Se}function we(n,t){function r(n,t){var r=i-t;return[r*Math.sin(u*n),i-r*Math.cos(u*n)]}var e=Math.cos(n),u=n===t?Math.sin(n):(e-Math.cos(t))/(t-n),i=e/u+n;return ca(u)u;u++){for(;e>1&&J(n[r[e-2]],n[r[e-1]],n[u])<=0;)--e;r[e++]=u}return r.slice(0,e)}function ze(n,t){return n[0]-t[0]||n[1]-t[1]}function Le(n,t,r){return(r[0]-t[0])*(n[1]-t[1])<(r[1]-t[1])*(n[0]-t[0])}function Te(n,t,r,e){var u=n[0],i=r[0],o=t[0]-u,a=e[0]-i,c=n[1],s=r[1],l=t[1]-c,f=e[1]-s,h=(a*(c-s)-f*(u-i))/(f*o-a*l);return[u+h*o,c+h*l]}function qe(n){var t=n[0],r=n[n.length-1];return!(t[0]-r[0]||t[1]-r[1])}function Re(){tu(this),this.edge=this.site=this.circle=null}function De(n){var t=Gc.pop()||new Re;return t.site=n,t}function Pe(n){$e(n),Bc.remove(n),Gc.push(n),tu(n)}function Ue(n){var t=n.circle,r=t.x,e=t.cy,u={x:r,y:e},i=n.P,o=n.N,a=[n];Pe(n);for(var c=i;c.circle&&ca(r-c.circle.x)l;++l)s=a[l],c=a[l-1],Ke(s.edge,c.site,s.site,u);c=a[0],s=a[f-1],s.edge=We(c.site,s.site,null,u),Ve(c),Ve(s)}function je(n){for(var t,r,e,u,i=n.x,o=n.y,a=Bc._;a;)if(e=He(a,o)-i,e>Ca)a=a.L;else{if(u=i-Fe(a,o),!(u>Ca)){e>-Ca?(t=a.P,r=a):u>-Ca?(t=a,r=a.N):t=r=a;break}if(!a.R){t=a;break}a=a.R}var c=De(n);if(Bc.insert(t,c),t||r){if(t===r)return $e(t),r=De(t.site),Bc.insert(c,r),c.edge=r.edge=We(t.site,c.site),Ve(t),Ve(r),void 0;if(!r)return c.edge=We(t.site,c.site),void 0;$e(t),$e(r);var s=t.site,l=s.x,f=s.y,h=n.x-l,g=n.y-f,p=r.site,v=p.x-l,d=p.y-f,m=2*(h*d-g*v),y=h*h+g*g,x=v*v+d*d,M={x:(d*y-g*x)/m+l,y:(h*x-v*y)/m+f};Ke(r.edge,s,p,M),c.edge=We(s,n,null,M),r.edge=We(n,p,null,M),Ve(t),Ve(r)}}function He(n,t){var r=n.site,e=r.x,u=r.y,i=u-t;if(!i)return e;var o=n.P;if(!o)return-1/0;r=o.site;var a=r.x,c=r.y,s=c-t;if(!s)return a;var l=a-e,f=1/i-1/s,h=l/s;return f?(-h+Math.sqrt(h*h-2*f*(l*l/(-2*s)-c+s/2+u-i/2)))/f+e:(e+a)/2}function Fe(n,t){var r=n.N;if(r)return He(r,t);var e=n.site;return e.y===t?e.x:1/0}function Oe(n){this.site=n,this.edges=[]}function Ie(n){for(var t,r,e,u,i,o,a,c,s,l,f=n[0][0],h=n[1][0],g=n[0][1],p=n[1][1],v=Xc,d=v.length;d--;)if(i=v[d],i&&i.prepare())for(a=i.edges,c=a.length,o=0;c>o;)l=a[o].end(),e=l.x,u=l.y,s=a[++o%c].start(),t=s.x,r=s.y,(ca(e-t)>Ca||ca(u-r)>Ca)&&(a.splice(o,0,new Qe(Ge(i.site,l,ca(e-f)Ca?{x:f,y:ca(t-f)Ca?{x:ca(r-p)Ca?{x:h,y:ca(t-h)Ca?{x:ca(r-g)=-Na)){var g=c*c+s*s,p=l*l+f*f,v=(f*g-s*p)/h,d=(c*p-l*g)/h,f=d+a,m=Kc.pop()||new Ze;m.arc=n,m.site=u,m.x=v+o,m.y=f+Math.sqrt(v*v+d*d),m.cy=f,n.circle=m;for(var y=null,x=Wc._;x;)if(m.yd||d>=a)return;if(h>p){if(i){if(i.y>=s)return}else i={x:d,y:c};r={x:d,y:s}}else{if(i){if(i.ye||e>1)if(h>p){if(i){if(i.y>=s)return}else i={x:(c-u)/e,y:c};r={x:(s-u)/e,y:s}}else{if(i){if(i.yg){if(i){if(i.x>=a)return}else i={x:o,y:e*o+u};r={x:a,y:e*a+u}}else{if(i){if(i.xi&&(u=t.substring(i,u),a[o]?a[o]+=u:a[++o]=u),(r=r[0])===(e=e[0])?a[o]?a[o]+=e:a[++o]=e:(a[++o]=null,c.push({i:o,x:pu(r,e)})),i=ts.lastIndex;return ie;++e)a[(r=c[e]).i]=r.x(n);return a.join("")})}function du(n,t){for(var r,e=Bo.interpolators.length;--e>=0&&!(r=Bo.interpolators[e](n,t)););return r}function mu(n,t){var r,e=[],u=[],i=n.length,o=t.length,a=Math.min(n.length,t.length);for(r=0;a>r;++r)e.push(du(n[r],t[r]));for(;i>r;++r)u[r]=n[r];for(;o>r;++r)u[r]=t[r];return function(n){for(r=0;a>r;++r)u[r]=e[r](n);return u}}function yu(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function xu(n){return function(t){return 1-n(1-t)}}function Mu(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function _u(n){return n*n}function bu(n){return n*n*n}function wu(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,r=t*n;return 4*(.5>n?r:3*(n-t)+r-.75)}function Su(n){return function(t){return Math.pow(t,n)}}function ku(n){return 1-Math.cos(n*Aa)}function Eu(n){return Math.pow(2,10*(n-1))}function Au(n){return 1-Math.sqrt(1-n*n)}function Cu(n,t){var r;return arguments.length<2&&(t=.45),arguments.length?r=t/Ea*Math.asin(1/n):(n=1,r=t/4),function(e){return 1+n*Math.pow(2,-10*e)*Math.sin((e-r)*Ea/t)}}function Nu(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function zu(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Lu(n,t){n=Bo.hcl(n),t=Bo.hcl(t);var r=n.h,e=n.c,u=n.l,i=t.h-r,o=t.c-e,a=t.l-u;return isNaN(o)&&(o=0,e=isNaN(e)?t.c:e),isNaN(i)?(i=0,r=isNaN(r)?t.h:r):i>180?i-=360:-180>i&&(i+=360),function(n){return ct(r+i*n,e+o*n,u+a*n)+""}}function Tu(n,t){n=Bo.hsl(n),t=Bo.hsl(t);var r=n.h,e=n.s,u=n.l,i=t.h-r,o=t.s-e,a=t.l-u;return isNaN(o)&&(o=0,e=isNaN(e)?t.s:e),isNaN(i)?(i=0,r=isNaN(r)?t.h:r):i>180?i-=360:-180>i&&(i+=360),function(n){return it(r+i*n,e+o*n,u+a*n)+""}}function qu(n,t){n=Bo.lab(n),t=Bo.lab(t);var r=n.l,e=n.a,u=n.b,i=t.l-r,o=t.a-e,a=t.b-u;return function(n){return ft(r+i*n,e+o*n,u+a*n)+""}}function Ru(n,t){return t-=n,function(r){return Math.round(n+t*r)}}function Du(n){var t=[n.a,n.b],r=[n.c,n.d],e=Uu(t),u=Pu(t,r),i=Uu(ju(r,t,-u))||0;t[0]*r[1]180?l+=360:l-s>180&&(s+=360),u.push({i:e.push(e.pop()+"rotate(",null,")")-2,x:pu(s,l)})):l&&e.push(e.pop()+"rotate("+l+")"),f!=h?u.push({i:e.push(e.pop()+"skewX(",null,")")-2,x:pu(f,h)}):h&&e.push(e.pop()+"skewX("+h+")"),g[0]!=p[0]||g[1]!=p[1]?(r=e.push(e.pop()+"scale(",null,",",null,")"),u.push({i:r-4,x:pu(g[0],p[0])},{i:r-2,x:pu(g[1],p[1])})):(1!=p[0]||1!=p[1])&&e.push(e.pop()+"scale("+p+")"),r=u.length,function(n){for(var t,i=-1;++i=0;)r.push(u[e])}function Ku(n,t){for(var r=[n],e=[];null!=(n=r.pop());)if(e.push(n),(i=n.children)&&(u=i.length))for(var u,i,o=-1;++or;++r)(t=n[r][1])>u&&(e=r,u=t);return e}function si(n){return n.reduce(li,0)}function li(n,t){return n+t[1]}function fi(n,t){return hi(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function hi(n,t){for(var r=-1,e=+n[0],u=(n[1]-e)/t,i=[];++r<=t;)i[r]=u*r+e;return i}function gi(n){return[Bo.min(n),Bo.max(n)]}function pi(n,t){return n.value-t.value}function vi(n,t){var r=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=r,r._pack_prev=t}function di(n,t){n._pack_next=t,t._pack_prev=n}function mi(n,t){var r=t.x-n.x,e=t.y-n.y,u=n.r+t.r;return.999*u*u>r*r+e*e}function yi(n){function t(n){l=Math.min(n.x-n.r,l),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),g=Math.max(n.y+n.r,g)}if((r=n.children)&&(s=r.length)){var r,e,u,i,o,a,c,s,l=1/0,f=-1/0,h=1/0,g=-1/0;if(r.forEach(xi),e=r[0],e.x=-e.r,e.y=0,t(e),s>1&&(u=r[1],u.x=u.r,u.y=0,t(u),s>2))for(i=r[2],bi(e,u,i),t(i),vi(e,i),e._pack_prev=i,vi(i,u),u=e._pack_next,o=3;s>o;o++){bi(e,u,i=r[o]);var p=0,v=1,d=1;for(a=u._pack_next;a!==u;a=a._pack_next,v++)if(mi(a,i)){p=1;break}if(1==p)for(c=e._pack_prev;c!==a._pack_prev&&!mi(c,i);c=c._pack_prev,d++);p?(d>v||v==d&&u.ro;o++)i=r[o],i.x-=m,i.y-=y,x=Math.max(x,i.r+Math.sqrt(i.x*i.x+i.y*i.y));n.r=x,r.forEach(Mi)}}function xi(n){n._pack_next=n._pack_prev=n}function Mi(n){delete n._pack_next,delete n._pack_prev}function _i(n,t,r,e){var u=n.children;if(n.x=t+=e*n.x,n.y=r+=e*n.y,n.r*=e,u)for(var i=-1,o=u.length;++i=0;)t=u[i],t.z+=r,t.m+=r,r+=t.s+(e+=t.c)}function Ci(n,t,r){return n.a.parent===t.parent?n.a:r}function Ni(n){return 1+Bo.max(n,function(n){return n.y})}function zi(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Li(n){var t=n.children;return t&&t.length?Li(t[0]):n}function Ti(n){var t,r=n.children;return r&&(t=r.length)?Ti(r[t-1]):n}function qi(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Ri(n,t){var r=n.x+t[3],e=n.y+t[0],u=n.dx-t[1]-t[3],i=n.dy-t[0]-t[2];return 0>u&&(r+=u/2,u=0),0>i&&(e+=i/2,i=0),{x:r,y:e,dx:u,dy:i}}function Di(n){var t=n[0],r=n[n.length-1];return r>t?[t,r]:[r,t]}function Pi(n){return n.rangeExtent?n.rangeExtent():Di(n.range())}function Ui(n,t,r,e){var u=r(n[0],n[1]),i=e(t[0],t[1]);return function(n){return i(u(n))}}function ji(n,t){var r,e=0,u=n.length-1,i=n[e],o=n[u];return i>o&&(r=e,e=u,u=r,r=i,i=o,o=r),n[e]=t.floor(i),n[u]=t.ceil(o),n}function Hi(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:hs}function Fi(n,t,r,e){var u=[],i=[],o=0,a=Math.min(n.length,t.length)-1;for(n[a]2?Fi:Ui,c=e?Ou:Fu;return o=u(n,t,c,r),a=u(t,n,c,du),i}function i(n){return o(n)}var o,a;return i.invert=function(n){return a(n)},i.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},i.range=function(n){return arguments.length?(t=n,u()):t},i.rangeRound=function(n){return i.range(n).interpolate(Ru)},i.clamp=function(n){return arguments.length?(e=n,u()):e},i.interpolate=function(n){return arguments.length?(r=n,u()):r},i.ticks=function(t){return Vi(n,t)},i.tickFormat=function(t,r){return $i(n,t,r)},i.nice=function(t){return Yi(n,t),u()},i.copy=function(){return Oi(n,t,r,e)},u()}function Ii(n,t){return Bo.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Yi(n,t){return ji(n,Hi(Zi(n,t)[2]))}function Zi(n,t){null==t&&(t=10);var r=Di(n),e=r[1]-r[0],u=Math.pow(10,Math.floor(Math.log(e/t)/Math.LN10)),i=t/e*u;return.15>=i?u*=10:.35>=i?u*=5:.75>=i&&(u*=2),r[0]=Math.ceil(r[0]/u)*u,r[1]=Math.floor(r[1]/u)*u+.5*u,r[2]=u,r}function Vi(n,t){return Bo.range.apply(Bo,Zi(n,t))}function $i(n,t,r){var e=Zi(n,t);if(r){var u=nc.exec(r);if(u.shift(),"s"===u[8]){var i=Bo.formatPrefix(Math.max(ca(e[0]),ca(e[1])));return u[7]||(u[7]="."+Xi(i.scale(e[2]))),u[8]="f",r=Bo.format(u.join("")),function(n){return r(i.scale(n))+i.symbol}}u[7]||(u[7]="."+Bi(u[8],e)),r=u.join("")}else r=",."+Xi(e[2])+"f";return Bo.format(r)}function Xi(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function Bi(n,t){var r=Xi(t[2]);return n in gs?Math.abs(r-Xi(Math.max(ca(t[0]),ca(t[1]))))+ +("e"!==n):r-2*("%"===n)}function Ji(n,t,r,e){function u(n){return(r?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function i(n){return r?Math.pow(t,n):-Math.pow(t,-n)}function o(t){return n(u(t))}return o.invert=function(t){return i(n.invert(t))},o.domain=function(t){return arguments.length?(r=t[0]>=0,n.domain((e=t.map(Number)).map(u)),o):e},o.base=function(r){return arguments.length?(t=+r,n.domain(e.map(u)),o):t},o.nice=function(){var t=ji(e.map(u),r?Math:vs);return n.domain(t),e=t.map(i),o},o.ticks=function(){var n=Di(e),o=[],a=n[0],c=n[1],s=Math.floor(u(a)),l=Math.ceil(u(c)),f=t%1?2:t;if(isFinite(l-s)){if(r){for(;l>s;s++)for(var h=1;f>h;h++)o.push(i(s)*h);o.push(i(s))}else for(o.push(i(s));s++0;h--)o.push(i(s)*h);for(s=0;o[s]c;l--);o=o.slice(s,l)}return o},o.tickFormat=function(n,t){if(!arguments.length)return ps;arguments.length<2?t=ps:"function"!=typeof t&&(t=Bo.format(t));var e,a=Math.max(.1,n/o.ticks().length),c=r?(e=1e-12,Math.ceil):(e=-1e-12,Math.floor);return function(n){return n/i(c(u(n)+e))<=a?t(n):""}},o.copy=function(){return Ji(n.copy(),t,r,e)},Ii(o,n)}function Wi(n,t,r){function e(t){return n(u(t))}var u=Gi(t),i=Gi(1/t);return e.invert=function(t){return i(n.invert(t))},e.domain=function(t){return arguments.length?(n.domain((r=t.map(Number)).map(u)),e):r},e.ticks=function(n){return Vi(r,n)},e.tickFormat=function(n,t){return $i(r,n,t)},e.nice=function(n){return e.domain(Yi(r,n))},e.exponent=function(o){return arguments.length?(u=Gi(t=o),i=Gi(1/t),n.domain(r.map(u)),e):t},e.copy=function(){return Wi(n.copy(),t,r)},Ii(e,n)}function Gi(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function Ki(n,t){function r(r){return i[((u.get(r)||("range"===t.t?u.set(r,n.push(r)):0/0))-1)%i.length]}function e(t,r){return Bo.range(n.length).map(function(n){return t+r*n})}var u,i,a;return r.domain=function(e){if(!arguments.length)return n;n=[],u=new o;for(var i,a=-1,c=e.length;++an?[0/0,0/0]:[n>0?o[n-1]:r[0],nt?0/0:t/i+n,[t,t+1/i]},e.copy=function(){return no(n,t,r)},u()}function to(n,t){function r(r){return r>=r?t[Bo.bisect(n,r)]:void 0}return r.domain=function(t){return arguments.length?(n=t,r):n},r.range=function(n){return arguments.length?(t=n,r):t},r.invertExtent=function(r){return r=t.indexOf(r),[n[r-1],n[r]]},r.copy=function(){return to(n,t)},r}function ro(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(r){return arguments.length?(n=r.map(t),t):n},t.ticks=function(t){return Vi(n,t)},t.tickFormat=function(t,r){return $i(n,t,r)},t.copy=function(){return ro(n)},t}function eo(n){return n.innerRadius}function uo(n){return n.outerRadius}function io(n){return n.startAngle}function oo(n){return n.endAngle}function ao(n){function t(t){function o(){s.push("M",i(n(l),a))}for(var c,s=[],l=[],f=-1,h=t.length,g=Et(r),p=Et(e);++f1&&u.push("H",e[0]),u.join("")}function fo(n){for(var t=0,r=n.length,e=n[0],u=[e[0],",",e[1]];++t1){a=t[1],i=n[c],c++,e+="C"+(u[0]+o[0])+","+(u[1]+o[1])+","+(i[0]-a[0])+","+(i[1]-a[1])+","+i[0]+","+i[1];for(var s=2;s9&&(u=3*t/Math.sqrt(u),o[a]=u*r,o[a+1]=u*e));for(a=-1;++a<=c;)u=(n[Math.min(c,a+1)][0]-n[Math.max(0,a-1)][0])/(6*(1+o[a]*o[a])),i.push([u||0,o[a]*u||0]);return i}function Co(n){return n.length<3?co(n):n[0]+mo(n,Ao(n))}function No(n){for(var t,r,e,u=-1,i=n.length;++ur?s():(u.active=r,i.event&&i.event.start.call(n,l,t),i.tween.forEach(function(r,e){(e=e.call(n,l,t))&&v.push(e)}),Bo.timer(function(){return p.c=c(e||1)?Ar:c,1},0,a),void 0)}function c(e){if(u.active!==r)return s();for(var o=e/g,a=f(o),c=v.length;c>0;)v[--c].call(n,a);return o>=1?(i.event&&i.event.end.call(n,l,t),s()):void 0}function s(){return--u.count?delete u[r]:delete n.__transition__,1}var l=n.__data__,f=i.ease,h=i.delay,g=i.duration,p=Ga,v=[];return p.t=h+a,e>=h?o(e-h):(p.c=o,void 0)},0,a)}}function Oo(n,t){n.attr("transform",function(n){return"translate("+t(n)+",0)"})}function Io(n,t){n.attr("transform",function(n){return"translate(0,"+t(n)+")"})}function Yo(n){return n.toISOString()}function Zo(n,t,r){function e(t){return n(t)}function u(n,r){var e=n[1]-n[0],u=e/r,i=Bo.bisect(Fs,u);return i==Fs.length?[t.year,Zi(n.map(function(n){return n/31536e6}),r)[2]]:i?t[u/Fs[i-1] CONNECT_POINT_COMPARATOR = new Comparator() { + @Override + public int compare(ConnectPoint o1, ConnectPoint o2) { + int compareId = ELEMENT_ID_COMPARATOR.compare(o1.elementId(), o2.elementId()); + return (compareId != 0) ? + compareId : + Long.signum(o1.port().toLong() - o2.port().toLong()); + } + }; + + public static final Comparator ADDRESSES_COMPARATOR = new Comparator() { + @Override + public int compare(PortAddresses arg0, PortAddresses arg1) { + return CONNECT_POINT_COMPARATOR.compare(arg0.connectPoint(), arg1.connectPoint()); + } + }; + } diff --git a/cli/src/main/java/org/onlab/onos/cli/MastersListCommand.java b/cli/src/main/java/org/onlab/onos/cli/MastersListCommand.java index ff86eaaaa5..caaf244437 100644 --- a/cli/src/main/java/org/onlab/onos/cli/MastersListCommand.java +++ b/cli/src/main/java/org/onlab/onos/cli/MastersListCommand.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli; diff --git a/cli/src/main/java/org/onlab/onos/cli/NodeAddCommand.java b/cli/src/main/java/org/onlab/onos/cli/NodeAddCommand.java index aec77ff405..3fa7bca400 100644 --- a/cli/src/main/java/org/onlab/onos/cli/NodeAddCommand.java +++ b/cli/src/main/java/org/onlab/onos/cli/NodeAddCommand.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli; @@ -22,7 +19,7 @@ import org.apache.karaf.shell.commands.Argument; import org.apache.karaf.shell.commands.Command; import org.onlab.onos.cluster.ClusterAdminService; import org.onlab.onos.cluster.NodeId; -import org.onlab.packet.IpPrefix; +import org.onlab.packet.IpAddress; /** * Adds a new controller cluster node. @@ -46,7 +43,7 @@ public class NodeAddCommand extends AbstractShellCommand { @Override protected void execute() { ClusterAdminService service = get(ClusterAdminService.class); - service.addNode(new NodeId(nodeId), IpPrefix.valueOf(ip), tcpPort); + service.addNode(new NodeId(nodeId), IpAddress.valueOf(ip), tcpPort); } } diff --git a/cli/src/main/java/org/onlab/onos/cli/NodeIdCompleter.java b/cli/src/main/java/org/onlab/onos/cli/NodeIdCompleter.java index 7ef407eecc..c728b5565f 100644 --- a/cli/src/main/java/org/onlab/onos/cli/NodeIdCompleter.java +++ b/cli/src/main/java/org/onlab/onos/cli/NodeIdCompleter.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli; diff --git a/cli/src/main/java/org/onlab/onos/cli/NodeRemoveCommand.java b/cli/src/main/java/org/onlab/onos/cli/NodeRemoveCommand.java index ff33bbf448..fa8ff90afe 100644 --- a/cli/src/main/java/org/onlab/onos/cli/NodeRemoveCommand.java +++ b/cli/src/main/java/org/onlab/onos/cli/NodeRemoveCommand.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli; diff --git a/cli/src/main/java/org/onlab/onos/cli/NodesListCommand.java b/cli/src/main/java/org/onlab/onos/cli/NodesListCommand.java index 2ffcd1159d..17162a21f4 100644 --- a/cli/src/main/java/org/onlab/onos/cli/NodesListCommand.java +++ b/cli/src/main/java/org/onlab/onos/cli/NodesListCommand.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli; diff --git a/cli/src/main/java/org/onlab/onos/cli/RolesCommand.java b/cli/src/main/java/org/onlab/onos/cli/RolesCommand.java index 6659a38d2d..d5b05045b1 100644 --- a/cli/src/main/java/org/onlab/onos/cli/RolesCommand.java +++ b/cli/src/main/java/org/onlab/onos/cli/RolesCommand.java @@ -1,28 +1,24 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli; -import static com.google.common.collect.Lists.newArrayList; - -import java.util.Collections; -import java.util.List; - +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.node.ArrayNode; +import com.fasterxml.jackson.databind.node.ObjectNode; import org.apache.karaf.shell.commands.Command; import org.onlab.onos.cluster.NodeId; import org.onlab.onos.cluster.RoleInfo; @@ -31,12 +27,15 @@ import org.onlab.onos.net.Device; import org.onlab.onos.net.DeviceId; import org.onlab.onos.net.device.DeviceService; +import java.util.List; + +import static org.onlab.onos.cli.net.DevicesListCommand.getSortedDevices; /** * Lists mastership roles of nodes for each device. */ @Command(scope = "onos", name = "roles", - description = "Lists mastership roles of nodes for each device.") + description = "Lists mastership roles of nodes for each device.") public class RolesCommand extends AbstractShellCommand { private static final String FMT_HDR = "%s: master=%s, standbys=[ %s]"; @@ -46,29 +45,47 @@ public class RolesCommand extends AbstractShellCommand { DeviceService deviceService = get(DeviceService.class); MastershipService roleService = get(MastershipService.class); - for (Device d : getSortedDevices(deviceService)) { - DeviceId did = d.id(); - printRoles(roleService, did); + if (outputJson()) { + print("%s", json(roleService, getSortedDevices(deviceService))); + } else { + for (Device d : getSortedDevices(deviceService)) { + DeviceId did = d.id(); + printRoles(roleService, did); + } } } - /** - * Returns the list of devices sorted using the device ID URIs. - * - * @param service device service - * @return sorted device list - */ - protected static List getSortedDevices(DeviceService service) { - List devices = newArrayList(service.getDevices()); - Collections.sort(devices, Comparators.ELEMENT_COMPARATOR); - return devices; + // Produces JSON structure with role information for the given devices. + private JsonNode json(MastershipService service, List sortedDevices) { + ObjectMapper mapper = new ObjectMapper(); + ArrayNode results = mapper.createArrayNode(); + for (Device device : sortedDevices) { + results.add(json(service, mapper, device)); + } + return results; + } + + // Produces JSON structure with role information for the given device. + private JsonNode json(MastershipService service, ObjectMapper mapper, + Device device) { + NodeId master = service.getMasterFor(device.id()); + ObjectNode result = mapper.createObjectNode() + .put("id", device.id().toString()) + .put("master", master != null ? master.toString() : "none"); + RoleInfo nodes = service.getNodesFor(device.id()); + ArrayNode standbys = mapper.createArrayNode(); + for (NodeId nid : nodes.backups()) { + standbys.add(nid.toString()); + } + result.set("standbys", standbys); + return result; } /** * Prints the role information for a device. * + * @param service mastership service * @param deviceId the ID of the device - * @param master the current master */ protected void printRoles(MastershipService service, DeviceId deviceId) { RoleInfo nodes = service.getNodesFor(deviceId); @@ -78,7 +95,7 @@ public class RolesCommand extends AbstractShellCommand { } print(FMT_HDR, deviceId, - nodes.master() == null ? "NONE" : nodes.master(), - builder.toString()); + nodes.master() == null ? "NONE" : nodes.master(), + builder.toString()); } } diff --git a/cli/src/main/java/org/onlab/onos/cli/SummaryCommand.java b/cli/src/main/java/org/onlab/onos/cli/SummaryCommand.java index b4b3e98e75..9703970bd9 100644 --- a/cli/src/main/java/org/onlab/onos/cli/SummaryCommand.java +++ b/cli/src/main/java/org/onlab/onos/cli/SummaryCommand.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli; diff --git a/cli/src/main/java/org/onlab/onos/cli/net/AddHostToHostIntentCommand.java b/cli/src/main/java/org/onlab/onos/cli/net/AddHostToHostIntentCommand.java index 642a19f691..7d3bfc29c2 100644 --- a/cli/src/main/java/org/onlab/onos/cli/net/AddHostToHostIntentCommand.java +++ b/cli/src/main/java/org/onlab/onos/cli/net/AddHostToHostIntentCommand.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli.net; diff --git a/cli/src/main/java/org/onlab/onos/cli/net/AddMultiPointToSinglePointIntentCommand.java b/cli/src/main/java/org/onlab/onos/cli/net/AddMultiPointToSinglePointIntentCommand.java index bfc99b8c48..9e8e2fc474 100644 --- a/cli/src/main/java/org/onlab/onos/cli/net/AddMultiPointToSinglePointIntentCommand.java +++ b/cli/src/main/java/org/onlab/onos/cli/net/AddMultiPointToSinglePointIntentCommand.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli.net; diff --git a/cli/src/main/java/org/onlab/onos/cli/net/AddOpticalIntentCommand.java b/cli/src/main/java/org/onlab/onos/cli/net/AddOpticalIntentCommand.java index dc73c819d7..1120621481 100644 --- a/cli/src/main/java/org/onlab/onos/cli/net/AddOpticalIntentCommand.java +++ b/cli/src/main/java/org/onlab/onos/cli/net/AddOpticalIntentCommand.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli.net; diff --git a/cli/src/main/java/org/onlab/onos/cli/net/AddPointToPointIntentCommand.java b/cli/src/main/java/org/onlab/onos/cli/net/AddPointToPointIntentCommand.java index d07b2aa72e..e1ede9fb07 100644 --- a/cli/src/main/java/org/onlab/onos/cli/net/AddPointToPointIntentCommand.java +++ b/cli/src/main/java/org/onlab/onos/cli/net/AddPointToPointIntentCommand.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli.net; diff --git a/cli/src/main/java/org/onlab/onos/cli/net/AddressBindingsListCommand.java b/cli/src/main/java/org/onlab/onos/cli/net/AddressBindingsListCommand.java new file mode 100644 index 0000000000..42b0ccc2d2 --- /dev/null +++ b/cli/src/main/java/org/onlab/onos/cli/net/AddressBindingsListCommand.java @@ -0,0 +1,55 @@ +package org.onlab.onos.cli.net; + +import java.util.Collections; +import java.util.List; +import java.util.Set; + +import org.apache.karaf.shell.commands.Command; +import org.onlab.onos.cli.AbstractShellCommand; +import org.onlab.onos.cli.Comparators; +import org.onlab.onos.net.host.HostService; +import org.onlab.onos.net.host.InterfaceIpAddress; +import org.onlab.onos.net.host.PortAddresses; + +import com.google.common.collect.Lists; + +/** + * Lists all configured address port bindings. + */ +@Command(scope = "onos", name = "address-bindings", + description = "Lists all configured address port bindings.") +public class AddressBindingsListCommand extends AbstractShellCommand { + + private static final String FORMAT = + "port=%s/%s, ip(s)=%s, mac=%s"; + + @Override + protected void execute() { + HostService hostService = get(HostService.class); + + List addresses = + Lists.newArrayList(hostService.getAddressBindings()); + + Collections.sort(addresses, Comparators.ADDRESSES_COMPARATOR); + + for (PortAddresses pa : addresses) { + print(FORMAT, pa.connectPoint().deviceId(), pa.connectPoint().port(), + printIpAddresses(pa.ipAddresses()), pa.mac()); + } + } + + private String printIpAddresses(Set addresses) { + StringBuilder output = new StringBuilder("["); + for (InterfaceIpAddress address : addresses) { + output.append(address.ipAddress().toString()); + output.append("/"); + output.append(address.subnetAddress().prefixLength()); + output.append(", "); + } + // Remove the last comma + output.delete(output.length() - 2 , output.length()); + output.append("]"); + return output.toString(); + } + +} diff --git a/cli/src/main/java/org/onlab/onos/cli/net/ClusterDevicesCommand.java b/cli/src/main/java/org/onlab/onos/cli/net/ClusterDevicesCommand.java index 63f48fe3f1..3d5bbb8656 100644 --- a/cli/src/main/java/org/onlab/onos/cli/net/ClusterDevicesCommand.java +++ b/cli/src/main/java/org/onlab/onos/cli/net/ClusterDevicesCommand.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli.net; diff --git a/cli/src/main/java/org/onlab/onos/cli/net/ClusterIdCompleter.java b/cli/src/main/java/org/onlab/onos/cli/net/ClusterIdCompleter.java index 3a374b8291..492451cf1a 100644 --- a/cli/src/main/java/org/onlab/onos/cli/net/ClusterIdCompleter.java +++ b/cli/src/main/java/org/onlab/onos/cli/net/ClusterIdCompleter.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli.net; diff --git a/cli/src/main/java/org/onlab/onos/cli/net/ClusterLinksCommand.java b/cli/src/main/java/org/onlab/onos/cli/net/ClusterLinksCommand.java index 662798e734..84fd9945e4 100644 --- a/cli/src/main/java/org/onlab/onos/cli/net/ClusterLinksCommand.java +++ b/cli/src/main/java/org/onlab/onos/cli/net/ClusterLinksCommand.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli.net; diff --git a/cli/src/main/java/org/onlab/onos/cli/net/ClustersListCommand.java b/cli/src/main/java/org/onlab/onos/cli/net/ClustersListCommand.java index 66d10d17b0..e4cfaa68e7 100644 --- a/cli/src/main/java/org/onlab/onos/cli/net/ClustersListCommand.java +++ b/cli/src/main/java/org/onlab/onos/cli/net/ClustersListCommand.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli.net; diff --git a/cli/src/main/java/org/onlab/onos/cli/net/ConnectPointCompleter.java b/cli/src/main/java/org/onlab/onos/cli/net/ConnectPointCompleter.java index 2c8df90b26..777ace52f5 100644 --- a/cli/src/main/java/org/onlab/onos/cli/net/ConnectPointCompleter.java +++ b/cli/src/main/java/org/onlab/onos/cli/net/ConnectPointCompleter.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli.net; diff --git a/cli/src/main/java/org/onlab/onos/cli/net/ConnectivityIntentCommand.java b/cli/src/main/java/org/onlab/onos/cli/net/ConnectivityIntentCommand.java index de3b0c2a9f..b9b071fbba 100644 --- a/cli/src/main/java/org/onlab/onos/cli/net/ConnectivityIntentCommand.java +++ b/cli/src/main/java/org/onlab/onos/cli/net/ConnectivityIntentCommand.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli.net; diff --git a/cli/src/main/java/org/onlab/onos/cli/net/DeviceIdCompleter.java b/cli/src/main/java/org/onlab/onos/cli/net/DeviceIdCompleter.java index bcc610e7b5..94ec2e1175 100644 --- a/cli/src/main/java/org/onlab/onos/cli/net/DeviceIdCompleter.java +++ b/cli/src/main/java/org/onlab/onos/cli/net/DeviceIdCompleter.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli.net; diff --git a/cli/src/main/java/org/onlab/onos/cli/net/DevicePortsListCommand.java b/cli/src/main/java/org/onlab/onos/cli/net/DevicePortsListCommand.java index 3be8e5c07d..b585285cf6 100644 --- a/cli/src/main/java/org/onlab/onos/cli/net/DevicePortsListCommand.java +++ b/cli/src/main/java/org/onlab/onos/cli/net/DevicePortsListCommand.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli.net; diff --git a/cli/src/main/java/org/onlab/onos/cli/net/DeviceRemoveCommand.java b/cli/src/main/java/org/onlab/onos/cli/net/DeviceRemoveCommand.java index 7ca48703f6..13a893ba55 100644 --- a/cli/src/main/java/org/onlab/onos/cli/net/DeviceRemoveCommand.java +++ b/cli/src/main/java/org/onlab/onos/cli/net/DeviceRemoveCommand.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli.net; diff --git a/cli/src/main/java/org/onlab/onos/cli/net/DeviceRoleCommand.java b/cli/src/main/java/org/onlab/onos/cli/net/DeviceRoleCommand.java index d02ea89ef1..f7bffe4368 100644 --- a/cli/src/main/java/org/onlab/onos/cli/net/DeviceRoleCommand.java +++ b/cli/src/main/java/org/onlab/onos/cli/net/DeviceRoleCommand.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli.net; diff --git a/cli/src/main/java/org/onlab/onos/cli/net/DevicesListCommand.java b/cli/src/main/java/org/onlab/onos/cli/net/DevicesListCommand.java index 543954e927..ca946d0336 100644 --- a/cli/src/main/java/org/onlab/onos/cli/net/DevicesListCommand.java +++ b/cli/src/main/java/org/onlab/onos/cli/net/DevicesListCommand.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli.net; @@ -101,7 +98,7 @@ public class DevicesListCommand extends AbstractShellCommand { * @param service device service * @return sorted device list */ - protected static List getSortedDevices(DeviceService service) { + public static List getSortedDevices(DeviceService service) { List devices = newArrayList(service.getDevices()); Collections.sort(devices, Comparators.ELEMENT_COMPARATOR); return devices; diff --git a/cli/src/main/java/org/onlab/onos/cli/net/EthType.java b/cli/src/main/java/org/onlab/onos/cli/net/EthType.java index d0ac3baa99..368c7b263a 100644 --- a/cli/src/main/java/org/onlab/onos/cli/net/EthType.java +++ b/cli/src/main/java/org/onlab/onos/cli/net/EthType.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli.net; diff --git a/cli/src/main/java/org/onlab/onos/cli/net/EthTypeCompleter.java b/cli/src/main/java/org/onlab/onos/cli/net/EthTypeCompleter.java index 715a073376..7a218fe892 100644 --- a/cli/src/main/java/org/onlab/onos/cli/net/EthTypeCompleter.java +++ b/cli/src/main/java/org/onlab/onos/cli/net/EthTypeCompleter.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli.net; diff --git a/cli/src/main/java/org/onlab/onos/cli/net/FlowRuleStatusCompleter.java b/cli/src/main/java/org/onlab/onos/cli/net/FlowRuleStatusCompleter.java index 9a142af010..73ea6ce003 100644 --- a/cli/src/main/java/org/onlab/onos/cli/net/FlowRuleStatusCompleter.java +++ b/cli/src/main/java/org/onlab/onos/cli/net/FlowRuleStatusCompleter.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli.net; diff --git a/cli/src/main/java/org/onlab/onos/cli/net/FlowsListCommand.java b/cli/src/main/java/org/onlab/onos/cli/net/FlowsListCommand.java index 6918c93109..ab79d03cd4 100644 --- a/cli/src/main/java/org/onlab/onos/cli/net/FlowsListCommand.java +++ b/cli/src/main/java/org/onlab/onos/cli/net/FlowsListCommand.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli.net; diff --git a/cli/src/main/java/org/onlab/onos/cli/net/GetStatistics.java b/cli/src/main/java/org/onlab/onos/cli/net/GetStatistics.java index 3745fa9e47..3413c96cd7 100644 --- a/cli/src/main/java/org/onlab/onos/cli/net/GetStatistics.java +++ b/cli/src/main/java/org/onlab/onos/cli/net/GetStatistics.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli.net; diff --git a/cli/src/main/java/org/onlab/onos/cli/net/HostIdCompleter.java b/cli/src/main/java/org/onlab/onos/cli/net/HostIdCompleter.java index 90381148cd..eb4d4a5319 100644 --- a/cli/src/main/java/org/onlab/onos/cli/net/HostIdCompleter.java +++ b/cli/src/main/java/org/onlab/onos/cli/net/HostIdCompleter.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli.net; diff --git a/cli/src/main/java/org/onlab/onos/cli/net/HostsListCommand.java b/cli/src/main/java/org/onlab/onos/cli/net/HostsListCommand.java index ab7a1f3c75..6f07b9d1d1 100644 --- a/cli/src/main/java/org/onlab/onos/cli/net/HostsListCommand.java +++ b/cli/src/main/java/org/onlab/onos/cli/net/HostsListCommand.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli.net; diff --git a/cli/src/main/java/org/onlab/onos/cli/net/IntentIdCompleter.java b/cli/src/main/java/org/onlab/onos/cli/net/IntentIdCompleter.java index 17de8b3f2e..c4a21344b6 100644 --- a/cli/src/main/java/org/onlab/onos/cli/net/IntentIdCompleter.java +++ b/cli/src/main/java/org/onlab/onos/cli/net/IntentIdCompleter.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli.net; diff --git a/cli/src/main/java/org/onlab/onos/cli/net/IntentPushTestCommand.java b/cli/src/main/java/org/onlab/onos/cli/net/IntentPushTestCommand.java index 6ee67dac27..202326b383 100644 --- a/cli/src/main/java/org/onlab/onos/cli/net/IntentPushTestCommand.java +++ b/cli/src/main/java/org/onlab/onos/cli/net/IntentPushTestCommand.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli.net; diff --git a/cli/src/main/java/org/onlab/onos/cli/net/IntentRemoveCommand.java b/cli/src/main/java/org/onlab/onos/cli/net/IntentRemoveCommand.java index a72ba57a99..73ba59ae73 100644 --- a/cli/src/main/java/org/onlab/onos/cli/net/IntentRemoveCommand.java +++ b/cli/src/main/java/org/onlab/onos/cli/net/IntentRemoveCommand.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli.net; diff --git a/cli/src/main/java/org/onlab/onos/cli/net/IntentsListCommand.java b/cli/src/main/java/org/onlab/onos/cli/net/IntentsListCommand.java index 10b46cb9c5..88548a10e3 100644 --- a/cli/src/main/java/org/onlab/onos/cli/net/IntentsListCommand.java +++ b/cli/src/main/java/org/onlab/onos/cli/net/IntentsListCommand.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli.net; diff --git a/cli/src/main/java/org/onlab/onos/cli/net/LinksListCommand.java b/cli/src/main/java/org/onlab/onos/cli/net/LinksListCommand.java index 7889dcf140..24f5c7b27a 100644 --- a/cli/src/main/java/org/onlab/onos/cli/net/LinksListCommand.java +++ b/cli/src/main/java/org/onlab/onos/cli/net/LinksListCommand.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli.net; diff --git a/cli/src/main/java/org/onlab/onos/cli/net/PathListCommand.java b/cli/src/main/java/org/onlab/onos/cli/net/PathListCommand.java index 75ab02ce87..57167ead73 100644 --- a/cli/src/main/java/org/onlab/onos/cli/net/PathListCommand.java +++ b/cli/src/main/java/org/onlab/onos/cli/net/PathListCommand.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli.net; diff --git a/cli/src/main/java/org/onlab/onos/cli/net/RoleCompleter.java b/cli/src/main/java/org/onlab/onos/cli/net/RoleCompleter.java index 5a244103ae..6092acd7ae 100644 --- a/cli/src/main/java/org/onlab/onos/cli/net/RoleCompleter.java +++ b/cli/src/main/java/org/onlab/onos/cli/net/RoleCompleter.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli.net; diff --git a/cli/src/main/java/org/onlab/onos/cli/net/TopologyCommand.java b/cli/src/main/java/org/onlab/onos/cli/net/TopologyCommand.java index 903b352d7d..ed732c5939 100644 --- a/cli/src/main/java/org/onlab/onos/cli/net/TopologyCommand.java +++ b/cli/src/main/java/org/onlab/onos/cli/net/TopologyCommand.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli.net; diff --git a/cli/src/main/java/org/onlab/onos/cli/net/WipeOutCommand.java b/cli/src/main/java/org/onlab/onos/cli/net/WipeOutCommand.java index 41ea5eb7ae..6aebc27280 100644 --- a/cli/src/main/java/org/onlab/onos/cli/net/WipeOutCommand.java +++ b/cli/src/main/java/org/onlab/onos/cli/net/WipeOutCommand.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.cli.net; diff --git a/cli/src/main/java/org/onlab/onos/cli/net/package-info.java b/cli/src/main/java/org/onlab/onos/cli/net/package-info.java index f379130ed3..057e741ee4 100644 --- a/cli/src/main/java/org/onlab/onos/cli/net/package-info.java +++ b/cli/src/main/java/org/onlab/onos/cli/net/package-info.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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. */ /** diff --git a/cli/src/main/java/org/onlab/onos/cli/package-info.java b/cli/src/main/java/org/onlab/onos/cli/package-info.java index fdafbe621d..589c27376b 100644 --- a/cli/src/main/java/org/onlab/onos/cli/package-info.java +++ b/cli/src/main/java/org/onlab/onos/cli/package-info.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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. */ /** diff --git a/cli/src/main/javadoc/doc-files/intent-states.png b/cli/src/main/javadoc/doc-files/intent-states.png deleted file mode 100644 index 70c333b185..0000000000 Binary files a/cli/src/main/javadoc/doc-files/intent-states.png and /dev/null differ diff --git a/cli/src/main/resources/OSGI-INF/blueprint/shell-config.xml b/cli/src/main/resources/OSGI-INF/blueprint/shell-config.xml index b5752b6fd0..418ee26490 100644 --- a/cli/src/main/resources/OSGI-INF/blueprint/shell-config.xml +++ b/cli/src/main/resources/OSGI-INF/blueprint/shell-config.xml @@ -1,20 +1,17 @@ @@ -172,6 +169,9 @@ + + + diff --git a/core/api/pom.xml b/core/api/pom.xml index 4229da77de..100e63f8fc 100644 --- a/core/api/pom.xml +++ b/core/api/pom.xml @@ -1,4 +1,19 @@ + @@ -21,6 +36,10 @@ com.google.guava guava-testlib + + joda-time + joda-time + diff --git a/core/api/src/main/java/org/onlab/onos/cluster/ClusterAdminService.java b/core/api/src/main/java/org/onlab/onos/cluster/ClusterAdminService.java index 73137e1cba..5c244b1fde 100644 --- a/core/api/src/main/java/org/onlab/onos/cluster/ClusterAdminService.java +++ b/core/api/src/main/java/org/onlab/onos/cluster/ClusterAdminService.java @@ -1,6 +1,21 @@ +/* + * Copyright 2014 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.onlab.onos.cluster; -import org.onlab.packet.IpPrefix; +import org.onlab.packet.IpAddress; /** * Service for administering the cluster node membership. @@ -15,7 +30,7 @@ public interface ClusterAdminService { * @param tcpPort tcp listen port * @return newly added node */ - ControllerNode addNode(NodeId nodeId, IpPrefix ip, int tcpPort); + ControllerNode addNode(NodeId nodeId, IpAddress ip, int tcpPort); /** * Removes the specified node from the cluster node list. diff --git a/core/api/src/main/java/org/onlab/onos/cluster/ClusterEvent.java b/core/api/src/main/java/org/onlab/onos/cluster/ClusterEvent.java index a47c43f6a5..0f95e30f31 100644 --- a/core/api/src/main/java/org/onlab/onos/cluster/ClusterEvent.java +++ b/core/api/src/main/java/org/onlab/onos/cluster/ClusterEvent.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.cluster; import org.onlab.onos.event.AbstractEvent; diff --git a/core/api/src/main/java/org/onlab/onos/cluster/ClusterEventListener.java b/core/api/src/main/java/org/onlab/onos/cluster/ClusterEventListener.java index 5cc4ea0122..14554ef947 100644 --- a/core/api/src/main/java/org/onlab/onos/cluster/ClusterEventListener.java +++ b/core/api/src/main/java/org/onlab/onos/cluster/ClusterEventListener.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.cluster; import org.onlab.onos.event.EventListener; diff --git a/core/api/src/main/java/org/onlab/onos/cluster/ClusterService.java b/core/api/src/main/java/org/onlab/onos/cluster/ClusterService.java index 9c0af8fead..6d2a45547e 100644 --- a/core/api/src/main/java/org/onlab/onos/cluster/ClusterService.java +++ b/core/api/src/main/java/org/onlab/onos/cluster/ClusterService.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.cluster; import java.util.Set; diff --git a/core/api/src/main/java/org/onlab/onos/cluster/ClusterStore.java b/core/api/src/main/java/org/onlab/onos/cluster/ClusterStore.java index 3725706f04..0a4ac585fe 100644 --- a/core/api/src/main/java/org/onlab/onos/cluster/ClusterStore.java +++ b/core/api/src/main/java/org/onlab/onos/cluster/ClusterStore.java @@ -1,7 +1,22 @@ +/* + * Copyright 2014 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.onlab.onos.cluster; import org.onlab.onos.store.Store; -import org.onlab.packet.IpPrefix; +import org.onlab.packet.IpAddress; import java.util.Set; @@ -48,7 +63,7 @@ public interface ClusterStore extends Store * @param tcpPort tcp listen port * @return newly added node */ - ControllerNode addNode(NodeId nodeId, IpPrefix ip, int tcpPort); + ControllerNode addNode(NodeId nodeId, IpAddress ip, int tcpPort); /** * Removes the specified node from the inventory of cluster nodes. diff --git a/core/api/src/main/java/org/onlab/onos/cluster/ClusterStoreDelegate.java b/core/api/src/main/java/org/onlab/onos/cluster/ClusterStoreDelegate.java index b247c27242..6fed1eecc2 100644 --- a/core/api/src/main/java/org/onlab/onos/cluster/ClusterStoreDelegate.java +++ b/core/api/src/main/java/org/onlab/onos/cluster/ClusterStoreDelegate.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.cluster; import org.onlab.onos.store.StoreDelegate; diff --git a/core/api/src/main/java/org/onlab/onos/cluster/ControllerNode.java b/core/api/src/main/java/org/onlab/onos/cluster/ControllerNode.java index 33fe1c963d..29f5cf4c18 100644 --- a/core/api/src/main/java/org/onlab/onos/cluster/ControllerNode.java +++ b/core/api/src/main/java/org/onlab/onos/cluster/ControllerNode.java @@ -1,6 +1,21 @@ +/* + * Copyright 2014 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.onlab.onos.cluster; -import org.onlab.packet.IpPrefix; +import org.onlab.packet.IpAddress; /** * Represents a controller instance as a member in a cluster. @@ -33,7 +48,7 @@ public interface ControllerNode { * * @return IP address */ - IpPrefix ip(); + IpAddress ip(); /** diff --git a/core/api/src/main/java/org/onlab/onos/cluster/ControllerNodeToNodeId.java b/core/api/src/main/java/org/onlab/onos/cluster/ControllerNodeToNodeId.java index 0f79c6821c..78f211c9b7 100644 --- a/core/api/src/main/java/org/onlab/onos/cluster/ControllerNodeToNodeId.java +++ b/core/api/src/main/java/org/onlab/onos/cluster/ControllerNodeToNodeId.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.cluster; import com.google.common.base.Function; diff --git a/core/api/src/main/java/org/onlab/onos/cluster/DefaultControllerNode.java b/core/api/src/main/java/org/onlab/onos/cluster/DefaultControllerNode.java index d23b7a32bb..3aee1a6d4a 100644 --- a/core/api/src/main/java/org/onlab/onos/cluster/DefaultControllerNode.java +++ b/core/api/src/main/java/org/onlab/onos/cluster/DefaultControllerNode.java @@ -1,6 +1,21 @@ +/* + * Copyright 2014 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.onlab.onos.cluster; -import org.onlab.packet.IpPrefix; +import org.onlab.packet.IpAddress; import java.util.Objects; @@ -14,7 +29,7 @@ public class DefaultControllerNode implements ControllerNode { private static final int DEFAULT_PORT = 9876; private final NodeId id; - private final IpPrefix ip; + private final IpAddress ip; private final int tcpPort; // For serialization @@ -30,7 +45,7 @@ public class DefaultControllerNode implements ControllerNode { * @param id instance identifier * @param ip instance IP address */ - public DefaultControllerNode(NodeId id, IpPrefix ip) { + public DefaultControllerNode(NodeId id, IpAddress ip) { this(id, ip, DEFAULT_PORT); } @@ -40,7 +55,7 @@ public class DefaultControllerNode implements ControllerNode { * @param id instance identifier * @param ip instance IP address */ - public DefaultControllerNode(NodeId id, IpPrefix ip, int tcpPort) { + public DefaultControllerNode(NodeId id, IpAddress ip, int tcpPort) { this.id = id; this.ip = ip; this.tcpPort = tcpPort; @@ -52,7 +67,7 @@ public class DefaultControllerNode implements ControllerNode { } @Override - public IpPrefix ip() { + public IpAddress ip() { return ip; } diff --git a/core/api/src/main/java/org/onlab/onos/cluster/NodeId.java b/core/api/src/main/java/org/onlab/onos/cluster/NodeId.java index 5ff2fbc719..50cdda450b 100644 --- a/core/api/src/main/java/org/onlab/onos/cluster/NodeId.java +++ b/core/api/src/main/java/org/onlab/onos/cluster/NodeId.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.cluster; import java.util.Objects; diff --git a/core/api/src/main/java/org/onlab/onos/cluster/RoleInfo.java b/core/api/src/main/java/org/onlab/onos/cluster/RoleInfo.java index 767884db08..d3753f5ea4 100644 --- a/core/api/src/main/java/org/onlab/onos/cluster/RoleInfo.java +++ b/core/api/src/main/java/org/onlab/onos/cluster/RoleInfo.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.cluster; import java.util.List; diff --git a/core/api/src/main/java/org/onlab/onos/cluster/package-info.java b/core/api/src/main/java/org/onlab/onos/cluster/package-info.java index ddc8a731ad..509fbdce31 100644 --- a/core/api/src/main/java/org/onlab/onos/cluster/package-info.java +++ b/core/api/src/main/java/org/onlab/onos/cluster/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Set of abstractions for dealing with controller cluster related topics. */ diff --git a/core/api/src/main/java/org/onlab/onos/codec/CodecService.java b/core/api/src/main/java/org/onlab/onos/codec/CodecService.java index c6dbda20a8..b8f3285482 100644 --- a/core/api/src/main/java/org/onlab/onos/codec/CodecService.java +++ b/core/api/src/main/java/org/onlab/onos/codec/CodecService.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.codec; diff --git a/core/api/src/main/java/org/onlab/onos/codec/JsonCodec.java b/core/api/src/main/java/org/onlab/onos/codec/JsonCodec.java index 4338cdeb30..5dcf25c15b 100644 --- a/core/api/src/main/java/org/onlab/onos/codec/JsonCodec.java +++ b/core/api/src/main/java/org/onlab/onos/codec/JsonCodec.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.codec; diff --git a/core/api/src/main/java/org/onlab/onos/codec/package-info.java b/core/api/src/main/java/org/onlab/onos/codec/package-info.java index 33d6d8cbdb..ce58d916c7 100644 --- a/core/api/src/main/java/org/onlab/onos/codec/package-info.java +++ b/core/api/src/main/java/org/onlab/onos/codec/package-info.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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. */ /** diff --git a/core/api/src/main/java/org/onlab/onos/core/ApplicationId.java b/core/api/src/main/java/org/onlab/onos/core/ApplicationId.java index 10c0c7525f..8e639c470d 100644 --- a/core/api/src/main/java/org/onlab/onos/core/ApplicationId.java +++ b/core/api/src/main/java/org/onlab/onos/core/ApplicationId.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.core; diff --git a/core/api/src/main/java/org/onlab/onos/core/ApplicationIdStore.java b/core/api/src/main/java/org/onlab/onos/core/ApplicationIdStore.java index ccb1414587..2819e87201 100644 --- a/core/api/src/main/java/org/onlab/onos/core/ApplicationIdStore.java +++ b/core/api/src/main/java/org/onlab/onos/core/ApplicationIdStore.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.core; diff --git a/core/api/src/main/java/org/onlab/onos/core/CoreService.java b/core/api/src/main/java/org/onlab/onos/core/CoreService.java index 0de33b3f95..09efe22386 100644 --- a/core/api/src/main/java/org/onlab/onos/core/CoreService.java +++ b/core/api/src/main/java/org/onlab/onos/core/CoreService.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.core; import java.util.Set; diff --git a/core/api/src/main/java/org/onlab/onos/core/DefaultApplicationId.java b/core/api/src/main/java/org/onlab/onos/core/DefaultApplicationId.java index b5ecccc907..f99123dc92 100644 --- a/core/api/src/main/java/org/onlab/onos/core/DefaultApplicationId.java +++ b/core/api/src/main/java/org/onlab/onos/core/DefaultApplicationId.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.core; import java.util.Objects; diff --git a/core/api/src/main/java/org/onlab/onos/core/Version.java b/core/api/src/main/java/org/onlab/onos/core/Version.java index 72fd50910d..12f1db580c 100644 --- a/core/api/src/main/java/org/onlab/onos/core/Version.java +++ b/core/api/src/main/java/org/onlab/onos/core/Version.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.core; import java.util.Objects; diff --git a/core/api/src/main/java/org/onlab/onos/core/package-info.java b/core/api/src/main/java/org/onlab/onos/core/package-info.java index fb9773412f..96c7b8b5d6 100644 --- a/core/api/src/main/java/org/onlab/onos/core/package-info.java +++ b/core/api/src/main/java/org/onlab/onos/core/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * ONOS Core API definitions. */ diff --git a/core/api/src/main/java/org/onlab/onos/event/AbstractEvent.java b/core/api/src/main/java/org/onlab/onos/event/AbstractEvent.java index f5c96913c4..0fc8eaa2eb 100644 --- a/core/api/src/main/java/org/onlab/onos/event/AbstractEvent.java +++ b/core/api/src/main/java/org/onlab/onos/event/AbstractEvent.java @@ -1,7 +1,24 @@ +/* + * Copyright 2014 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.onlab.onos.event; import static com.google.common.base.MoreObjects.toStringHelper; +import org.joda.time.LocalDateTime; + /** * Base event implementation. */ @@ -52,8 +69,11 @@ public class AbstractEvent implements Event { if (port == null) { return super.toString(); } - return toStringHelper(this).add("time", time()).add("type", type()) - .add("subject", subject()).add("port", port).toString(); + return toStringHelper(this) + .add("time", new LocalDateTime(time())) + .add("type", type()) + .add("subject", subject()) + .add("port", port) + .toString(); } } diff --git a/core/api/src/main/java/org/onlab/onos/net/device/DeviceListener.java b/core/api/src/main/java/org/onlab/onos/net/device/DeviceListener.java index b11d617040..62f4bc05c4 100644 --- a/core/api/src/main/java/org/onlab/onos/net/device/DeviceListener.java +++ b/core/api/src/main/java/org/onlab/onos/net/device/DeviceListener.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.device; import org.onlab.onos.event.EventListener; diff --git a/core/api/src/main/java/org/onlab/onos/net/device/DeviceProvider.java b/core/api/src/main/java/org/onlab/onos/net/device/DeviceProvider.java index ec73ce5180..8411b09d56 100644 --- a/core/api/src/main/java/org/onlab/onos/net/device/DeviceProvider.java +++ b/core/api/src/main/java/org/onlab/onos/net/device/DeviceProvider.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.device; import org.onlab.onos.net.Device; @@ -32,4 +47,11 @@ public interface DeviceProvider extends Provider { */ void roleChanged(Device device, MastershipRole newRole); + /** + * Checks the reachability (connectivity) of a device from this provider. + * + * @param device device to check + * @return true if reachable, false otherwise + */ + boolean isReachable(Device device); } diff --git a/core/api/src/main/java/org/onlab/onos/net/device/DeviceProviderRegistry.java b/core/api/src/main/java/org/onlab/onos/net/device/DeviceProviderRegistry.java index cff252eb14..f1c69bac1e 100644 --- a/core/api/src/main/java/org/onlab/onos/net/device/DeviceProviderRegistry.java +++ b/core/api/src/main/java/org/onlab/onos/net/device/DeviceProviderRegistry.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.device; import org.onlab.onos.net.provider.ProviderRegistry; diff --git a/core/api/src/main/java/org/onlab/onos/net/device/DeviceProviderService.java b/core/api/src/main/java/org/onlab/onos/net/device/DeviceProviderService.java index d043eca09a..57d9ebfe01 100644 --- a/core/api/src/main/java/org/onlab/onos/net/device/DeviceProviderService.java +++ b/core/api/src/main/java/org/onlab/onos/net/device/DeviceProviderService.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.device; import org.onlab.onos.net.DeviceId; diff --git a/core/api/src/main/java/org/onlab/onos/net/device/DeviceService.java b/core/api/src/main/java/org/onlab/onos/net/device/DeviceService.java index 54b9d722db..d35b1af3e0 100644 --- a/core/api/src/main/java/org/onlab/onos/net/device/DeviceService.java +++ b/core/api/src/main/java/org/onlab/onos/net/device/DeviceService.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.device; import org.onlab.onos.net.Device; diff --git a/core/api/src/main/java/org/onlab/onos/net/device/DeviceStore.java b/core/api/src/main/java/org/onlab/onos/net/device/DeviceStore.java index fdb9f6d57f..f3f124a5e3 100644 --- a/core/api/src/main/java/org/onlab/onos/net/device/DeviceStore.java +++ b/core/api/src/main/java/org/onlab/onos/net/device/DeviceStore.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.device; import org.onlab.onos.net.Device; diff --git a/core/api/src/main/java/org/onlab/onos/net/device/DeviceStoreDelegate.java b/core/api/src/main/java/org/onlab/onos/net/device/DeviceStoreDelegate.java index 4ab8486665..054d4cf170 100644 --- a/core/api/src/main/java/org/onlab/onos/net/device/DeviceStoreDelegate.java +++ b/core/api/src/main/java/org/onlab/onos/net/device/DeviceStoreDelegate.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.device; import org.onlab.onos.store.StoreDelegate; diff --git a/core/api/src/main/java/org/onlab/onos/net/device/PortDescription.java b/core/api/src/main/java/org/onlab/onos/net/device/PortDescription.java index f01b49ccb0..cdee0057f5 100644 --- a/core/api/src/main/java/org/onlab/onos/net/device/PortDescription.java +++ b/core/api/src/main/java/org/onlab/onos/net/device/PortDescription.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.device; import org.onlab.onos.net.Description; diff --git a/core/api/src/main/java/org/onlab/onos/net/device/package-info.java b/core/api/src/main/java/org/onlab/onos/net/device/package-info.java index ea66ebf98e..bf9efc0897 100644 --- a/core/api/src/main/java/org/onlab/onos/net/device/package-info.java +++ b/core/api/src/main/java/org/onlab/onos/net/device/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Infrastructure device model & related services API definitions. */ diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/BatchOperation.java b/core/api/src/main/java/org/onlab/onos/net/flow/BatchOperation.java index 38f0211953..16ce1844a0 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/BatchOperation.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/BatchOperation.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.flow; diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/BatchOperationEntry.java b/core/api/src/main/java/org/onlab/onos/net/flow/BatchOperationEntry.java index 2ea7053c14..d67ed7471e 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/BatchOperationEntry.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/BatchOperationEntry.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.flow; diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/BatchOperationResult.java b/core/api/src/main/java/org/onlab/onos/net/flow/BatchOperationResult.java index d2db96b315..47628729cf 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/BatchOperationResult.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/BatchOperationResult.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.flow; diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/BatchOperationTarget.java b/core/api/src/main/java/org/onlab/onos/net/flow/BatchOperationTarget.java index e73e3a8795..b9d628348b 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/BatchOperationTarget.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/BatchOperationTarget.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.flow; diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/CompletedBatchOperation.java b/core/api/src/main/java/org/onlab/onos/net/flow/CompletedBatchOperation.java index 363831c9e5..3758ea964d 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/CompletedBatchOperation.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/CompletedBatchOperation.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.flow; @@ -22,13 +19,13 @@ import java.util.Set; import com.google.common.collect.ImmutableSet; -public class CompletedBatchOperation implements BatchOperationResult { +public class CompletedBatchOperation implements BatchOperationResult { private final boolean success; - private final Set failures; + private final Set failures; - public CompletedBatchOperation(boolean success, Set failures) { + public CompletedBatchOperation(boolean success, Set failures) { this.success = success; this.failures = ImmutableSet.copyOf(failures); } @@ -39,7 +36,7 @@ public class CompletedBatchOperation implements BatchOperationResult } @Override - public Set failedItems() { + public Set failedItems() { return failures; } diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/DefaultFlowEntry.java b/core/api/src/main/java/org/onlab/onos/net/flow/DefaultFlowEntry.java index 59aed23718..c2d901b7a6 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/DefaultFlowEntry.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/DefaultFlowEntry.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.flow; diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/DefaultFlowRule.java b/core/api/src/main/java/org/onlab/onos/net/flow/DefaultFlowRule.java index deb654ed67..6e59cf5648 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/DefaultFlowRule.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/DefaultFlowRule.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.flow; diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/DefaultTrafficSelector.java b/core/api/src/main/java/org/onlab/onos/net/flow/DefaultTrafficSelector.java index fa8a64c09b..960eb02e84 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/DefaultTrafficSelector.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/DefaultTrafficSelector.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.flow; diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/DefaultTrafficTreatment.java b/core/api/src/main/java/org/onlab/onos/net/flow/DefaultTrafficTreatment.java index c3fd6ed56e..a584e17ed9 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/DefaultTrafficTreatment.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/DefaultTrafficTreatment.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.flow; diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/FlowEntry.java b/core/api/src/main/java/org/onlab/onos/net/flow/FlowEntry.java index 1e6ce52dbb..a8b9ea0008 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/FlowEntry.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/FlowEntry.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.flow; diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/FlowId.java b/core/api/src/main/java/org/onlab/onos/net/flow/FlowId.java index 142e352dcf..397e6903eb 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/FlowId.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/FlowId.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.flow; diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/FlowRule.java b/core/api/src/main/java/org/onlab/onos/net/flow/FlowRule.java index 718edfeda6..f082db4b75 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/FlowRule.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/FlowRule.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.flow; diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleBatchEntry.java b/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleBatchEntry.java index ee85ea8311..d84e51b293 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleBatchEntry.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleBatchEntry.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.flow; diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleBatchEvent.java b/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleBatchEvent.java index d0d1820742..d5c762dbea 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleBatchEvent.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleBatchEvent.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.flow; import org.onlab.onos.event.AbstractEvent; diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleBatchOperation.java b/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleBatchOperation.java index f078fb9cbc..8d99f8067f 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleBatchOperation.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleBatchOperation.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.flow; diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleBatchRequest.java b/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleBatchRequest.java index f8a25cb1c1..4a2bcf94ab 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleBatchRequest.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleBatchRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.flow; import java.util.Collections; diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleEvent.java b/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleEvent.java index e511be69de..550685ad91 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleEvent.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleEvent.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.flow; diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleListener.java b/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleListener.java index eddaf057fe..76359c09bc 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleListener.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleListener.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.flow; diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleProvider.java b/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleProvider.java index 8748fe8ea0..05ecd66162 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleProvider.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleProvider.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.flow; diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleProviderRegistry.java b/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleProviderRegistry.java index 25b00c4326..eba227ffa8 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleProviderRegistry.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleProviderRegistry.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.flow; diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleProviderService.java b/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleProviderService.java index bacff0dbcd..b1bda15feb 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleProviderService.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleProviderService.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.flow; diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleService.java b/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleService.java index 6fbc053884..789b6bf50c 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleService.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleService.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.flow; diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleStore.java b/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleStore.java index 736dc9de98..8a887d0690 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleStore.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleStore.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.flow; diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleStoreDelegate.java b/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleStoreDelegate.java index fbd6b55283..f7a123dc70 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleStoreDelegate.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleStoreDelegate.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.flow; diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/StoredFlowEntry.java b/core/api/src/main/java/org/onlab/onos/net/flow/StoredFlowEntry.java index 9ba53e9aa3..de15732b9f 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/StoredFlowEntry.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/StoredFlowEntry.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.flow; diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/TrafficSelector.java b/core/api/src/main/java/org/onlab/onos/net/flow/TrafficSelector.java index bcaf70c45e..aaf0ecec31 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/TrafficSelector.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/TrafficSelector.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.flow; diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/TrafficTreatment.java b/core/api/src/main/java/org/onlab/onos/net/flow/TrafficTreatment.java index 9b135baa06..85c8bc03ef 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/TrafficTreatment.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/TrafficTreatment.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.flow; diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/Treatment.java b/core/api/src/main/java/org/onlab/onos/net/flow/Treatment.java index 877da65c12..26f78dd3fc 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/Treatment.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/Treatment.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.flow; diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/criteria/Criteria.java b/core/api/src/main/java/org/onlab/onos/net/flow/criteria/Criteria.java index 9d8ab7bd2c..aba5680ea0 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/criteria/Criteria.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/criteria/Criteria.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.flow.criteria; diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/criteria/Criterion.java b/core/api/src/main/java/org/onlab/onos/net/flow/criteria/Criterion.java index 6110892e03..718534da40 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/criteria/Criterion.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/criteria/Criterion.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.flow.criteria; diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/criteria/package-info.java b/core/api/src/main/java/org/onlab/onos/net/flow/criteria/package-info.java index fabf82e867..3205356902 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/criteria/package-info.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/criteria/package-info.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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. */ /** diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/instructions/Instruction.java b/core/api/src/main/java/org/onlab/onos/net/flow/instructions/Instruction.java index 9b578b607d..ea92134747 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/instructions/Instruction.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/instructions/Instruction.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.flow.instructions; diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/instructions/Instructions.java b/core/api/src/main/java/org/onlab/onos/net/flow/instructions/Instructions.java index b18d7efc47..3b1d433c1a 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/instructions/Instructions.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/instructions/Instructions.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.flow.instructions; diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/instructions/L0ModificationInstruction.java b/core/api/src/main/java/org/onlab/onos/net/flow/instructions/L0ModificationInstruction.java index 23e5f2abfc..0d5cd81c5d 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/instructions/L0ModificationInstruction.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/instructions/L0ModificationInstruction.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.flow.instructions; import static com.google.common.base.MoreObjects.toStringHelper; diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/instructions/L2ModificationInstruction.java b/core/api/src/main/java/org/onlab/onos/net/flow/instructions/L2ModificationInstruction.java index 35acd16cc6..86ea44a6c9 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/instructions/L2ModificationInstruction.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/instructions/L2ModificationInstruction.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.flow.instructions; diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/instructions/L3ModificationInstruction.java b/core/api/src/main/java/org/onlab/onos/net/flow/instructions/L3ModificationInstruction.java index 8aff5df6a1..609d2455ae 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/instructions/L3ModificationInstruction.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/instructions/L3ModificationInstruction.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.flow.instructions; diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/instructions/package-info.java b/core/api/src/main/java/org/onlab/onos/net/flow/instructions/package-info.java index 067cd012b2..0331743a54 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/instructions/package-info.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/instructions/package-info.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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. */ /** diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/package-info.java b/core/api/src/main/java/org/onlab/onos/net/flow/package-info.java index 8fd6008df5..1b2e61b407 100644 --- a/core/api/src/main/java/org/onlab/onos/net/flow/package-info.java +++ b/core/api/src/main/java/org/onlab/onos/net/flow/package-info.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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. */ /** diff --git a/core/api/src/main/java/org/onlab/onos/net/host/DefaultHostDescription.java b/core/api/src/main/java/org/onlab/onos/net/host/DefaultHostDescription.java index ae548e18d6..c41a77cfa3 100644 --- a/core/api/src/main/java/org/onlab/onos/net/host/DefaultHostDescription.java +++ b/core/api/src/main/java/org/onlab/onos/net/host/DefaultHostDescription.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.host; import java.util.Collections; diff --git a/core/api/src/main/java/org/onlab/onos/net/host/HostAdminService.java b/core/api/src/main/java/org/onlab/onos/net/host/HostAdminService.java index 38cfa2e0b4..5232b98f8e 100644 --- a/core/api/src/main/java/org/onlab/onos/net/host/HostAdminService.java +++ b/core/api/src/main/java/org/onlab/onos/net/host/HostAdminService.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.host; import org.onlab.onos.net.ConnectPoint; diff --git a/core/api/src/main/java/org/onlab/onos/net/host/HostClockService.java b/core/api/src/main/java/org/onlab/onos/net/host/HostClockService.java index 21de7a6ba5..1020cbe317 100644 --- a/core/api/src/main/java/org/onlab/onos/net/host/HostClockService.java +++ b/core/api/src/main/java/org/onlab/onos/net/host/HostClockService.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.host; import org.onlab.onos.net.HostId; diff --git a/core/api/src/main/java/org/onlab/onos/net/host/HostDescription.java b/core/api/src/main/java/org/onlab/onos/net/host/HostDescription.java index c42dc03e33..0b0244f4bf 100644 --- a/core/api/src/main/java/org/onlab/onos/net/host/HostDescription.java +++ b/core/api/src/main/java/org/onlab/onos/net/host/HostDescription.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.host; import java.util.Set; diff --git a/core/api/src/main/java/org/onlab/onos/net/host/HostEvent.java b/core/api/src/main/java/org/onlab/onos/net/host/HostEvent.java index 2adfb09dbe..76dd8e7d61 100644 --- a/core/api/src/main/java/org/onlab/onos/net/host/HostEvent.java +++ b/core/api/src/main/java/org/onlab/onos/net/host/HostEvent.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.host; import org.onlab.onos.event.AbstractEvent; diff --git a/core/api/src/main/java/org/onlab/onos/net/host/HostListener.java b/core/api/src/main/java/org/onlab/onos/net/host/HostListener.java index 0e3e0e18b6..f5e8d9ae30 100644 --- a/core/api/src/main/java/org/onlab/onos/net/host/HostListener.java +++ b/core/api/src/main/java/org/onlab/onos/net/host/HostListener.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.host; import org.onlab.onos.event.EventListener; diff --git a/core/api/src/main/java/org/onlab/onos/net/host/HostProvider.java b/core/api/src/main/java/org/onlab/onos/net/host/HostProvider.java index 72264dc3c5..9f53bee848 100644 --- a/core/api/src/main/java/org/onlab/onos/net/host/HostProvider.java +++ b/core/api/src/main/java/org/onlab/onos/net/host/HostProvider.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.host; import org.onlab.onos.net.Host; diff --git a/core/api/src/main/java/org/onlab/onos/net/host/HostProviderRegistry.java b/core/api/src/main/java/org/onlab/onos/net/host/HostProviderRegistry.java index 76f281e5ee..bef70293e3 100644 --- a/core/api/src/main/java/org/onlab/onos/net/host/HostProviderRegistry.java +++ b/core/api/src/main/java/org/onlab/onos/net/host/HostProviderRegistry.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.host; import org.onlab.onos.net.provider.ProviderRegistry; diff --git a/core/api/src/main/java/org/onlab/onos/net/host/HostProviderService.java b/core/api/src/main/java/org/onlab/onos/net/host/HostProviderService.java index ed568e86ba..c7044133c2 100644 --- a/core/api/src/main/java/org/onlab/onos/net/host/HostProviderService.java +++ b/core/api/src/main/java/org/onlab/onos/net/host/HostProviderService.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.host; import org.onlab.onos.net.HostId; diff --git a/core/api/src/main/java/org/onlab/onos/net/host/HostService.java b/core/api/src/main/java/org/onlab/onos/net/host/HostService.java index f18569f96e..66a2ccf048 100644 --- a/core/api/src/main/java/org/onlab/onos/net/host/HostService.java +++ b/core/api/src/main/java/org/onlab/onos/net/host/HostService.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.host; import java.util.Set; diff --git a/core/api/src/main/java/org/onlab/onos/net/host/HostStore.java b/core/api/src/main/java/org/onlab/onos/net/host/HostStore.java index 535479c8a5..a6bf96ddba 100644 --- a/core/api/src/main/java/org/onlab/onos/net/host/HostStore.java +++ b/core/api/src/main/java/org/onlab/onos/net/host/HostStore.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.host; import org.onlab.onos.net.ConnectPoint; diff --git a/core/api/src/main/java/org/onlab/onos/net/host/HostStoreDelegate.java b/core/api/src/main/java/org/onlab/onos/net/host/HostStoreDelegate.java index 999b28fe41..de0d69ae3c 100644 --- a/core/api/src/main/java/org/onlab/onos/net/host/HostStoreDelegate.java +++ b/core/api/src/main/java/org/onlab/onos/net/host/HostStoreDelegate.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.host; import org.onlab.onos.store.StoreDelegate; diff --git a/core/api/src/main/java/org/onlab/onos/net/host/InterfaceIpAddress.java b/core/api/src/main/java/org/onlab/onos/net/host/InterfaceIpAddress.java index afdfddee9f..0cd9b5c1d7 100644 --- a/core/api/src/main/java/org/onlab/onos/net/host/InterfaceIpAddress.java +++ b/core/api/src/main/java/org/onlab/onos/net/host/InterfaceIpAddress.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.host; import java.util.Objects; diff --git a/core/api/src/main/java/org/onlab/onos/net/host/PortAddresses.java b/core/api/src/main/java/org/onlab/onos/net/host/PortAddresses.java index b6d1239d30..deaea5e286 100644 --- a/core/api/src/main/java/org/onlab/onos/net/host/PortAddresses.java +++ b/core/api/src/main/java/org/onlab/onos/net/host/PortAddresses.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.host; import java.util.Collections; diff --git a/core/api/src/main/java/org/onlab/onos/net/host/package-info.java b/core/api/src/main/java/org/onlab/onos/net/host/package-info.java index 79fd0da7a9..260917484c 100644 --- a/core/api/src/main/java/org/onlab/onos/net/host/package-info.java +++ b/core/api/src/main/java/org/onlab/onos/net/host/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * End-station host model & related services API definitions. */ diff --git a/core/api/src/main/java/org/onlab/onos/net/intent/ConnectivityIntent.java b/core/api/src/main/java/org/onlab/onos/net/intent/ConnectivityIntent.java index d15a15a986..65d48d568e 100644 --- a/core/api/src/main/java/org/onlab/onos/net/intent/ConnectivityIntent.java +++ b/core/api/src/main/java/org/onlab/onos/net/intent/ConnectivityIntent.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.intent; diff --git a/core/api/src/main/java/org/onlab/onos/net/intent/HostToHostIntent.java b/core/api/src/main/java/org/onlab/onos/net/intent/HostToHostIntent.java index 3bf5e4ed54..376a122a41 100644 --- a/core/api/src/main/java/org/onlab/onos/net/intent/HostToHostIntent.java +++ b/core/api/src/main/java/org/onlab/onos/net/intent/HostToHostIntent.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.intent; diff --git a/core/api/src/main/java/org/onlab/onos/net/intent/Intent.java b/core/api/src/main/java/org/onlab/onos/net/intent/Intent.java index 32ed36f372..92161f4f54 100644 --- a/core/api/src/main/java/org/onlab/onos/net/intent/Intent.java +++ b/core/api/src/main/java/org/onlab/onos/net/intent/Intent.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.intent; diff --git a/core/api/src/main/java/org/onlab/onos/net/intent/IntentCompiler.java b/core/api/src/main/java/org/onlab/onos/net/intent/IntentCompiler.java index c54b601249..f6dcd17af2 100644 --- a/core/api/src/main/java/org/onlab/onos/net/intent/IntentCompiler.java +++ b/core/api/src/main/java/org/onlab/onos/net/intent/IntentCompiler.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.intent; diff --git a/core/api/src/main/java/org/onlab/onos/net/intent/IntentEvent.java b/core/api/src/main/java/org/onlab/onos/net/intent/IntentEvent.java index 22a24f928d..6d7a3b0cc7 100644 --- a/core/api/src/main/java/org/onlab/onos/net/intent/IntentEvent.java +++ b/core/api/src/main/java/org/onlab/onos/net/intent/IntentEvent.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.intent; diff --git a/core/api/src/main/java/org/onlab/onos/net/intent/IntentException.java b/core/api/src/main/java/org/onlab/onos/net/intent/IntentException.java index 55ca32e6f2..7bdfa1058c 100644 --- a/core/api/src/main/java/org/onlab/onos/net/intent/IntentException.java +++ b/core/api/src/main/java/org/onlab/onos/net/intent/IntentException.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.intent; diff --git a/core/api/src/main/java/org/onlab/onos/net/intent/IntentExtensionService.java b/core/api/src/main/java/org/onlab/onos/net/intent/IntentExtensionService.java index 31db2ec182..2b578ff6d1 100644 --- a/core/api/src/main/java/org/onlab/onos/net/intent/IntentExtensionService.java +++ b/core/api/src/main/java/org/onlab/onos/net/intent/IntentExtensionService.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.intent; diff --git a/core/api/src/main/java/org/onlab/onos/net/intent/IntentId.java b/core/api/src/main/java/org/onlab/onos/net/intent/IntentId.java index 8cfe6fdc46..cd75e6f88b 100644 --- a/core/api/src/main/java/org/onlab/onos/net/intent/IntentId.java +++ b/core/api/src/main/java/org/onlab/onos/net/intent/IntentId.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.intent; diff --git a/core/api/src/main/java/org/onlab/onos/net/intent/IntentInstaller.java b/core/api/src/main/java/org/onlab/onos/net/intent/IntentInstaller.java index 22669e5afa..75662107b4 100644 --- a/core/api/src/main/java/org/onlab/onos/net/intent/IntentInstaller.java +++ b/core/api/src/main/java/org/onlab/onos/net/intent/IntentInstaller.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.intent; diff --git a/core/api/src/main/java/org/onlab/onos/net/intent/IntentListener.java b/core/api/src/main/java/org/onlab/onos/net/intent/IntentListener.java index aa1a4a054e..442d1df4c8 100644 --- a/core/api/src/main/java/org/onlab/onos/net/intent/IntentListener.java +++ b/core/api/src/main/java/org/onlab/onos/net/intent/IntentListener.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.intent; diff --git a/core/api/src/main/java/org/onlab/onos/net/intent/IntentOperation.java b/core/api/src/main/java/org/onlab/onos/net/intent/IntentOperation.java index 4135ed8f6e..902f41894b 100644 --- a/core/api/src/main/java/org/onlab/onos/net/intent/IntentOperation.java +++ b/core/api/src/main/java/org/onlab/onos/net/intent/IntentOperation.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.intent; diff --git a/core/api/src/main/java/org/onlab/onos/net/intent/IntentOperations.java b/core/api/src/main/java/org/onlab/onos/net/intent/IntentOperations.java index 32f0414285..9e31ca345c 100644 --- a/core/api/src/main/java/org/onlab/onos/net/intent/IntentOperations.java +++ b/core/api/src/main/java/org/onlab/onos/net/intent/IntentOperations.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.intent; diff --git a/core/api/src/main/java/org/onlab/onos/net/intent/IntentService.java b/core/api/src/main/java/org/onlab/onos/net/intent/IntentService.java index 6b89a680f9..5e5ac31cbc 100644 --- a/core/api/src/main/java/org/onlab/onos/net/intent/IntentService.java +++ b/core/api/src/main/java/org/onlab/onos/net/intent/IntentService.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.intent; diff --git a/core/api/src/main/java/org/onlab/onos/net/intent/IntentState.java b/core/api/src/main/java/org/onlab/onos/net/intent/IntentState.java index 38662d20a9..0050718660 100644 --- a/core/api/src/main/java/org/onlab/onos/net/intent/IntentState.java +++ b/core/api/src/main/java/org/onlab/onos/net/intent/IntentState.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.intent; diff --git a/core/api/src/main/java/org/onlab/onos/net/intent/IntentStore.java b/core/api/src/main/java/org/onlab/onos/net/intent/IntentStore.java index 7a62d61dd4..a2248a28aa 100644 --- a/core/api/src/main/java/org/onlab/onos/net/intent/IntentStore.java +++ b/core/api/src/main/java/org/onlab/onos/net/intent/IntentStore.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.intent; @@ -89,13 +86,13 @@ public interface IntentStore extends Store { IntentEvent setState(Intent intent, IntentState newState); /** - * Adds the installable intents which resulted from compilation of the + * Sets the installable intents which resulted from compilation of the * specified original intent. * * @param intentId original intent identifier * @param installableIntents compiled installable intents */ - void addInstallableIntents(IntentId intentId, List installableIntents); + void setInstallableIntents(IntentId intentId, List installableIntents); /** * Returns the list of the installable events associated with the specified diff --git a/core/api/src/main/java/org/onlab/onos/net/intent/IntentStoreDelegate.java b/core/api/src/main/java/org/onlab/onos/net/intent/IntentStoreDelegate.java index ab117d2ed5..6d491e43fe 100644 --- a/core/api/src/main/java/org/onlab/onos/net/intent/IntentStoreDelegate.java +++ b/core/api/src/main/java/org/onlab/onos/net/intent/IntentStoreDelegate.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.intent; diff --git a/core/api/src/main/java/org/onlab/onos/net/intent/LinkCollectionIntent.java b/core/api/src/main/java/org/onlab/onos/net/intent/LinkCollectionIntent.java index c328a4e82e..8940340114 100644 --- a/core/api/src/main/java/org/onlab/onos/net/intent/LinkCollectionIntent.java +++ b/core/api/src/main/java/org/onlab/onos/net/intent/LinkCollectionIntent.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.intent; diff --git a/core/api/src/main/java/org/onlab/onos/net/intent/MultiPointToSinglePointIntent.java b/core/api/src/main/java/org/onlab/onos/net/intent/MultiPointToSinglePointIntent.java index 9766f8f4dc..0c47aaddb2 100644 --- a/core/api/src/main/java/org/onlab/onos/net/intent/MultiPointToSinglePointIntent.java +++ b/core/api/src/main/java/org/onlab/onos/net/intent/MultiPointToSinglePointIntent.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.intent; diff --git a/core/api/src/main/java/org/onlab/onos/net/intent/OpticalConnectivityIntent.java b/core/api/src/main/java/org/onlab/onos/net/intent/OpticalConnectivityIntent.java index d22700b036..46f5f9a104 100644 --- a/core/api/src/main/java/org/onlab/onos/net/intent/OpticalConnectivityIntent.java +++ b/core/api/src/main/java/org/onlab/onos/net/intent/OpticalConnectivityIntent.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent; import org.onlab.onos.core.ApplicationId; diff --git a/core/api/src/main/java/org/onlab/onos/net/intent/OpticalPathIntent.java b/core/api/src/main/java/org/onlab/onos/net/intent/OpticalPathIntent.java index e9bf826b12..92017f1e0e 100644 --- a/core/api/src/main/java/org/onlab/onos/net/intent/OpticalPathIntent.java +++ b/core/api/src/main/java/org/onlab/onos/net/intent/OpticalPathIntent.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent; import java.util.Collection; diff --git a/core/api/src/main/java/org/onlab/onos/net/intent/PathIntent.java b/core/api/src/main/java/org/onlab/onos/net/intent/PathIntent.java index 639e68be27..721a8fd761 100644 --- a/core/api/src/main/java/org/onlab/onos/net/intent/PathIntent.java +++ b/core/api/src/main/java/org/onlab/onos/net/intent/PathIntent.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.intent; diff --git a/core/api/src/main/java/org/onlab/onos/net/intent/PointToPointIntent.java b/core/api/src/main/java/org/onlab/onos/net/intent/PointToPointIntent.java index 7c69887b60..61a1a56ae1 100644 --- a/core/api/src/main/java/org/onlab/onos/net/intent/PointToPointIntent.java +++ b/core/api/src/main/java/org/onlab/onos/net/intent/PointToPointIntent.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.intent; diff --git a/core/api/src/main/java/org/onlab/onos/net/intent/SinglePointToMultiPointIntent.java b/core/api/src/main/java/org/onlab/onos/net/intent/SinglePointToMultiPointIntent.java index f08c1d710c..bb38846f92 100644 --- a/core/api/src/main/java/org/onlab/onos/net/intent/SinglePointToMultiPointIntent.java +++ b/core/api/src/main/java/org/onlab/onos/net/intent/SinglePointToMultiPointIntent.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.net.intent; diff --git a/core/api/src/main/java/org/onlab/onos/net/intent/package-info.java b/core/api/src/main/java/org/onlab/onos/net/intent/package-info.java index d7efa521a0..1bac21da8e 100644 --- a/core/api/src/main/java/org/onlab/onos/net/intent/package-info.java +++ b/core/api/src/main/java/org/onlab/onos/net/intent/package-info.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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. */ /** diff --git a/core/api/src/main/java/org/onlab/onos/net/link/DefaultLinkDescription.java b/core/api/src/main/java/org/onlab/onos/net/link/DefaultLinkDescription.java index 037b79666b..fc3f335b39 100644 --- a/core/api/src/main/java/org/onlab/onos/net/link/DefaultLinkDescription.java +++ b/core/api/src/main/java/org/onlab/onos/net/link/DefaultLinkDescription.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.link; import com.google.common.base.MoreObjects; diff --git a/core/api/src/main/java/org/onlab/onos/net/link/LinkAdminService.java b/core/api/src/main/java/org/onlab/onos/net/link/LinkAdminService.java index 228b3c921a..851747061e 100644 --- a/core/api/src/main/java/org/onlab/onos/net/link/LinkAdminService.java +++ b/core/api/src/main/java/org/onlab/onos/net/link/LinkAdminService.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.link; import org.onlab.onos.net.ConnectPoint; diff --git a/core/api/src/main/java/org/onlab/onos/net/link/LinkDescription.java b/core/api/src/main/java/org/onlab/onos/net/link/LinkDescription.java index 4b34ad63b1..334345169a 100644 --- a/core/api/src/main/java/org/onlab/onos/net/link/LinkDescription.java +++ b/core/api/src/main/java/org/onlab/onos/net/link/LinkDescription.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.link; import org.onlab.onos.net.ConnectPoint; diff --git a/core/api/src/main/java/org/onlab/onos/net/link/LinkEvent.java b/core/api/src/main/java/org/onlab/onos/net/link/LinkEvent.java index a85965ae6a..b164b9ea34 100644 --- a/core/api/src/main/java/org/onlab/onos/net/link/LinkEvent.java +++ b/core/api/src/main/java/org/onlab/onos/net/link/LinkEvent.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.link; import org.onlab.onos.event.AbstractEvent; diff --git a/core/api/src/main/java/org/onlab/onos/net/link/LinkListener.java b/core/api/src/main/java/org/onlab/onos/net/link/LinkListener.java index 03039db136..35d701b725 100644 --- a/core/api/src/main/java/org/onlab/onos/net/link/LinkListener.java +++ b/core/api/src/main/java/org/onlab/onos/net/link/LinkListener.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.link; import org.onlab.onos.event.EventListener; diff --git a/core/api/src/main/java/org/onlab/onos/net/link/LinkProvider.java b/core/api/src/main/java/org/onlab/onos/net/link/LinkProvider.java index a8ade1817d..7982089ce9 100644 --- a/core/api/src/main/java/org/onlab/onos/net/link/LinkProvider.java +++ b/core/api/src/main/java/org/onlab/onos/net/link/LinkProvider.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.link; import org.onlab.onos.net.provider.Provider; diff --git a/core/api/src/main/java/org/onlab/onos/net/link/LinkProviderRegistry.java b/core/api/src/main/java/org/onlab/onos/net/link/LinkProviderRegistry.java index 2aa54e7b37..069433cc78 100644 --- a/core/api/src/main/java/org/onlab/onos/net/link/LinkProviderRegistry.java +++ b/core/api/src/main/java/org/onlab/onos/net/link/LinkProviderRegistry.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.link; import org.onlab.onos.net.provider.ProviderRegistry; diff --git a/core/api/src/main/java/org/onlab/onos/net/link/LinkProviderService.java b/core/api/src/main/java/org/onlab/onos/net/link/LinkProviderService.java index 70196608ea..a512dd1d4e 100644 --- a/core/api/src/main/java/org/onlab/onos/net/link/LinkProviderService.java +++ b/core/api/src/main/java/org/onlab/onos/net/link/LinkProviderService.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.link; import org.onlab.onos.net.ConnectPoint; diff --git a/core/api/src/main/java/org/onlab/onos/net/link/LinkService.java b/core/api/src/main/java/org/onlab/onos/net/link/LinkService.java index db060a25e4..70775f0837 100644 --- a/core/api/src/main/java/org/onlab/onos/net/link/LinkService.java +++ b/core/api/src/main/java/org/onlab/onos/net/link/LinkService.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.link; import java.util.Set; diff --git a/core/api/src/main/java/org/onlab/onos/net/link/LinkStore.java b/core/api/src/main/java/org/onlab/onos/net/link/LinkStore.java index 0197417e07..95962e7638 100644 --- a/core/api/src/main/java/org/onlab/onos/net/link/LinkStore.java +++ b/core/api/src/main/java/org/onlab/onos/net/link/LinkStore.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.link; import org.onlab.onos.net.ConnectPoint; diff --git a/core/api/src/main/java/org/onlab/onos/net/link/LinkStoreDelegate.java b/core/api/src/main/java/org/onlab/onos/net/link/LinkStoreDelegate.java index ec747c46bc..6b3ca335d0 100644 --- a/core/api/src/main/java/org/onlab/onos/net/link/LinkStoreDelegate.java +++ b/core/api/src/main/java/org/onlab/onos/net/link/LinkStoreDelegate.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.link; import org.onlab.onos.store.StoreDelegate; diff --git a/core/api/src/main/java/org/onlab/onos/net/link/package-info.java b/core/api/src/main/java/org/onlab/onos/net/link/package-info.java index c44f1aa8c4..5465383b34 100644 --- a/core/api/src/main/java/org/onlab/onos/net/link/package-info.java +++ b/core/api/src/main/java/org/onlab/onos/net/link/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Infrastructure link model & related services API definitions. */ diff --git a/core/api/src/main/java/org/onlab/onos/net/package-info.java b/core/api/src/main/java/org/onlab/onos/net/package-info.java index cb8ec54628..28c6aa328e 100644 --- a/core/api/src/main/java/org/onlab/onos/net/package-info.java +++ b/core/api/src/main/java/org/onlab/onos/net/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Network model entities & service API definitions. */ diff --git a/core/api/src/main/java/org/onlab/onos/net/packet/DefaultInboundPacket.java b/core/api/src/main/java/org/onlab/onos/net/packet/DefaultInboundPacket.java index 1bf53d57b8..ddead1dafb 100644 --- a/core/api/src/main/java/org/onlab/onos/net/packet/DefaultInboundPacket.java +++ b/core/api/src/main/java/org/onlab/onos/net/packet/DefaultInboundPacket.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.packet; import org.onlab.onos.net.ConnectPoint; diff --git a/core/api/src/main/java/org/onlab/onos/net/packet/DefaultOutboundPacket.java b/core/api/src/main/java/org/onlab/onos/net/packet/DefaultOutboundPacket.java index 8f496029a1..01ecf96310 100644 --- a/core/api/src/main/java/org/onlab/onos/net/packet/DefaultOutboundPacket.java +++ b/core/api/src/main/java/org/onlab/onos/net/packet/DefaultOutboundPacket.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.packet; import java.nio.ByteBuffer; diff --git a/core/api/src/main/java/org/onlab/onos/net/packet/DefaultPacketContext.java b/core/api/src/main/java/org/onlab/onos/net/packet/DefaultPacketContext.java index 75100c6ae8..9a0eac3795 100644 --- a/core/api/src/main/java/org/onlab/onos/net/packet/DefaultPacketContext.java +++ b/core/api/src/main/java/org/onlab/onos/net/packet/DefaultPacketContext.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.packet; import java.util.concurrent.atomic.AtomicBoolean; diff --git a/core/api/src/main/java/org/onlab/onos/net/packet/InboundPacket.java b/core/api/src/main/java/org/onlab/onos/net/packet/InboundPacket.java index 2931c3e287..b0a2fdb3a5 100644 --- a/core/api/src/main/java/org/onlab/onos/net/packet/InboundPacket.java +++ b/core/api/src/main/java/org/onlab/onos/net/packet/InboundPacket.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.packet; import org.onlab.onos.net.ConnectPoint; diff --git a/core/api/src/main/java/org/onlab/onos/net/packet/OutboundPacket.java b/core/api/src/main/java/org/onlab/onos/net/packet/OutboundPacket.java index 05a507406b..00224c98b6 100644 --- a/core/api/src/main/java/org/onlab/onos/net/packet/OutboundPacket.java +++ b/core/api/src/main/java/org/onlab/onos/net/packet/OutboundPacket.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.packet; import org.onlab.onos.net.DeviceId; diff --git a/core/api/src/main/java/org/onlab/onos/net/packet/PacketContext.java b/core/api/src/main/java/org/onlab/onos/net/packet/PacketContext.java index 73fe10275d..3e1b3c7cf8 100644 --- a/core/api/src/main/java/org/onlab/onos/net/packet/PacketContext.java +++ b/core/api/src/main/java/org/onlab/onos/net/packet/PacketContext.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.packet; import org.onlab.onos.net.flow.TrafficTreatment; diff --git a/core/api/src/main/java/org/onlab/onos/net/packet/PacketProcessor.java b/core/api/src/main/java/org/onlab/onos/net/packet/PacketProcessor.java index aef556834b..9735c33e0a 100644 --- a/core/api/src/main/java/org/onlab/onos/net/packet/PacketProcessor.java +++ b/core/api/src/main/java/org/onlab/onos/net/packet/PacketProcessor.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.packet; diff --git a/core/api/src/main/java/org/onlab/onos/net/packet/PacketProvider.java b/core/api/src/main/java/org/onlab/onos/net/packet/PacketProvider.java index 4ffdd6fdb7..4c8aac94a2 100644 --- a/core/api/src/main/java/org/onlab/onos/net/packet/PacketProvider.java +++ b/core/api/src/main/java/org/onlab/onos/net/packet/PacketProvider.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.packet; import org.onlab.onos.net.provider.Provider; diff --git a/core/api/src/main/java/org/onlab/onos/net/packet/PacketProviderRegistry.java b/core/api/src/main/java/org/onlab/onos/net/packet/PacketProviderRegistry.java index 86df510e2e..9efc9d7187 100644 --- a/core/api/src/main/java/org/onlab/onos/net/packet/PacketProviderRegistry.java +++ b/core/api/src/main/java/org/onlab/onos/net/packet/PacketProviderRegistry.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.packet; import org.onlab.onos.net.provider.ProviderRegistry; diff --git a/core/api/src/main/java/org/onlab/onos/net/packet/PacketProviderService.java b/core/api/src/main/java/org/onlab/onos/net/packet/PacketProviderService.java index 6615386aa5..1fb2f14e55 100644 --- a/core/api/src/main/java/org/onlab/onos/net/packet/PacketProviderService.java +++ b/core/api/src/main/java/org/onlab/onos/net/packet/PacketProviderService.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.packet; import org.onlab.onos.net.provider.ProviderService; diff --git a/core/api/src/main/java/org/onlab/onos/net/packet/PacketService.java b/core/api/src/main/java/org/onlab/onos/net/packet/PacketService.java index d2db536138..721cb46dab 100644 --- a/core/api/src/main/java/org/onlab/onos/net/packet/PacketService.java +++ b/core/api/src/main/java/org/onlab/onos/net/packet/PacketService.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.packet; /** diff --git a/core/api/src/main/java/org/onlab/onos/net/packet/package-info.java b/core/api/src/main/java/org/onlab/onos/net/packet/package-info.java index 4643f6ec62..f2b760e0d8 100644 --- a/core/api/src/main/java/org/onlab/onos/net/packet/package-info.java +++ b/core/api/src/main/java/org/onlab/onos/net/packet/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Mechanism for processing inbound packets intercepted from the data plane and * for emitting outbound packets onto the data plane. diff --git a/core/api/src/main/java/org/onlab/onos/net/provider/AbstractProvider.java b/core/api/src/main/java/org/onlab/onos/net/provider/AbstractProvider.java index d1c992fc4e..acf9f3ee29 100644 --- a/core/api/src/main/java/org/onlab/onos/net/provider/AbstractProvider.java +++ b/core/api/src/main/java/org/onlab/onos/net/provider/AbstractProvider.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.provider; /** diff --git a/core/api/src/main/java/org/onlab/onos/net/provider/AbstractProviderRegistry.java b/core/api/src/main/java/org/onlab/onos/net/provider/AbstractProviderRegistry.java index 35aed74c86..c4a32343b6 100644 --- a/core/api/src/main/java/org/onlab/onos/net/provider/AbstractProviderRegistry.java +++ b/core/api/src/main/java/org/onlab/onos/net/provider/AbstractProviderRegistry.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.provider; import com.google.common.collect.ImmutableSet; diff --git a/core/api/src/main/java/org/onlab/onos/net/provider/AbstractProviderService.java b/core/api/src/main/java/org/onlab/onos/net/provider/AbstractProviderService.java index 5497842a2f..88932f4ad8 100644 --- a/core/api/src/main/java/org/onlab/onos/net/provider/AbstractProviderService.java +++ b/core/api/src/main/java/org/onlab/onos/net/provider/AbstractProviderService.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.provider; import static com.google.common.base.Preconditions.checkState; diff --git a/core/api/src/main/java/org/onlab/onos/net/provider/Provider.java b/core/api/src/main/java/org/onlab/onos/net/provider/Provider.java index 3771611571..8b6e187d19 100644 --- a/core/api/src/main/java/org/onlab/onos/net/provider/Provider.java +++ b/core/api/src/main/java/org/onlab/onos/net/provider/Provider.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.provider; /** diff --git a/core/api/src/main/java/org/onlab/onos/net/provider/ProviderId.java b/core/api/src/main/java/org/onlab/onos/net/provider/ProviderId.java index c2a3133d13..e35d044a4e 100644 --- a/core/api/src/main/java/org/onlab/onos/net/provider/ProviderId.java +++ b/core/api/src/main/java/org/onlab/onos/net/provider/ProviderId.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.provider; import java.util.Objects; @@ -23,7 +38,7 @@ public class ProviderId { /** * Represents no provider ID. */ - public static final ProviderId NONE = new ProviderId(); + public static final ProviderId NONE = new ProviderId("none", "none"); private final String scheme; private final String id; diff --git a/core/api/src/main/java/org/onlab/onos/net/provider/ProviderRegistry.java b/core/api/src/main/java/org/onlab/onos/net/provider/ProviderRegistry.java index 08975e213d..a2497f018b 100644 --- a/core/api/src/main/java/org/onlab/onos/net/provider/ProviderRegistry.java +++ b/core/api/src/main/java/org/onlab/onos/net/provider/ProviderRegistry.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.provider; import java.util.Set; diff --git a/core/api/src/main/java/org/onlab/onos/net/provider/ProviderService.java b/core/api/src/main/java/org/onlab/onos/net/provider/ProviderService.java index ae21a61eec..709f1c1f78 100644 --- a/core/api/src/main/java/org/onlab/onos/net/provider/ProviderService.java +++ b/core/api/src/main/java/org/onlab/onos/net/provider/ProviderService.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.provider; /** diff --git a/core/api/src/main/java/org/onlab/onos/net/provider/package-info.java b/core/api/src/main/java/org/onlab/onos/net/provider/package-info.java index 51deeaaa9b..4406cee23b 100644 --- a/core/api/src/main/java/org/onlab/onos/net/provider/package-info.java +++ b/core/api/src/main/java/org/onlab/onos/net/provider/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Base abstractions related to network entity providers and their brokers. */ diff --git a/core/api/src/main/java/org/onlab/onos/net/proxyarp/ProxyArpService.java b/core/api/src/main/java/org/onlab/onos/net/proxyarp/ProxyArpService.java index f49b5cf700..3a93b309d2 100644 --- a/core/api/src/main/java/org/onlab/onos/net/proxyarp/ProxyArpService.java +++ b/core/api/src/main/java/org/onlab/onos/net/proxyarp/ProxyArpService.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.proxyarp; import org.onlab.onos.net.ConnectPoint; diff --git a/core/api/src/main/java/org/onlab/onos/net/proxyarp/package-info.java b/core/api/src/main/java/org/onlab/onos/net/proxyarp/package-info.java index 30d44e71ef..95ad6f56d2 100644 --- a/core/api/src/main/java/org/onlab/onos/net/proxyarp/package-info.java +++ b/core/api/src/main/java/org/onlab/onos/net/proxyarp/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Base abstractions related to the proxy arp service. */ diff --git a/core/api/src/main/java/org/onlab/onos/net/resource/Bandwidth.java b/core/api/src/main/java/org/onlab/onos/net/resource/Bandwidth.java index 3c4eebef0d..9dddb86dbd 100644 --- a/core/api/src/main/java/org/onlab/onos/net/resource/Bandwidth.java +++ b/core/api/src/main/java/org/onlab/onos/net/resource/Bandwidth.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.resource; import java.util.Objects; diff --git a/core/api/src/main/java/org/onlab/onos/net/resource/BandwidthResourceAllocation.java b/core/api/src/main/java/org/onlab/onos/net/resource/BandwidthResourceAllocation.java index 5995d5f99c..e540db2142 100644 --- a/core/api/src/main/java/org/onlab/onos/net/resource/BandwidthResourceAllocation.java +++ b/core/api/src/main/java/org/onlab/onos/net/resource/BandwidthResourceAllocation.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.resource; /** diff --git a/core/api/src/main/java/org/onlab/onos/net/resource/BandwidthResourceRequest.java b/core/api/src/main/java/org/onlab/onos/net/resource/BandwidthResourceRequest.java index 5743d8e38b..cced791260 100644 --- a/core/api/src/main/java/org/onlab/onos/net/resource/BandwidthResourceRequest.java +++ b/core/api/src/main/java/org/onlab/onos/net/resource/BandwidthResourceRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.resource; /** diff --git a/core/api/src/main/java/org/onlab/onos/net/resource/DefaultLinkResourceRequest.java b/core/api/src/main/java/org/onlab/onos/net/resource/DefaultLinkResourceRequest.java index b33e203620..73b48df676 100644 --- a/core/api/src/main/java/org/onlab/onos/net/resource/DefaultLinkResourceRequest.java +++ b/core/api/src/main/java/org/onlab/onos/net/resource/DefaultLinkResourceRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.resource; import java.util.Collection; diff --git a/core/api/src/main/java/org/onlab/onos/net/resource/Lambda.java b/core/api/src/main/java/org/onlab/onos/net/resource/Lambda.java index 73c9488729..e09d915c7f 100644 --- a/core/api/src/main/java/org/onlab/onos/net/resource/Lambda.java +++ b/core/api/src/main/java/org/onlab/onos/net/resource/Lambda.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.resource; import java.util.Objects; diff --git a/core/api/src/main/java/org/onlab/onos/net/resource/LambdaResourceAllocation.java b/core/api/src/main/java/org/onlab/onos/net/resource/LambdaResourceAllocation.java index 909563325d..7499f6db85 100644 --- a/core/api/src/main/java/org/onlab/onos/net/resource/LambdaResourceAllocation.java +++ b/core/api/src/main/java/org/onlab/onos/net/resource/LambdaResourceAllocation.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.resource; /** diff --git a/core/api/src/main/java/org/onlab/onos/net/resource/LambdaResourceRequest.java b/core/api/src/main/java/org/onlab/onos/net/resource/LambdaResourceRequest.java index 05bf61c323..382758a6c3 100644 --- a/core/api/src/main/java/org/onlab/onos/net/resource/LambdaResourceRequest.java +++ b/core/api/src/main/java/org/onlab/onos/net/resource/LambdaResourceRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.resource; /** diff --git a/core/api/src/main/java/org/onlab/onos/net/resource/LinkResource.java b/core/api/src/main/java/org/onlab/onos/net/resource/LinkResource.java index 76055015b9..58935a4ece 100644 --- a/core/api/src/main/java/org/onlab/onos/net/resource/LinkResource.java +++ b/core/api/src/main/java/org/onlab/onos/net/resource/LinkResource.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.resource; /** diff --git a/core/api/src/main/java/org/onlab/onos/net/resource/LinkResourceAllocations.java b/core/api/src/main/java/org/onlab/onos/net/resource/LinkResourceAllocations.java index 412cecdc23..7bd8a024c7 100644 --- a/core/api/src/main/java/org/onlab/onos/net/resource/LinkResourceAllocations.java +++ b/core/api/src/main/java/org/onlab/onos/net/resource/LinkResourceAllocations.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.resource; import java.util.Set; diff --git a/core/api/src/main/java/org/onlab/onos/net/resource/LinkResourceRequest.java b/core/api/src/main/java/org/onlab/onos/net/resource/LinkResourceRequest.java index 3f32b06a2a..a51177865d 100644 --- a/core/api/src/main/java/org/onlab/onos/net/resource/LinkResourceRequest.java +++ b/core/api/src/main/java/org/onlab/onos/net/resource/LinkResourceRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.resource; import java.util.Collection; diff --git a/core/api/src/main/java/org/onlab/onos/net/resource/LinkResourceService.java b/core/api/src/main/java/org/onlab/onos/net/resource/LinkResourceService.java index 43cc61c2c2..08c49856df 100644 --- a/core/api/src/main/java/org/onlab/onos/net/resource/LinkResourceService.java +++ b/core/api/src/main/java/org/onlab/onos/net/resource/LinkResourceService.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.resource; import org.onlab.onos.net.Link; @@ -40,14 +55,6 @@ public interface LinkResourceService { */ Iterable getAllocations(); - /** - * Returns the resources allocated for an Intent. - * - * @param intentId the target Intent's id - * @return allocated resources for Intent - */ - LinkResourceAllocations getAllocations(IntentId intentId); - /** * Returns all allocated resources to given link. * @@ -57,12 +64,12 @@ public interface LinkResourceService { Iterable getAllocations(Link link); /** - * Returns all IDs of intents using the given link. + * Returns the resources allocated for an Intent. * - * @param link a target link - * @return IDs of intents using the link + * @param intentId the target Intent's id + * @return allocated resources for Intent */ - Iterable getIntents(Link link); + LinkResourceAllocations getAllocations(IntentId intentId); /** * Returns available resources for given link. @@ -70,7 +77,7 @@ public interface LinkResourceService { * @param link a target link * @return available resources for the target link */ - ResourceRequest getAvailableResources(Link link); + Iterable getAvailableResources(Link link); /** * Returns available resources for given link. diff --git a/core/api/src/main/java/org/onlab/onos/net/resource/LinkResources.java b/core/api/src/main/java/org/onlab/onos/net/resource/LinkResources.java index 6eadb569b1..e305cea39f 100644 --- a/core/api/src/main/java/org/onlab/onos/net/resource/LinkResources.java +++ b/core/api/src/main/java/org/onlab/onos/net/resource/LinkResources.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.resource; import java.util.Set; diff --git a/core/api/src/main/java/org/onlab/onos/net/resource/ResourceAllocation.java b/core/api/src/main/java/org/onlab/onos/net/resource/ResourceAllocation.java index 5cc1414fe0..ea3ce992c8 100644 --- a/core/api/src/main/java/org/onlab/onos/net/resource/ResourceAllocation.java +++ b/core/api/src/main/java/org/onlab/onos/net/resource/ResourceAllocation.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.resource; /** diff --git a/core/api/src/main/java/org/onlab/onos/net/resource/ResourceId.java b/core/api/src/main/java/org/onlab/onos/net/resource/ResourceId.java index 5c4c9fc2cd..28a502e03e 100644 --- a/core/api/src/main/java/org/onlab/onos/net/resource/ResourceId.java +++ b/core/api/src/main/java/org/onlab/onos/net/resource/ResourceId.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.resource; /** diff --git a/core/api/src/main/java/org/onlab/onos/net/resource/ResourceRequest.java b/core/api/src/main/java/org/onlab/onos/net/resource/ResourceRequest.java index 06e3666cc2..75b983dc40 100644 --- a/core/api/src/main/java/org/onlab/onos/net/resource/ResourceRequest.java +++ b/core/api/src/main/java/org/onlab/onos/net/resource/ResourceRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.resource; /** diff --git a/core/api/src/main/java/org/onlab/onos/net/resource/ResourceType.java b/core/api/src/main/java/org/onlab/onos/net/resource/ResourceType.java index 06a8174907..7202e4d3e2 100644 --- a/core/api/src/main/java/org/onlab/onos/net/resource/ResourceType.java +++ b/core/api/src/main/java/org/onlab/onos/net/resource/ResourceType.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.resource; public enum ResourceType { diff --git a/core/api/src/main/java/org/onlab/onos/net/resource/package-info.java b/core/api/src/main/java/org/onlab/onos/net/resource/package-info.java index 6b402a7d6c..98ffbc6501 100644 --- a/core/api/src/main/java/org/onlab/onos/net/resource/package-info.java +++ b/core/api/src/main/java/org/onlab/onos/net/resource/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Services for reserving network resources, e.g. bandwidth, lambdas. */ diff --git a/core/api/src/main/java/org/onlab/onos/net/statistic/DefaultLoad.java b/core/api/src/main/java/org/onlab/onos/net/statistic/DefaultLoad.java index f0f890a02a..b2771ac0d1 100644 --- a/core/api/src/main/java/org/onlab/onos/net/statistic/DefaultLoad.java +++ b/core/api/src/main/java/org/onlab/onos/net/statistic/DefaultLoad.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.statistic; import com.google.common.base.MoreObjects; diff --git a/core/api/src/main/java/org/onlab/onos/net/statistic/Load.java b/core/api/src/main/java/org/onlab/onos/net/statistic/Load.java index b609f2b4a2..41b4cf98d8 100644 --- a/core/api/src/main/java/org/onlab/onos/net/statistic/Load.java +++ b/core/api/src/main/java/org/onlab/onos/net/statistic/Load.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.statistic; /** diff --git a/core/api/src/main/java/org/onlab/onos/net/statistic/StatisticService.java b/core/api/src/main/java/org/onlab/onos/net/statistic/StatisticService.java index 2ad2b065a3..3c9f3e57f0 100644 --- a/core/api/src/main/java/org/onlab/onos/net/statistic/StatisticService.java +++ b/core/api/src/main/java/org/onlab/onos/net/statistic/StatisticService.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.statistic; import org.onlab.onos.net.ConnectPoint; diff --git a/core/api/src/main/java/org/onlab/onos/net/statistic/StatisticStore.java b/core/api/src/main/java/org/onlab/onos/net/statistic/StatisticStore.java index d0d625ccfe..29eced761f 100644 --- a/core/api/src/main/java/org/onlab/onos/net/statistic/StatisticStore.java +++ b/core/api/src/main/java/org/onlab/onos/net/statistic/StatisticStore.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.statistic; import org.onlab.onos.net.ConnectPoint; diff --git a/core/api/src/main/java/org/onlab/onos/net/statistic/package-info.java b/core/api/src/main/java/org/onlab/onos/net/statistic/package-info.java index 445a0f32f0..26b6ad9729 100644 --- a/core/api/src/main/java/org/onlab/onos/net/statistic/package-info.java +++ b/core/api/src/main/java/org/onlab/onos/net/statistic/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Service for looking up statistics on links. */ diff --git a/core/api/src/main/java/org/onlab/onos/net/topology/ClusterId.java b/core/api/src/main/java/org/onlab/onos/net/topology/ClusterId.java index 9f0e20b461..0a520627f0 100644 --- a/core/api/src/main/java/org/onlab/onos/net/topology/ClusterId.java +++ b/core/api/src/main/java/org/onlab/onos/net/topology/ClusterId.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.topology; import java.util.Objects; diff --git a/core/api/src/main/java/org/onlab/onos/net/topology/DefaultGraphDescription.java b/core/api/src/main/java/org/onlab/onos/net/topology/DefaultGraphDescription.java index b723f11555..ca64d1d47d 100644 --- a/core/api/src/main/java/org/onlab/onos/net/topology/DefaultGraphDescription.java +++ b/core/api/src/main/java/org/onlab/onos/net/topology/DefaultGraphDescription.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.topology; import com.google.common.collect.ImmutableSet; diff --git a/core/api/src/main/java/org/onlab/onos/net/topology/DefaultTopologyCluster.java b/core/api/src/main/java/org/onlab/onos/net/topology/DefaultTopologyCluster.java index b6cc9bd0e6..190a39281b 100644 --- a/core/api/src/main/java/org/onlab/onos/net/topology/DefaultTopologyCluster.java +++ b/core/api/src/main/java/org/onlab/onos/net/topology/DefaultTopologyCluster.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.topology; import org.onlab.onos.net.DeviceId; diff --git a/core/api/src/main/java/org/onlab/onos/net/topology/DefaultTopologyEdge.java b/core/api/src/main/java/org/onlab/onos/net/topology/DefaultTopologyEdge.java index c399f3ce51..f6de3fe91a 100644 --- a/core/api/src/main/java/org/onlab/onos/net/topology/DefaultTopologyEdge.java +++ b/core/api/src/main/java/org/onlab/onos/net/topology/DefaultTopologyEdge.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.topology; import org.onlab.onos.net.Link; diff --git a/core/api/src/main/java/org/onlab/onos/net/topology/DefaultTopologyVertex.java b/core/api/src/main/java/org/onlab/onos/net/topology/DefaultTopologyVertex.java index 4337f581a0..c261fb0e05 100644 --- a/core/api/src/main/java/org/onlab/onos/net/topology/DefaultTopologyVertex.java +++ b/core/api/src/main/java/org/onlab/onos/net/topology/DefaultTopologyVertex.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.topology; import org.onlab.onos.net.DeviceId; diff --git a/core/api/src/main/java/org/onlab/onos/net/topology/GraphDescription.java b/core/api/src/main/java/org/onlab/onos/net/topology/GraphDescription.java index 2b846a08da..fcbe9756c1 100644 --- a/core/api/src/main/java/org/onlab/onos/net/topology/GraphDescription.java +++ b/core/api/src/main/java/org/onlab/onos/net/topology/GraphDescription.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.topology; import com.google.common.collect.ImmutableSet; diff --git a/core/api/src/main/java/org/onlab/onos/net/topology/LinkWeight.java b/core/api/src/main/java/org/onlab/onos/net/topology/LinkWeight.java index 5e18dfbfb4..5f3becdd51 100644 --- a/core/api/src/main/java/org/onlab/onos/net/topology/LinkWeight.java +++ b/core/api/src/main/java/org/onlab/onos/net/topology/LinkWeight.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.topology; import org.onlab.graph.EdgeWeight; diff --git a/core/api/src/main/java/org/onlab/onos/net/topology/PathService.java b/core/api/src/main/java/org/onlab/onos/net/topology/PathService.java index f1b4542174..c4623b6f3d 100644 --- a/core/api/src/main/java/org/onlab/onos/net/topology/PathService.java +++ b/core/api/src/main/java/org/onlab/onos/net/topology/PathService.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.topology; import org.onlab.onos.net.ElementId; diff --git a/core/api/src/main/java/org/onlab/onos/net/topology/Topology.java b/core/api/src/main/java/org/onlab/onos/net/topology/Topology.java index ea3c68daa1..70e392fb18 100644 --- a/core/api/src/main/java/org/onlab/onos/net/topology/Topology.java +++ b/core/api/src/main/java/org/onlab/onos/net/topology/Topology.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.topology; import org.onlab.onos.net.Provided; diff --git a/core/api/src/main/java/org/onlab/onos/net/topology/TopologyCluster.java b/core/api/src/main/java/org/onlab/onos/net/topology/TopologyCluster.java index 46c98722d8..05668b444a 100644 --- a/core/api/src/main/java/org/onlab/onos/net/topology/TopologyCluster.java +++ b/core/api/src/main/java/org/onlab/onos/net/topology/TopologyCluster.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.topology; import org.onlab.onos.net.DeviceId; diff --git a/core/api/src/main/java/org/onlab/onos/net/topology/TopologyEdge.java b/core/api/src/main/java/org/onlab/onos/net/topology/TopologyEdge.java index d9cd6f4c43..15ad81ba5f 100644 --- a/core/api/src/main/java/org/onlab/onos/net/topology/TopologyEdge.java +++ b/core/api/src/main/java/org/onlab/onos/net/topology/TopologyEdge.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.topology; import org.onlab.graph.Edge; diff --git a/core/api/src/main/java/org/onlab/onos/net/topology/TopologyEvent.java b/core/api/src/main/java/org/onlab/onos/net/topology/TopologyEvent.java index 268b6ac848..38b9c13195 100644 --- a/core/api/src/main/java/org/onlab/onos/net/topology/TopologyEvent.java +++ b/core/api/src/main/java/org/onlab/onos/net/topology/TopologyEvent.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.topology; import org.onlab.onos.event.AbstractEvent; diff --git a/core/api/src/main/java/org/onlab/onos/net/topology/TopologyGraph.java b/core/api/src/main/java/org/onlab/onos/net/topology/TopologyGraph.java index 70139cd0a5..c47bcc2445 100644 --- a/core/api/src/main/java/org/onlab/onos/net/topology/TopologyGraph.java +++ b/core/api/src/main/java/org/onlab/onos/net/topology/TopologyGraph.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.topology; import org.onlab.graph.Graph; diff --git a/core/api/src/main/java/org/onlab/onos/net/topology/TopologyListener.java b/core/api/src/main/java/org/onlab/onos/net/topology/TopologyListener.java index bcc2cf3f2c..39e7626d78 100644 --- a/core/api/src/main/java/org/onlab/onos/net/topology/TopologyListener.java +++ b/core/api/src/main/java/org/onlab/onos/net/topology/TopologyListener.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.topology; import org.onlab.onos.event.EventListener; diff --git a/core/api/src/main/java/org/onlab/onos/net/topology/TopologyProvider.java b/core/api/src/main/java/org/onlab/onos/net/topology/TopologyProvider.java index 312e15488a..c96ce58cb2 100644 --- a/core/api/src/main/java/org/onlab/onos/net/topology/TopologyProvider.java +++ b/core/api/src/main/java/org/onlab/onos/net/topology/TopologyProvider.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.topology; import org.onlab.onos.net.provider.Provider; diff --git a/core/api/src/main/java/org/onlab/onos/net/topology/TopologyProviderRegistry.java b/core/api/src/main/java/org/onlab/onos/net/topology/TopologyProviderRegistry.java index 40bfa66bf3..7c59bce328 100644 --- a/core/api/src/main/java/org/onlab/onos/net/topology/TopologyProviderRegistry.java +++ b/core/api/src/main/java/org/onlab/onos/net/topology/TopologyProviderRegistry.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.topology; import org.onlab.onos.net.provider.ProviderRegistry; diff --git a/core/api/src/main/java/org/onlab/onos/net/topology/TopologyProviderService.java b/core/api/src/main/java/org/onlab/onos/net/topology/TopologyProviderService.java index c81a871074..985a0cb54b 100644 --- a/core/api/src/main/java/org/onlab/onos/net/topology/TopologyProviderService.java +++ b/core/api/src/main/java/org/onlab/onos/net/topology/TopologyProviderService.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.topology; import org.onlab.onos.event.Event; diff --git a/core/api/src/main/java/org/onlab/onos/net/topology/TopologyService.java b/core/api/src/main/java/org/onlab/onos/net/topology/TopologyService.java index 8eb683d1b6..31a718b438 100644 --- a/core/api/src/main/java/org/onlab/onos/net/topology/TopologyService.java +++ b/core/api/src/main/java/org/onlab/onos/net/topology/TopologyService.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.topology; import org.onlab.onos.net.ConnectPoint; diff --git a/core/api/src/main/java/org/onlab/onos/net/topology/TopologyStore.java b/core/api/src/main/java/org/onlab/onos/net/topology/TopologyStore.java index 1945f4c277..bdce044cda 100644 --- a/core/api/src/main/java/org/onlab/onos/net/topology/TopologyStore.java +++ b/core/api/src/main/java/org/onlab/onos/net/topology/TopologyStore.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.topology; import org.onlab.onos.event.Event; diff --git a/core/api/src/main/java/org/onlab/onos/net/topology/TopologyStoreDelegate.java b/core/api/src/main/java/org/onlab/onos/net/topology/TopologyStoreDelegate.java index 2a19a0cdac..25bbdca3f4 100644 --- a/core/api/src/main/java/org/onlab/onos/net/topology/TopologyStoreDelegate.java +++ b/core/api/src/main/java/org/onlab/onos/net/topology/TopologyStoreDelegate.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.topology; import org.onlab.onos.store.StoreDelegate; diff --git a/core/api/src/main/java/org/onlab/onos/net/topology/TopologyVertex.java b/core/api/src/main/java/org/onlab/onos/net/topology/TopologyVertex.java index 96a918f6fb..f8589538d8 100644 --- a/core/api/src/main/java/org/onlab/onos/net/topology/TopologyVertex.java +++ b/core/api/src/main/java/org/onlab/onos/net/topology/TopologyVertex.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.topology; import org.onlab.graph.Vertex; diff --git a/core/api/src/main/java/org/onlab/onos/net/topology/package-info.java b/core/api/src/main/java/org/onlab/onos/net/topology/package-info.java index e2ef485dee..02d3db39e7 100644 --- a/core/api/src/main/java/org/onlab/onos/net/topology/package-info.java +++ b/core/api/src/main/java/org/onlab/onos/net/topology/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Network topology model & related services API definitions. */ diff --git a/core/api/src/main/java/org/onlab/onos/store/AbstractStore.java b/core/api/src/main/java/org/onlab/onos/store/AbstractStore.java index e7668d0340..7d95fbe90b 100644 --- a/core/api/src/main/java/org/onlab/onos/store/AbstractStore.java +++ b/core/api/src/main/java/org/onlab/onos/store/AbstractStore.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store; import java.util.List; diff --git a/core/api/src/main/java/org/onlab/onos/store/Store.java b/core/api/src/main/java/org/onlab/onos/store/Store.java index 28bc08e068..6118ea5929 100644 --- a/core/api/src/main/java/org/onlab/onos/store/Store.java +++ b/core/api/src/main/java/org/onlab/onos/store/Store.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store; import org.onlab.onos.event.Event; diff --git a/core/api/src/main/java/org/onlab/onos/store/StoreDelegate.java b/core/api/src/main/java/org/onlab/onos/store/StoreDelegate.java index c7b0465356..0bcd8147a2 100644 --- a/core/api/src/main/java/org/onlab/onos/store/StoreDelegate.java +++ b/core/api/src/main/java/org/onlab/onos/store/StoreDelegate.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store; import org.onlab.onos.event.Event; diff --git a/core/api/src/main/java/org/onlab/onos/store/Timestamp.java b/core/api/src/main/java/org/onlab/onos/store/Timestamp.java index b3caf85d77..ab3e3cb5da 100644 --- a/core/api/src/main/java/org/onlab/onos/store/Timestamp.java +++ b/core/api/src/main/java/org/onlab/onos/store/Timestamp.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store; /** diff --git a/core/api/src/main/java/org/onlab/onos/store/cluster/messaging/ClusterCommunicationService.java b/core/api/src/main/java/org/onlab/onos/store/cluster/messaging/ClusterCommunicationService.java index 2cff64ac49..cd2daff843 100644 --- a/core/api/src/main/java/org/onlab/onos/store/cluster/messaging/ClusterCommunicationService.java +++ b/core/api/src/main/java/org/onlab/onos/store/cluster/messaging/ClusterCommunicationService.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.cluster.messaging; import java.io.IOException; diff --git a/core/api/src/main/java/org/onlab/onos/store/cluster/messaging/ClusterMessage.java b/core/api/src/main/java/org/onlab/onos/store/cluster/messaging/ClusterMessage.java index dd29f24fae..5c8550f5f9 100644 --- a/core/api/src/main/java/org/onlab/onos/store/cluster/messaging/ClusterMessage.java +++ b/core/api/src/main/java/org/onlab/onos/store/cluster/messaging/ClusterMessage.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.cluster.messaging; import java.io.IOException; diff --git a/core/api/src/main/java/org/onlab/onos/store/cluster/messaging/ClusterMessageHandler.java b/core/api/src/main/java/org/onlab/onos/store/cluster/messaging/ClusterMessageHandler.java index 4dd7bc299b..7bc0cb1906 100644 --- a/core/api/src/main/java/org/onlab/onos/store/cluster/messaging/ClusterMessageHandler.java +++ b/core/api/src/main/java/org/onlab/onos/store/cluster/messaging/ClusterMessageHandler.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.cluster.messaging; /** diff --git a/core/api/src/main/java/org/onlab/onos/store/cluster/messaging/MessageSubject.java b/core/api/src/main/java/org/onlab/onos/store/cluster/messaging/MessageSubject.java index 43df15fa1c..77afd22bd0 100644 --- a/core/api/src/main/java/org/onlab/onos/store/cluster/messaging/MessageSubject.java +++ b/core/api/src/main/java/org/onlab/onos/store/cluster/messaging/MessageSubject.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.cluster.messaging; import static com.google.common.base.Preconditions.checkNotNull; diff --git a/core/api/src/main/java/org/onlab/onos/store/cluster/messaging/package-info.java b/core/api/src/main/java/org/onlab/onos/store/cluster/messaging/package-info.java index 326dbe8c2b..59e8cd02c8 100644 --- a/core/api/src/main/java/org/onlab/onos/store/cluster/messaging/package-info.java +++ b/core/api/src/main/java/org/onlab/onos/store/cluster/messaging/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Cluster messaging APIs for the use by the various distributed stores. */ diff --git a/core/api/src/main/java/org/onlab/onos/store/package-info.java b/core/api/src/main/java/org/onlab/onos/store/package-info.java index b8203ce69b..9d96863a1a 100644 --- a/core/api/src/main/java/org/onlab/onos/store/package-info.java +++ b/core/api/src/main/java/org/onlab/onos/store/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Abstractions for creating and interacting with distributed stores. */ diff --git a/core/api/src/test/java/org/onlab/onos/TestApplicationId.java b/core/api/src/test/java/org/onlab/onos/TestApplicationId.java index cb1621937a..0de5788e55 100644 --- a/core/api/src/test/java/org/onlab/onos/TestApplicationId.java +++ b/core/api/src/test/java/org/onlab/onos/TestApplicationId.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos; import org.onlab.onos.core.ApplicationId; diff --git a/core/api/src/test/java/org/onlab/onos/VersionTest.java b/core/api/src/test/java/org/onlab/onos/VersionTest.java index 14b69d7356..1711ea82b8 100644 --- a/core/api/src/test/java/org/onlab/onos/VersionTest.java +++ b/core/api/src/test/java/org/onlab/onos/VersionTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos; import com.google.common.testing.EqualsTester; diff --git a/core/api/src/test/java/org/onlab/onos/cluster/ClusterServiceAdapter.java b/core/api/src/test/java/org/onlab/onos/cluster/ClusterServiceAdapter.java index 5e1e3b6e2a..2433dc6054 100644 --- a/core/api/src/test/java/org/onlab/onos/cluster/ClusterServiceAdapter.java +++ b/core/api/src/test/java/org/onlab/onos/cluster/ClusterServiceAdapter.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.cluster; import java.util.Set; diff --git a/core/api/src/test/java/org/onlab/onos/cluster/ControllerNodeToNodeIdTest.java b/core/api/src/test/java/org/onlab/onos/cluster/ControllerNodeToNodeIdTest.java index b95dcfc04c..76043219a3 100644 --- a/core/api/src/test/java/org/onlab/onos/cluster/ControllerNodeToNodeIdTest.java +++ b/core/api/src/test/java/org/onlab/onos/cluster/ControllerNodeToNodeIdTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.cluster; import static com.google.common.base.Predicates.notNull; @@ -8,7 +23,7 @@ import java.util.Arrays; import java.util.List; import org.junit.Test; -import org.onlab.packet.IpPrefix; +import org.onlab.packet.IpAddress; import com.google.common.collect.FluentIterable; @@ -19,9 +34,9 @@ public class ControllerNodeToNodeIdTest { private static final NodeId NID2 = new NodeId("bar"); private static final NodeId NID3 = new NodeId("buz"); - private static final IpPrefix IP1 = IpPrefix.valueOf("127.0.0.1"); - private static final IpPrefix IP2 = IpPrefix.valueOf("127.0.0.2"); - private static final IpPrefix IP3 = IpPrefix.valueOf("127.0.0.3"); + private static final IpAddress IP1 = IpAddress.valueOf("127.0.0.1"); + private static final IpAddress IP2 = IpAddress.valueOf("127.0.0.2"); + private static final IpAddress IP3 = IpAddress.valueOf("127.0.0.3"); private static final ControllerNode CN1 = new DefaultControllerNode(NID1, IP1); private static final ControllerNode CN2 = new DefaultControllerNode(NID2, IP2); diff --git a/core/api/src/test/java/org/onlab/onos/cluster/RoleInfoTest.java b/core/api/src/test/java/org/onlab/onos/cluster/RoleInfoTest.java index 46ab02eb8a..c692b87ad6 100644 --- a/core/api/src/test/java/org/onlab/onos/cluster/RoleInfoTest.java +++ b/core/api/src/test/java/org/onlab/onos/cluster/RoleInfoTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.cluster; import java.util.List; diff --git a/core/api/src/test/java/org/onlab/onos/codec/JsonCodecTest.java b/core/api/src/test/java/org/onlab/onos/codec/JsonCodecTest.java index f3a10e3288..f482a48333 100644 --- a/core/api/src/test/java/org/onlab/onos/codec/JsonCodecTest.java +++ b/core/api/src/test/java/org/onlab/onos/codec/JsonCodecTest.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.codec; diff --git a/core/api/src/test/java/org/onlab/onos/event/AbstractEventAccumulatorTest.java b/core/api/src/test/java/org/onlab/onos/event/AbstractEventAccumulatorTest.java index 1f57266495..55ed7bff48 100644 --- a/core/api/src/test/java/org/onlab/onos/event/AbstractEventAccumulatorTest.java +++ b/core/api/src/test/java/org/onlab/onos/event/AbstractEventAccumulatorTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.event; import static org.junit.Assert.assertEquals; diff --git a/core/api/src/test/java/org/onlab/onos/event/AbstractEventTest.java b/core/api/src/test/java/org/onlab/onos/event/AbstractEventTest.java index b79b836d60..6b1268fdaf 100644 --- a/core/api/src/test/java/org/onlab/onos/event/AbstractEventTest.java +++ b/core/api/src/test/java/org/onlab/onos/event/AbstractEventTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.event; import org.junit.Test; diff --git a/core/api/src/test/java/org/onlab/onos/event/AbstractListenerRegistryTest.java b/core/api/src/test/java/org/onlab/onos/event/AbstractListenerRegistryTest.java index e41eb278a6..13fe5d8663 100644 --- a/core/api/src/test/java/org/onlab/onos/event/AbstractListenerRegistryTest.java +++ b/core/api/src/test/java/org/onlab/onos/event/AbstractListenerRegistryTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.event; import org.junit.Test; diff --git a/core/api/src/test/java/org/onlab/onos/event/BrokenListener.java b/core/api/src/test/java/org/onlab/onos/event/BrokenListener.java index dc83419370..29921a7f76 100644 --- a/core/api/src/test/java/org/onlab/onos/event/BrokenListener.java +++ b/core/api/src/test/java/org/onlab/onos/event/BrokenListener.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.event; /** diff --git a/core/api/src/test/java/org/onlab/onos/event/DefaultEventSinkRegistryTest.java b/core/api/src/test/java/org/onlab/onos/event/DefaultEventSinkRegistryTest.java index ff10b50517..0bb1e8ccdc 100644 --- a/core/api/src/test/java/org/onlab/onos/event/DefaultEventSinkRegistryTest.java +++ b/core/api/src/test/java/org/onlab/onos/event/DefaultEventSinkRegistryTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.event; import org.junit.Before; diff --git a/core/api/src/test/java/org/onlab/onos/event/TestEvent.java b/core/api/src/test/java/org/onlab/onos/event/TestEvent.java index 25c8f46980..9d41971f3a 100644 --- a/core/api/src/test/java/org/onlab/onos/event/TestEvent.java +++ b/core/api/src/test/java/org/onlab/onos/event/TestEvent.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.event; /** diff --git a/core/api/src/test/java/org/onlab/onos/event/TestListener.java b/core/api/src/test/java/org/onlab/onos/event/TestListener.java index ec2185a1bb..275f0197e4 100644 --- a/core/api/src/test/java/org/onlab/onos/event/TestListener.java +++ b/core/api/src/test/java/org/onlab/onos/event/TestListener.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.event; import java.util.ArrayList; diff --git a/core/api/src/test/java/org/onlab/onos/event/TestListenerRegistry.java b/core/api/src/test/java/org/onlab/onos/event/TestListenerRegistry.java index e676030ab1..235783a351 100644 --- a/core/api/src/test/java/org/onlab/onos/event/TestListenerRegistry.java +++ b/core/api/src/test/java/org/onlab/onos/event/TestListenerRegistry.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.event; import java.util.ArrayList; diff --git a/core/api/src/test/java/org/onlab/onos/mastership/MastershipServiceAdapter.java b/core/api/src/test/java/org/onlab/onos/mastership/MastershipServiceAdapter.java index 8169dfb1cb..97dd7a9cd9 100644 --- a/core/api/src/test/java/org/onlab/onos/mastership/MastershipServiceAdapter.java +++ b/core/api/src/test/java/org/onlab/onos/mastership/MastershipServiceAdapter.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.mastership; import org.onlab.onos.cluster.NodeId; diff --git a/core/api/src/test/java/org/onlab/onos/mastership/MastershipTermTest.java b/core/api/src/test/java/org/onlab/onos/mastership/MastershipTermTest.java index 9b2a4e6f06..be2f84a13d 100644 --- a/core/api/src/test/java/org/onlab/onos/mastership/MastershipTermTest.java +++ b/core/api/src/test/java/org/onlab/onos/mastership/MastershipTermTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.mastership; import static org.junit.Assert.assertEquals; diff --git a/core/api/src/test/java/org/onlab/onos/net/ConnectPointTest.java b/core/api/src/test/java/org/onlab/onos/net/ConnectPointTest.java index 6b9f777bd4..972311ed77 100644 --- a/core/api/src/test/java/org/onlab/onos/net/ConnectPointTest.java +++ b/core/api/src/test/java/org/onlab/onos/net/ConnectPointTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net; import com.google.common.testing.EqualsTester; diff --git a/core/api/src/test/java/org/onlab/onos/net/DefaultAnnotationsTest.java b/core/api/src/test/java/org/onlab/onos/net/DefaultAnnotationsTest.java index 9132126580..fcca8df642 100644 --- a/core/api/src/test/java/org/onlab/onos/net/DefaultAnnotationsTest.java +++ b/core/api/src/test/java/org/onlab/onos/net/DefaultAnnotationsTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net; import org.junit.Test; diff --git a/core/api/src/test/java/org/onlab/onos/net/DefaultDeviceTest.java b/core/api/src/test/java/org/onlab/onos/net/DefaultDeviceTest.java index 63f1daad75..6d8b275591 100644 --- a/core/api/src/test/java/org/onlab/onos/net/DefaultDeviceTest.java +++ b/core/api/src/test/java/org/onlab/onos/net/DefaultDeviceTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net; import com.google.common.testing.EqualsTester; diff --git a/core/api/src/test/java/org/onlab/onos/net/DefaultEdgeLinkTest.java b/core/api/src/test/java/org/onlab/onos/net/DefaultEdgeLinkTest.java index 9fb95704d7..355f49e1bd 100644 --- a/core/api/src/test/java/org/onlab/onos/net/DefaultEdgeLinkTest.java +++ b/core/api/src/test/java/org/onlab/onos/net/DefaultEdgeLinkTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net; import com.google.common.testing.EqualsTester; diff --git a/core/api/src/test/java/org/onlab/onos/net/DefaultHostTest.java b/core/api/src/test/java/org/onlab/onos/net/DefaultHostTest.java index 4f2323121e..b07939286e 100644 --- a/core/api/src/test/java/org/onlab/onos/net/DefaultHostTest.java +++ b/core/api/src/test/java/org/onlab/onos/net/DefaultHostTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net; import static org.junit.Assert.assertEquals; diff --git a/core/api/src/test/java/org/onlab/onos/net/DefaultLinkTest.java b/core/api/src/test/java/org/onlab/onos/net/DefaultLinkTest.java index a62c822d67..52b5a7e2ee 100644 --- a/core/api/src/test/java/org/onlab/onos/net/DefaultLinkTest.java +++ b/core/api/src/test/java/org/onlab/onos/net/DefaultLinkTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net; import com.google.common.testing.EqualsTester; diff --git a/core/api/src/test/java/org/onlab/onos/net/DefaultPortTest.java b/core/api/src/test/java/org/onlab/onos/net/DefaultPortTest.java index b9720ea42c..3d3d3d35e7 100644 --- a/core/api/src/test/java/org/onlab/onos/net/DefaultPortTest.java +++ b/core/api/src/test/java/org/onlab/onos/net/DefaultPortTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net; import com.google.common.testing.EqualsTester; diff --git a/core/api/src/test/java/org/onlab/onos/net/DeviceIdTest.java b/core/api/src/test/java/org/onlab/onos/net/DeviceIdTest.java index 295955e3cc..53f8d1e1d2 100644 --- a/core/api/src/test/java/org/onlab/onos/net/DeviceIdTest.java +++ b/core/api/src/test/java/org/onlab/onos/net/DeviceIdTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net; import com.google.common.testing.EqualsTester; diff --git a/core/api/src/test/java/org/onlab/onos/net/HostIdTest.java b/core/api/src/test/java/org/onlab/onos/net/HostIdTest.java index 40efeb1c41..cb711b5945 100644 --- a/core/api/src/test/java/org/onlab/onos/net/HostIdTest.java +++ b/core/api/src/test/java/org/onlab/onos/net/HostIdTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net; import com.google.common.testing.EqualsTester; diff --git a/core/api/src/test/java/org/onlab/onos/net/NetTestTools.java b/core/api/src/test/java/org/onlab/onos/net/NetTestTools.java index 1d2e1af4ec..9bc0450202 100644 --- a/core/api/src/test/java/org/onlab/onos/net/NetTestTools.java +++ b/core/api/src/test/java/org/onlab/onos/net/NetTestTools.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net; import org.onlab.onos.net.provider.ProviderId; diff --git a/core/api/src/test/java/org/onlab/onos/net/PortNumberTest.java b/core/api/src/test/java/org/onlab/onos/net/PortNumberTest.java index d942a986b9..a537dc8732 100644 --- a/core/api/src/test/java/org/onlab/onos/net/PortNumberTest.java +++ b/core/api/src/test/java/org/onlab/onos/net/PortNumberTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net; import static org.junit.Assert.assertEquals; diff --git a/core/api/src/test/java/org/onlab/onos/net/TestDeviceParams.java b/core/api/src/test/java/org/onlab/onos/net/TestDeviceParams.java index 7471a2d7e2..1856220e9b 100644 --- a/core/api/src/test/java/org/onlab/onos/net/TestDeviceParams.java +++ b/core/api/src/test/java/org/onlab/onos/net/TestDeviceParams.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net; import static org.onlab.onos.net.DeviceId.deviceId; diff --git a/core/api/src/test/java/org/onlab/onos/net/device/DefaultDeviceDescriptionTest.java b/core/api/src/test/java/org/onlab/onos/net/device/DefaultDeviceDescriptionTest.java index 243d148e15..da64523452 100644 --- a/core/api/src/test/java/org/onlab/onos/net/device/DefaultDeviceDescriptionTest.java +++ b/core/api/src/test/java/org/onlab/onos/net/device/DefaultDeviceDescriptionTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.device; import org.junit.Test; diff --git a/core/api/src/test/java/org/onlab/onos/net/device/DeviceEventTest.java b/core/api/src/test/java/org/onlab/onos/net/device/DeviceEventTest.java index 312b9c2e62..39947636ac 100644 --- a/core/api/src/test/java/org/onlab/onos/net/device/DeviceEventTest.java +++ b/core/api/src/test/java/org/onlab/onos/net/device/DeviceEventTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.device; import static org.junit.Assert.assertEquals; diff --git a/core/api/src/test/java/org/onlab/onos/net/device/DeviceServiceAdapter.java b/core/api/src/test/java/org/onlab/onos/net/device/DeviceServiceAdapter.java index bfb28f69b3..6b4ed3b182 100644 --- a/core/api/src/test/java/org/onlab/onos/net/device/DeviceServiceAdapter.java +++ b/core/api/src/test/java/org/onlab/onos/net/device/DeviceServiceAdapter.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.device; import org.onlab.onos.net.Device; diff --git a/core/api/src/test/java/org/onlab/onos/net/host/DefaultHostDecriptionTest.java b/core/api/src/test/java/org/onlab/onos/net/host/DefaultHostDecriptionTest.java index ec58b16a38..3d57d22feb 100644 --- a/core/api/src/test/java/org/onlab/onos/net/host/DefaultHostDecriptionTest.java +++ b/core/api/src/test/java/org/onlab/onos/net/host/DefaultHostDecriptionTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.host; import org.junit.Test; diff --git a/core/api/src/test/java/org/onlab/onos/net/host/HostEventTest.java b/core/api/src/test/java/org/onlab/onos/net/host/HostEventTest.java index 561b0411d0..62a9ba0e46 100644 --- a/core/api/src/test/java/org/onlab/onos/net/host/HostEventTest.java +++ b/core/api/src/test/java/org/onlab/onos/net/host/HostEventTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.host; import java.util.Set; diff --git a/core/api/src/test/java/org/onlab/onos/net/host/HostServiceAdapter.java b/core/api/src/test/java/org/onlab/onos/net/host/HostServiceAdapter.java index a8085ebefa..a0a0e369e5 100644 --- a/core/api/src/test/java/org/onlab/onos/net/host/HostServiceAdapter.java +++ b/core/api/src/test/java/org/onlab/onos/net/host/HostServiceAdapter.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.host; import java.util.Set; diff --git a/core/api/src/test/java/org/onlab/onos/net/host/InterfaceIpAddressTest.java b/core/api/src/test/java/org/onlab/onos/net/host/InterfaceIpAddressTest.java index f436eca586..c18fe06ca4 100644 --- a/core/api/src/test/java/org/onlab/onos/net/host/InterfaceIpAddressTest.java +++ b/core/api/src/test/java/org/onlab/onos/net/host/InterfaceIpAddressTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.host; import org.junit.Test; diff --git a/core/api/src/test/java/org/onlab/onos/net/intent/ConnectivityIntentTest.java b/core/api/src/test/java/org/onlab/onos/net/intent/ConnectivityIntentTest.java index 3d92e87d53..2e9ef7e313 100644 --- a/core/api/src/test/java/org/onlab/onos/net/intent/ConnectivityIntentTest.java +++ b/core/api/src/test/java/org/onlab/onos/net/intent/ConnectivityIntentTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent; import java.util.Set; diff --git a/core/api/src/test/java/org/onlab/onos/net/intent/FakeIntentManager.java b/core/api/src/test/java/org/onlab/onos/net/intent/FakeIntentManager.java index cb982ba6fe..9f4755ae81 100644 --- a/core/api/src/test/java/org/onlab/onos/net/intent/FakeIntentManager.java +++ b/core/api/src/test/java/org/onlab/onos/net/intent/FakeIntentManager.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent; import java.util.ArrayList; diff --git a/core/api/src/test/java/org/onlab/onos/net/intent/IntentExceptionTest.java b/core/api/src/test/java/org/onlab/onos/net/intent/IntentExceptionTest.java index 02564e693e..72add7fae8 100644 --- a/core/api/src/test/java/org/onlab/onos/net/intent/IntentExceptionTest.java +++ b/core/api/src/test/java/org/onlab/onos/net/intent/IntentExceptionTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent; import org.junit.Test; diff --git a/core/api/src/test/java/org/onlab/onos/net/intent/IntentIdTest.java b/core/api/src/test/java/org/onlab/onos/net/intent/IntentIdTest.java index 3e21187fe6..973a5f2f67 100644 --- a/core/api/src/test/java/org/onlab/onos/net/intent/IntentIdTest.java +++ b/core/api/src/test/java/org/onlab/onos/net/intent/IntentIdTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent; import org.junit.Test; diff --git a/core/api/src/test/java/org/onlab/onos/net/intent/IntentServiceTest.java b/core/api/src/test/java/org/onlab/onos/net/intent/IntentServiceTest.java index a51746dd22..86ebc5936d 100644 --- a/core/api/src/test/java/org/onlab/onos/net/intent/IntentServiceTest.java +++ b/core/api/src/test/java/org/onlab/onos/net/intent/IntentServiceTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent; import static org.junit.Assert.assertEquals; diff --git a/core/api/src/test/java/org/onlab/onos/net/intent/IntentTest.java b/core/api/src/test/java/org/onlab/onos/net/intent/IntentTest.java index 084017b24e..5bf0c74be4 100644 --- a/core/api/src/test/java/org/onlab/onos/net/intent/IntentTest.java +++ b/core/api/src/test/java/org/onlab/onos/net/intent/IntentTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent; import org.junit.Test; diff --git a/core/api/src/test/java/org/onlab/onos/net/intent/MultiPointToSinglePointIntentTest.java b/core/api/src/test/java/org/onlab/onos/net/intent/MultiPointToSinglePointIntentTest.java index 83bec15ef0..4ab3699586 100644 --- a/core/api/src/test/java/org/onlab/onos/net/intent/MultiPointToSinglePointIntentTest.java +++ b/core/api/src/test/java/org/onlab/onos/net/intent/MultiPointToSinglePointIntentTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent; import org.junit.Test; diff --git a/core/api/src/test/java/org/onlab/onos/net/intent/PathIntentTest.java b/core/api/src/test/java/org/onlab/onos/net/intent/PathIntentTest.java index 715c99832d..21efe49bf2 100644 --- a/core/api/src/test/java/org/onlab/onos/net/intent/PathIntentTest.java +++ b/core/api/src/test/java/org/onlab/onos/net/intent/PathIntentTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent; import static org.junit.Assert.assertEquals; diff --git a/core/api/src/test/java/org/onlab/onos/net/intent/PointToPointIntentTest.java b/core/api/src/test/java/org/onlab/onos/net/intent/PointToPointIntentTest.java index 9fbc25526c..67c728e267 100644 --- a/core/api/src/test/java/org/onlab/onos/net/intent/PointToPointIntentTest.java +++ b/core/api/src/test/java/org/onlab/onos/net/intent/PointToPointIntentTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent; import org.junit.Test; diff --git a/core/api/src/test/java/org/onlab/onos/net/intent/SinglePointToMultiPointIntentTest.java b/core/api/src/test/java/org/onlab/onos/net/intent/SinglePointToMultiPointIntentTest.java index a1c68ee176..eebd3d8108 100644 --- a/core/api/src/test/java/org/onlab/onos/net/intent/SinglePointToMultiPointIntentTest.java +++ b/core/api/src/test/java/org/onlab/onos/net/intent/SinglePointToMultiPointIntentTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent; import org.junit.Test; diff --git a/core/api/src/test/java/org/onlab/onos/net/intent/TestInstallableIntent.java b/core/api/src/test/java/org/onlab/onos/net/intent/TestInstallableIntent.java index 94761905e9..9238b4649a 100644 --- a/core/api/src/test/java/org/onlab/onos/net/intent/TestInstallableIntent.java +++ b/core/api/src/test/java/org/onlab/onos/net/intent/TestInstallableIntent.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent; import org.onlab.onos.TestApplicationId; diff --git a/core/api/src/test/java/org/onlab/onos/net/intent/TestIntent.java b/core/api/src/test/java/org/onlab/onos/net/intent/TestIntent.java index a9d1656102..583220f5a7 100644 --- a/core/api/src/test/java/org/onlab/onos/net/intent/TestIntent.java +++ b/core/api/src/test/java/org/onlab/onos/net/intent/TestIntent.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent; import org.onlab.onos.TestApplicationId; diff --git a/core/api/src/test/java/org/onlab/onos/net/intent/TestSubclassInstallableIntent.java b/core/api/src/test/java/org/onlab/onos/net/intent/TestSubclassInstallableIntent.java index bfeb9854a3..973333d241 100644 --- a/core/api/src/test/java/org/onlab/onos/net/intent/TestSubclassInstallableIntent.java +++ b/core/api/src/test/java/org/onlab/onos/net/intent/TestSubclassInstallableIntent.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent; /** diff --git a/core/api/src/test/java/org/onlab/onos/net/intent/TestSubclassIntent.java b/core/api/src/test/java/org/onlab/onos/net/intent/TestSubclassIntent.java index c8d6996ad7..d1cec0a3be 100644 --- a/core/api/src/test/java/org/onlab/onos/net/intent/TestSubclassIntent.java +++ b/core/api/src/test/java/org/onlab/onos/net/intent/TestSubclassIntent.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent; /** diff --git a/core/api/src/test/java/org/onlab/onos/net/intent/TestTools.java b/core/api/src/test/java/org/onlab/onos/net/intent/TestTools.java index f22585ebdb..68c6f95367 100644 --- a/core/api/src/test/java/org/onlab/onos/net/intent/TestTools.java +++ b/core/api/src/test/java/org/onlab/onos/net/intent/TestTools.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent; import static org.junit.Assert.fail; diff --git a/core/api/src/test/java/org/onlab/onos/net/intent/TestableIntentService.java b/core/api/src/test/java/org/onlab/onos/net/intent/TestableIntentService.java index 95502d3012..a12b565af2 100644 --- a/core/api/src/test/java/org/onlab/onos/net/intent/TestableIntentService.java +++ b/core/api/src/test/java/org/onlab/onos/net/intent/TestableIntentService.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent; import java.util.List; diff --git a/core/api/src/test/java/org/onlab/onos/net/link/DefaultLinkDescriptionTest.java b/core/api/src/test/java/org/onlab/onos/net/link/DefaultLinkDescriptionTest.java index 2c69625799..b353bd8d2e 100644 --- a/core/api/src/test/java/org/onlab/onos/net/link/DefaultLinkDescriptionTest.java +++ b/core/api/src/test/java/org/onlab/onos/net/link/DefaultLinkDescriptionTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.link; import org.junit.Test; diff --git a/core/api/src/test/java/org/onlab/onos/net/link/LinkEventTest.java b/core/api/src/test/java/org/onlab/onos/net/link/LinkEventTest.java index aa95a42cc2..5523c1946c 100644 --- a/core/api/src/test/java/org/onlab/onos/net/link/LinkEventTest.java +++ b/core/api/src/test/java/org/onlab/onos/net/link/LinkEventTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.link; import org.junit.Test; diff --git a/core/api/src/test/java/org/onlab/onos/net/link/LinkServiceAdapter.java b/core/api/src/test/java/org/onlab/onos/net/link/LinkServiceAdapter.java index 582ee1b138..17a570ab55 100644 --- a/core/api/src/test/java/org/onlab/onos/net/link/LinkServiceAdapter.java +++ b/core/api/src/test/java/org/onlab/onos/net/link/LinkServiceAdapter.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.link; import java.util.Set; diff --git a/core/api/src/test/java/org/onlab/onos/net/provider/AbstractProviderRegistryTest.java b/core/api/src/test/java/org/onlab/onos/net/provider/AbstractProviderRegistryTest.java index 3ecd90d21b..adfbdc7f56 100644 --- a/core/api/src/test/java/org/onlab/onos/net/provider/AbstractProviderRegistryTest.java +++ b/core/api/src/test/java/org/onlab/onos/net/provider/AbstractProviderRegistryTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.provider; import org.junit.Test; diff --git a/core/api/src/test/java/org/onlab/onos/net/provider/AbstractProviderTest.java b/core/api/src/test/java/org/onlab/onos/net/provider/AbstractProviderTest.java index c2e5cfc4aa..b75748aba6 100644 --- a/core/api/src/test/java/org/onlab/onos/net/provider/AbstractProviderTest.java +++ b/core/api/src/test/java/org/onlab/onos/net/provider/AbstractProviderTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.provider; import org.junit.Test; diff --git a/core/api/src/test/java/org/onlab/onos/net/provider/ProviderIdTest.java b/core/api/src/test/java/org/onlab/onos/net/provider/ProviderIdTest.java index 1501eb9082..1f2108eb1c 100644 --- a/core/api/src/test/java/org/onlab/onos/net/provider/ProviderIdTest.java +++ b/core/api/src/test/java/org/onlab/onos/net/provider/ProviderIdTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.provider; import com.google.common.testing.EqualsTester; diff --git a/core/api/src/test/java/org/onlab/onos/net/provider/TestProvider.java b/core/api/src/test/java/org/onlab/onos/net/provider/TestProvider.java index 785577a5d0..40c55993c0 100644 --- a/core/api/src/test/java/org/onlab/onos/net/provider/TestProvider.java +++ b/core/api/src/test/java/org/onlab/onos/net/provider/TestProvider.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.provider; /** diff --git a/core/api/src/test/java/org/onlab/onos/net/topology/ClusterIdTest.java b/core/api/src/test/java/org/onlab/onos/net/topology/ClusterIdTest.java index 2c02409bf3..3fb51e5c3b 100644 --- a/core/api/src/test/java/org/onlab/onos/net/topology/ClusterIdTest.java +++ b/core/api/src/test/java/org/onlab/onos/net/topology/ClusterIdTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.topology; import com.google.common.testing.EqualsTester; diff --git a/core/api/src/test/java/org/onlab/onos/net/topology/DefaultGraphDescriptionTest.java b/core/api/src/test/java/org/onlab/onos/net/topology/DefaultGraphDescriptionTest.java index 81e6393190..4b229d855d 100644 --- a/core/api/src/test/java/org/onlab/onos/net/topology/DefaultGraphDescriptionTest.java +++ b/core/api/src/test/java/org/onlab/onos/net/topology/DefaultGraphDescriptionTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.topology; import com.google.common.collect.ImmutableSet; diff --git a/core/api/src/test/java/org/onlab/onos/net/topology/DefaultTopologyClusterTest.java b/core/api/src/test/java/org/onlab/onos/net/topology/DefaultTopologyClusterTest.java index a20d731dad..223cce0826 100644 --- a/core/api/src/test/java/org/onlab/onos/net/topology/DefaultTopologyClusterTest.java +++ b/core/api/src/test/java/org/onlab/onos/net/topology/DefaultTopologyClusterTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.topology; import com.google.common.testing.EqualsTester; diff --git a/core/api/src/test/java/org/onlab/onos/net/topology/DefaultTopologyEdgeTest.java b/core/api/src/test/java/org/onlab/onos/net/topology/DefaultTopologyEdgeTest.java index 5d64c83115..bf34e1c858 100644 --- a/core/api/src/test/java/org/onlab/onos/net/topology/DefaultTopologyEdgeTest.java +++ b/core/api/src/test/java/org/onlab/onos/net/topology/DefaultTopologyEdgeTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.topology; import com.google.common.testing.EqualsTester; diff --git a/core/api/src/test/java/org/onlab/onos/net/topology/DefaultTopologyVertexTest.java b/core/api/src/test/java/org/onlab/onos/net/topology/DefaultTopologyVertexTest.java index 7210ff3656..ac7974b975 100644 --- a/core/api/src/test/java/org/onlab/onos/net/topology/DefaultTopologyVertexTest.java +++ b/core/api/src/test/java/org/onlab/onos/net/topology/DefaultTopologyVertexTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.topology; import com.google.common.testing.EqualsTester; diff --git a/core/api/src/test/java/org/onlab/onos/net/topology/TopologyServiceAdapter.java b/core/api/src/test/java/org/onlab/onos/net/topology/TopologyServiceAdapter.java index cfc22e0876..7d1d43e56c 100644 --- a/core/api/src/test/java/org/onlab/onos/net/topology/TopologyServiceAdapter.java +++ b/core/api/src/test/java/org/onlab/onos/net/topology/TopologyServiceAdapter.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.topology; import org.onlab.onos.net.ConnectPoint; diff --git a/core/json/pom.xml b/core/json/pom.xml index 63dfe57f3c..a425b0d998 100644 --- a/core/json/pom.xml +++ b/core/json/pom.xml @@ -1,4 +1,19 @@ + diff --git a/core/json/src/main/java/org/onlab/onos/json/impl/DeleteMe.java b/core/json/src/main/java/org/onlab/onos/json/impl/DeleteMe.java index d89f31ba5f..b46510cc1d 100644 --- a/core/json/src/main/java/org/onlab/onos/json/impl/DeleteMe.java +++ b/core/json/src/main/java/org/onlab/onos/json/impl/DeleteMe.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.json.impl; /** diff --git a/core/json/src/main/java/org/onlab/onos/json/impl/package-info.java b/core/json/src/main/java/org/onlab/onos/json/impl/package-info.java index 406641f4cb..9ff299da90 100644 --- a/core/json/src/main/java/org/onlab/onos/json/impl/package-info.java +++ b/core/json/src/main/java/org/onlab/onos/json/impl/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Implementation of JSON codec factory and of the builtin codecs. */ diff --git a/core/net/pom.xml b/core/net/pom.xml index bff4cce3dc..7e7f4ad9f0 100644 --- a/core/net/pom.xml +++ b/core/net/pom.xml @@ -1,4 +1,19 @@ + diff --git a/core/net/src/main/java/org/onlab/onos/cluster/impl/ClusterManager.java b/core/net/src/main/java/org/onlab/onos/cluster/impl/ClusterManager.java index 36f2f7ed50..b7259b8da1 100644 --- a/core/net/src/main/java/org/onlab/onos/cluster/impl/ClusterManager.java +++ b/core/net/src/main/java/org/onlab/onos/cluster/impl/ClusterManager.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.cluster.impl; import org.apache.felix.scr.annotations.Activate; @@ -16,7 +31,7 @@ import org.onlab.onos.cluster.ControllerNode; import org.onlab.onos.cluster.NodeId; import org.onlab.onos.event.AbstractListenerRegistry; import org.onlab.onos.event.EventDeliveryService; -import org.onlab.packet.IpPrefix; +import org.onlab.packet.IpAddress; import org.slf4j.Logger; import java.util.Set; @@ -83,7 +98,7 @@ public class ClusterManager implements ClusterService, ClusterAdminService { } @Override - public ControllerNode addNode(NodeId nodeId, IpPrefix ip, int tcpPort) { + public ControllerNode addNode(NodeId nodeId, IpAddress ip, int tcpPort) { checkNotNull(nodeId, INSTANCE_ID_NULL); checkNotNull(ip, "IP address cannot be null"); checkArgument(tcpPort > 5000, "TCP port must be > 5000"); diff --git a/core/net/src/main/java/org/onlab/onos/cluster/impl/MastershipManager.java b/core/net/src/main/java/org/onlab/onos/cluster/impl/MastershipManager.java index 1a671f64fb..6180ada193 100644 --- a/core/net/src/main/java/org/onlab/onos/cluster/impl/MastershipManager.java +++ b/core/net/src/main/java/org/onlab/onos/cluster/impl/MastershipManager.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.cluster.impl; import static com.google.common.base.Preconditions.checkNotNull; @@ -82,10 +97,20 @@ implements MastershipService, MastershipAdminService { checkNotNull(role, ROLE_NULL); MastershipEvent event = null; - if (role.equals(MastershipRole.MASTER)) { - event = store.setMaster(nodeId, deviceId); - } else { - event = store.setStandby(nodeId, deviceId); + + switch (role) { + case MASTER: + event = store.setMaster(nodeId, deviceId); + break; + case STANDBY: + event = store.setStandby(nodeId, deviceId); + break; + case NONE: + event = store.relinquishRole(nodeId, deviceId); + break; + default: + log.info("Unknown role; ignoring"); + return; } if (event != null) { @@ -244,6 +269,10 @@ implements MastershipService, MastershipAdminService { @Override public void notify(MastershipEvent event) { + if (clusterService.getLocalNode().id().equals(event.roleInfo().master())) { + log.info("ignoring locally-generated event {}", event); + // return; + } log.info("dispatching mastership event {}", event); eventDispatcher.post(event); } diff --git a/core/net/src/main/java/org/onlab/onos/cluster/impl/package-info.java b/core/net/src/main/java/org/onlab/onos/cluster/impl/package-info.java index a31eb368e9..3be50548e8 100644 --- a/core/net/src/main/java/org/onlab/onos/cluster/impl/package-info.java +++ b/core/net/src/main/java/org/onlab/onos/cluster/impl/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Subsystem for tracking controller cluster nodes. */ diff --git a/core/net/src/main/java/org/onlab/onos/core/impl/CoreManager.java b/core/net/src/main/java/org/onlab/onos/core/impl/CoreManager.java index 907466fc1b..ebc4ed6755 100644 --- a/core/net/src/main/java/org/onlab/onos/core/impl/CoreManager.java +++ b/core/net/src/main/java/org/onlab/onos/core/impl/CoreManager.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.core.impl; import org.apache.felix.scr.annotations.Activate; diff --git a/core/net/src/main/java/org/onlab/onos/core/impl/MetricsManagerComponent.java b/core/net/src/main/java/org/onlab/onos/core/impl/MetricsManagerComponent.java index 66608f2813..a624cc1cfa 100644 --- a/core/net/src/main/java/org/onlab/onos/core/impl/MetricsManagerComponent.java +++ b/core/net/src/main/java/org/onlab/onos/core/impl/MetricsManagerComponent.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.core.impl; import org.apache.felix.scr.annotations.Activate; diff --git a/core/net/src/main/java/org/onlab/onos/core/impl/package-info.java b/core/net/src/main/java/org/onlab/onos/core/impl/package-info.java index 8a501e3d37..0596df24df 100644 --- a/core/net/src/main/java/org/onlab/onos/core/impl/package-info.java +++ b/core/net/src/main/java/org/onlab/onos/core/impl/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Miscellaneous core system implementations. */ diff --git a/core/net/src/main/java/org/onlab/onos/event/impl/CoreEventDispatcher.java b/core/net/src/main/java/org/onlab/onos/event/impl/CoreEventDispatcher.java index 0caef5c9fc..7df0b3cb1c 100644 --- a/core/net/src/main/java/org/onlab/onos/event/impl/CoreEventDispatcher.java +++ b/core/net/src/main/java/org/onlab/onos/event/impl/CoreEventDispatcher.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.event.impl; import org.apache.felix.scr.annotations.Activate; diff --git a/core/net/src/main/java/org/onlab/onos/event/impl/package-info.java b/core/net/src/main/java/org/onlab/onos/event/impl/package-info.java index 46722adfca..8d20e75109 100644 --- a/core/net/src/main/java/org/onlab/onos/event/impl/package-info.java +++ b/core/net/src/main/java/org/onlab/onos/event/impl/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Local event dispatching mechanism. */ diff --git a/core/net/src/main/java/org/onlab/onos/net/device/impl/DeviceManager.java b/core/net/src/main/java/org/onlab/onos/net/device/impl/DeviceManager.java index 76d46b0236..2441e88161 100644 --- a/core/net/src/main/java/org/onlab/onos/net/device/impl/DeviceManager.java +++ b/core/net/src/main/java/org/onlab/onos/net/device/impl/DeviceManager.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.device.impl; import static com.google.common.base.Preconditions.checkNotNull; @@ -14,6 +29,7 @@ import org.apache.felix.scr.annotations.ReferenceCardinality; import org.apache.felix.scr.annotations.Service; import org.onlab.onos.cluster.ClusterService; import org.onlab.onos.cluster.NodeId; +import org.onlab.onos.cluster.RoleInfo; import org.onlab.onos.event.AbstractListenerRegistry; import org.onlab.onos.event.EventDeliveryService; import org.onlab.onos.mastership.MastershipEvent; @@ -43,6 +59,8 @@ import org.onlab.onos.net.provider.AbstractProviderRegistry; import org.onlab.onos.net.provider.AbstractProviderService; import org.slf4j.Logger; +import com.google.common.collect.HashMultimap; + /** * Provides implementation of the device SB & NB APIs. */ @@ -144,32 +162,37 @@ public class DeviceManager // Applies the specified role to the device; ignores NONE private void applyRole(DeviceId deviceId, MastershipRole newRole) { - if (!newRole.equals(MastershipRole.NONE)) { - Device device = store.getDevice(deviceId); - // FIXME: Device might not be there yet. (eventual consistent) - if (device == null) { - return; - } - DeviceProvider provider = getProvider(device.providerId()); - if (provider != null) { - provider.roleChanged(device, newRole); - - // only trigger event when request was sent to provider - // TODO: consider removing this from Device event type? - post(new DeviceEvent(DEVICE_MASTERSHIP_CHANGED, device)); - } + if (newRole.equals(MastershipRole.NONE)) { + return; } - } - // Queries a device for port information. - private void queryPortInfo(DeviceId deviceId) { Device device = store.getDevice(deviceId); // FIXME: Device might not be there yet. (eventual consistent) if (device == null) { return; } + DeviceProvider provider = getProvider(device.providerId()); - provider.triggerProbe(device); + if (provider != null) { + provider.roleChanged(device, newRole); + // only trigger event when request was sent to provider + // TODO: consider removing this from Device event type? + post(new DeviceEvent(DEVICE_MASTERSHIP_CHANGED, device)); + + if (newRole.equals(MastershipRole.MASTER)) { + provider.triggerProbe(device); + } + } + } + + // Check a device for control channel connectivity. + private boolean isReachable(Device device) { + // FIXME: Device might not be there yet. (eventual consistent) + if (device == null) { + return false; + } + DeviceProvider provider = getProvider(device.providerId()); + return provider.isReachable(device); } @Override @@ -221,7 +244,6 @@ public class DeviceManager log.info("Device {} connected", deviceId); // check my Role MastershipRole role = mastershipService.requestRoleFor(deviceId); - log.info("requestedRole, became {} for {}", role, deviceId); if (role != MastershipRole.MASTER) { // TODO: Do we need to explicitly tell the Provider that // this instance is no longer the MASTER? probably not @@ -368,6 +390,12 @@ public class DeviceManager // Intercepts mastership events private class InternalMastershipListener implements MastershipListener { + // random cache size + private final int cacheSize = 5; + // temporarily stores term number + events to check for duplicates. A hack. + private HashMultimap eventCache = + HashMultimap.create(); + @Override public void event(MastershipEvent event) { final DeviceId did = event.subject(); @@ -376,6 +404,13 @@ public class DeviceManager if (myNodeId.equals(event.roleInfo().master())) { MastershipTerm term = termService.getMastershipTerm(did); + // TODO duplicate suppression should probably occur in the MastershipManager + // itself, so listeners that can't deal with duplicates don't have to + // so this check themselves. + if (checkDuplicate(event.roleInfo(), term.termNumber())) { + return; + } + if (!myNodeId.equals(term.master())) { // something went wrong in consistency, let go log.warn("Mastership has changed after this event." @@ -390,14 +425,16 @@ public class DeviceManager // only set the new term if I am the master deviceClockProviderService.setMastershipTerm(did, term); - // FIXME: we should check that the device is connected on our end. - // currently, this is not straight forward as the actual switch - // implementation is hidden from the registry. Maybe we can ask the - // provider. // if the device is null here, we are the first master to claim the // device. No worries, the DeviceManager will create one soon. Device device = getDevice(did); if ((device != null) && !isAvailable(did)) { + if (!isReachable(device)) { + log.warn("Device {} has disconnected after this event", did); + mastershipService.relinquishMastership(did); + applyRole(did, MastershipRole.STANDBY); + return; + } //flag the device as online. Is there a better way to do this? DeviceEvent devEvent = store.createOrUpdateDevice(device.providerId(), did, new DefaultDeviceDescription( @@ -407,12 +444,32 @@ public class DeviceManager post(devEvent); } applyRole(did, MastershipRole.MASTER); - // re-collect device information to fix potential staleness - queryPortInfo(did); } else if (event.roleInfo().backups().contains(myNodeId)) { + if (!isReachable(getDevice(did))) { + log.warn("Device {} has disconnected after this event", did); + mastershipService.relinquishMastership(did); + } applyRole(did, MastershipRole.STANDBY); } } + + // checks for duplicate event, returning true if one is found. + private boolean checkDuplicate(RoleInfo roleInfo, int term) { + synchronized (eventCache) { + if (eventCache.get(term).contains(roleInfo)) { + log.info("duplicate event detected; ignoring"); + return true; + } else { + eventCache.put(term, roleInfo); + // purge by-term oldest entries to keep the cache size under limit + if (eventCache.size() > cacheSize) { + eventCache.removeAll(term - cacheSize); + } + return false; + } + } + } + } // Store delegate to re-post events emitted from the store. diff --git a/core/net/src/main/java/org/onlab/onos/net/device/impl/package-info.java b/core/net/src/main/java/org/onlab/onos/net/device/impl/package-info.java index 02afb8cef5..fa1cd69360 100644 --- a/core/net/src/main/java/org/onlab/onos/net/device/impl/package-info.java +++ b/core/net/src/main/java/org/onlab/onos/net/device/impl/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Core subsystem for tracking global inventory of infrastructure devices. */ diff --git a/core/net/src/main/java/org/onlab/onos/net/flow/impl/FlowRuleManager.java b/core/net/src/main/java/org/onlab/onos/net/flow/impl/FlowRuleManager.java index aef5831013..4fe9022798 100644 --- a/core/net/src/main/java/org/onlab/onos/net/flow/impl/FlowRuleManager.java +++ b/core/net/src/main/java/org/onlab/onos/net/flow/impl/FlowRuleManager.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.flow.impl; import static com.google.common.base.Preconditions.checkNotNull; @@ -380,7 +395,7 @@ public class FlowRuleManager break; case BATCH_OPERATION_COMPLETED: - Set failedItems = event.result().failedItems(); + Set failedItems = event.result().failedItems(); for (FlowEntry entry : request.toAdd()) { if (!failedItems.contains(entry)) { eventDispatcher.post(new FlowRuleEvent(FlowRuleEvent.Type.RULE_ADDED, entry)); @@ -448,7 +463,7 @@ public class FlowRuleManager } boolean success = true; - Set failed = Sets.newHashSet(); + Set failed = Sets.newHashSet(); CompletedBatchOperation completed; for (Future future : futures) { completed = future.get(); @@ -468,7 +483,7 @@ public class FlowRuleManager return overall; } boolean success = true; - Set failed = Sets.newHashSet(); + Set failed = Sets.newHashSet(); CompletedBatchOperation completed; long start = System.nanoTime(); long end = start + unit.toNanos(timeout); @@ -482,7 +497,7 @@ public class FlowRuleManager return finalizeBatchOperation(success, failed); } - private boolean validateBatchOperation(Set failed, + private boolean validateBatchOperation(Set failed, CompletedBatchOperation completed) { if (isCancelled()) { @@ -504,7 +519,7 @@ public class FlowRuleManager } private CompletedBatchOperation finalizeBatchOperation(boolean success, - Set failed) { + Set failed) { synchronized (this) { if (!state.compareAndSet(BatchState.STARTED, BatchState.FINISHED)) { if (state.get() == BatchState.FINISHED) { diff --git a/core/net/src/main/java/org/onlab/onos/net/flow/impl/package-info.java b/core/net/src/main/java/org/onlab/onos/net/flow/impl/package-info.java index 0d05cb2c1b..109ed37598 100644 --- a/core/net/src/main/java/org/onlab/onos/net/flow/impl/package-info.java +++ b/core/net/src/main/java/org/onlab/onos/net/flow/impl/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Core subsystem for tracking and manipulating global flow state. */ diff --git a/core/net/src/main/java/org/onlab/onos/net/host/impl/HostManager.java b/core/net/src/main/java/org/onlab/onos/net/host/impl/HostManager.java index e4d158d99c..762bae000d 100644 --- a/core/net/src/main/java/org/onlab/onos/net/host/impl/HostManager.java +++ b/core/net/src/main/java/org/onlab/onos/net/host/impl/HostManager.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.host.impl; import static com.google.common.base.Preconditions.checkNotNull; diff --git a/core/net/src/main/java/org/onlab/onos/net/host/impl/HostMonitor.java b/core/net/src/main/java/org/onlab/onos/net/host/impl/HostMonitor.java index e92440f7b5..cfe4749425 100644 --- a/core/net/src/main/java/org/onlab/onos/net/host/impl/HostMonitor.java +++ b/core/net/src/main/java/org/onlab/onos/net/host/impl/HostMonitor.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.host.impl; import java.nio.ByteBuffer; diff --git a/core/net/src/main/java/org/onlab/onos/net/host/impl/package-info.java b/core/net/src/main/java/org/onlab/onos/net/host/impl/package-info.java index 55370d37d8..32ce565c22 100644 --- a/core/net/src/main/java/org/onlab/onos/net/host/impl/package-info.java +++ b/core/net/src/main/java/org/onlab/onos/net/host/impl/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Core subsystem for tracking global inventory of end-station hosts. */ diff --git a/core/net/src/main/java/org/onlab/onos/net/intent/impl/HostToHostIntentCompiler.java b/core/net/src/main/java/org/onlab/onos/net/intent/impl/HostToHostIntentCompiler.java index e769982e47..e045cecc1b 100644 --- a/core/net/src/main/java/org/onlab/onos/net/intent/impl/HostToHostIntentCompiler.java +++ b/core/net/src/main/java/org/onlab/onos/net/intent/impl/HostToHostIntentCompiler.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent.impl; import org.apache.felix.scr.annotations.Activate; @@ -7,6 +22,7 @@ import org.apache.felix.scr.annotations.Reference; import org.apache.felix.scr.annotations.ReferenceCardinality; import org.onlab.onos.net.Host; import org.onlab.onos.net.HostId; +import org.onlab.onos.net.Link; import org.onlab.onos.net.Path; import org.onlab.onos.net.flow.TrafficSelector; import org.onlab.onos.net.host.HostService; @@ -15,7 +31,9 @@ import org.onlab.onos.net.intent.Intent; import org.onlab.onos.net.intent.IntentCompiler; import org.onlab.onos.net.intent.IntentExtensionService; import org.onlab.onos.net.intent.PathIntent; +import org.onlab.onos.net.topology.LinkWeight; import org.onlab.onos.net.topology.PathService; +import org.onlab.onos.net.topology.TopologyEdge; import java.util.Arrays; import java.util.List; @@ -71,7 +89,13 @@ public class HostToHostIntentCompiler } private Path getPath(HostId one, HostId two) { - Set paths = pathService.getPaths(one, two); + Set paths = pathService.getPaths(one, two, new LinkWeight() { + @Override + public double weight(TopologyEdge edge) { + return edge.link().type() == Link.Type.OPTICAL ? -1 : +1; + } + }); + if (paths.isEmpty()) { throw new PathNotFoundException("No path from host " + one + " to " + two); } diff --git a/core/net/src/main/java/org/onlab/onos/net/intent/impl/IntentCompilationException.java b/core/net/src/main/java/org/onlab/onos/net/intent/impl/IntentCompilationException.java index bf739df305..2f8e692372 100644 --- a/core/net/src/main/java/org/onlab/onos/net/intent/impl/IntentCompilationException.java +++ b/core/net/src/main/java/org/onlab/onos/net/intent/impl/IntentCompilationException.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent.impl; import org.onlab.onos.net.intent.IntentException; diff --git a/core/net/src/main/java/org/onlab/onos/net/intent/impl/IntentInstallationException.java b/core/net/src/main/java/org/onlab/onos/net/intent/impl/IntentInstallationException.java index 3b17cf1f41..c98468fdeb 100644 --- a/core/net/src/main/java/org/onlab/onos/net/intent/impl/IntentInstallationException.java +++ b/core/net/src/main/java/org/onlab/onos/net/intent/impl/IntentInstallationException.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent.impl; import org.onlab.onos.net.intent.IntentException; diff --git a/core/net/src/main/java/org/onlab/onos/net/intent/impl/IntentManager.java b/core/net/src/main/java/org/onlab/onos/net/intent/impl/IntentManager.java index d528ed6130..7b1d7a92e2 100644 --- a/core/net/src/main/java/org/onlab/onos/net/intent/impl/IntentManager.java +++ b/core/net/src/main/java/org/onlab/onos/net/intent/impl/IntentManager.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent.impl; import static com.google.common.base.Preconditions.checkNotNull; @@ -258,7 +273,7 @@ public class IntentManager // If all went well, associate the resulting list of installable // intents with the top-level intent and proceed to install. - store.addInstallableIntents(intent.id(), installable); + store.setInstallableIntents(intent.id(), installable); executeInstallingPhase(intent); } catch (Exception e) { @@ -351,7 +366,7 @@ public class IntentManager } else { // Otherwise, re-associate the newly compiled installable intents // with the top-level intent and kick off installing phase. - store.addInstallableIntents(intent.id(), installable); + store.setInstallableIntents(intent.id(), installable); executeInstallingPhase(intent); } } catch (Exception e) { diff --git a/core/net/src/main/java/org/onlab/onos/net/intent/impl/IntentRemovalException.java b/core/net/src/main/java/org/onlab/onos/net/intent/impl/IntentRemovalException.java index 5ee4ee4ae3..ec0586abbb 100644 --- a/core/net/src/main/java/org/onlab/onos/net/intent/impl/IntentRemovalException.java +++ b/core/net/src/main/java/org/onlab/onos/net/intent/impl/IntentRemovalException.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent.impl; import org.onlab.onos.net.intent.IntentException; diff --git a/core/net/src/main/java/org/onlab/onos/net/intent/impl/LinkCollectionIntentInstaller.java b/core/net/src/main/java/org/onlab/onos/net/intent/impl/LinkCollectionIntentInstaller.java index 93c6345eb0..4a689a15b1 100644 --- a/core/net/src/main/java/org/onlab/onos/net/intent/impl/LinkCollectionIntentInstaller.java +++ b/core/net/src/main/java/org/onlab/onos/net/intent/impl/LinkCollectionIntentInstaller.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent.impl; import static org.slf4j.LoggerFactory.getLogger; diff --git a/core/net/src/main/java/org/onlab/onos/net/intent/impl/MultiPointToSinglePointIntentCompiler.java b/core/net/src/main/java/org/onlab/onos/net/intent/impl/MultiPointToSinglePointIntentCompiler.java index cfc8d73e87..b01500a784 100644 --- a/core/net/src/main/java/org/onlab/onos/net/intent/impl/MultiPointToSinglePointIntentCompiler.java +++ b/core/net/src/main/java/org/onlab/onos/net/intent/impl/MultiPointToSinglePointIntentCompiler.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent.impl; import org.apache.felix.scr.annotations.Activate; diff --git a/core/net/src/main/java/org/onlab/onos/net/intent/impl/ObjectiveTracker.java b/core/net/src/main/java/org/onlab/onos/net/intent/impl/ObjectiveTracker.java index 90e878e446..d080b72f09 100644 --- a/core/net/src/main/java/org/onlab/onos/net/intent/impl/ObjectiveTracker.java +++ b/core/net/src/main/java/org/onlab/onos/net/intent/impl/ObjectiveTracker.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent.impl; import com.google.common.collect.HashMultimap; @@ -133,7 +148,9 @@ public class ObjectiveTracker implements ObjectiveTrackerService { if (reason instanceof LinkEvent) { LinkEvent linkEvent = (LinkEvent) reason; if (linkEvent.type() == LINK_REMOVED) { - Set intentIds = intentsByLink.get(linkKey(linkEvent.subject())); + final LinkKey linkKey = linkKey(linkEvent.subject()); + Set intentIds = intentsByLink.get(linkKey); + log.debug("recompile triggered by LinkDown {} {}", linkKey, intentIds); toBeRecompiled.addAll(intentIds); } recompileOnly = recompileOnly && linkEvent.type() == LINK_REMOVED; diff --git a/core/net/src/main/java/org/onlab/onos/net/intent/impl/ObjectiveTrackerService.java b/core/net/src/main/java/org/onlab/onos/net/intent/impl/ObjectiveTrackerService.java index 9acd215487..4dafcba39e 100644 --- a/core/net/src/main/java/org/onlab/onos/net/intent/impl/ObjectiveTrackerService.java +++ b/core/net/src/main/java/org/onlab/onos/net/intent/impl/ObjectiveTrackerService.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent.impl; import org.onlab.onos.net.NetworkResource; diff --git a/core/net/src/main/java/org/onlab/onos/net/intent/impl/OpticalConnectivityIntentCompiler.java b/core/net/src/main/java/org/onlab/onos/net/intent/impl/OpticalConnectivityIntentCompiler.java index c19bba0bc6..3683e8e4f5 100644 --- a/core/net/src/main/java/org/onlab/onos/net/intent/impl/OpticalConnectivityIntentCompiler.java +++ b/core/net/src/main/java/org/onlab/onos/net/intent/impl/OpticalConnectivityIntentCompiler.java @@ -1,18 +1,26 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent.impl; -import static org.slf4j.LoggerFactory.getLogger; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Set; - +import com.google.common.collect.ImmutableList; import org.apache.felix.scr.annotations.Activate; import org.apache.felix.scr.annotations.Component; import org.apache.felix.scr.annotations.Deactivate; import org.apache.felix.scr.annotations.Reference; import org.apache.felix.scr.annotations.ReferenceCardinality; -import org.onlab.onos.core.CoreService; import org.onlab.onos.net.ConnectPoint; import org.onlab.onos.net.Link; import org.onlab.onos.net.Path; @@ -21,41 +29,26 @@ import org.onlab.onos.net.intent.IntentCompiler; import org.onlab.onos.net.intent.IntentExtensionService; import org.onlab.onos.net.intent.OpticalConnectivityIntent; import org.onlab.onos.net.intent.OpticalPathIntent; -import org.onlab.onos.net.provider.ProviderId; -import org.onlab.onos.net.resource.LinkResourceService; import org.onlab.onos.net.topology.LinkWeight; -import org.onlab.onos.net.topology.PathService; import org.onlab.onos.net.topology.Topology; import org.onlab.onos.net.topology.TopologyEdge; import org.onlab.onos.net.topology.TopologyService; -import org.slf4j.Logger; + +import java.util.List; +import java.util.Set; /** - * Optical compiler for OpticalConnectivityIntent. - * It firstly computes K-shortest paths in the optical-layer, then choose the optimal one to assign a wavelength. - * Finally, it generates one or more opticalPathintent(s) with opticalMatchs and opticalActions. + * An intent compiler for {@link org.onlab.onos.net.intent.OpticalConnectivityIntent}. */ @Component(immediate = true) public class OpticalConnectivityIntentCompiler implements IntentCompiler { - private final Logger log = getLogger(getClass()); - private static final ProviderId PID = new ProviderId("core", "org.onlab.onos.core", true); - @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) protected IntentExtensionService intentManager; - @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) - protected PathService pathService; - @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) protected TopologyService topologyService; - @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) - protected LinkResourceService resourceService; - - @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) - protected CoreService coreService; - @Activate public void activate() { intentManager.registerCompiler(OpticalConnectivityIntent.class, this); @@ -69,31 +62,12 @@ public class OpticalConnectivityIntentCompiler implements IntentCompiler compile(OpticalConnectivityIntent intent) { // TODO: compute multiple paths using the K-shortest path algorithm - List retList = new ArrayList<>(); - log.info("The system is comipling the OpticalConnectivityIntent:" + intent.toString()); Path path = calculateOpticalPath(intent.getSrcConnectPoint(), intent.getDst()); - if (path == null) { - return retList; - } else { - log.info("the computed lightpath is : {}.", path.toString()); - } - - List links = new ArrayList<>(); - // links.add(DefaultEdgeLink.createEdgeLink(intent.getSrcConnectPoint(), true)); - links.addAll(path.links()); - //links.add(DefaultEdgeLink.createEdgeLink(intent.getDst(), false)); - - // create a new opticalPathIntent Intent newIntent = new OpticalPathIntent(intent.appId(), - intent.getSrcConnectPoint(), - intent.getDst(), - path); - - log.info("a new OpticalPathIntent was created: " + newIntent.toString()); - - retList.add(newIntent); - - return retList; + intent.getSrcConnectPoint(), + intent.getDst(), + path); + return ImmutableList.of(newIntent); } private Path calculateOpticalPath(ConnectPoint start, ConnectPoint end) { @@ -102,36 +76,18 @@ public class OpticalConnectivityIntentCompiler implements IntentCompiler paths = topologyService.getPaths(topology, - start.deviceId(), - end.deviceId(), - weight); - - ArrayList localPaths = new ArrayList<>(); - Iterator itr = paths.iterator(); - while (itr.hasNext()) { - Path path = itr.next(); - if (path.cost() >= 1000) { - continue; - } - localPaths.add(path); - } - - if (localPaths.isEmpty()) { + Set paths = topologyService.getPaths(topology, start.deviceId(), + end.deviceId(), weight); + if (paths.isEmpty()) { throw new PathNotFoundException("No fiber path from " + start + " to " + end); - } else { - return localPaths.iterator().next(); } + // TODO: let's be more intelligent about this eventually + return paths.iterator().next(); } } diff --git a/core/net/src/main/java/org/onlab/onos/net/intent/impl/OpticalPathIntentInstaller.java b/core/net/src/main/java/org/onlab/onos/net/intent/impl/OpticalPathIntentInstaller.java index a5049924a9..f0747ddd12 100644 --- a/core/net/src/main/java/org/onlab/onos/net/intent/impl/OpticalPathIntentInstaller.java +++ b/core/net/src/main/java/org/onlab/onos/net/intent/impl/OpticalPathIntentInstaller.java @@ -1,10 +1,21 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent.impl; -import static org.onlab.onos.net.flow.DefaultTrafficTreatment.builder; -import static org.slf4j.LoggerFactory.getLogger; - -import java.util.List; - +import com.google.common.collect.Lists; import org.apache.felix.scr.annotations.Activate; import org.apache.felix.scr.annotations.Component; import org.apache.felix.scr.annotations.Deactivate; @@ -38,14 +49,14 @@ import org.onlab.onos.net.resource.ResourceType; import org.onlab.onos.net.topology.TopologyService; import org.slf4j.Logger; -import com.google.common.collect.Lists; +import java.util.List; + +import static org.onlab.onos.net.flow.DefaultTrafficTreatment.builder; +import static org.slf4j.LoggerFactory.getLogger; /** - * OpticaliIntentInstaller for optical path intents. - * It essentially generates optical FlowRules and - * call the flowRule service to execute them. + * Installer for {@link org.onlab.onos.net.intent.OpticalPathIntent optical path connectivity intents}. */ - @Component(immediate = true) public class OpticalPathIntentInstaller implements IntentInstaller { private final Logger log = getLogger(getClass()); @@ -110,12 +121,12 @@ public class OpticalPathIntentInstaller implements IntentInstaller { diff --git a/core/net/src/main/java/org/onlab/onos/net/intent/impl/PathNotFoundException.java b/core/net/src/main/java/org/onlab/onos/net/intent/impl/PathNotFoundException.java index a1fd63a84f..536b7e072a 100644 --- a/core/net/src/main/java/org/onlab/onos/net/intent/impl/PathNotFoundException.java +++ b/core/net/src/main/java/org/onlab/onos/net/intent/impl/PathNotFoundException.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent.impl; import org.onlab.onos.net.intent.IntentException; diff --git a/core/net/src/main/java/org/onlab/onos/net/intent/impl/PointToPointIntentCompiler.java b/core/net/src/main/java/org/onlab/onos/net/intent/impl/PointToPointIntentCompiler.java index dacc479d89..5c79d5ca63 100644 --- a/core/net/src/main/java/org/onlab/onos/net/intent/impl/PointToPointIntentCompiler.java +++ b/core/net/src/main/java/org/onlab/onos/net/intent/impl/PointToPointIntentCompiler.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent.impl; import org.apache.felix.scr.annotations.Activate; @@ -10,7 +25,6 @@ import org.onlab.onos.net.DefaultEdgeLink; import org.onlab.onos.net.DefaultPath; import org.onlab.onos.net.Link; import org.onlab.onos.net.Path; -import org.onlab.onos.net.host.HostService; import org.onlab.onos.net.intent.Intent; import org.onlab.onos.net.intent.IntentCompiler; import org.onlab.onos.net.intent.IntentExtensionService; @@ -18,23 +32,18 @@ import org.onlab.onos.net.intent.PathIntent; import org.onlab.onos.net.intent.PointToPointIntent; import org.onlab.onos.net.provider.ProviderId; import org.onlab.onos.net.topology.LinkWeight; -//import org.onlab.onos.net.topology.LinkWeight; -import org.onlab.onos.net.topology.PathService; import org.onlab.onos.net.topology.Topology; import org.onlab.onos.net.topology.TopologyEdge; -//import org.onlab.onos.net.topology.Topology; -//import org.onlab.onos.net.topology.TopologyEdge; import org.onlab.onos.net.topology.TopologyService; import java.util.ArrayList; -import java.util.Arrays; -import java.util.Iterator; -//import java.util.Iterator; import java.util.List; import java.util.Set; +import static java.util.Arrays.asList; + /** - * A intent compiler for {@link org.onlab.onos.net.intent.HostToHostIntent}. + * An intent compiler for {@link org.onlab.onos.net.intent.PointToPointIntent}. */ @Component(immediate = true) public class PointToPointIntentCompiler @@ -44,12 +53,6 @@ public class PointToPointIntentCompiler @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) protected IntentExtensionService intentManager; - @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) - protected PathService pathService; - - @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) - protected HostService hostService; - @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) protected TopologyService topologyService; @@ -72,9 +75,8 @@ public class PointToPointIntentCompiler links.addAll(path.links()); links.add(DefaultEdgeLink.createEdgeLink(intent.egressPoint(), false)); - return Arrays.asList(createPathIntent(new DefaultPath(PID, links, path.cost() + 2, - path.annotations()), - intent)); + return asList(createPathIntent(new DefaultPath(PID, links, path.cost() + 2, + path.annotations()), intent)); } /** @@ -99,39 +101,21 @@ public class PointToPointIntentCompiler * @throws PathNotFoundException if a path cannot be found */ private Path getPath(ConnectPoint one, ConnectPoint two) { - // Set paths = pathService.getPaths(one.deviceId(), two.deviceId()); - Topology topology = topologyService.currentTopology(); + Topology topology = topologyService.currentTopology(); LinkWeight weight = new LinkWeight() { @Override public double weight(TopologyEdge edge) { - Link.Type lt = edge.link().type(); - if (lt == Link.Type.OPTICAL) { - return 1000.0; - } else { - return Double.MIN_VALUE; - } + return edge.link().type() == Link.Type.OPTICAL ? -1 : +1; } }; - Set paths = topologyService.getPaths(topology, - one.deviceId(), - two.deviceId(), - weight); - - ArrayList localPaths = new ArrayList<>(); - Iterator itr = paths.iterator(); - while (itr.hasNext()) { - Path path = itr.next(); - if (path.cost() >= 1000) { - continue; - } - localPaths.add(path); - } - - if (localPaths.isEmpty()) { + Set paths = topologyService.getPaths(topology, one.deviceId(), + two.deviceId(), weight); + if (paths.isEmpty()) { throw new PathNotFoundException("No packet path from " + one + " to " + two); } + // TODO: let's be more intelligent about this eventually - return localPaths.iterator().next(); + return paths.iterator().next(); } } diff --git a/core/net/src/main/java/org/onlab/onos/net/intent/impl/TopologyChangeDelegate.java b/core/net/src/main/java/org/onlab/onos/net/intent/impl/TopologyChangeDelegate.java index 30e689980f..325b790c32 100644 --- a/core/net/src/main/java/org/onlab/onos/net/intent/impl/TopologyChangeDelegate.java +++ b/core/net/src/main/java/org/onlab/onos/net/intent/impl/TopologyChangeDelegate.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent.impl; import org.onlab.onos.net.intent.IntentId; diff --git a/core/net/src/main/java/org/onlab/onos/net/intent/impl/UnavailableIdException.java b/core/net/src/main/java/org/onlab/onos/net/intent/impl/UnavailableIdException.java deleted file mode 100644 index fd4f122d8c..0000000000 --- a/core/net/src/main/java/org/onlab/onos/net/intent/impl/UnavailableIdException.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.onlab.onos.net.intent.impl; - -/** - * Represents that there is no available IDs. - */ -public class UnavailableIdException extends RuntimeException { - - private static final long serialVersionUID = -2287403908433720122L; - - /** - * Constructs an exception with no message and no underlying cause. - */ - public UnavailableIdException() { - } - - /** - * Constructs an exception with the specified message. - * - * @param message the message describing the specific nature of the error - */ - public UnavailableIdException(String message) { - super(message); - } - - /** - * Constructs an exception with the specified message and the underlying cause. - * - * @param message the message describing the specific nature of the error - * @param cause the underlying cause of this error - */ - public UnavailableIdException(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/core/net/src/main/java/org/onlab/onos/net/intent/impl/package-info.java b/core/net/src/main/java/org/onlab/onos/net/intent/impl/package-info.java index 3f0027159b..af9a8d7a62 100644 --- a/core/net/src/main/java/org/onlab/onos/net/intent/impl/package-info.java +++ b/core/net/src/main/java/org/onlab/onos/net/intent/impl/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Core subsystem for tracking high-level intents for treatment of selected * network traffic. diff --git a/core/net/src/main/java/org/onlab/onos/net/link/impl/LinkManager.java b/core/net/src/main/java/org/onlab/onos/net/link/impl/LinkManager.java index ea1d09c831..23c736218d 100644 --- a/core/net/src/main/java/org/onlab/onos/net/link/impl/LinkManager.java +++ b/core/net/src/main/java/org/onlab/onos/net/link/impl/LinkManager.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.link.impl; import static com.google.common.base.Preconditions.checkNotNull; @@ -197,7 +212,6 @@ public class LinkManager checkNotNull(linkDescription, LINK_DESC_NULL); checkValidity(); - LinkEvent event = store.createOrUpdateLink(provider().id(), linkDescription); if (event != null) { diff --git a/core/net/src/main/java/org/onlab/onos/net/link/impl/package-info.java b/core/net/src/main/java/org/onlab/onos/net/link/impl/package-info.java index 44327b3d0d..1dc7602b8b 100644 --- a/core/net/src/main/java/org/onlab/onos/net/link/impl/package-info.java +++ b/core/net/src/main/java/org/onlab/onos/net/link/impl/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Core subsystem for tracking global inventory of infrastructure links. */ diff --git a/core/net/src/main/java/org/onlab/onos/net/packet/impl/PacketManager.java b/core/net/src/main/java/org/onlab/onos/net/packet/impl/PacketManager.java index 49d21e0021..b90d5612f0 100644 --- a/core/net/src/main/java/org/onlab/onos/net/packet/impl/PacketManager.java +++ b/core/net/src/main/java/org/onlab/onos/net/packet/impl/PacketManager.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.packet.impl; import static com.google.common.base.Preconditions.checkNotNull; diff --git a/core/net/src/main/java/org/onlab/onos/net/packet/impl/package-info.java b/core/net/src/main/java/org/onlab/onos/net/packet/impl/package-info.java index 78dfeaa9ba..2c5a48c9af 100644 --- a/core/net/src/main/java/org/onlab/onos/net/packet/impl/package-info.java +++ b/core/net/src/main/java/org/onlab/onos/net/packet/impl/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Core subsystem for processing inbound packets and emitting outbound packets. * Processing of inbound packets is always in the local context only, but diff --git a/core/net/src/main/java/org/onlab/onos/net/proxyarp/impl/ProxyArpManager.java b/core/net/src/main/java/org/onlab/onos/net/proxyarp/impl/ProxyArpManager.java index 3ba1c8ac45..47e0cffd76 100644 --- a/core/net/src/main/java/org/onlab/onos/net/proxyarp/impl/ProxyArpManager.java +++ b/core/net/src/main/java/org/onlab/onos/net/proxyarp/impl/ProxyArpManager.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.proxyarp.impl; import static com.google.common.base.Preconditions.checkArgument; diff --git a/core/net/src/main/java/org/onlab/onos/net/proxyarp/impl/package-info.java b/core/net/src/main/java/org/onlab/onos/net/proxyarp/impl/package-info.java index c0cbd208b6..1eb14f9549 100644 --- a/core/net/src/main/java/org/onlab/onos/net/proxyarp/impl/package-info.java +++ b/core/net/src/main/java/org/onlab/onos/net/proxyarp/impl/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Core subsystem for responding to arp requests. */ diff --git a/core/net/src/main/java/org/onlab/onos/net/resource/impl/DefaultLinkResourceAllocations.java b/core/net/src/main/java/org/onlab/onos/net/resource/impl/DefaultLinkResourceAllocations.java index 0330821cb8..28ace887e9 100644 --- a/core/net/src/main/java/org/onlab/onos/net/resource/impl/DefaultLinkResourceAllocations.java +++ b/core/net/src/main/java/org/onlab/onos/net/resource/impl/DefaultLinkResourceAllocations.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.resource.impl; import java.util.Collection; @@ -26,7 +41,7 @@ public class DefaultLinkResourceAllocations implements LinkResourceAllocations { * @param request requested resources * @param allocations allocated resources */ - protected DefaultLinkResourceAllocations(LinkResourceRequest request, + DefaultLinkResourceAllocations(LinkResourceRequest request, Map> allocations) { this.request = request; this.allocations = allocations; diff --git a/core/net/src/main/java/org/onlab/onos/net/resource/impl/LinkResourceManager.java b/core/net/src/main/java/org/onlab/onos/net/resource/impl/LinkResourceManager.java index 75e0818634..bdd07618d5 100644 --- a/core/net/src/main/java/org/onlab/onos/net/resource/impl/LinkResourceManager.java +++ b/core/net/src/main/java/org/onlab/onos/net/resource/impl/LinkResourceManager.java @@ -1,8 +1,24 @@ +/* + * Copyright 2014 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.onlab.onos.net.resource.impl; import static org.slf4j.LoggerFactory.getLogger; import java.util.HashMap; +import java.util.Iterator; import java.util.Map; import java.util.Set; @@ -44,12 +60,16 @@ public class LinkResourceManager implements LinkResourceService { log.info("Stopped"); } + private Iterable getAvailableLambdas(Iterable links) { + return Sets.newHashSet(Lambda.valueOf(7)); + } + @Override public LinkResourceAllocations requestResources(LinkResourceRequest req) { // TODO implement it using a resource data store. ResourceAllocation alloc = null; - for (ResourceRequest r: req.resources()) { + for (ResourceRequest r : req.resources()) { switch (r.type()) { case BANDWIDTH: log.info("requestResources() always returns requested bandwidth"); @@ -58,7 +78,10 @@ public class LinkResourceManager implements LinkResourceService { break; case LAMBDA: log.info("requestResources() always returns lambda 7"); - alloc = new LambdaResourceAllocation(Lambda.valueOf(7)); + Iterator lambdaIterator = getAvailableLambdas(req.links()).iterator(); + if (lambdaIterator.hasNext()) { + alloc = new LambdaResourceAllocation(lambdaIterator.next()); + } break; default: break; @@ -66,7 +89,7 @@ public class LinkResourceManager implements LinkResourceService { } Map> allocations = new HashMap<>(); - for (Link link: req.links()) { + for (Link link : req.links()) { allocations.put(link, Sets.newHashSet(alloc)); } return new DefaultLinkResourceAllocations(req, allocations); @@ -90,12 +113,6 @@ public class LinkResourceManager implements LinkResourceService { return null; } - @Override - public LinkResourceAllocations getAllocations(IntentId intentId) { - // TODO Auto-generated method stub - return null; - } - @Override public Iterable getAllocations(Link link) { // TODO Auto-generated method stub @@ -103,13 +120,13 @@ public class LinkResourceManager implements LinkResourceService { } @Override - public Iterable getIntents(Link link) { + public LinkResourceAllocations getAllocations(IntentId intentId) { // TODO Auto-generated method stub return null; } @Override - public ResourceRequest getAvailableResources(Link link) { + public Iterable getAvailableResources(Link link) { // TODO Auto-generated method stub return null; } diff --git a/core/net/src/main/java/org/onlab/onos/net/resource/impl/package-info.java b/core/net/src/main/java/org/onlab/onos/net/resource/impl/package-info.java index a398a80b1b..6efdaba7f7 100644 --- a/core/net/src/main/java/org/onlab/onos/net/resource/impl/package-info.java +++ b/core/net/src/main/java/org/onlab/onos/net/resource/impl/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Services for reserving network resources, e.g. bandwidth, lambdas. */ diff --git a/core/net/src/main/java/org/onlab/onos/net/statistic/impl/StatisticManager.java b/core/net/src/main/java/org/onlab/onos/net/statistic/impl/StatisticManager.java index edd7db95bf..3bff3c5de0 100644 --- a/core/net/src/main/java/org/onlab/onos/net/statistic/impl/StatisticManager.java +++ b/core/net/src/main/java/org/onlab/onos/net/statistic/impl/StatisticManager.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.statistic.impl; import org.apache.felix.scr.annotations.Activate; diff --git a/core/net/src/main/java/org/onlab/onos/net/statistic/impl/package-info.java b/core/net/src/main/java/org/onlab/onos/net/statistic/impl/package-info.java index cbe301c53a..114d6120b2 100644 --- a/core/net/src/main/java/org/onlab/onos/net/statistic/impl/package-info.java +++ b/core/net/src/main/java/org/onlab/onos/net/statistic/impl/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Core subsystem for responding to statistical inquiries. */ diff --git a/core/net/src/main/java/org/onlab/onos/net/topology/impl/DefaultTopologyProvider.java b/core/net/src/main/java/org/onlab/onos/net/topology/impl/DefaultTopologyProvider.java index 0efd08ba26..33830aa9fc 100644 --- a/core/net/src/main/java/org/onlab/onos/net/topology/impl/DefaultTopologyProvider.java +++ b/core/net/src/main/java/org/onlab/onos/net/topology/impl/DefaultTopologyProvider.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.topology.impl; import org.apache.felix.scr.annotations.Activate; diff --git a/core/net/src/main/java/org/onlab/onos/net/topology/impl/PathManager.java b/core/net/src/main/java/org/onlab/onos/net/topology/impl/PathManager.java index 849ac6d2eb..433cdcd966 100644 --- a/core/net/src/main/java/org/onlab/onos/net/topology/impl/PathManager.java +++ b/core/net/src/main/java/org/onlab/onos/net/topology/impl/PathManager.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.topology.impl; import com.google.common.collect.ImmutableSet; diff --git a/core/net/src/main/java/org/onlab/onos/net/topology/impl/TopologyManager.java b/core/net/src/main/java/org/onlab/onos/net/topology/impl/TopologyManager.java index 4846944d01..de72c526da 100644 --- a/core/net/src/main/java/org/onlab/onos/net/topology/impl/TopologyManager.java +++ b/core/net/src/main/java/org/onlab/onos/net/topology/impl/TopologyManager.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.topology.impl; import org.apache.felix.scr.annotations.Activate; diff --git a/core/net/src/main/java/org/onlab/onos/net/topology/impl/package-info.java b/core/net/src/main/java/org/onlab/onos/net/topology/impl/package-info.java index 17c364412f..c76dcef67b 100644 --- a/core/net/src/main/java/org/onlab/onos/net/topology/impl/package-info.java +++ b/core/net/src/main/java/org/onlab/onos/net/topology/impl/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Core subsystem for tracking global & consistent topology graph views. */ diff --git a/core/net/src/test/java/org/onlab/onos/cluster/impl/MastershipManagerTest.java b/core/net/src/test/java/org/onlab/onos/cluster/impl/MastershipManagerTest.java index 96b8ae09f7..1572408669 100644 --- a/core/net/src/test/java/org/onlab/onos/cluster/impl/MastershipManagerTest.java +++ b/core/net/src/test/java/org/onlab/onos/cluster/impl/MastershipManagerTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.cluster.impl; import java.util.Set; @@ -16,7 +31,7 @@ import org.onlab.onos.mastership.MastershipService; import org.onlab.onos.mastership.MastershipTermService; import org.onlab.onos.net.DeviceId; import org.onlab.onos.store.trivial.impl.SimpleMastershipStore; -import org.onlab.packet.IpPrefix; +import org.onlab.packet.IpAddress; import com.google.common.collect.Sets; @@ -31,7 +46,7 @@ public class MastershipManagerTest { private static final NodeId NID_LOCAL = new NodeId("local"); private static final NodeId NID_OTHER = new NodeId("foo"); - private static final IpPrefix LOCALHOST = IpPrefix.valueOf("127.0.0.1"); + private static final IpAddress LOCALHOST = IpAddress.valueOf("127.0.0.1"); private static final DeviceId DEV_MASTER = DeviceId.deviceId("of:1"); private static final DeviceId DEV_OTHER = DeviceId.deviceId("of:2"); diff --git a/core/net/src/test/java/org/onlab/onos/event/impl/CoreEventDispatcherTest.java b/core/net/src/test/java/org/onlab/onos/event/impl/CoreEventDispatcherTest.java index f13cacfea2..209b33ab36 100644 --- a/core/net/src/test/java/org/onlab/onos/event/impl/CoreEventDispatcherTest.java +++ b/core/net/src/test/java/org/onlab/onos/event/impl/CoreEventDispatcherTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.event.impl; import org.junit.After; diff --git a/core/net/src/test/java/org/onlab/onos/event/impl/TestEventDispatcher.java b/core/net/src/test/java/org/onlab/onos/event/impl/TestEventDispatcher.java index d2cbc24705..891702739d 100644 --- a/core/net/src/test/java/org/onlab/onos/event/impl/TestEventDispatcher.java +++ b/core/net/src/test/java/org/onlab/onos/event/impl/TestEventDispatcher.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.event.impl; import org.onlab.onos.event.DefaultEventSinkRegistry; diff --git a/core/net/src/test/java/org/onlab/onos/net/device/impl/DeviceManagerTest.java b/core/net/src/test/java/org/onlab/onos/net/device/impl/DeviceManagerTest.java index a86502fa7b..25fa922a10 100644 --- a/core/net/src/test/java/org/onlab/onos/net/device/impl/DeviceManagerTest.java +++ b/core/net/src/test/java/org/onlab/onos/net/device/impl/DeviceManagerTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.device.impl; import com.google.common.collect.Sets; @@ -38,7 +53,7 @@ import org.onlab.onos.net.provider.AbstractProvider; import org.onlab.onos.net.provider.ProviderId; import org.onlab.onos.store.trivial.impl.SimpleDeviceStore; import org.onlab.packet.ChassisId; -import org.onlab.packet.IpPrefix; +import org.onlab.packet.IpAddress; import java.util.ArrayList; import java.util.Iterator; @@ -69,7 +84,7 @@ public class DeviceManagerTest { private static final PortNumber P2 = PortNumber.portNumber(2); private static final PortNumber P3 = PortNumber.portNumber(3); private static final NodeId NID_LOCAL = new NodeId("local"); - private static final IpPrefix LOCALHOST = IpPrefix.valueOf("127.0.0.1"); + private static final IpAddress LOCALHOST = IpAddress.valueOf("127.0.0.1"); private DeviceManager mgr; @@ -263,6 +278,11 @@ public class DeviceManagerTest { deviceReceived = device; roleReceived = newRole; } + + @Override + public boolean isReachable(Device device) { + return false; + } } private static class TestListener implements DeviceListener { diff --git a/core/net/src/test/java/org/onlab/onos/net/flow/impl/FlowRuleManagerTest.java b/core/net/src/test/java/org/onlab/onos/net/flow/impl/FlowRuleManagerTest.java index 59f0595e34..b986d6d881 100644 --- a/core/net/src/test/java/org/onlab/onos/net/flow/impl/FlowRuleManagerTest.java +++ b/core/net/src/test/java/org/onlab/onos/net/flow/impl/FlowRuleManagerTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.flow.impl; import com.google.common.collect.ImmutableList; @@ -540,7 +555,7 @@ public class FlowRuleManagerTest { @Override public CompletedBatchOperation get() throws InterruptedException, ExecutionException { - return new CompletedBatchOperation(true, Collections.emptySet()); + return new CompletedBatchOperation(true, Collections.emptySet()); } @Override diff --git a/core/net/src/test/java/org/onlab/onos/net/host/impl/HostManagerTest.java b/core/net/src/test/java/org/onlab/onos/net/host/impl/HostManagerTest.java index 67e6cc4bc3..cbc9cf1bb9 100644 --- a/core/net/src/test/java/org/onlab/onos/net/host/impl/HostManagerTest.java +++ b/core/net/src/test/java/org/onlab/onos/net/host/impl/HostManagerTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.host.impl; import static org.junit.Assert.assertEquals; diff --git a/core/net/src/test/java/org/onlab/onos/net/host/impl/HostMonitorTest.java b/core/net/src/test/java/org/onlab/onos/net/host/impl/HostMonitorTest.java index df211fb8e6..7405de2889 100644 --- a/core/net/src/test/java/org/onlab/onos/net/host/impl/HostMonitorTest.java +++ b/core/net/src/test/java/org/onlab/onos/net/host/impl/HostMonitorTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.host.impl; import static org.easymock.EasyMock.createMock; diff --git a/core/net/src/test/java/org/onlab/onos/net/intent/IntentTestsMocks.java b/core/net/src/test/java/org/onlab/onos/net/intent/IntentTestsMocks.java index e0e49ef3b5..63317063d2 100644 --- a/core/net/src/test/java/org/onlab/onos/net/intent/IntentTestsMocks.java +++ b/core/net/src/test/java/org/onlab/onos/net/intent/IntentTestsMocks.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent; import static org.onlab.onos.net.NetTestTools.createPath; diff --git a/core/net/src/test/java/org/onlab/onos/net/intent/LinksHaveEntryWithSourceDestinationPairMatcher.java b/core/net/src/test/java/org/onlab/onos/net/intent/LinksHaveEntryWithSourceDestinationPairMatcher.java index 869cefe6c9..a1b4cf7b35 100644 --- a/core/net/src/test/java/org/onlab/onos/net/intent/LinksHaveEntryWithSourceDestinationPairMatcher.java +++ b/core/net/src/test/java/org/onlab/onos/net/intent/LinksHaveEntryWithSourceDestinationPairMatcher.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent; import java.util.Collection; diff --git a/core/net/src/test/java/org/onlab/onos/net/intent/TestHostToHostIntent.java b/core/net/src/test/java/org/onlab/onos/net/intent/TestHostToHostIntent.java index 270ffd6527..55e00dd7cd 100644 --- a/core/net/src/test/java/org/onlab/onos/net/intent/TestHostToHostIntent.java +++ b/core/net/src/test/java/org/onlab/onos/net/intent/TestHostToHostIntent.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent; import org.junit.Test; diff --git a/core/net/src/test/java/org/onlab/onos/net/intent/TestLinkCollectionIntent.java b/core/net/src/test/java/org/onlab/onos/net/intent/TestLinkCollectionIntent.java index 8618aa0f79..7cc7398d18 100644 --- a/core/net/src/test/java/org/onlab/onos/net/intent/TestLinkCollectionIntent.java +++ b/core/net/src/test/java/org/onlab/onos/net/intent/TestLinkCollectionIntent.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent; import static org.hamcrest.CoreMatchers.not; diff --git a/core/net/src/test/java/org/onlab/onos/net/intent/TestMultiPointToSinglePointIntent.java b/core/net/src/test/java/org/onlab/onos/net/intent/TestMultiPointToSinglePointIntent.java index 442057824d..5325cfcc6d 100644 --- a/core/net/src/test/java/org/onlab/onos/net/intent/TestMultiPointToSinglePointIntent.java +++ b/core/net/src/test/java/org/onlab/onos/net/intent/TestMultiPointToSinglePointIntent.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent; import org.junit.Before; diff --git a/core/net/src/test/java/org/onlab/onos/net/intent/TestPointToPointIntent.java b/core/net/src/test/java/org/onlab/onos/net/intent/TestPointToPointIntent.java index 904e013c5e..7af382f8ca 100644 --- a/core/net/src/test/java/org/onlab/onos/net/intent/TestPointToPointIntent.java +++ b/core/net/src/test/java/org/onlab/onos/net/intent/TestPointToPointIntent.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent; import org.junit.Test; diff --git a/core/net/src/test/java/org/onlab/onos/net/intent/impl/TestHostToHostIntentCompiler.java b/core/net/src/test/java/org/onlab/onos/net/intent/impl/TestHostToHostIntentCompiler.java index 06d0f1155a..02fa4db79f 100644 --- a/core/net/src/test/java/org/onlab/onos/net/intent/impl/TestHostToHostIntentCompiler.java +++ b/core/net/src/test/java/org/onlab/onos/net/intent/impl/TestHostToHostIntentCompiler.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent.impl; import org.hamcrest.Matchers; diff --git a/core/net/src/test/java/org/onlab/onos/net/intent/impl/TestMultiPointToSinglePointIntentCompiler.java b/core/net/src/test/java/org/onlab/onos/net/intent/impl/TestMultiPointToSinglePointIntentCompiler.java index 276d07f2bc..e85d090256 100644 --- a/core/net/src/test/java/org/onlab/onos/net/intent/impl/TestMultiPointToSinglePointIntentCompiler.java +++ b/core/net/src/test/java/org/onlab/onos/net/intent/impl/TestMultiPointToSinglePointIntentCompiler.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent.impl; import org.hamcrest.Matchers; diff --git a/core/net/src/test/java/org/onlab/onos/net/intent/impl/TestPointToPointIntentCompiler.java b/core/net/src/test/java/org/onlab/onos/net/intent/impl/TestPointToPointIntentCompiler.java index b04bc2905e..d417908d5b 100644 --- a/core/net/src/test/java/org/onlab/onos/net/intent/impl/TestPointToPointIntentCompiler.java +++ b/core/net/src/test/java/org/onlab/onos/net/intent/impl/TestPointToPointIntentCompiler.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.intent.impl; import org.hamcrest.Matchers; @@ -53,7 +68,7 @@ public class TestPointToPointIntentCompiler { private PointToPointIntentCompiler makeCompiler(String[] hops) { PointToPointIntentCompiler compiler = new PointToPointIntentCompiler(); - compiler.pathService = new IntentTestsMocks.MockPathService(hops); +// compiler.topologyService = new IntentTestsMocks.MockPathService(hops); return compiler; } diff --git a/core/net/src/test/java/org/onlab/onos/net/link/impl/LinkManagerTest.java b/core/net/src/test/java/org/onlab/onos/net/link/impl/LinkManagerTest.java index 9a1656245b..2cab8fe4ee 100644 --- a/core/net/src/test/java/org/onlab/onos/net/link/impl/LinkManagerTest.java +++ b/core/net/src/test/java/org/onlab/onos/net/link/impl/LinkManagerTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.link.impl; import com.google.common.collect.ImmutableSet; diff --git a/core/net/src/test/java/org/onlab/onos/net/proxyarp/impl/ProxyArpManagerTest.java b/core/net/src/test/java/org/onlab/onos/net/proxyarp/impl/ProxyArpManagerTest.java index 60fdb690ca..6eca77c8d4 100644 --- a/core/net/src/test/java/org/onlab/onos/net/proxyarp/impl/ProxyArpManagerTest.java +++ b/core/net/src/test/java/org/onlab/onos/net/proxyarp/impl/ProxyArpManagerTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.proxyarp.impl; import static org.easymock.EasyMock.anyObject; diff --git a/core/net/src/test/java/org/onlab/onos/net/topology/impl/DefaultTopologyProviderTest.java b/core/net/src/test/java/org/onlab/onos/net/topology/impl/DefaultTopologyProviderTest.java index 4a8a3e9040..3ea1abbb46 100644 --- a/core/net/src/test/java/org/onlab/onos/net/topology/impl/DefaultTopologyProviderTest.java +++ b/core/net/src/test/java/org/onlab/onos/net/topology/impl/DefaultTopologyProviderTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.topology.impl; import com.google.common.collect.ImmutableSet; diff --git a/core/net/src/test/java/org/onlab/onos/net/topology/impl/PathManagerTest.java b/core/net/src/test/java/org/onlab/onos/net/topology/impl/PathManagerTest.java index c22f985139..6779c5e28b 100644 --- a/core/net/src/test/java/org/onlab/onos/net/topology/impl/PathManagerTest.java +++ b/core/net/src/test/java/org/onlab/onos/net/topology/impl/PathManagerTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.topology.impl; import org.junit.After; diff --git a/core/net/src/test/java/org/onlab/onos/net/topology/impl/TopologyManagerTest.java b/core/net/src/test/java/org/onlab/onos/net/topology/impl/TopologyManagerTest.java index ada7e78678..7fa2ff596b 100644 --- a/core/net/src/test/java/org/onlab/onos/net/topology/impl/TopologyManagerTest.java +++ b/core/net/src/test/java/org/onlab/onos/net/topology/impl/TopologyManagerTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.net.topology.impl; import org.junit.After; diff --git a/core/pom.xml b/core/pom.xml index fc8216ff89..322bac8a19 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -1,4 +1,19 @@ + diff --git a/core/store/dist/pom.xml b/core/store/dist/pom.xml index 7cb1a5155c..eebb8ffcc4 100644 --- a/core/store/dist/pom.xml +++ b/core/store/dist/pom.xml @@ -1,4 +1,19 @@ + diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterDefinitionStore.java b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterDefinitionStore.java index f38df5a5df..97ec769fe8 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterDefinitionStore.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterDefinitionStore.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.cluster.impl; import com.fasterxml.jackson.core.JsonEncoding; @@ -8,7 +23,7 @@ import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.ObjectNode; import org.onlab.onos.cluster.DefaultControllerNode; import org.onlab.onos.cluster.NodeId; -import org.onlab.packet.IpPrefix; +import org.onlab.packet.IpAddress; import java.io.File; import java.io.IOException; @@ -46,7 +61,7 @@ public class ClusterDefinitionStore { while (it.hasNext()) { ObjectNode nodeDef = (ObjectNode) it.next(); nodes.add(new DefaultControllerNode(new NodeId(nodeDef.get("id").asText()), - IpPrefix.valueOf(nodeDef.get("ip").asText()), + IpAddress.valueOf(nodeDef.get("ip").asText()), nodeDef.get("tcpPort").asInt(9876))); } return nodes; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterManagementMessageSubjects.java b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterManagementMessageSubjects.java index 6ab594e855..0fa40db78d 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterManagementMessageSubjects.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterManagementMessageSubjects.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.cluster.impl; import org.onlab.onos.store.cluster.messaging.MessageSubject; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterMembershipEvent.java b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterMembershipEvent.java index 1a65798156..30b5939b04 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterMembershipEvent.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterMembershipEvent.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.cluster.impl; import org.onlab.onos.cluster.ControllerNode; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterMembershipEventType.java b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterMembershipEventType.java index 07c6c31ec5..6ed93b45e0 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterMembershipEventType.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterMembershipEventType.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.cluster.impl; //Not used right now diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterNodesDelegate.java b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterNodesDelegate.java index daef7bdc95..a909534787 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterNodesDelegate.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/ClusterNodesDelegate.java @@ -1,8 +1,23 @@ +/* + * Copyright 2014 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.onlab.onos.store.cluster.impl; import org.onlab.onos.cluster.DefaultControllerNode; import org.onlab.onos.cluster.NodeId; -import org.onlab.packet.IpPrefix; +import org.onlab.packet.IpAddress; // Not used right now /** @@ -19,7 +34,8 @@ public interface ClusterNodesDelegate { * @param tcpPort node TCP listen port * @return the controller node */ - DefaultControllerNode nodeDetected(NodeId nodeId, IpPrefix ip, int tcpPort); + DefaultControllerNode nodeDetected(NodeId nodeId, IpAddress ip, + int tcpPort); /** * Notifies about cluster node going offline. diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/DistributedClusterStore.java b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/DistributedClusterStore.java index 59267d15c0..e3822add14 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/DistributedClusterStore.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/DistributedClusterStore.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.cluster.impl; import com.google.common.base.Optional; @@ -22,7 +37,7 @@ import org.onlab.onos.cluster.NodeId; import org.onlab.onos.store.hz.AbsentInvalidatingLoadingCache; import org.onlab.onos.store.hz.AbstractHazelcastStore; import org.onlab.onos.store.hz.OptionalCacheLoader; -import org.onlab.packet.IpPrefix; +import org.onlab.packet.IpAddress; import java.util.Map; import java.util.Set; @@ -105,7 +120,7 @@ public class DistributedClusterStore } @Override - public ControllerNode addNode(NodeId nodeId, IpPrefix ip, int tcpPort) { + public ControllerNode addNode(NodeId nodeId, IpAddress ip, int tcpPort) { return addNode(new DefaultControllerNode(nodeId, ip, tcpPort)); } @@ -127,13 +142,13 @@ public class DistributedClusterStore // Creates a controller node descriptor from the Hazelcast member. private DefaultControllerNode node(Member member) { - IpPrefix ip = memberAddress(member); + IpAddress ip = memberAddress(member); return new DefaultControllerNode(new NodeId(ip.toString()), ip); } - private IpPrefix memberAddress(Member member) { + private IpAddress memberAddress(Member member) { byte[] address = member.getSocketAddress().getAddress().getAddress(); - return IpPrefix.valueOf(address); + return IpAddress.valueOf(address); } // Interceptor for membership events. diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/package-info.java b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/package-info.java index 9f36b88e70..64b4e20d5b 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/package-info.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/impl/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Implementation of a distributed cluster node store using Hazelcast. */ diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/messaging/impl/ClusterCommunicationManager.java b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/messaging/impl/ClusterCommunicationManager.java index d8e5fabd7b..540de77f69 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/messaging/impl/ClusterCommunicationManager.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/messaging/impl/ClusterCommunicationManager.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.cluster.messaging.impl; import static com.google.common.base.Preconditions.checkArgument; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/messaging/impl/package-info.java b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/messaging/impl/package-info.java index 3364dd23fe..efb89a432f 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/messaging/impl/package-info.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/messaging/impl/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Implementation of the cluster messaging mechanism. */ diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/core/impl/AppIdEvent.java b/core/store/dist/src/main/java/org/onlab/onos/store/core/impl/AppIdEvent.java index 3dd626c66a..8c33201940 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/core/impl/AppIdEvent.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/core/impl/AppIdEvent.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.store.core.impl; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/core/impl/AppIdStoreDelegate.java b/core/store/dist/src/main/java/org/onlab/onos/store/core/impl/AppIdStoreDelegate.java index e05daf265f..e71dbb7fc1 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/core/impl/AppIdStoreDelegate.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/core/impl/AppIdStoreDelegate.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.store.core.impl; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/core/impl/DistributedApplicationIdStore.java b/core/store/dist/src/main/java/org/onlab/onos/store/core/impl/DistributedApplicationIdStore.java index 354ef49093..24f4f74e3c 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/core/impl/DistributedApplicationIdStore.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/core/impl/DistributedApplicationIdStore.java @@ -1,23 +1,22 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.store.core.impl; +import static org.apache.commons.lang3.concurrent.ConcurrentUtils.putIfAbsent; + import com.google.common.collect.ImmutableSet; import com.hazelcast.core.EntryEvent; import com.hazelcast.core.EntryListener; @@ -100,20 +99,19 @@ public class DistributedApplicationIdStore return appId; } - private synchronized void primeAppIds() { + private void primeAppIds() { for (DefaultApplicationId appId : appIdsByName.values()) { appIds.put(appId.id(), appId); } } @Override - public synchronized ApplicationId registerApplication(String name) { + public ApplicationId registerApplication(String name) { DefaultApplicationId appId = appIdsByName.get(name); if (appId == null) { short id = (short) lastAppId.getAndIncrement(); - appId = new DefaultApplicationId(id, name); - appIds.put(id, appId); - appIdsByName.put(name, appId); + appId = putIfAbsent(appIdsByName, name, + new DefaultApplicationId(id, name)); } return appId; } diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/core/impl/package-info.java b/core/store/dist/src/main/java/org/onlab/onos/store/core/impl/package-info.java index 7613a4f4f3..a03d5510d2 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/core/impl/package-info.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/core/impl/package-info.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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. */ /** diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/DeviceAntiEntropyAdvertisement.java b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/DeviceAntiEntropyAdvertisement.java index 7e754fcab9..403032a90f 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/DeviceAntiEntropyAdvertisement.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/DeviceAntiEntropyAdvertisement.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.device.impl; import static com.google.common.base.Preconditions.checkNotNull; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/DeviceAntiEntropyRequest.java b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/DeviceAntiEntropyRequest.java index 7b63c083f7..923453a94f 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/DeviceAntiEntropyRequest.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/DeviceAntiEntropyRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.device.impl; import static com.google.common.base.Preconditions.checkNotNull; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/DeviceClockManager.java b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/DeviceClockManager.java index 92af514cd4..f7f24e9657 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/DeviceClockManager.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/DeviceClockManager.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.device.impl; import static org.slf4j.LoggerFactory.getLogger; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/DeviceDescriptions.java b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/DeviceDescriptions.java index 43008d2437..b51377fbbe 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/DeviceDescriptions.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/DeviceDescriptions.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.device.impl; import static com.google.common.base.Preconditions.checkNotNull; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/DeviceFragmentId.java b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/DeviceFragmentId.java index 411a9e8738..67616f258f 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/DeviceFragmentId.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/DeviceFragmentId.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.device.impl; import java.util.Objects; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/GossipDeviceStore.java b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/GossipDeviceStore.java index 6fbc034d2c..f3ae7a4ac6 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/GossipDeviceStore.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/GossipDeviceStore.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.device.impl; import com.google.common.base.Function; @@ -701,7 +716,7 @@ public class GossipDeviceStore public synchronized DeviceEvent removeDevice(DeviceId deviceId) { final NodeId master = mastershipService.getMasterFor(deviceId); if (!clusterService.getLocalNode().id().equals(master)) { - log.info("remove Device {} requested on non master node", deviceId); + log.info("Removal of device {} requested on non master node", deviceId); // FIXME silently ignoring. Should be forwarding or broadcasting to // master. return null; @@ -778,7 +793,7 @@ public class GossipDeviceStore private Device composeDevice(DeviceId deviceId, Map providerDescs) { - checkArgument(!providerDescs.isEmpty(), "No Device descriptions supplied"); + checkArgument(!providerDescs.isEmpty(), "No device descriptions supplied"); ProviderId primary = pickPrimaryPID(providerDescs); diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/GossipDeviceStoreMessageSubjects.java b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/GossipDeviceStoreMessageSubjects.java index 3168368387..89577a841e 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/GossipDeviceStoreMessageSubjects.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/GossipDeviceStoreMessageSubjects.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.device.impl; import org.onlab.onos.store.cluster.messaging.MessageSubject; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/InternalDeviceEvent.java b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/InternalDeviceEvent.java index 623a6b146d..051602be80 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/InternalDeviceEvent.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/InternalDeviceEvent.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.device.impl; import org.onlab.onos.net.DeviceId; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/InternalDeviceEventSerializer.java b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/InternalDeviceEventSerializer.java index c789c96eeb..b0a577c848 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/InternalDeviceEventSerializer.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/InternalDeviceEventSerializer.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.device.impl; import org.onlab.onos.net.DeviceId; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/InternalDeviceOfflineEvent.java b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/InternalDeviceOfflineEvent.java index 4540efbbb8..403798185b 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/InternalDeviceOfflineEvent.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/InternalDeviceOfflineEvent.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.device.impl; import org.onlab.onos.net.DeviceId; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/InternalDeviceOfflineEventSerializer.java b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/InternalDeviceOfflineEventSerializer.java index 7059636e30..f5f8814f1b 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/InternalDeviceOfflineEventSerializer.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/InternalDeviceOfflineEventSerializer.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.device.impl; import org.onlab.onos.net.DeviceId; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/InternalDeviceRemovedEvent.java b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/InternalDeviceRemovedEvent.java index 42cb177894..ac7793d690 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/InternalDeviceRemovedEvent.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/InternalDeviceRemovedEvent.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.device.impl; import org.onlab.onos.net.DeviceId; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/InternalPortEvent.java b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/InternalPortEvent.java index e036ec6176..f394905e85 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/InternalPortEvent.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/InternalPortEvent.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.device.impl; import java.util.List; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/InternalPortEventSerializer.java b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/InternalPortEventSerializer.java index 2facb7e2f4..99514abd5c 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/InternalPortEventSerializer.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/InternalPortEventSerializer.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.device.impl; import java.util.List; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/InternalPortStatusEvent.java b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/InternalPortStatusEvent.java index ff59ab067d..12a8a19112 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/InternalPortStatusEvent.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/InternalPortStatusEvent.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.device.impl; import org.onlab.onos.net.DeviceId; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/InternalPortStatusEventSerializer.java b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/InternalPortStatusEventSerializer.java index 9d2db47531..24a9f259e2 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/InternalPortStatusEventSerializer.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/InternalPortStatusEventSerializer.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.device.impl; import org.onlab.onos.net.DeviceId; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/PortFragmentId.java b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/PortFragmentId.java index 0ac3643dd2..74398c1c75 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/PortFragmentId.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/PortFragmentId.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.device.impl; import java.util.Objects; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/package-info.java b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/package-info.java index 572948e6fc..e60ee4d37c 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/package-info.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Implementation of distributed device store using p2p synchronization protocol. */ diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/flow/ReplicaInfo.java b/core/store/dist/src/main/java/org/onlab/onos/store/flow/ReplicaInfo.java index 47706f9943..f15eda834d 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/flow/ReplicaInfo.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/flow/ReplicaInfo.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.flow; import static com.google.common.base.Preconditions.checkNotNull; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/flow/ReplicaInfoEvent.java b/core/store/dist/src/main/java/org/onlab/onos/store/flow/ReplicaInfoEvent.java index 7cba127d56..c956c8a7b0 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/flow/ReplicaInfoEvent.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/flow/ReplicaInfoEvent.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.flow; import static com.google.common.base.Preconditions.checkNotNull; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/flow/ReplicaInfoEventListener.java b/core/store/dist/src/main/java/org/onlab/onos/store/flow/ReplicaInfoEventListener.java index 44239dc06e..fc6ef23a08 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/flow/ReplicaInfoEventListener.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/flow/ReplicaInfoEventListener.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.flow; import org.onlab.onos.event.EventListener; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/flow/ReplicaInfoService.java b/core/store/dist/src/main/java/org/onlab/onos/store/flow/ReplicaInfoService.java index e6133482c9..7fb24f80d8 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/flow/ReplicaInfoService.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/flow/ReplicaInfoService.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.flow; import org.onlab.onos.net.DeviceId; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/flow/impl/DistributedFlowRuleStore.java b/core/store/dist/src/main/java/org/onlab/onos/store/flow/impl/DistributedFlowRuleStore.java index 69b6743333..bd2742a7b8 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/flow/impl/DistributedFlowRuleStore.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/flow/impl/DistributedFlowRuleStore.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.flow.impl; import static com.google.common.base.Preconditions.checkNotNull; @@ -11,6 +26,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; +import java.util.HashSet; import java.util.Map.Entry; import java.util.Set; import java.util.concurrent.ExecutionException; @@ -58,12 +74,13 @@ import org.onlab.onos.store.flow.ReplicaInfoEventListener; import org.onlab.onos.store.flow.ReplicaInfoService; import org.onlab.onos.store.hz.AbstractHazelcastStore; import org.onlab.onos.store.hz.SMap; +import org.onlab.onos.store.serializers.DecodeTo; import org.onlab.onos.store.serializers.DistributedStoreSerializers; import org.onlab.onos.store.serializers.KryoSerializer; +import org.onlab.onos.store.serializers.StoreSerializer; import org.onlab.util.KryoNamespace; import org.slf4j.Logger; -import com.google.common.base.Function; import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; import com.google.common.cache.CacheLoader; @@ -130,7 +147,7 @@ public class DistributedFlowRuleStore // TODO make this configurable private boolean syncBackup = false; - protected static final KryoSerializer SERIALIZER = new KryoSerializer() { + protected static final StoreSerializer SERIALIZER = new KryoSerializer() { @Override protected void setupKryoPool() { serializerPool = KryoNamespace.newBuilder() @@ -157,28 +174,9 @@ public class DistributedFlowRuleStore .softValues() .build(new SMapLoader()); - clusterCommunicator.addSubscriber(APPLY_BATCH_FLOWS, new ClusterMessageHandler() { + final NodeId local = clusterService.getLocalNode().id(); - @Override - public void handle(final ClusterMessage message) { - FlowRuleBatchOperation operation = SERIALIZER.decode(message.payload()); - log.info("received batch request {}", operation); - final ListenableFuture f = storeBatchInternal(operation); - - f.addListener(new Runnable() { - - @Override - public void run() { - CompletedBatchOperation result = Futures.getUnchecked(f); - try { - message.respond(SERIALIZER.encode(result)); - } catch (IOException e) { - log.error("Failed to respond back", e); - } - } - }, futureListeners); - } - }); + clusterCommunicator.addSubscriber(APPLY_BATCH_FLOWS, new OnStoreBatch(local)); clusterCommunicator.addSubscriber(GET_FLOW_ENTRY, new ClusterMessageHandler() { @@ -241,6 +239,14 @@ public class DistributedFlowRuleStore @Override public synchronized FlowEntry getFlowEntry(FlowRule rule) { ReplicaInfo replicaInfo = replicaInfoManager.getReplicaInfoFor(rule.deviceId()); + + if (!replicaInfo.master().isPresent()) { + log.warn("No master for {}", rule); + // TODO: revisit if this should be returning null. + // FIXME: throw a FlowStoreException + throw new RuntimeException("No master for " + rule); + } + if (replicaInfo.master().get().equals(clusterService.getLocalNode().id())) { return getFlowEntryInternal(rule); } @@ -275,6 +281,14 @@ public class DistributedFlowRuleStore public synchronized Iterable getFlowEntries(DeviceId deviceId) { ReplicaInfo replicaInfo = replicaInfoManager.getReplicaInfoFor(deviceId); + + if (!replicaInfo.master().isPresent()) { + log.warn("No master for {}", deviceId); + // TODO: revisit if this should be returning empty collection. + // FIXME: throw a FlowStoreException + throw new RuntimeException("No master for " + deviceId); + } + if (replicaInfo.master().get().equals(clusterService.getLocalNode().id())) { return getFlowEntriesInternal(deviceId); } @@ -314,14 +328,22 @@ public class DistributedFlowRuleStore public Future storeBatch(FlowRuleBatchOperation operation) { if (operation.getOperations().isEmpty()) { - return Futures.immediateFuture(new CompletedBatchOperation(true, Collections.emptySet())); + return Futures.immediateFuture(new CompletedBatchOperation(true, Collections.emptySet())); } DeviceId deviceId = operation.getOperations().get(0).getTarget().deviceId(); ReplicaInfo replicaInfo = replicaInfoManager.getReplicaInfoFor(deviceId); - if (replicaInfo.master().get().equals(clusterService.getLocalNode().id())) { + if (!replicaInfo.master().isPresent()) { + log.warn("No master for {}", deviceId); + // TODO: revisit if this should be "success" from Future point of view + // with every FlowEntry failed + return Futures.immediateFailedFuture(new IOException("No master to forward to")); + } + + final NodeId local = clusterService.getLocalNode().id(); + if (replicaInfo.master().get().equals(local)) { return storeBatchInternal(operation); } @@ -329,19 +351,14 @@ public class DistributedFlowRuleStore replicaInfo.master().orNull(), deviceId); ClusterMessage message = new ClusterMessage( - clusterService.getLocalNode().id(), + local, APPLY_BATCH_FLOWS, SERIALIZER.encode(operation)); try { ListenableFuture responseFuture = clusterCommunicator.sendAndReceive(message, replicaInfo.master().get()); - return Futures.transform(responseFuture, new Function() { - @Override - public CompletedBatchOperation apply(byte[] input) { - return SERIALIZER.decode(input); - } - }); + return Futures.transform(responseFuture, new DecodeTo(SERIALIZER)); } catch (IOException e) { return Futures.immediateFailedFuture(e); } @@ -352,7 +369,6 @@ public class DistributedFlowRuleStore final List toAdd = new ArrayList<>(); DeviceId did = null; - for (FlowRuleBatchEntry batchEntry : operation.getOperations()) { FlowRule flowRule = batchEntry.getTarget(); FlowRuleOperation op = batchEntry.getOperator(); @@ -375,7 +391,7 @@ public class DistributedFlowRuleStore } } if (toAdd.isEmpty() && toRemove.isEmpty()) { - return Futures.immediateFuture(new CompletedBatchOperation(true, Collections.emptySet())); + return Futures.immediateFuture(new CompletedBatchOperation(true, Collections.emptySet())); } // create remote backup copies @@ -419,7 +435,8 @@ public class DistributedFlowRuleStore @Override public FlowRuleEvent addOrUpdateFlowRule(FlowEntry rule) { ReplicaInfo replicaInfo = replicaInfoManager.getReplicaInfoFor(rule.deviceId()); - if (replicaInfo.master().get().equals(clusterService.getLocalNode().id())) { + final NodeId localId = clusterService.getLocalNode().id(); + if (localId.equals(replicaInfo.master().orNull())) { return addOrUpdateFlowRuleInternal(rule); } @@ -456,7 +473,9 @@ public class DistributedFlowRuleStore @Override public FlowRuleEvent removeFlowRule(FlowEntry rule) { ReplicaInfo replicaInfo = replicaInfoManager.getReplicaInfoFor(rule.deviceId()); - if (replicaInfo.master().get().equals(clusterService.getLocalNode().id())) { + + final NodeId localId = clusterService.getLocalNode().id(); + if (localId.equals(replicaInfo.master().orNull())) { // bypass and handle it locally return removeFlowRuleInternal(rule); } @@ -517,6 +536,56 @@ public class DistributedFlowRuleStore log.debug("removedFromPrimary {}", removed); } + private final class OnStoreBatch implements ClusterMessageHandler { + private final NodeId local; + + private OnStoreBatch(NodeId local) { + this.local = local; + } + + @Override + public void handle(final ClusterMessage message) { + FlowRuleBatchOperation operation = SERIALIZER.decode(message.payload()); + log.info("received batch request {}", operation); + + final DeviceId deviceId = operation.getOperations().get(0).getTarget().deviceId(); + ReplicaInfo replicaInfo = replicaInfoManager.getReplicaInfoFor(deviceId); + if (!local.equals(replicaInfo.master().orNull())) { + + Set failures = new HashSet<>(operation.size()); + for (FlowRuleBatchEntry op : operation.getOperations()) { + failures.add(op.getTarget()); + } + CompletedBatchOperation allFailed = new CompletedBatchOperation(false, failures); + // This node is no longer the master, respond as all failed. + // TODO: we might want to wrap response in envelope + // to distinguish sw programming failure and hand over + // it make sense in the latter case to retry immediately. + try { + message.respond(SERIALIZER.encode(allFailed)); + } catch (IOException e) { + log.error("Failed to respond back", e); + } + return; + } + + final ListenableFuture f = storeBatchInternal(operation); + + f.addListener(new Runnable() { + + @Override + public void run() { + CompletedBatchOperation result = Futures.getUnchecked(f); + try { + message.respond(SERIALIZER.encode(result)); + } catch (IOException e) { + log.error("Failed to respond back", e); + } + } + }, futureListeners); + } + } + private final class SMapLoader extends CacheLoader>> { diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/flow/impl/FlowStoreMessageSubjects.java b/core/store/dist/src/main/java/org/onlab/onos/store/flow/impl/FlowStoreMessageSubjects.java index 8f4a050860..a1cee06637 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/flow/impl/FlowStoreMessageSubjects.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/flow/impl/FlowStoreMessageSubjects.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.flow.impl; import org.onlab.onos.store.cluster.messaging.MessageSubject; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/flow/impl/ReplicaInfoManager.java b/core/store/dist/src/main/java/org/onlab/onos/store/flow/impl/ReplicaInfoManager.java index f03600dfe8..5d766e63a6 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/flow/impl/ReplicaInfoManager.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/flow/impl/ReplicaInfoManager.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.flow.impl; import static com.google.common.base.Preconditions.checkNotNull; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/flow/impl/package-info.java b/core/store/dist/src/main/java/org/onlab/onos/store/flow/impl/package-info.java index cedf68ef0b..0fec5a09f0 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/flow/impl/package-info.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/flow/impl/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Implementation of the distributed flow rule store using p2p synchronization * protocol. diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/host/impl/GossipHostStore.java b/core/store/dist/src/main/java/org/onlab/onos/store/host/impl/GossipHostStore.java index 25ca29e01d..8029e27c44 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/host/impl/GossipHostStore.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/host/impl/GossipHostStore.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.host.impl; import com.google.common.collect.FluentIterable; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/host/impl/GossipHostStoreMessageSubjects.java b/core/store/dist/src/main/java/org/onlab/onos/store/host/impl/GossipHostStoreMessageSubjects.java index 0a9f0e0dcd..36e018d3b0 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/host/impl/GossipHostStoreMessageSubjects.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/host/impl/GossipHostStoreMessageSubjects.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.host.impl; import org.onlab.onos.store.cluster.messaging.MessageSubject; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/host/impl/HostAntiEntropyAdvertisement.java b/core/store/dist/src/main/java/org/onlab/onos/store/host/impl/HostAntiEntropyAdvertisement.java index 6139005618..8e5877c358 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/host/impl/HostAntiEntropyAdvertisement.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/host/impl/HostAntiEntropyAdvertisement.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.host.impl; import static com.google.common.base.Preconditions.checkNotNull; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/host/impl/HostClockManager.java b/core/store/dist/src/main/java/org/onlab/onos/store/host/impl/HostClockManager.java index 176f05de37..ec954ba0ad 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/host/impl/HostClockManager.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/host/impl/HostClockManager.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.host.impl; import static org.slf4j.LoggerFactory.getLogger; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/host/impl/HostFragmentId.java b/core/store/dist/src/main/java/org/onlab/onos/store/host/impl/HostFragmentId.java index 34dbff63a3..d935946dcc 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/host/impl/HostFragmentId.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/host/impl/HostFragmentId.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.host.impl; import java.util.Objects; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/host/impl/InternalHostEvent.java b/core/store/dist/src/main/java/org/onlab/onos/store/host/impl/InternalHostEvent.java index f5ca63ee94..92afea4827 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/host/impl/InternalHostEvent.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/host/impl/InternalHostEvent.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.host.impl; import org.onlab.onos.net.HostId; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/host/impl/InternalHostRemovedEvent.java b/core/store/dist/src/main/java/org/onlab/onos/store/host/impl/InternalHostRemovedEvent.java index 8dd3b44d21..0269691ea8 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/host/impl/InternalHostRemovedEvent.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/host/impl/InternalHostRemovedEvent.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.host.impl; import org.onlab.onos.net.HostId; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/host/impl/package-info.java b/core/store/dist/src/main/java/org/onlab/onos/store/host/impl/package-info.java index a5f7727d0c..a2e8ed1fa5 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/host/impl/package-info.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/host/impl/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Implementation of the distributed host store using p2p synchronization protocol. */ diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/hz/AbsentInvalidatingLoadingCache.java b/core/store/dist/src/main/java/org/onlab/onos/store/hz/AbsentInvalidatingLoadingCache.java index 8164467bac..63c505f8cb 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/hz/AbsentInvalidatingLoadingCache.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/hz/AbsentInvalidatingLoadingCache.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.hz; import java.util.concurrent.Callable; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/hz/AbstractHazelcastStore.java b/core/store/dist/src/main/java/org/onlab/onos/store/hz/AbstractHazelcastStore.java index e42ec453fc..0a1631e5a2 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/hz/AbstractHazelcastStore.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/hz/AbstractHazelcastStore.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.hz; import com.google.common.base.Optional; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/hz/OptionalCacheLoader.java b/core/store/dist/src/main/java/org/onlab/onos/store/hz/OptionalCacheLoader.java index e555a51a66..574f80d843 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/hz/OptionalCacheLoader.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/hz/OptionalCacheLoader.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.hz; import static com.google.common.base.Preconditions.checkNotNull; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/hz/SMap.java b/core/store/dist/src/main/java/org/onlab/onos/store/hz/SMap.java index 16063ff331..a4badcf8ef 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/hz/SMap.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/hz/SMap.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.hz; import static com.google.common.base.Preconditions.checkNotNull; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/hz/StoreManager.java b/core/store/dist/src/main/java/org/onlab/onos/store/hz/StoreManager.java index 6674989a19..b59861692a 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/hz/StoreManager.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/hz/StoreManager.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.hz; import com.hazelcast.config.Config; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/hz/StoreService.java b/core/store/dist/src/main/java/org/onlab/onos/store/hz/StoreService.java index d79e51c400..a597b7410b 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/hz/StoreService.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/hz/StoreService.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.hz; import com.hazelcast.core.HazelcastInstance; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/hz/package-info.java b/core/store/dist/src/main/java/org/onlab/onos/store/hz/package-info.java index d92f54318d..16ab775a1d 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/hz/package-info.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/hz/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Common abstractions and facilities for implementing distributed store * using Hazelcast. diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/impl/MastershipBasedTimestamp.java b/core/store/dist/src/main/java/org/onlab/onos/store/impl/MastershipBasedTimestamp.java index 9721024a65..50ab244559 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/impl/MastershipBasedTimestamp.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/impl/MastershipBasedTimestamp.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.impl; import static com.google.common.base.Preconditions.checkArgument; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/impl/Timestamped.java b/core/store/dist/src/main/java/org/onlab/onos/store/impl/Timestamped.java index ae79831724..2b3f3e5067 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/impl/Timestamped.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/impl/Timestamped.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.impl; import static com.google.common.base.Preconditions.checkNotNull; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/impl/WallClockTimestamp.java b/core/store/dist/src/main/java/org/onlab/onos/store/impl/WallClockTimestamp.java index 38d23c1a93..3ce8f11a48 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/impl/WallClockTimestamp.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/impl/WallClockTimestamp.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.impl; import static com.google.common.base.Preconditions.checkArgument; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/impl/package-info.java b/core/store/dist/src/main/java/org/onlab/onos/store/impl/package-info.java index 5b3ec3043f..a534923136 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/impl/package-info.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/impl/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Common facilities for use by various distributed stores. */ diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/intent/impl/DistributedIntentStore.java b/core/store/dist/src/main/java/org/onlab/onos/store/intent/impl/DistributedIntentStore.java index f940f7de12..366ae3e66d 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/intent/impl/DistributedIntentStore.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/intent/impl/DistributedIntentStore.java @@ -1,6 +1,23 @@ +/* + * Copyright 2014 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.onlab.onos.store.intent.impl; import com.google.common.collect.ImmutableSet; +import com.hazelcast.core.IMap; + import org.apache.felix.scr.annotations.Activate; import org.apache.felix.scr.annotations.Component; import org.apache.felix.scr.annotations.Deactivate; @@ -11,30 +28,57 @@ import org.onlab.onos.net.intent.IntentId; import org.onlab.onos.net.intent.IntentState; import org.onlab.onos.net.intent.IntentStore; import org.onlab.onos.net.intent.IntentStoreDelegate; -import org.onlab.onos.store.AbstractStore; +import org.onlab.onos.store.hz.AbstractHazelcastStore; +import org.onlab.onos.store.hz.SMap; import org.slf4j.Logger; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; +import static com.google.common.base.Verify.verify; import static org.onlab.onos.net.intent.IntentState.*; import static org.slf4j.LoggerFactory.getLogger; -//FIXME: I LIE I AM NOT DISTRIBUTED @Component(immediate = true) @Service public class DistributedIntentStore - extends AbstractStore + extends AbstractHazelcastStore implements IntentStore { private final Logger log = getLogger(getClass()); - private final Map intents = new ConcurrentHashMap<>(); - private final Map states = new ConcurrentHashMap<>(); - private final Map> installable = new ConcurrentHashMap<>(); + // Assumption: IntentId will not have synonyms + private SMap intents; + private SMap states; + + // Map to store instance local intermediate state transition + private transient Map transientStates = new ConcurrentHashMap<>(); + + private SMap> installable; + + @Override @Activate public void activate() { + // FIXME: We need a way to add serializer for intents which has been plugged-in. + // TODO: As a short term workaround, relax Kryo config to + // registrationRequired=false? + super.activate(); + + // TODO: enable near cache, allow read from backup for this IMap + IMap rawIntents = super.theInstance.getMap("intents"); + intents = new SMap<>(rawIntents , super.serializer); + + // TODO: disable near cache, disable read from backup for this IMap + IMap rawStates = super.theInstance.getMap("intent-states"); + states = new SMap<>(rawStates , super.serializer); + + transientStates.clear(); + + // TODO: disable near cache, disable read from backup for this IMap + IMap rawInstallables = super.theInstance.getMap("installable-intents"); + installable = new SMap<>(rawInstallables , super.serializer); + log.info("Started"); } @@ -45,16 +89,27 @@ public class DistributedIntentStore @Override public IntentEvent createIntent(Intent intent) { - intents.put(intent.id(), intent); - return this.setState(intent, IntentState.SUBMITTED); + Intent existing = intents.putIfAbsent(intent.id(), intent); + if (existing != null) { + // duplicate, ignore + return null; + } else { + return this.setState(intent, IntentState.SUBMITTED); + } } @Override public IntentEvent removeIntent(IntentId intentId) { Intent intent = intents.remove(intentId); installable.remove(intentId); + if (intent == null) { + // was already removed + return null; + } IntentEvent event = this.setState(intent, WITHDRAWN); states.remove(intentId); + transientStates.remove(intentId); + // TODO: Should we callremoveInstalledIntents if this Intent was return event; } @@ -75,31 +130,53 @@ public class DistributedIntentStore @Override public IntentState getIntentState(IntentId id) { + final IntentState localState = transientStates.get(id); + if (localState != null) { + return localState; + } return states.get(id); } @Override public IntentEvent setState(Intent intent, IntentState state) { - IntentId id = intent.id(); - states.put(id, state); + final IntentId id = intent.id(); IntentEvent.Type type = null; + IntentState prev = null; + boolean transientStateChangeOnly = false; + // TODO: enable sanity checking if Debug enabled, etc. switch (state) { case SUBMITTED: + prev = states.putIfAbsent(id, SUBMITTED); + verify(prev == null, "Illegal state transition attempted from %s to SUBMITTED", prev); type = IntentEvent.Type.SUBMITTED; break; case INSTALLED: + // parking state transition + prev = states.replace(id, INSTALLED); + verify(prev != null, "Illegal state transition attempted from non-SUBMITTED to INSTALLED"); type = IntentEvent.Type.INSTALLED; break; case FAILED: + prev = states.replace(id, FAILED); type = IntentEvent.Type.FAILED; break; case WITHDRAWN: + prev = states.replace(id, WITHDRAWN); + verify(prev != null, "Illegal state transition attempted from non-WITHDRAWING to WITHDRAWN"); type = IntentEvent.Type.WITHDRAWN; break; default: + transientStateChangeOnly = true; break; } + if (!transientStateChangeOnly) { + log.debug("Parking State change: {} {}=>{}", id, prev, state); + } + // Update instance local state, which includes non-parking state transition + prev = transientStates.put(id, state); + log.debug("Transient State change: {} {}=>{}", id, prev, state); + if (type == null) { return null; } @@ -107,7 +184,7 @@ public class DistributedIntentStore } @Override - public void addInstallableIntents(IntentId intentId, List result) { + public void setInstallableIntents(IntentId intentId, List result) { installable.put(intentId, result); } @@ -121,4 +198,5 @@ public class DistributedIntentStore installable.remove(intentId); } + // FIXME add handler to react to remote event } diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/link/impl/GossipLinkStore.java b/core/store/dist/src/main/java/org/onlab/onos/store/link/impl/GossipLinkStore.java index d6c07a8d78..ab5cc8ad9b 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/link/impl/GossipLinkStore.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/link/impl/GossipLinkStore.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.link.impl; import com.google.common.base.Function; @@ -330,14 +345,6 @@ public class GossipLinkStore // Creates and stores the link and returns the appropriate event. // Guarded by linkDescs value (=locking each Link) private LinkEvent createLink(LinkKey key, Link newLink) { - - if (newLink.providerId().isAncillary()) { - // TODO: revisit ancillary only Link handling - - // currently treating ancillary only as down (not visible outside) - return null; - } - links.put(key, newLink); srcLinks.put(newLink.src().deviceId(), key); dstLinks.put(newLink.dst().deviceId(), key); @@ -347,14 +354,6 @@ public class GossipLinkStore // Updates, if necessary the specified link and returns the appropriate event. // Guarded by linkDescs value (=locking each Link) private LinkEvent updateLink(LinkKey key, Link oldLink, Link newLink) { - - if (newLink.providerId().isAncillary()) { - // TODO: revisit ancillary only Link handling - - // currently treating ancillary only as down (not visible outside) - return null; - } - // Note: INDIRECT -> DIRECT transition only // so that BDDP discovered Link will not overwrite LDDP Link if ((oldLink.type() == INDIRECT && newLink.type() == DIRECT) || diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/link/impl/GossipLinkStoreMessageSubjects.java b/core/store/dist/src/main/java/org/onlab/onos/store/link/impl/GossipLinkStoreMessageSubjects.java index 817efe48f0..4a7cb46e1b 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/link/impl/GossipLinkStoreMessageSubjects.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/link/impl/GossipLinkStoreMessageSubjects.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.link.impl; import org.onlab.onos.store.cluster.messaging.MessageSubject; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/link/impl/InternalLinkEvent.java b/core/store/dist/src/main/java/org/onlab/onos/store/link/impl/InternalLinkEvent.java index 74694baa9c..a184d7097c 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/link/impl/InternalLinkEvent.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/link/impl/InternalLinkEvent.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.link.impl; import com.google.common.base.MoreObjects; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/link/impl/InternalLinkRemovedEvent.java b/core/store/dist/src/main/java/org/onlab/onos/store/link/impl/InternalLinkRemovedEvent.java index 7864580571..4cd783c70e 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/link/impl/InternalLinkRemovedEvent.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/link/impl/InternalLinkRemovedEvent.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.link.impl; import org.onlab.onos.net.LinkKey; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/link/impl/LinkAntiEntropyAdvertisement.java b/core/store/dist/src/main/java/org/onlab/onos/store/link/impl/LinkAntiEntropyAdvertisement.java index a41f9cd39f..6cc961653b 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/link/impl/LinkAntiEntropyAdvertisement.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/link/impl/LinkAntiEntropyAdvertisement.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.link.impl; import static com.google.common.base.Preconditions.checkNotNull; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/link/impl/LinkFragmentId.java b/core/store/dist/src/main/java/org/onlab/onos/store/link/impl/LinkFragmentId.java index f97bef641e..383dcd611f 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/link/impl/LinkFragmentId.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/link/impl/LinkFragmentId.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.link.impl; import java.util.Objects; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/link/impl/package-info.java b/core/store/dist/src/main/java/org/onlab/onos/store/link/impl/package-info.java index ab45e4f7e1..6ce15e2e69 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/link/impl/package-info.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/link/impl/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Implementation of distributed link store using p2p synchronization protocol. */ diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/mastership/impl/DistributedMastershipStore.java b/core/store/dist/src/main/java/org/onlab/onos/store/mastership/impl/DistributedMastershipStore.java index ecc8982c64..d1917d60f8 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/mastership/impl/DistributedMastershipStore.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/mastership/impl/DistributedMastershipStore.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.mastership.impl; import static org.onlab.onos.mastership.MastershipEvent.Type.MASTER_CHANGED; @@ -257,6 +272,10 @@ implements MastershipStore { switch (role) { case MASTER: event = reelect(nodeId, deviceId, rv); + if (event != null) { + Integer term = terms.get(deviceId); + terms.put(deviceId, ++term); + } //fall through to reinforce relinquishment case STANDBY: //fall through to reinforce relinquishment @@ -289,15 +308,11 @@ implements MastershipStore { if (backup == null) { log.info("{} giving up and going to NONE for {}", current, deviceId); rv.remove(MASTER, current); - roleMap.put(deviceId, rv); return null; } else { log.info("{} trying to pass mastership for {} to {}", current, deviceId, backup); rv.replace(current, backup, MASTER); rv.reassign(backup, STANDBY, NONE); - roleMap.put(deviceId, rv); - Integer term = terms.get(deviceId); - terms.put(deviceId, ++term); return new MastershipEvent(MASTER_CHANGED, deviceId, rv.roleInfo()); } } @@ -351,7 +366,7 @@ implements MastershipStore { @Override public void entryUpdated(EntryEvent event) { - + // this subsumes entryAdded event notifyDelegate(new MastershipEvent( MASTER_CHANGED, event.getKey(), event.getValue().roleInfo())); } diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/mastership/impl/RoleValue.java b/core/store/dist/src/main/java/org/onlab/onos/store/mastership/impl/RoleValue.java index 0a3de5009f..3944a6a6c3 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/mastership/impl/RoleValue.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/mastership/impl/RoleValue.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.mastership.impl; import java.util.Collections; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/mastership/impl/RoleValueSerializer.java b/core/store/dist/src/main/java/org/onlab/onos/store/mastership/impl/RoleValueSerializer.java index 4450e5b13a..f66eb21bdc 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/mastership/impl/RoleValueSerializer.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/mastership/impl/RoleValueSerializer.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.mastership.impl; import java.util.List; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/mastership/impl/package-info.java b/core/store/dist/src/main/java/org/onlab/onos/store/mastership/impl/package-info.java index 308c9ef60b..c31ac8eae5 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/mastership/impl/package-info.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/mastership/impl/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Implementation of a distributed mastership store using Hazelcast. */ diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/serializers/ClusterMessageSerializer.java b/core/store/dist/src/main/java/org/onlab/onos/store/serializers/ClusterMessageSerializer.java index e20b4a6885..9cc7f8aed5 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/serializers/ClusterMessageSerializer.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/serializers/ClusterMessageSerializer.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.serializers; import org.onlab.onos.cluster.NodeId; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/serializers/DistributedStoreSerializers.java b/core/store/dist/src/main/java/org/onlab/onos/store/serializers/DistributedStoreSerializers.java index 2f03c876e1..d2de5ad111 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/serializers/DistributedStoreSerializers.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/serializers/DistributedStoreSerializers.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.serializers; import org.onlab.onos.store.impl.MastershipBasedTimestamp; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/serializers/MastershipBasedTimestampSerializer.java b/core/store/dist/src/main/java/org/onlab/onos/store/serializers/MastershipBasedTimestampSerializer.java index 062ae03bfb..4221d5790f 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/serializers/MastershipBasedTimestampSerializer.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/serializers/MastershipBasedTimestampSerializer.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.serializers; import org.onlab.onos.store.impl.MastershipBasedTimestamp; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/serializers/MessageSubjectSerializer.java b/core/store/dist/src/main/java/org/onlab/onos/store/serializers/MessageSubjectSerializer.java index bb6b2927e6..e94d30221b 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/serializers/MessageSubjectSerializer.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/serializers/MessageSubjectSerializer.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.serializers; import org.onlab.onos.store.cluster.messaging.MessageSubject; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/statistic/impl/DistributedStatisticStore.java b/core/store/dist/src/main/java/org/onlab/onos/store/statistic/impl/DistributedStatisticStore.java index 7106aefe84..a7a3a02f86 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/statistic/impl/DistributedStatisticStore.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/statistic/impl/DistributedStatisticStore.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.statistic.impl; import static org.onlab.onos.store.statistic.impl.StatisticStoreMessageSubjects.*; @@ -13,6 +28,7 @@ import org.apache.felix.scr.annotations.ReferenceCardinality; import org.apache.felix.scr.annotations.Service; import org.onlab.onos.cluster.ClusterService; import org.onlab.onos.net.ConnectPoint; +import org.onlab.onos.net.DeviceId; import org.onlab.onos.net.PortNumber; import org.onlab.onos.net.flow.FlowEntry; import org.onlab.onos.net.flow.FlowRule; @@ -176,7 +192,14 @@ public class DistributedStatisticStore implements StatisticStore { @Override public Set getCurrentStatistic(ConnectPoint connectPoint) { - ReplicaInfo replicaInfo = replicaInfoManager.getReplicaInfoFor(connectPoint.deviceId()); + final DeviceId deviceId = connectPoint.deviceId(); + ReplicaInfo replicaInfo = replicaInfoManager.getReplicaInfoFor(deviceId); + if (!replicaInfo.master().isPresent()) { + log.warn("No master for {}", deviceId); + // TODO: revisit if this should be returning empty collection. + // FIXME: throw a StatsStoreException + throw new RuntimeException("No master for " + deviceId); + } if (replicaInfo.master().get().equals(clusterService.getLocalNode().id())) { return getCurrentStatisticInternal(connectPoint); } else { @@ -204,7 +227,14 @@ public class DistributedStatisticStore implements StatisticStore { @Override public Set getPreviousStatistic(ConnectPoint connectPoint) { - ReplicaInfo replicaInfo = replicaInfoManager.getReplicaInfoFor(connectPoint.deviceId()); + final DeviceId deviceId = connectPoint.deviceId(); + ReplicaInfo replicaInfo = replicaInfoManager.getReplicaInfoFor(deviceId); + if (!replicaInfo.master().isPresent()) { + log.warn("No master for {}", deviceId); + // TODO: revisit if this should be returning empty collection. + // FIXME: throw a StatsStoreException + throw new RuntimeException("No master for " + deviceId); + } if (replicaInfo.master().get().equals(clusterService.getLocalNode().id())) { return getPreviousStatisticInternal(connectPoint); } else { diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/statistic/impl/StatisticStoreMessageSubjects.java b/core/store/dist/src/main/java/org/onlab/onos/store/statistic/impl/StatisticStoreMessageSubjects.java index a096a3d4a0..eb14b2a152 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/statistic/impl/StatisticStoreMessageSubjects.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/statistic/impl/StatisticStoreMessageSubjects.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.statistic.impl; import org.onlab.onos.store.cluster.messaging.MessageSubject; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/statistic/impl/package-info.java b/core/store/dist/src/main/java/org/onlab/onos/store/statistic/impl/package-info.java index 122d2be81a..7c275c2f15 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/statistic/impl/package-info.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/statistic/impl/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Implementation of the statistic store. */ diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/topology/impl/DefaultTopology.java b/core/store/dist/src/main/java/org/onlab/onos/store/topology/impl/DefaultTopology.java index 5574d27728..6fc2360e68 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/topology/impl/DefaultTopology.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/topology/impl/DefaultTopology.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.topology.impl; import com.google.common.collect.ImmutableMap; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/topology/impl/DefaultTopologyGraph.java b/core/store/dist/src/main/java/org/onlab/onos/store/topology/impl/DefaultTopologyGraph.java index 945ba05060..11f7ce1f4a 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/topology/impl/DefaultTopologyGraph.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/topology/impl/DefaultTopologyGraph.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.topology.impl; import org.onlab.graph.AdjacencyListsGraph; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/topology/impl/DistributedTopologyStore.java b/core/store/dist/src/main/java/org/onlab/onos/store/topology/impl/DistributedTopologyStore.java index 9ae9d7bda6..3878c79b1d 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/topology/impl/DistributedTopologyStore.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/topology/impl/DistributedTopologyStore.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.topology.impl; import static org.slf4j.LoggerFactory.getLogger; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/topology/impl/PathKey.java b/core/store/dist/src/main/java/org/onlab/onos/store/topology/impl/PathKey.java index 60736b9b32..8b71a13aef 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/topology/impl/PathKey.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/topology/impl/PathKey.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.topology.impl; import org.onlab.onos.net.DeviceId; diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/topology/impl/package-info.java b/core/store/dist/src/main/java/org/onlab/onos/store/topology/impl/package-info.java index ec719d0759..676aaf2ad2 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/topology/impl/package-info.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/topology/impl/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Implementation of distributed topology store using p2p synchronization protocol. */ diff --git a/core/store/dist/src/test/java/org/onlab/onos/store/cluster/messaging/impl/ClusterCommunicationManagerTest.java b/core/store/dist/src/test/java/org/onlab/onos/store/cluster/messaging/impl/ClusterCommunicationManagerTest.java index 34e5b3b07d..01192bafe3 100644 --- a/core/store/dist/src/test/java/org/onlab/onos/store/cluster/messaging/impl/ClusterCommunicationManagerTest.java +++ b/core/store/dist/src/test/java/org/onlab/onos/store/cluster/messaging/impl/ClusterCommunicationManagerTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.cluster.messaging.impl; import org.junit.After; @@ -8,7 +23,7 @@ import org.onlab.onos.cluster.DefaultControllerNode; import org.onlab.onos.cluster.NodeId; import org.onlab.onos.store.cluster.impl.ClusterNodesDelegate; import org.onlab.netty.NettyMessagingService; -import org.onlab.packet.IpPrefix; +import org.onlab.packet.IpAddress; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; @@ -27,7 +42,7 @@ public class ClusterCommunicationManagerTest { private static final int P1 = 9881; private static final int P2 = 9882; - private static final IpPrefix IP = IpPrefix.valueOf("127.0.0.1"); + private static final IpAddress IP = IpAddress.valueOf("127.0.0.1"); private ClusterCommunicationManager ccm1; private ClusterCommunicationManager ccm2; @@ -104,7 +119,7 @@ public class ClusterCommunicationManagerTest { NodeId nodeId; @Override - public DefaultControllerNode nodeDetected(NodeId nodeId, IpPrefix ip, int tcpPort) { + public DefaultControllerNode nodeDetected(NodeId nodeId, IpAddress ip, int tcpPort) { latch(nodeId, Op.DETECTED); return new DefaultControllerNode(nodeId, ip, tcpPort); } diff --git a/core/store/dist/src/test/java/org/onlab/onos/store/device/impl/DeviceFragmentIdTest.java b/core/store/dist/src/test/java/org/onlab/onos/store/device/impl/DeviceFragmentIdTest.java index 3a532fdc49..83ffac0f0b 100644 --- a/core/store/dist/src/test/java/org/onlab/onos/store/device/impl/DeviceFragmentIdTest.java +++ b/core/store/dist/src/test/java/org/onlab/onos/store/device/impl/DeviceFragmentIdTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.device.impl; import static org.onlab.onos.net.DeviceId.deviceId; diff --git a/core/store/dist/src/test/java/org/onlab/onos/store/device/impl/GossipDeviceStoreTest.java b/core/store/dist/src/test/java/org/onlab/onos/store/device/impl/GossipDeviceStoreTest.java index 975a7f8483..33b3c14592 100644 --- a/core/store/dist/src/test/java/org/onlab/onos/store/device/impl/GossipDeviceStoreTest.java +++ b/core/store/dist/src/test/java/org/onlab/onos/store/device/impl/GossipDeviceStoreTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.device.impl; import static org.easymock.EasyMock.*; @@ -55,7 +70,7 @@ import org.onlab.onos.store.cluster.messaging.ClusterMessage; import org.onlab.onos.store.cluster.messaging.ClusterMessageHandler; import org.onlab.onos.store.cluster.messaging.MessageSubject; import org.onlab.packet.ChassisId; -import org.onlab.packet.IpPrefix; +import org.onlab.packet.IpAddress; import com.google.common.collect.Iterables; import com.google.common.collect.Sets; @@ -102,12 +117,12 @@ public class GossipDeviceStoreTest { // local node private static final NodeId NID1 = new NodeId("local"); private static final ControllerNode ONOS1 = - new DefaultControllerNode(NID1, IpPrefix.valueOf("127.0.0.1")); + new DefaultControllerNode(NID1, IpAddress.valueOf("127.0.0.1")); // remote node private static final NodeId NID2 = new NodeId("remote"); private static final ControllerNode ONOS2 = - new DefaultControllerNode(NID2, IpPrefix.valueOf("127.0.0.2")); + new DefaultControllerNode(NID2, IpAddress.valueOf("127.0.0.2")); private static final List NO_ANNOTATION = Collections.emptyList(); diff --git a/core/store/dist/src/test/java/org/onlab/onos/store/device/impl/PortFragmentIdTest.java b/core/store/dist/src/test/java/org/onlab/onos/store/device/impl/PortFragmentIdTest.java index 4e7c290797..4028014f6e 100644 --- a/core/store/dist/src/test/java/org/onlab/onos/store/device/impl/PortFragmentIdTest.java +++ b/core/store/dist/src/test/java/org/onlab/onos/store/device/impl/PortFragmentIdTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.device.impl; import static org.onlab.onos.net.DeviceId.deviceId; diff --git a/core/store/dist/src/test/java/org/onlab/onos/store/flow/impl/ReplicaInfoManagerTest.java b/core/store/dist/src/test/java/org/onlab/onos/store/flow/impl/ReplicaInfoManagerTest.java index e2a3ddf2fe..cd5b009856 100644 --- a/core/store/dist/src/test/java/org/onlab/onos/store/flow/impl/ReplicaInfoManagerTest.java +++ b/core/store/dist/src/test/java/org/onlab/onos/store/flow/impl/ReplicaInfoManagerTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.flow.impl; import static com.google.common.base.Preconditions.checkState; diff --git a/core/store/dist/src/test/java/org/onlab/onos/store/hz/TestStoreManager.java b/core/store/dist/src/test/java/org/onlab/onos/store/hz/TestStoreManager.java index 0740e4eec0..87c7b42c0d 100644 --- a/core/store/dist/src/test/java/org/onlab/onos/store/hz/TestStoreManager.java +++ b/core/store/dist/src/test/java/org/onlab/onos/store/hz/TestStoreManager.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.hz; import java.io.FileNotFoundException; diff --git a/core/store/dist/src/test/java/org/onlab/onos/store/impl/MastershipBasedTimestampTest.java b/core/store/dist/src/test/java/org/onlab/onos/store/impl/MastershipBasedTimestampTest.java index ae36d7898f..0060d445e6 100644 --- a/core/store/dist/src/test/java/org/onlab/onos/store/impl/MastershipBasedTimestampTest.java +++ b/core/store/dist/src/test/java/org/onlab/onos/store/impl/MastershipBasedTimestampTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.impl; import static org.junit.Assert.*; diff --git a/core/store/dist/src/test/java/org/onlab/onos/store/impl/TimestampedTest.java b/core/store/dist/src/test/java/org/onlab/onos/store/impl/TimestampedTest.java index 23a97bef46..6303be8004 100644 --- a/core/store/dist/src/test/java/org/onlab/onos/store/impl/TimestampedTest.java +++ b/core/store/dist/src/test/java/org/onlab/onos/store/impl/TimestampedTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.impl; import static org.junit.Assert.*; diff --git a/core/store/dist/src/test/java/org/onlab/onos/store/impl/WallClockTimestampTest.java b/core/store/dist/src/test/java/org/onlab/onos/store/impl/WallClockTimestampTest.java index 370c9f6bd2..433c5baa73 100644 --- a/core/store/dist/src/test/java/org/onlab/onos/store/impl/WallClockTimestampTest.java +++ b/core/store/dist/src/test/java/org/onlab/onos/store/impl/WallClockTimestampTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.impl; import static org.junit.Assert.assertTrue; diff --git a/core/store/dist/src/test/java/org/onlab/onos/store/mastership/impl/DistributedMastershipStoreTest.java b/core/store/dist/src/test/java/org/onlab/onos/store/mastership/impl/DistributedMastershipStoreTest.java index 4ecb8db8d4..ed6a859918 100644 --- a/core/store/dist/src/test/java/org/onlab/onos/store/mastership/impl/DistributedMastershipStoreTest.java +++ b/core/store/dist/src/test/java/org/onlab/onos/store/mastership/impl/DistributedMastershipStoreTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.mastership.impl; import static org.junit.Assert.assertEquals; @@ -32,7 +47,7 @@ import org.onlab.onos.store.hz.StoreManager; import org.onlab.onos.store.hz.StoreService; import org.onlab.onos.store.hz.TestStoreManager; import org.onlab.onos.store.serializers.KryoSerializer; -import org.onlab.packet.IpPrefix; +import org.onlab.packet.IpAddress; import com.google.common.collect.Sets; import com.hazelcast.config.Config; @@ -47,7 +62,7 @@ public class DistributedMastershipStoreTest { private static final DeviceId DID2 = DeviceId.deviceId("of:02"); private static final DeviceId DID3 = DeviceId.deviceId("of:03"); - private static final IpPrefix IP = IpPrefix.valueOf("127.0.0.1"); + private static final IpAddress IP = IpAddress.valueOf("127.0.0.1"); private static final NodeId N1 = new NodeId("node1"); private static final NodeId N2 = new NodeId("node2"); diff --git a/core/store/dist/src/test/java/org/onlab/onos/store/mastership/impl/RoleValueTest.java b/core/store/dist/src/test/java/org/onlab/onos/store/mastership/impl/RoleValueTest.java index 93741b7357..3d428d0a16 100644 --- a/core/store/dist/src/test/java/org/onlab/onos/store/mastership/impl/RoleValueTest.java +++ b/core/store/dist/src/test/java/org/onlab/onos/store/mastership/impl/RoleValueTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.mastership.impl; import static org.junit.Assert.assertEquals; diff --git a/core/store/pom.xml b/core/store/pom.xml index 6876b240a5..59d16b4c09 100644 --- a/core/store/pom.xml +++ b/core/store/pom.xml @@ -1,4 +1,19 @@ + diff --git a/core/store/serializers/pom.xml b/core/store/serializers/pom.xml index 5f92ad12f4..082a751d0a 100644 --- a/core/store/serializers/pom.xml +++ b/core/store/serializers/pom.xml @@ -1,4 +1,19 @@ + diff --git a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/ConnectPointSerializer.java b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/ConnectPointSerializer.java index 14a64d2d07..3cb243e972 100644 --- a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/ConnectPointSerializer.java +++ b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/ConnectPointSerializer.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.serializers; import org.onlab.onos.net.ConnectPoint; diff --git a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/DecodeTo.java b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/DecodeTo.java new file mode 100644 index 0000000000..a8b0379b62 --- /dev/null +++ b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/DecodeTo.java @@ -0,0 +1,24 @@ +package org.onlab.onos.store.serializers; + +import static com.google.common.base.Preconditions.checkNotNull; + +import com.google.common.base.Function; + +/** + * Function to convert byte[] into {@code T}. + * + * @param Type after decoding + */ +public final class DecodeTo implements Function { + + private StoreSerializer serializer; + + public DecodeTo(StoreSerializer serializer) { + this.serializer = checkNotNull(serializer); + } + + @Override + public T apply(byte[] input) { + return serializer.decode(input); + } +} \ No newline at end of file diff --git a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/DefaultApplicationIdSerializer.java b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/DefaultApplicationIdSerializer.java index 87e9ba4479..3bf0f1e87b 100644 --- a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/DefaultApplicationIdSerializer.java +++ b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/DefaultApplicationIdSerializer.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.store.serializers; diff --git a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/DefaultLinkSerializer.java b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/DefaultLinkSerializer.java index 06d01b5a02..a79e4d4936 100644 --- a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/DefaultLinkSerializer.java +++ b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/DefaultLinkSerializer.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.serializers; import org.onlab.onos.net.ConnectPoint; diff --git a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/DefaultPortSerializer.java b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/DefaultPortSerializer.java index 5dc310b8bd..bed02ecf45 100644 --- a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/DefaultPortSerializer.java +++ b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/DefaultPortSerializer.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.serializers; import org.onlab.onos.net.DefaultPort; diff --git a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/DeviceIdSerializer.java b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/DeviceIdSerializer.java index 36d0a21851..ee373ac9cb 100644 --- a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/DeviceIdSerializer.java +++ b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/DeviceIdSerializer.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.serializers; import java.net.URI; diff --git a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/HostLocationSerializer.java b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/HostLocationSerializer.java index 2ef09acff6..3e573d43a1 100644 --- a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/HostLocationSerializer.java +++ b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/HostLocationSerializer.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.serializers; import org.onlab.onos.net.DeviceId; diff --git a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/ImmutableListSerializer.java b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/ImmutableListSerializer.java index 83a7c8a6e2..d51f37bd53 100644 --- a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/ImmutableListSerializer.java +++ b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/ImmutableListSerializer.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.serializers; import org.onlab.util.KryoNamespace.FamilySerializer; diff --git a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/ImmutableMapSerializer.java b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/ImmutableMapSerializer.java index cfa7cccea7..1a26ea46e5 100644 --- a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/ImmutableMapSerializer.java +++ b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/ImmutableMapSerializer.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.serializers; import java.util.Collections; diff --git a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/ImmutableSetSerializer.java b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/ImmutableSetSerializer.java index eb9fd0618e..f63d17ddc2 100644 --- a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/ImmutableSetSerializer.java +++ b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/ImmutableSetSerializer.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.serializers; import java.util.ArrayList; diff --git a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/IpAddressSerializer.java b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/IpAddressSerializer.java index fbfa84ee06..686adb2e93 100644 --- a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/IpAddressSerializer.java +++ b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/IpAddressSerializer.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.serializers; import org.onlab.packet.IpAddress; diff --git a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/IpPrefixSerializer.java b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/IpPrefixSerializer.java index cf82ebb029..a9d3e4fd24 100644 --- a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/IpPrefixSerializer.java +++ b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/IpPrefixSerializer.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.serializers; import org.onlab.packet.IpPrefix; diff --git a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/KryoNamespaces.java b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/KryoNamespaces.java index c5543720b0..4fc88b6d68 100644 --- a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/KryoNamespaces.java +++ b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/KryoNamespaces.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.serializers; import java.net.URI; @@ -16,7 +31,9 @@ import org.onlab.onos.mastership.MastershipTerm; import org.onlab.onos.net.ConnectPoint; import org.onlab.onos.net.DefaultAnnotations; import org.onlab.onos.net.DefaultDevice; +import org.onlab.onos.net.DefaultEdgeLink; import org.onlab.onos.net.DefaultLink; +import org.onlab.onos.net.DefaultPath; import org.onlab.onos.net.DefaultPort; import org.onlab.onos.net.Device; import org.onlab.onos.net.DeviceId; @@ -44,6 +61,14 @@ import org.onlab.onos.net.flow.criteria.Criterion; import org.onlab.onos.net.flow.instructions.Instructions; import org.onlab.onos.net.host.DefaultHostDescription; import org.onlab.onos.net.host.HostDescription; +import org.onlab.onos.net.intent.ConnectivityIntent; +import org.onlab.onos.net.intent.HostToHostIntent; +import org.onlab.onos.net.intent.Intent; +import org.onlab.onos.net.intent.IntentId; +import org.onlab.onos.net.intent.IntentState; +import org.onlab.onos.net.intent.MultiPointToSinglePointIntent; +import org.onlab.onos.net.intent.PathIntent; +import org.onlab.onos.net.intent.PointToPointIntent; import org.onlab.onos.net.link.DefaultLinkDescription; import org.onlab.onos.net.provider.ProviderId; import org.onlab.onos.store.Timestamp; @@ -128,7 +153,17 @@ public final class KryoNamespaces { FlowRuleBatchOperation.class, CompletedBatchOperation.class, FlowRuleBatchEntry.class, - FlowRuleBatchEntry.FlowRuleOperation.class + FlowRuleBatchEntry.FlowRuleOperation.class, + IntentId.class, + IntentState.class, + Intent.class, + ConnectivityIntent.class, + PathIntent.class, + DefaultPath.class, + DefaultEdgeLink.class, + HostToHostIntent.class, + PointToPointIntent.class, + MultiPointToSinglePointIntent.class ) .register(DefaultApplicationId.class, new DefaultApplicationIdSerializer()) .register(URI.class, new URISerializer()) diff --git a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/KryoSerializer.java b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/KryoSerializer.java index 8142e57152..03c3927075 100644 --- a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/KryoSerializer.java +++ b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/KryoSerializer.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.serializers; import org.onlab.util.KryoNamespace; diff --git a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/LinkKeySerializer.java b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/LinkKeySerializer.java index 0f07133988..7de9f3a7ab 100644 --- a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/LinkKeySerializer.java +++ b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/LinkKeySerializer.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.serializers; import org.onlab.onos.net.ConnectPoint; diff --git a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/MacAddressSerializer.java b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/MacAddressSerializer.java index 954c071f82..4837e842f7 100644 --- a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/MacAddressSerializer.java +++ b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/MacAddressSerializer.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.serializers; import org.onlab.packet.MacAddress; diff --git a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/MastershipTermSerializer.java b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/MastershipTermSerializer.java index d99fcde27e..2d665cd30f 100644 --- a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/MastershipTermSerializer.java +++ b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/MastershipTermSerializer.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.serializers; import org.onlab.onos.cluster.NodeId; diff --git a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/NodeIdSerializer.java b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/NodeIdSerializer.java index 460b63d671..1f4dc7bf35 100644 --- a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/NodeIdSerializer.java +++ b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/NodeIdSerializer.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.serializers; import com.esotericsoftware.kryo.Kryo; diff --git a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/PortNumberSerializer.java b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/PortNumberSerializer.java index 37929667ed..4dbaae435f 100644 --- a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/PortNumberSerializer.java +++ b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/PortNumberSerializer.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.serializers; import org.onlab.onos.net.PortNumber; diff --git a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/ProviderIdSerializer.java b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/ProviderIdSerializer.java index 060ac7d2e3..26dada43ff 100644 --- a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/ProviderIdSerializer.java +++ b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/ProviderIdSerializer.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.serializers; import org.onlab.onos.net.provider.ProviderId; diff --git a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/StoreSerializer.java b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/StoreSerializer.java index 6c43a1b965..48fff654c9 100644 --- a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/StoreSerializer.java +++ b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/StoreSerializer.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.serializers; import java.nio.ByteBuffer; diff --git a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/URISerializer.java b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/URISerializer.java index 4c2d61e2f9..895f0ac9a0 100644 --- a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/URISerializer.java +++ b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/URISerializer.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.serializers; import java.net.URI; diff --git a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/package-info.java b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/package-info.java index c66304f109..c798498704 100644 --- a/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/package-info.java +++ b/core/store/serializers/src/main/java/org/onlab/onos/store/serializers/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Various Kryo serializers for use in distributed stores. */ diff --git a/core/store/serializers/src/test/java/org/onlab/onos/store/serializers/KryoSerializerTest.java b/core/store/serializers/src/test/java/org/onlab/onos/store/serializers/KryoSerializerTest.java index 1bd2097952..4e7a8e01de 100644 --- a/core/store/serializers/src/test/java/org/onlab/onos/store/serializers/KryoSerializerTest.java +++ b/core/store/serializers/src/test/java/org/onlab/onos/store/serializers/KryoSerializerTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.serializers; import static org.junit.Assert.assertEquals; diff --git a/core/store/trivial/pom.xml b/core/store/trivial/pom.xml index d9f9154df6..59cf1b8c29 100644 --- a/core/store/trivial/pom.xml +++ b/core/store/trivial/pom.xml @@ -1,4 +1,19 @@ + diff --git a/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/DefaultTopology.java b/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/DefaultTopology.java index e85e091b3f..9a232c1456 100644 --- a/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/DefaultTopology.java +++ b/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/DefaultTopology.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.trivial.impl; import com.google.common.collect.ImmutableMap; diff --git a/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/DefaultTopologyGraph.java b/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/DefaultTopologyGraph.java index b7b721d402..b24547cba0 100644 --- a/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/DefaultTopologyGraph.java +++ b/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/DefaultTopologyGraph.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.trivial.impl; import org.onlab.graph.AdjacencyListsGraph; diff --git a/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/NoOpClockProviderService.java b/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/NoOpClockProviderService.java index 6c1fae8bec..64e5e1666c 100644 --- a/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/NoOpClockProviderService.java +++ b/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/NoOpClockProviderService.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.trivial.impl; import org.apache.felix.scr.annotations.Component; diff --git a/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/PathKey.java b/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/PathKey.java index 7169290fb1..6404a9edee 100644 --- a/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/PathKey.java +++ b/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/PathKey.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.trivial.impl; import org.onlab.onos.net.DeviceId; diff --git a/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleApplicationIdStore.java b/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleApplicationIdStore.java index a2428220a3..b8524650f7 100644 --- a/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleApplicationIdStore.java +++ b/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleApplicationIdStore.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.store.trivial.impl; diff --git a/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleClusterStore.java b/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleClusterStore.java index 1363fd0922..447defb3b5 100644 --- a/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleClusterStore.java +++ b/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleClusterStore.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.trivial.impl; import com.google.common.collect.ImmutableSet; @@ -12,7 +27,7 @@ import org.onlab.onos.cluster.ControllerNode; import org.onlab.onos.cluster.DefaultControllerNode; import org.onlab.onos.cluster.NodeId; import org.onlab.onos.store.AbstractStore; -import org.onlab.packet.IpPrefix; +import org.onlab.packet.IpAddress; import org.slf4j.Logger; import java.util.Set; @@ -29,7 +44,7 @@ public class SimpleClusterStore extends AbstractStore implements ClusterStore { - public static final IpPrefix LOCALHOST = IpPrefix.valueOf("127.0.0.1"); + public static final IpAddress LOCALHOST = IpAddress.valueOf("127.0.0.1"); private final Logger log = getLogger(getClass()); @@ -68,7 +83,7 @@ public class SimpleClusterStore } @Override - public ControllerNode addNode(NodeId nodeId, IpPrefix ip, int tcpPort) { + public ControllerNode addNode(NodeId nodeId, IpAddress ip, int tcpPort) { return null; } diff --git a/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleDeviceStore.java b/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleDeviceStore.java index c1be1f5a50..a4a47e2361 100644 --- a/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleDeviceStore.java +++ b/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleDeviceStore.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.trivial.impl; import com.google.common.collect.FluentIterable; diff --git a/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleFlowRuleStore.java b/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleFlowRuleStore.java index 8d925bd917..49b0c71e62 100644 --- a/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleFlowRuleStore.java +++ b/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleFlowRuleStore.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.trivial.impl; import com.google.common.base.Function; diff --git a/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleHostStore.java b/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleHostStore.java index d01862c66e..6c27ea842a 100644 --- a/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleHostStore.java +++ b/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleHostStore.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.trivial.impl; import com.google.common.collect.HashMultimap; diff --git a/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleIntentStore.java b/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleIntentStore.java index 12e62e2636..c28adf5fff 100644 --- a/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleIntentStore.java +++ b/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleIntentStore.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.trivial.impl; import com.google.common.collect.ImmutableSet; @@ -53,6 +68,10 @@ public class SimpleIntentStore public IntentEvent removeIntent(IntentId intentId) { Intent intent = intents.remove(intentId); installable.remove(intentId); + if (intent == null) { + // was already removed + return null; + } IntentEvent event = this.setState(intent, WITHDRAWN); states.remove(intentId); return event; @@ -107,7 +126,7 @@ public class SimpleIntentStore } @Override - public void addInstallableIntents(IntentId intentId, List result) { + public void setInstallableIntents(IntentId intentId, List result) { installable.put(intentId, result); } diff --git a/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleLinkStore.java b/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleLinkStore.java index 09d6a62c07..838375473e 100644 --- a/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleLinkStore.java +++ b/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleLinkStore.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.trivial.impl; import com.google.common.base.Function; @@ -201,12 +216,6 @@ public class SimpleLinkStore // Updates, if necessary the specified link and returns the appropriate event. // Guarded by linkDescs value (=locking each Link) private LinkEvent updateLink(LinkKey key, Link oldLink, Link newLink) { - if (newLink.providerId().isAncillary()) { - // TODO: revisit ancillary only Link handling - // currently treating ancillary only as down (not visible outside) - return null; - } - if ((oldLink.type() == INDIRECT && newLink.type() == DIRECT) || !AnnotationsUtil.isEqual(oldLink.annotations(), newLink.annotations())) { diff --git a/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleMastershipStore.java b/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleMastershipStore.java index a0ac4c7e3b..33da98798a 100644 --- a/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleMastershipStore.java +++ b/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleMastershipStore.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.trivial.impl; import static org.slf4j.LoggerFactory.getLogger; @@ -26,7 +41,7 @@ import org.onlab.onos.mastership.MastershipTerm; import org.onlab.onos.net.DeviceId; import org.onlab.onos.net.MastershipRole; import org.onlab.onos.store.AbstractStore; -import org.onlab.packet.IpPrefix; +import org.onlab.packet.IpAddress; import org.slf4j.Logger; import com.google.common.collect.Lists; @@ -45,7 +60,7 @@ public class SimpleMastershipStore private final Logger log = getLogger(getClass()); - public static final IpPrefix LOCALHOST = IpPrefix.valueOf("127.0.0.1"); + public static final IpAddress LOCALHOST = IpAddress.valueOf("127.0.0.1"); private ControllerNode instance = new DefaultControllerNode(new NodeId("local"), LOCALHOST); diff --git a/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleTopologyStore.java b/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleTopologyStore.java index bd7db8ad37..c5d1738d6d 100644 --- a/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleTopologyStore.java +++ b/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleTopologyStore.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.trivial.impl; import org.apache.felix.scr.annotations.Activate; diff --git a/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/package-info.java b/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/package-info.java index f697a8759f..0276be0358 100644 --- a/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/package-info.java +++ b/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * Implementations of in-memory stores suitable for unit testing and * experimentation; not for production use. diff --git a/core/store/trivial/src/test/java/org/onlab/onos/store/trivial/impl/DefaultTopologyTest.java b/core/store/trivial/src/test/java/org/onlab/onos/store/trivial/impl/DefaultTopologyTest.java index 879f123b40..d6ba728194 100644 --- a/core/store/trivial/src/test/java/org/onlab/onos/store/trivial/impl/DefaultTopologyTest.java +++ b/core/store/trivial/src/test/java/org/onlab/onos/store/trivial/impl/DefaultTopologyTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.trivial.impl; import org.junit.Before; diff --git a/core/store/trivial/src/test/java/org/onlab/onos/store/trivial/impl/SimpleDeviceStoreTest.java b/core/store/trivial/src/test/java/org/onlab/onos/store/trivial/impl/SimpleDeviceStoreTest.java index 8338a77604..f43ae1013f 100644 --- a/core/store/trivial/src/test/java/org/onlab/onos/store/trivial/impl/SimpleDeviceStoreTest.java +++ b/core/store/trivial/src/test/java/org/onlab/onos/store/trivial/impl/SimpleDeviceStoreTest.java @@ -1,3 +1,19 @@ +/* + * Copyright 2014 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. + */ + /** * */ diff --git a/core/store/trivial/src/test/java/org/onlab/onos/store/trivial/impl/SimpleLinkStoreTest.java b/core/store/trivial/src/test/java/org/onlab/onos/store/trivial/impl/SimpleLinkStoreTest.java index a7f40ac4d9..043cff3954 100644 --- a/core/store/trivial/src/test/java/org/onlab/onos/store/trivial/impl/SimpleLinkStoreTest.java +++ b/core/store/trivial/src/test/java/org/onlab/onos/store/trivial/impl/SimpleLinkStoreTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.trivial.impl; import com.google.common.collect.Iterables; diff --git a/core/store/trivial/src/test/java/org/onlab/onos/store/trivial/impl/SimpleMastershipStoreTest.java b/core/store/trivial/src/test/java/org/onlab/onos/store/trivial/impl/SimpleMastershipStoreTest.java index 9fa066e4ca..711e3669d8 100644 --- a/core/store/trivial/src/test/java/org/onlab/onos/store/trivial/impl/SimpleMastershipStoreTest.java +++ b/core/store/trivial/src/test/java/org/onlab/onos/store/trivial/impl/SimpleMastershipStoreTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2014 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.onlab.onos.store.trivial.impl; import java.util.Set; diff --git a/docs/external.xml b/docs/external.xml index 45caf24df9..7942d802f0 100644 --- a/docs/external.xml +++ b/docs/external.xml @@ -1,4 +1,19 @@ + diff --git a/docs/pom.xml b/docs/pom.xml index 3a38f13eb0..ebf535718b 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -1,4 +1,19 @@ + diff --git a/docs/src/main/javadoc/overview.html b/docs/src/main/javadoc/overview.html index f50f24dd27..501a0efb1e 100644 --- a/docs/src/main/javadoc/overview.html +++ b/docs/src/main/javadoc/overview.html @@ -1,3 +1,18 @@ +

diff --git a/features/features.xml b/features/features.xml index 730970243b..088e42fb57 100644 --- a/features/features.xml +++ b/features/features.xml @@ -1,21 +1,18 @@ @@ -35,6 +32,8 @@ mvn:io.netty/netty-transport-native-epoll/4.0.23.Final mvn:commons-pool/commons-pool/1.6 + mvn:joda-time/joda-time/2.5 + mvn:com.hazelcast/hazelcast/3.3.2 mvn:io.dropwizard.metrics/metrics-core/3.1.0 mvn:io.dropwizard.metrics/metrics-json/3.1.0 diff --git a/features/pom.xml b/features/pom.xml index 233867f4fd..d39e79e3d7 100644 --- a/features/pom.xml +++ b/features/pom.xml @@ -1,21 +1,18 @@ + diff --git a/pom.xml b/pom.xml index 095e40e680..83ed0f4572 100644 --- a/pom.xml +++ b/pom.xml @@ -319,6 +319,11 @@ netty-transport-native-epoll ${netty4.version} + + joda-time + joda-time + 2.5 + diff --git a/providers/host/bin/pom.xml b/providers/host/bin/pom.xml index 3cf47bcd6a..e3ff4d0d48 100644 --- a/providers/host/bin/pom.xml +++ b/providers/host/bin/pom.xml @@ -1,21 +1,18 @@ actions = buildActions(); + + // FIXME had to revert back to using apply-actions instead of + // write-actions because LINC-OE apparently doesn't support + // write-actions. I would prefer to change this back in the future + // because apply-actions is an optional instruction in OF 1.3. + + //OFInstruction writeActions = + //factory().instructions().writeActions(actions); long cookie = flowRule().id().value(); @@ -88,7 +91,8 @@ public class FlowModBuilderVer13 extends FlowModBuilder { .setXid(cookie) .setCookie(U64.of(cookie)) .setBufferId(OFBufferId.NO_BUFFER) - .setInstructions(Collections.singletonList(writeActions)) + .setActions(actions) + //.setInstructions(Collections.singletonList(writeActions)) .setMatch(match) .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM)) .setPriority(flowRule().priority()) @@ -100,8 +104,9 @@ public class FlowModBuilderVer13 extends FlowModBuilder { @Override public OFFlowMod buildFlowMod() { Match match = buildMatch(); - OFInstruction writeActions = - factory().instructions().writeActions(buildActions()); + List actions = buildActions(); + //OFInstruction writeActions = + //factory().instructions().writeActions(actions); long cookie = flowRule().id().value(); @@ -110,7 +115,8 @@ public class FlowModBuilderVer13 extends FlowModBuilder { .setXid(cookie) .setCookie(U64.of(cookie)) .setBufferId(OFBufferId.NO_BUFFER) - .setInstructions(Collections.singletonList(writeActions)) + .setActions(actions) + //.setInstructions(Collections.singletonList(writeActions)) .setMatch(match) .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM)) .setPriority(flowRule().priority()) @@ -122,8 +128,9 @@ public class FlowModBuilderVer13 extends FlowModBuilder { @Override public OFFlowDelete buildFlowDel() { Match match = buildMatch(); - OFInstruction writeActions = - factory().instructions().writeActions(buildActions()); + List actions = buildActions(); + //OFInstruction writeActions = + //factory().instructions().writeActions(actions); long cookie = flowRule().id().value(); @@ -131,7 +138,8 @@ public class FlowModBuilderVer13 extends FlowModBuilder { .setXid(cookie) .setCookie(U64.of(cookie)) .setBufferId(OFBufferId.NO_BUFFER) - .setInstructions(Collections.singletonList(writeActions)) + .setActions(actions) + //.setInstructions(Collections.singletonList(writeActions)) .setMatch(match) .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM)) .setPriority(flowRule().priority()) diff --git a/providers/openflow/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/FlowStatsCollector.java b/providers/openflow/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/FlowStatsCollector.java index cb6f262346..dcb953a939 100644 --- a/providers/openflow/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/FlowStatsCollector.java +++ b/providers/openflow/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/FlowStatsCollector.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.provider.of.flow.impl; diff --git a/providers/openflow/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/OpenFlowRuleProvider.java b/providers/openflow/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/OpenFlowRuleProvider.java index 05860f604c..53a49b6502 100644 --- a/providers/openflow/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/OpenFlowRuleProvider.java +++ b/providers/openflow/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/OpenFlowRuleProvider.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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.onlab.onos.provider.of.flow.impl; diff --git a/providers/openflow/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/package-info.java b/providers/openflow/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/package-info.java index 091f047f24..fa6fbf0763 100644 --- a/providers/openflow/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/package-info.java +++ b/providers/openflow/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/package-info.java @@ -1,20 +1,17 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 + * Copyright 2014 Open Networking Laboratory * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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. */ /** diff --git a/providers/openflow/host/pom.xml b/providers/openflow/host/pom.xml index 3cf47bcd6a..e3ff4d0d48 100644 --- a/providers/openflow/host/pom.xml +++ b/providers/openflow/host/pom.xml @@ -1,21 +1,18 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/dev/eclipse-formatter.xml b/tools/dev/eclipse-formatter.xml new file mode 100644 index 0000000000..aba77910fe --- /dev/null +++ b/tools/dev/eclipse-formatter.xml @@ -0,0 +1,295 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/test/bin/onos-topo-cfg b/tools/test/bin/onos-topo-cfg new file mode 100755 index 0000000000..d3a4f0d0cd --- /dev/null +++ b/tools/test/bin/onos-topo-cfg @@ -0,0 +1,13 @@ +#!/bin/bash +# ----------------------------------------------------------------------------- +# ONOS topology configuration uploader. +# ----------------------------------------------------------------------------- + +[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 +. $ONOS_ROOT/tools/build/envDefaults + +node="${1:-$OC1}" +file="${2:-$ONOS_ROOT/tools/test/topos/oe-linear-3.json}" + +curl -sS --fail -L -X POST -H 'Content-Type:application/json' \ + http://$node:8181/onos/v1/config/topology -d@$file diff --git a/tools/test/cells/local b/tools/test/cells/local index f506c086c4..64b63ec0f5 100644 --- a/tools/test/cells/local +++ b/tools/test/cells/local @@ -8,4 +8,4 @@ export OC2="192.168.56.102" export OCN="192.168.56.103" export OCI="${OC1}" -export ONOS_FEATURES="${ONOS_FEATURES:-webconsole,onos-api,onos-core,onos-cli,onos-openflow,onos-app-fwd,onos-app-proxyarp,onos-app-tvue}" +export ONOS_FEATURES="${ONOS_FEATURES:-webconsole,onos-api,onos-core,onos-cli,onos-openflow,onos-rest,onos-app-fwd,onos-app-proxyarp,onos-app-tvue}" diff --git a/tools/test/cells/single b/tools/test/cells/single index 125477a234..50296c19fa 100644 --- a/tools/test/cells/single +++ b/tools/test/cells/single @@ -7,4 +7,4 @@ export OC1="192.168.56.101" export OCN="192.168.56.103" export OCI="${OC1}" -export ONOS_FEATURES="${ONOS_FEATURES:-webconsole,onos-api,onos-core-trivial,onos-cli,onos-rest,onos-openflow,onos-app-fwd,onos-app-proxyarp,onos-app-tvue}" +export ONOS_FEATURES=webconsole,onos-api,onos-core-trivial,onos-cli,onos-rest,onos-openflow,onos-app-fwd,onos-app-proxyarp,onos-app-tvue diff --git a/tools/test/topos/oe-linear-3.json b/tools/test/topos/oe-linear-3.json index 98206dab36..b3cd61bcd1 100644 --- a/tools/test/topos/oe-linear-3.json +++ b/tools/test/topos/oe-linear-3.json @@ -29,14 +29,14 @@ ], "links" : [ - { "src": "of:0000ffffffffff01/10", "dst": "of:0000ffffffffff03/30", "type": "OPTICAL", "annotations": { "optical.waves": 80, "optical.type": "WDM" } }, - { "src": "of:0000ffffffffff02/20", "dst": "of:0000ffffffffff03/31", "type": "OPTICAL", "annotations": { "optical.waves": 80, "optical.type": "WDM" } }, + { "src": "of:0000ffffffffff01/20", "dst": "of:0000ffffffffff03/30", "type": "OPTICAL", "annotations": { "optical.waves": 80, "optical.type": "WDM" } }, + { "src": "of:0000ffffffffff02/21", "dst": "of:0000ffffffffff03/31", "type": "OPTICAL", "annotations": { "optical.waves": 80, "optical.type": "WDM" } }, - { "src": "of:0000ffffffff0001/10", "dst": "of:0000ffffffffff01/11", "type": "OPTICAL", "annotations": { "bandwidth": 100000, "optical.type": "cross-connect" } }, - { "src": "of:0000ffffffff0002/10", "dst": "of:0000ffffffffff02/21", "type": "OPTICAL", "annotations": { "bandwidth": 100000, "optical.type": "cross-connect" } } + { "src": "of:0000ffffffff0001/2", "dst": "of:0000ffffffffff01/10", "type": "OPTICAL", "annotations": { "bandwidth": 100000, "optical.type": "cross-connect" } }, + { "src": "of:0000ffffffff0002/2", "dst": "of:0000ffffffffff02/11", "type": "OPTICAL", "annotations": { "bandwidth": 100000, "optical.type": "cross-connect" } } ], - "hosts" : [ + "Xhosts" : [ { "mac": "a0:00:00:00:00:11", "vlan": -1, "location": "of:0000ffffffff0001/11", "ip": "1.2.3.4" }, { "mac": "a0:00:00:00:00:12", "vlan": -1, "location": "of:0000ffffffff0001/12", "ip": "1.2.3.5" }, { "mac": "a0:00:00:00:00:21", "vlan": -1, "location": "of:0000ffffffff0002/11", "ip": "2.2.3.4" }, diff --git a/tools/test/topos/optical.py b/tools/test/topos/optical.py new file mode 100755 index 0000000000..300332aa27 --- /dev/null +++ b/tools/test/topos/optical.py @@ -0,0 +1,79 @@ +#!/usr/bin/env python + +''' file: optical.py ''' + +from mininet.topo import Topo +from mininet.node import RemoteController +from mininet.net import Mininet +from mininet.cli import CLI +from mininet.log import setLogLevel, info +from mininet.link import Intf, Link +from mininet.util import irange + +class NullIntf( Intf ): + "A dummy interface with a blank name that doesn't do any configuration" + def __init__( self, name, **params ): + self.name = '' + +class NullLink( Link ): + "A dummy link that doesn't touch either interface" + def makeIntfPair( cls, intf1, intf2, addr1=None, addr2=None ): + pass + def delete( self ): + pass + +class OpticalTopo( Topo ): + + def addIntf( self, switch, intfName ): + "Add intf intfName to switch" + self.addLink( switch, switch, cls=NullLink, + intfName1=intfName, cls2=NullIntf, intfName2=intfName ) + + def build( self, n=2, tapStart=3 ): + + # Add hosts and switches + hosts = [] + switches = [] + for i in irange( 1, n ): + h = self.addHost( 'h%d' % i ) + s = self.addSwitch( 's%d' % i, dpid="0000ffffffff%04d" % i ) + self.addLink( h, s ) + hosts.append( h ) + switches.append( s ) + + # Add optical tap interfaces + tapNum = tapStart + for sw in switches: + self.addIntf( sw, 'tap%d' % tapNum ) + tapNum += 1 + +# if you use, sudo mn --custom custom/optical.py, then register the topo: +#sudo mn --custom optical.py --topo optical,5 +topos = { 'optical': OpticalTopo } + +def installStaticFlows( net ): + for sw in net.switches: + info( 'Adding flows to %s...' % sw.name ) + sw.dpctl( 'add-flow', 'in_port=1,actions=output=2' ) + sw.dpctl( 'add-flow', 'in_port=2,actions=output=1' ) + info( sw.dpctl( 'dump-flows' ) ) + +def run( n ): + topo = OpticalTopo( n ) + net = Mininet( topo=topo, controller=RemoteController, autoSetMacs=True ) + net.start() + #installStaticFlows( net ) + CLI( net ) + net.stop() + +# if the script is run directly (sudo custom/optical.py): +if __name__ == '__main__': + import sys + try: + n = int( sys.argv[1] ) + except: + print ( 'Usage: ./optical.py n # n is number of switches\n' + 'Starting with default of 2 switches...\n' ) + n = 2 + setLogLevel( 'info' ) + run( n ) diff --git a/utils/junit/pom.xml b/utils/junit/pom.xml index 9048eece81..cb5c909ec1 100644 --- a/utils/junit/pom.xml +++ b/utils/junit/pom.xml @@ -1,21 +1,18 @@ + +

diff --git a/web/gui/src/main/webapp/network.json b/web/gui/src/main/webapp/json/network.json similarity index 90% rename from web/gui/src/main/webapp/network.json rename to web/gui/src/main/webapp/json/network.json index c43e0effa7..eacb01c72a 100644 --- a/web/gui/src/main/webapp/network.json +++ b/web/gui/src/main/webapp/json/network.json @@ -14,37 +14,37 @@ "devices": [ { "id": "of:0000000000000001", - "labels": ["00:00:00:00:00:00:00:01", "of/::01", "opt-1"], + "labels": ["00:00:00:00:00:00:00:01", "SFO-W10", "opt-1"], "type": "roadm" }, { "id": "of:0000000000000002", - "labels": ["00:00:00:00:00:00:00:02", "of/::02", "opt-2"], + "labels": ["00:00:00:00:00:00:00:02", "SJC-W10", "opt-2"], "type": "roadm" }, { "id": "of:0000000000000003", - "labels": ["00:00:00:00:00:00:00:03", "of/::03", "opt-3"], + "labels": ["00:00:00:00:00:00:00:03", "LAX-W10", "opt-3"], "type": "roadm" }, { "id": "of:0000000000000004", - "labels": ["00:00:00:00:00:00:00:04", "of/::04", "opt-4"], + "labels": ["00:00:00:00:00:00:00:04", "SDG-W10", "opt-4"], "type": "roadm" }, { "id": "of:0000000000000011", - "labels": ["00:00:00:00:00:00:00:11", "of/::11", "pkt-11"], + "labels": ["00:00:00:00:00:00:00:11", "SFO-pkt", "pkt-11"], "type": "switch" }, { "id": "of:0000000000000012", - "labels": ["00:00:00:00:00:00:00:12", "of/::12", "pkt-12"], + "labels": ["00:00:00:00:00:00:00:12", "SJC-pkt", "pkt-12"], "type": "switch" }, { "id": "of:0000000000000013", - "labels": ["00:00:00:00:00:00:00:13", "of/::13", "pkt-13"], + "labels": ["00:00:00:00:00:00:00:13", "LAX-pkt", "pkt-13"], "type": "switch" } ], diff --git a/web/gui/src/main/webapp/json/of_0000000000000001.json b/web/gui/src/main/webapp/json/of_0000000000000001.json new file mode 100644 index 0000000000..c4848129f3 --- /dev/null +++ b/web/gui/src/main/webapp/json/of_0000000000000001.json @@ -0,0 +1,13 @@ +{ + "comment": "sample device properties", + "id": "of:0000000000000001", + "propOrder": [ "name", "type", "dpid", "latitude", "longitude", "allowed" ], + "props": { + "allowed": true, + "latitude": 37.6, + "longitude": 122.3, + "name": "SFO-W10", + "dpid": "00:00:00:00:00:00:00:01", + "type": "Roadm" + } +} diff --git a/web/gui/src/main/webapp/json/of_0000000000000002.json b/web/gui/src/main/webapp/json/of_0000000000000002.json new file mode 100644 index 0000000000..049329d245 --- /dev/null +++ b/web/gui/src/main/webapp/json/of_0000000000000002.json @@ -0,0 +1,13 @@ +{ + "comment": "sample device properties", + "id": "of:0000000000000002", + "propOrder": [ "name", "type", "dpid", "latitude", "longitude", "allowed" ], + "props": { + "allowed": true, + "latitude": 37.3, + "longitude": 121.9, + "name": "SJC-W10", + "dpid": "00:00:00:00:00:00:00:02", + "type": "Roadm" + } +} diff --git a/web/gui/src/main/webapp/json/of_0000000000000003.json b/web/gui/src/main/webapp/json/of_0000000000000003.json new file mode 100644 index 0000000000..8561cf49c5 --- /dev/null +++ b/web/gui/src/main/webapp/json/of_0000000000000003.json @@ -0,0 +1,13 @@ +{ + "comment": "sample device properties", + "id": "of:0000000000000003", + "propOrder": [ "name", "type", "dpid", "latitude", "longitude", "allowed" ], + "props": { + "allowed": true, + "latitude": 33.9, + "longitude": 118.4, + "name": "LAX-W10", + "dpid": "00:00:00:00:00:00:00:03", + "type": "Roadm" + } +} diff --git a/web/gui/src/main/webapp/json/of_0000000000000004.json b/web/gui/src/main/webapp/json/of_0000000000000004.json new file mode 100644 index 0000000000..eb031148c2 --- /dev/null +++ b/web/gui/src/main/webapp/json/of_0000000000000004.json @@ -0,0 +1,13 @@ +{ + "comment": "sample device properties", + "id": "of:0000000000000004", + "propOrder": [ "name", "type", "dpid", "latitude", "longitude", "allowed" ], + "props": { + "allowed": true, + "latitude": 32.8, + "longitude": 117.1, + "name": "SDG-W10", + "dpid": "00:00:00:00:00:00:00:04", + "type": "Roadm" + } +} diff --git a/web/gui/src/main/webapp/json/of_0000000000000011.json b/web/gui/src/main/webapp/json/of_0000000000000011.json new file mode 100644 index 0000000000..0e73a57b5e --- /dev/null +++ b/web/gui/src/main/webapp/json/of_0000000000000011.json @@ -0,0 +1,11 @@ +{ + "comment": "sample device properties", + "id": "of:0000000000000011", + "propOrder": [ "name", "type", "dpid", "optLink" ], + "props": { + "name": "SFO-pkt", + "dpid": "00:00:00:00:00:00:00:11", + "type": "SwitchX", + "optLink": "SFO-W10" + } +} diff --git a/web/gui/src/main/webapp/json/of_0000000000000012.json b/web/gui/src/main/webapp/json/of_0000000000000012.json new file mode 100644 index 0000000000..2a00e0c99a --- /dev/null +++ b/web/gui/src/main/webapp/json/of_0000000000000012.json @@ -0,0 +1,11 @@ +{ + "comment": "sample device properties", + "id": "of:0000000000000012", + "propOrder": [ "name", "type", "dpid", "optLink" ], + "props": { + "name": "SJC-pkt", + "dpid": "00:00:00:00:00:00:00:12", + "type": "SwitchX", + "optLink": "SJC-W10" + } +} diff --git a/web/gui/src/main/webapp/json/of_0000000000000013.json b/web/gui/src/main/webapp/json/of_0000000000000013.json new file mode 100644 index 0000000000..b71738a58e --- /dev/null +++ b/web/gui/src/main/webapp/json/of_0000000000000013.json @@ -0,0 +1,11 @@ +{ + "comment": "sample device properties", + "id": "of:0000000000000013", + "propOrder": [ "name", "type", "dpid", "optLink" ], + "props": { + "name": "LAX-pkt", + "dpid": "00:00:00:00:00:00:00:13", + "type": "SwitchX", + "optLink": "LAX-W10" + } +} diff --git a/web/gui/src/main/webapp/libs/d3.js b/web/gui/src/main/webapp/libs/d3.js index 557db02e8e..b96992772e 100644 --- a/web/gui/src/main/webapp/libs/d3.js +++ b/web/gui/src/main/webapp/libs/d3.js @@ -1,21 +1,3 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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. - */ !function() { var d3 = { version: "3.4.12" diff --git a/web/gui/src/main/webapp/libs/d3.min.js b/web/gui/src/main/webapp/libs/d3.min.js index f827b396e7..b4943ee462 100644 --- a/web/gui/src/main/webapp/libs/d3.min.js +++ b/web/gui/src/main/webapp/libs/d3.min.js @@ -1,21 +1,3 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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. - */ !function(){function n(n,t){return t>n?-1:n>t?1:n>=t?0:0/0}function t(n){return null!=n&&!isNaN(n)}function e(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function r(n){return n.length}function u(n){for(var t=1;n*t%1;)t*=10;return t}function i(n,t){try{for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}catch(r){n.prototype=t}}function o(){}function a(n){return oa+n in this}function c(n){return n=oa+n,n in this&&delete this[n]}function l(){var n=[];return this.forEach(function(t){n.push(t)}),n}function s(){var n=0;for(var t in this)t.charCodeAt(0)===aa&&++n;return n}function f(){for(var n in this)if(n.charCodeAt(0)===aa)return!1;return!0}function h(){}function g(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function p(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=ca.length;r>e;++e){var u=ca[e]+t;if(u in n)return u}}function v(){}function d(){}function m(n){function t(){for(var t,r=e,u=-1,i=r.length;++ue;e++)for(var u,i=n[e],o=0,a=i.length;a>o;o++)(u=i[o])&&t(u,o,e);return n}function U(n){return sa(n,ma),n}function j(n){var t,e;return function(r,u,i){var o,a=n[i].update,c=a.length;for(i!=e&&(e=i,t=0),u>=t&&(t=u+1);!(o=a[t])&&++t0&&(n=n.slice(0,a));var l=xa.get(n);return l&&(n=l,c=Y),a?t?u:r:t?v:i}function O(n,t){return function(e){var r=Vo.event;Vo.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{Vo.event=r}}}function Y(n,t){var e=O(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function I(){var n=".dragsuppress-"+ ++_a,t="click"+n,e=Vo.select(Jo).on("touchmove"+n,y).on("dragstart"+n,y).on("selectstart"+n,y);if(Ma){var r=Wo.style,u=r[Ma];r[Ma]="none"}return function(i){function o(){e.on(t,null)}e.on(n,null),Ma&&(r[Ma]=u),i&&(e.on(t,function(){y(),o()},!0),setTimeout(o,0))}}function Z(n,t){t.changedTouches&&(t=t.changedTouches[0]);var e=n.ownerSVGElement||n;if(e.createSVGPoint){var r=e.createSVGPoint();if(0>ba&&(Jo.scrollX||Jo.scrollY)){e=Vo.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var u=e[0][0].getScreenCTM();ba=!(u.f||u.e),e.remove()}return ba?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY),r=r.matrixTransform(n.getScreenCTM().inverse()),[r.x,r.y]}var i=n.getBoundingClientRect();return[t.clientX-i.left-n.clientLeft,t.clientY-i.top-n.clientTop]}function V(){return Vo.event.changedTouches[0].identifier}function X(){return Vo.event.target}function $(){return Jo}function B(n){return n>0?1:0>n?-1:0}function W(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function J(n){return n>1?0:-1>n?wa:Math.acos(n)}function G(n){return n>1?ka:-1>n?-ka:Math.asin(n)}function K(n){return((n=Math.exp(n))-1/n)/2}function Q(n){return((n=Math.exp(n))+1/n)/2}function nt(n){return((n=Math.exp(2*n))-1)/(n+1)}function tt(n){return(n=Math.sin(n/2))*n}function et(){}function rt(n,t,e){return this instanceof rt?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof rt?new rt(n.h,n.s,n.l):mt(""+n,yt,rt):new rt(n,t,e)}function ut(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?i+(o-i)*n/60:180>n?o:240>n?i+(o-i)*(240-n)/60:i}function u(n){return Math.round(255*r(n))}var i,o;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,o=.5>=e?e*(1+t):e+t-e*t,i=2*e-o,new gt(u(n+120),u(n),u(n-120))}function it(n,t,e){return this instanceof it?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof it?new it(n.h,n.c,n.l):n instanceof at?lt(n.l,n.a,n.b):lt((n=xt((n=Vo.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new it(n,t,e)}function ot(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new at(e,Math.cos(n*=Ca)*t,Math.sin(n)*t)}function at(n,t,e){return this instanceof at?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof at?new at(n.l,n.a,n.b):n instanceof it?ot(n.l,n.c,n.h):xt((n=gt(n)).r,n.g,n.b):new at(n,t,e)}function ct(n,t,e){var r=(n+16)/116,u=r+t/500,i=r-e/200;return u=st(u)*Ha,r=st(r)*Fa,i=st(i)*Oa,new gt(ht(3.2404542*u-1.5371385*r-.4985314*i),ht(-.969266*u+1.8760108*r+.041556*i),ht(.0556434*u-.2040259*r+1.0572252*i))}function lt(n,t,e){return n>0?new it(Math.atan2(e,t)*Na,Math.sqrt(t*t+e*e),n):new it(0/0,0/0,n)}function st(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function ft(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function ht(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function gt(n,t,e){return this instanceof gt?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof gt?new gt(n.r,n.g,n.b):mt(""+n,gt,ut):new gt(n,t,e)}function pt(n){return new gt(n>>16,255&n>>8,255&n)}function vt(n){return pt(n)+""}function dt(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function mt(n,t,e){var r,u,i,o=0,a=0,c=0;if(r=/([a-z]+)\((.*)\)/i.exec(n))switch(u=r[2].split(","),r[1]){case"hsl":return e(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(_t(u[0]),_t(u[1]),_t(u[2]))}return(i=Za.get(n))?t(i.r,i.g,i.b):(null==n||"#"!==n.charAt(0)||isNaN(i=parseInt(n.slice(1),16))||(4===n.length?(o=(3840&i)>>4,o=o>>4|o,a=240&i,a=a>>4|a,c=15&i,c=c<<4|c):7===n.length&&(o=(16711680&i)>>16,a=(65280&i)>>8,c=255&i)),t(o,a,c))}function yt(n,t,e){var r,u,i=Math.min(n/=255,t/=255,e/=255),o=Math.max(n,t,e),a=o-i,c=(o+i)/2;return a?(u=.5>c?a/(o+i):a/(2-o-i),r=n==o?(t-e)/a+(e>t?6:0):t==o?(e-n)/a+2:(n-t)/a+4,r*=60):(r=0/0,u=c>0&&1>c?0:r),new rt(r,u,c)}function xt(n,t,e){n=Mt(n),t=Mt(t),e=Mt(e);var r=ft((.4124564*n+.3575761*t+.1804375*e)/Ha),u=ft((.2126729*n+.7151522*t+.072175*e)/Fa),i=ft((.0193339*n+.119192*t+.9503041*e)/Oa);return at(116*u-16,500*(r-u),200*(u-i))}function Mt(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function _t(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function bt(n){return"function"==typeof n?n:function(){return n}}function wt(n){return n}function St(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),kt(t,e,n,r)}}function kt(n,t,e,r){function u(){var n,t=c.status;if(!t&&At(c)||t>=200&&300>t||304===t){try{n=e.call(i,c)}catch(r){return o.error.call(i,r),void 0}o.load.call(i,n)}else o.error.call(i,c)}var i={},o=Vo.dispatch("beforesend","progress","load","error"),a={},c=new XMLHttpRequest,l=null;return!Jo.XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(n)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=u:c.onreadystatechange=function(){c.readyState>3&&u()},c.onprogress=function(n){var t=Vo.event;Vo.event=n;try{o.progress.call(i,c)}finally{Vo.event=t}},i.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?a[n]:(null==t?delete a[n]:a[n]=t+"",i)},i.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",i):t},i.responseType=function(n){return arguments.length?(l=n,i):l},i.response=function(n){return e=n,i},["get","post"].forEach(function(n){i[n]=function(){return i.send.apply(i,[n].concat($o(arguments)))}}),i.send=function(e,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),c.open(e,n,!0),null==t||"accept"in a||(a.accept=t+",*/*"),c.setRequestHeader)for(var s in a)c.setRequestHeader(s,a[s]);return null!=t&&c.overrideMimeType&&c.overrideMimeType(t),null!=l&&(c.responseType=l),null!=u&&i.on("error",u).on("load",function(n){u(null,n)}),o.beforesend.call(i,c),c.send(null==r?null:r),i},i.abort=function(){return c.abort(),i},Vo.rebind(i,o,"on"),null==r?i:i.get(Et(r))}function Et(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function At(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function Ct(){var n=Nt(),t=zt()-n;t>24?(isFinite(t)&&(clearTimeout(Ba),Ba=setTimeout(Ct,t)),$a=0):($a=1,Ja(Ct))}function Nt(){var n=Date.now();for(Wa=Va;Wa;)n>=Wa.t&&(Wa.f=Wa.c(n-Wa.t)),Wa=Wa.n;return n}function zt(){for(var n,t=Va,e=1/0;t;)t.f?t=n?n.n=t.n:Va=t.n:(t.t8?function(n){return n/e}:function(n){return n*e},symbol:n}}function qt(n){var t=n.decimal,e=n.thousands,r=n.grouping,u=n.currency,i=r?function(n){for(var t=n.length,u=[],i=0,o=r[0];o>0&&t>0;)u.push(n.substring(t-=o,t+o)),o=r[i=(i+1)%r.length];return u.reverse().join(e)}:wt;return function(n){var e=Ka.exec(n),r=e[1]||" ",o=e[2]||">",a=e[3]||"",c=e[4]||"",l=e[5],s=+e[6],f=e[7],h=e[8],g=e[9],p=1,v="",d="",m=!1;switch(h&&(h=+h.substring(1)),(l||"0"===r&&"="===o)&&(l=r="0",o="=",f&&(s-=Math.floor((s-1)/4))),g){case"n":f=!0,g="g";break;case"%":p=100,d="%",g="f";break;case"p":p=100,d="%",g="r";break;case"b":case"o":case"x":case"X":"#"===c&&(v="0"+g.toLowerCase());case"c":case"d":m=!0,h=0;break;case"s":p=-1,g="r"}"$"===c&&(v=u[0],d=u[1]),"r"!=g||h||(g="g"),null!=h&&("g"==g?h=Math.max(1,Math.min(21,h)):("e"==g||"f"==g)&&(h=Math.max(0,Math.min(20,h)))),g=Qa.get(g)||Rt;var y=l&&f;return function(n){var e=d;if(m&&n%1)return"";var u=0>n||0===n&&0>1/n?(n=-n,"-"):a;if(0>p){var c=Vo.formatPrefix(n,h);n=c.scale(n),e=c.symbol+d}else n*=p;n=g(n,h);var x=n.lastIndexOf("."),M=0>x?n:n.substring(0,x),_=0>x?"":t+n.substring(x+1);!l&&f&&(M=i(M));var b=v.length+M.length+_.length+(y?0:u.length),w=s>b?new Array(b=s-b+1).join(r):"";return y&&(M=i(w+M)),u+=v,n=M+_,("<"===o?u+n+w:">"===o?w+u+n:"^"===o?w.substring(0,b>>=1)+u+n+w.substring(b):u+(y?n:w+n))+e}}}function Rt(n){return n+""}function Dt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Pt(n,t,e){function r(t){var e=n(t),r=i(e,1);return r-t>t-e?e:r}function u(e){return t(e=n(new tc(e-1)),1),e}function i(n,e){return t(n=new tc(+n),e),n}function o(n,r,i){var o=u(n),a=[];if(i>1)for(;r>o;)e(o)%i||a.push(new Date(+o)),t(o,1);else for(;r>o;)a.push(new Date(+o)),t(o,1);return a}function a(n,t,e){try{tc=Dt;var r=new Dt;return r._=n,o(r,t,e)}finally{tc=Date}}n.floor=n,n.round=r,n.ceil=u,n.offset=i,n.range=o;var c=n.utc=Ut(n);return c.floor=c,c.round=Ut(r),c.ceil=Ut(u),c.offset=Ut(i),c.range=a,n}function Ut(n){return function(t,e){try{tc=Dt;var r=new Dt;return r._=t,n(r,e)._}finally{tc=Date}}}function jt(n){function t(n){function t(t){for(var e,u,i,o=[],a=-1,c=0;++aa;){if(r>=l)return-1;if(u=t.charCodeAt(a++),37===u){if(o=t.charAt(a++),i=N[o in rc?t.charAt(a++):o],!i||(r=i(n,e,r))<0)return-1}else if(u!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){b.lastIndex=0;var r=b.exec(t.slice(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){M.lastIndex=0;var r=M.exec(t.slice(e));return r?(n.w=_.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){E.lastIndex=0;var r=E.exec(t.slice(e));return r?(n.m=A.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,r){return e(n,C.c.toString(),t,r)}function c(n,t,r){return e(n,C.x.toString(),t,r)}function l(n,t,r){return e(n,C.X.toString(),t,r)}function s(n,t,e){var r=x.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var f=n.dateTime,h=n.date,g=n.time,p=n.periods,v=n.days,d=n.shortDays,m=n.months,y=n.shortMonths;t.utc=function(n){function e(n){try{tc=Dt;var t=new tc;return t._=n,r(t)}finally{tc=Date}}var r=t(n);return e.parse=function(n){try{tc=Dt;var t=r.parse(n);return t&&t._}finally{tc=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ue;var x=Vo.map(),M=Ft(v),_=Ot(v),b=Ft(d),w=Ot(d),S=Ft(m),k=Ot(m),E=Ft(y),A=Ot(y);p.forEach(function(n,t){x.set(n.toLowerCase(),t)});var C={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return y[n.getMonth()]},B:function(n){return m[n.getMonth()]},c:t(f),d:function(n,t){return Ht(n.getDate(),t,2)},e:function(n,t){return Ht(n.getDate(),t,2)},H:function(n,t){return Ht(n.getHours(),t,2)},I:function(n,t){return Ht(n.getHours()%12||12,t,2)},j:function(n,t){return Ht(1+nc.dayOfYear(n),t,3)},L:function(n,t){return Ht(n.getMilliseconds(),t,3)},m:function(n,t){return Ht(n.getMonth()+1,t,2)},M:function(n,t){return Ht(n.getMinutes(),t,2)},p:function(n){return p[+(n.getHours()>=12)]},S:function(n,t){return Ht(n.getSeconds(),t,2)},U:function(n,t){return Ht(nc.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Ht(nc.mondayOfYear(n),t,2)},x:t(h),X:t(g),y:function(n,t){return Ht(n.getFullYear()%100,t,2)},Y:function(n,t){return Ht(n.getFullYear()%1e4,t,4)},Z:ee,"%":function(){return"%"}},N={a:r,A:u,b:i,B:o,c:a,d:Jt,e:Jt,H:Kt,I:Kt,j:Gt,L:te,m:Wt,M:Qt,p:s,S:ne,U:It,w:Yt,W:Zt,x:c,X:l,y:Xt,Y:Vt,Z:$t,"%":re};return t}function Ht(n,t,e){var r=0>n?"-":"",u=(r?-n:n)+"",i=u.length;return r+(e>i?new Array(e-i+1).join(t)+u:u)}function Ft(n){return new RegExp("^(?:"+n.map(Vo.requote).join("|")+")","i")}function Ot(n){for(var t=new o,e=-1,r=n.length;++e68?1900:2e3)}function Wt(n,t,e){uc.lastIndex=0;var r=uc.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function Jt(n,t,e){uc.lastIndex=0;var r=uc.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function Gt(n,t,e){uc.lastIndex=0;var r=uc.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function Kt(n,t,e){uc.lastIndex=0;var r=uc.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function Qt(n,t,e){uc.lastIndex=0;var r=uc.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function ne(n,t,e){uc.lastIndex=0;var r=uc.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function te(n,t,e){uc.lastIndex=0;var r=uc.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function ee(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=0|ia(t)/60,u=ia(t)%60;return e+Ht(r,"0",2)+Ht(u,"0",2)}function re(n,t,e){ic.lastIndex=0;var r=ic.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ue(n){for(var t=n.length,e=-1;++e=0?1:-1,a=o*e,c=Math.cos(t),l=Math.sin(t),s=i*l,f=u*c+s*Math.cos(a),h=s*o*Math.sin(a);fc.add(Math.atan2(h,f)),r=n,u=c,i=l}var t,e,r,u,i;hc.point=function(o,a){hc.point=n,r=(t=o)*Ca,u=Math.cos(a=(e=a)*Ca/2+wa/4),i=Math.sin(a)},hc.lineEnd=function(){n(t,e)}}function fe(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function he(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function ge(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function pe(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function ve(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function de(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function me(n){return[Math.atan2(n[1],n[0]),G(n[2])]}function ye(n,t){return ia(n[0]-t[0])a;++a)u.point((e=n[a])[0],e[1]);return u.lineEnd(),void 0}var c=new Ae(e,n,null,!0),l=new Ae(e,null,c,!1);c.o=l,i.push(c),o.push(l),c=new Ae(r,n,null,!1),l=new Ae(r,null,c,!0),c.o=l,i.push(c),o.push(l)}}),o.sort(t),Ee(i),Ee(o),i.length){for(var a=0,c=e,l=o.length;l>a;++a)o[a].e=c=!c;for(var s,f,h=i[0];;){for(var g=h,p=!0;g.v;)if((g=g.n)===h)return;s=g.z,u.lineStart();do{if(g.v=g.o.v=!0,g.e){if(p)for(var a=0,l=s.length;l>a;++a)u.point((f=s[a])[0],f[1]);else r(g.x,g.n.x,1,u);g=g.n}else{if(p){s=g.p.z;for(var a=s.length-1;a>=0;--a)u.point((f=s[a])[0],f[1])}else r(g.x,g.p.x,-1,u);g=g.p}g=g.o,s=g.z,p=!p}while(!g.v);u.lineEnd()}}}function Ee(n){if(t=n.length){for(var t,e,r=0,u=n[0];++r0){for(_||(i.polygonStart(),_=!0),i.lineStart();++o1&&2&t&&e.push(e.pop().concat(e.shift())),g.push(e.filter(Ne))}var g,p,v,d=t(i),m=u.invert(r[0],r[1]),y={point:o,lineStart:c,lineEnd:l,polygonStart:function(){y.point=s,y.lineStart=f,y.lineEnd=h,g=[],p=[]},polygonEnd:function(){y.point=o,y.lineStart=c,y.lineEnd=l,g=Vo.merge(g);var n=De(m,p);g.length?(_||(i.polygonStart(),_=!0),ke(g,Le,n,e,i)):n&&(_||(i.polygonStart(),_=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),_&&(i.polygonEnd(),_=!1),g=p=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}},x=ze(),M=t(x),_=!1;return y}}function Ne(n){return n.length>1}function ze(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:v,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Le(n,t){return((n=n.x)[0]<0?n[1]-ka-Ea:ka-n[1])-((t=t.x)[0]<0?t[1]-ka-Ea:ka-t[1])}function Te(n){var t,e=0/0,r=0/0,u=0/0;return{lineStart:function(){n.lineStart(),t=1},point:function(i,o){var a=i>0?wa:-wa,c=ia(i-e);ia(c-wa)0?ka:-ka),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(a,r),n.point(i,r),t=0):u!==a&&c>=wa&&(ia(e-u)Ea?Math.atan((Math.sin(t)*(i=Math.cos(r))*Math.sin(e)-Math.sin(r)*(u=Math.cos(t))*Math.sin(n))/(u*i*o)):(t+r)/2}function Re(n,t,e,r){var u;if(null==n)u=e*ka,r.point(-wa,u),r.point(0,u),r.point(wa,u),r.point(wa,0),r.point(wa,-u),r.point(0,-u),r.point(-wa,-u),r.point(-wa,0),r.point(-wa,u);else if(ia(n[0]-t[0])>Ea){var i=n[0]a;++a){var l=t[a],s=l.length;if(s)for(var f=l[0],h=f[0],g=f[1]/2+wa/4,p=Math.sin(g),v=Math.cos(g),d=1;;){d===s&&(d=0),n=l[d];var m=n[0],y=n[1]/2+wa/4,x=Math.sin(y),M=Math.cos(y),_=m-h,b=_>=0?1:-1,w=b*_,S=w>wa,k=p*x;if(fc.add(Math.atan2(k*b*Math.sin(w),v*M+k*Math.cos(w))),i+=S?_+b*Sa:_,S^h>=e^m>=e){var E=ge(fe(f),fe(n));de(E);var A=ge(u,E);de(A);var C=(S^_>=0?-1:1)*G(A[2]);(r>C||r===C&&(E[0]||E[1]))&&(o+=S^_>=0?1:-1)}if(!d++)break;h=m,p=x,v=M,f=n}}return(-Ea>i||Ea>i&&0>fc)^1&o}function Pe(n){function t(n,t){return Math.cos(n)*Math.cos(t)>i}function e(n){var e,i,c,l,s;return{lineStart:function(){l=c=!1,s=1},point:function(f,h){var g,p=[f,h],v=t(f,h),d=o?v?0:u(f,h):v?u(f+(0>f?wa:-wa),h):0;if(!e&&(l=c=v)&&n.lineStart(),v!==c&&(g=r(e,p),(ye(e,g)||ye(p,g))&&(p[0]+=Ea,p[1]+=Ea,v=t(p[0],p[1]))),v!==c)s=0,v?(n.lineStart(),g=r(p,e),n.point(g[0],g[1])):(g=r(e,p),n.point(g[0],g[1]),n.lineEnd()),e=g;else if(a&&e&&o^v){var m;d&i||!(m=r(p,e,!0))||(s=0,o?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!v||e&&ye(e,p)||n.point(p[0],p[1]),e=p,c=v,i=d},lineEnd:function(){c&&n.lineEnd(),e=null},clean:function(){return s|(l&&c)<<1}}}function r(n,t,e){var r=fe(n),u=fe(t),o=[1,0,0],a=ge(r,u),c=he(a,a),l=a[0],s=c-l*l;if(!s)return!e&&n;var f=i*c/s,h=-i*l/s,g=ge(o,a),p=ve(o,f),v=ve(a,h);pe(p,v);var d=g,m=he(p,d),y=he(d,d),x=m*m-y*(he(p,p)-1);if(!(0>x)){var M=Math.sqrt(x),_=ve(d,(-m-M)/y);if(pe(_,p),_=me(_),!e)return _;var b,w=n[0],S=t[0],k=n[1],E=t[1];w>S&&(b=w,w=S,S=b);var A=S-w,C=ia(A-wa)A;if(!C&&k>E&&(b=k,k=E,E=b),N?C?k+E>0^_[1]<(ia(_[0]-w)wa^(w<=_[0]&&_[0]<=S)){var z=ve(d,(-m+M)/y);return pe(z,p),[_,me(z)]}}}function u(t,e){var r=o?n:wa-n,u=0;return-r>t?u|=1:t>r&&(u|=2),-r>e?u|=4:e>r&&(u|=8),u}var i=Math.cos(n),o=i>0,a=ia(i)>Ea,c=sr(n,6*Ca);return Ce(t,e,c,o?[0,-n]:[-wa,n-wa])}function Ue(n,t,e,r){return function(u){var i,o=u.a,a=u.b,c=o.x,l=o.y,s=a.x,f=a.y,h=0,g=1,p=s-c,v=f-l;if(i=n-c,p||!(i>0)){if(i/=p,0>p){if(h>i)return;g>i&&(g=i)}else if(p>0){if(i>g)return;i>h&&(h=i)}if(i=e-c,p||!(0>i)){if(i/=p,0>p){if(i>g)return;i>h&&(h=i)}else if(p>0){if(h>i)return;g>i&&(g=i)}if(i=t-l,v||!(i>0)){if(i/=v,0>v){if(h>i)return;g>i&&(g=i)}else if(v>0){if(i>g)return;i>h&&(h=i)}if(i=r-l,v||!(0>i)){if(i/=v,0>v){if(i>g)return;i>h&&(h=i)}else if(v>0){if(h>i)return;g>i&&(g=i)}return h>0&&(u.a={x:c+h*p,y:l+h*v}),1>g&&(u.b={x:c+g*p,y:l+g*v}),u}}}}}}function je(n,t,e,r){function u(r,u){return ia(r[0]-n)0?0:3:ia(r[0]-e)0?2:1:ia(r[1]-t)0?1:0:u>0?3:2}function i(n,t){return o(n.x,t.x)}function o(n,t){var e=u(n,1),r=u(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(a){function c(n){for(var t=0,e=d.length,r=n[1],u=0;e>u;++u)for(var i,o=1,a=d[u],c=a.length,l=a[0];c>o;++o)i=a[o],l[1]<=r?i[1]>r&&W(l,i,n)>0&&++t:i[1]<=r&&W(l,i,n)<0&&--t,l=i;return 0!==t}function l(i,a,c,l){var s=0,f=0;if(null==i||(s=u(i,c))!==(f=u(a,c))||o(i,a)<0^c>0){do l.point(0===s||3===s?n:e,s>1?r:t);while((s=(s+c+4)%4)!==f)}else l.point(a[0],a[1])}function s(u,i){return u>=n&&e>=u&&i>=t&&r>=i}function f(n,t){s(n,t)&&a.point(n,t)}function h(){N.point=p,d&&d.push(m=[]),S=!0,w=!1,_=b=0/0}function g(){v&&(p(y,x),M&&w&&A.rejoin(),v.push(A.buffer())),N.point=f,w&&a.lineEnd()}function p(n,t){n=Math.max(-Ec,Math.min(Ec,n)),t=Math.max(-Ec,Math.min(Ec,t));var e=s(n,t);if(d&&m.push([n,t]),S)y=n,x=t,M=e,S=!1,e&&(a.lineStart(),a.point(n,t));else if(e&&w)a.point(n,t);else{var r={a:{x:_,y:b},b:{x:n,y:t}};C(r)?(w||(a.lineStart(),a.point(r.a.x,r.a.y)),a.point(r.b.x,r.b.y),e||a.lineEnd(),k=!1):e&&(a.lineStart(),a.point(n,t),k=!1)}_=n,b=t,w=e}var v,d,m,y,x,M,_,b,w,S,k,E=a,A=ze(),C=Ue(n,t,e,r),N={point:f,lineStart:h,lineEnd:g,polygonStart:function(){a=A,v=[],d=[],k=!0},polygonEnd:function(){a=E,v=Vo.merge(v);var t=c([n,r]),e=k&&t,u=v.length;(e||u)&&(a.polygonStart(),e&&(a.lineStart(),l(null,null,1,a),a.lineEnd()),u&&ke(v,i,t,l,a),a.polygonEnd()),v=d=m=null}};return N}}function He(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return e=t.invert(e,r),e&&n.invert(e[0],e[1])}),e}function Fe(n){var t=0,e=wa/3,r=er(n),u=r(t,e);return u.parallels=function(n){return arguments.length?r(t=n[0]*wa/180,e=n[1]*wa/180):[180*(t/wa),180*(e/wa)]},u}function Oe(n,t){function e(n,t){var e=Math.sqrt(i-2*u*Math.sin(t))/u;return[e*Math.sin(n*=u),o-e*Math.cos(n)]}var r=Math.sin(n),u=(r+Math.sin(t))/2,i=1+r*(2*u-r),o=Math.sqrt(i)/u;return e.invert=function(n,t){var e=o-t;return[Math.atan2(n,e)/u,G((i-(n*n+e*e)*u*u)/(2*u))]},e}function Ye(){function n(n,t){Cc+=u*n-r*t,r=n,u=t}var t,e,r,u;qc.point=function(i,o){qc.point=n,t=r=i,e=u=o},qc.lineEnd=function(){n(t,e)}}function Ie(n,t){Nc>n&&(Nc=n),n>Lc&&(Lc=n),zc>t&&(zc=t),t>Tc&&(Tc=t)}function Ze(){function n(n,t){o.push("M",n,",",t,i)}function t(n,t){o.push("M",n,",",t),a.point=e}function e(n,t){o.push("L",n,",",t)}function r(){a.point=n}function u(){o.push("Z")}var i=Ve(4.5),o=[],a={point:n,lineStart:function(){a.point=t},lineEnd:r,polygonStart:function(){a.lineEnd=u},polygonEnd:function(){a.lineEnd=r,a.point=n},pointRadius:function(n){return i=Ve(n),a},result:function(){if(o.length){var n=o.join("");return o=[],n}}};return a}function Ve(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Xe(n,t){vc+=n,dc+=t,++mc}function $e(){function n(n,r){var u=n-t,i=r-e,o=Math.sqrt(u*u+i*i);yc+=o*(t+n)/2,xc+=o*(e+r)/2,Mc+=o,Xe(t=n,e=r)}var t,e;Dc.point=function(r,u){Dc.point=n,Xe(t=r,e=u)}}function Be(){Dc.point=Xe}function We(){function n(n,t){var e=n-r,i=t-u,o=Math.sqrt(e*e+i*i);yc+=o*(r+n)/2,xc+=o*(u+t)/2,Mc+=o,o=u*n-r*t,_c+=o*(r+n),bc+=o*(u+t),wc+=3*o,Xe(r=n,u=t)}var t,e,r,u;Dc.point=function(i,o){Dc.point=n,Xe(t=r=i,e=u=o)},Dc.lineEnd=function(){n(t,e)}}function Je(n){function t(t,e){n.moveTo(t,e),n.arc(t,e,o,0,Sa)}function e(t,e){n.moveTo(t,e),a.point=r}function r(t,e){n.lineTo(t,e)}function u(){a.point=t}function i(){n.closePath()}var o=4.5,a={point:t,lineStart:function(){a.point=e},lineEnd:u,polygonStart:function(){a.lineEnd=i},polygonEnd:function(){a.lineEnd=u,a.point=t},pointRadius:function(n){return o=n,a},result:v};return a}function Ge(n){function t(n){return(a?r:e)(n)}function e(t){return nr(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){x=0/0,S.point=i,t.lineStart()}function i(e,r){var i=fe([e,r]),o=n(e,r);u(x,M,y,_,b,w,x=o[0],M=o[1],y=e,_=i[0],b=i[1],w=i[2],a,t),t.point(x,M)}function o(){S.point=e,t.lineEnd()}function c(){r(),S.point=l,S.lineEnd=s}function l(n,t){i(f=n,h=t),g=x,p=M,v=_,d=b,m=w,S.point=i}function s(){u(x,M,y,_,b,w,g,p,f,v,d,m,a,t),S.lineEnd=o,o()}var f,h,g,p,v,d,m,y,x,M,_,b,w,S={point:e,lineStart:r,lineEnd:o,polygonStart:function(){t.polygonStart(),S.lineStart=c},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function u(t,e,r,a,c,l,s,f,h,g,p,v,d,m){var y=s-t,x=f-e,M=y*y+x*x;if(M>4*i&&d--){var _=a+g,b=c+p,w=l+v,S=Math.sqrt(_*_+b*b+w*w),k=Math.asin(w/=S),E=ia(ia(w)-1)i||ia((y*z+x*L)/M-.5)>.3||o>a*g+c*p+l*v)&&(u(t,e,r,a,c,l,C,N,E,_/=S,b/=S,w,d,m),m.point(C,N),u(C,N,E,_,b,w,s,f,h,g,p,v,d,m))}}var i=.5,o=Math.cos(30*Ca),a=16;return t.precision=function(n){return arguments.length?(a=(i=n*n)>0&&16,t):Math.sqrt(i) },t}function Ke(n){var t=Ge(function(t,e){return n([t*Na,e*Na])});return function(n){return rr(t(n))}}function Qe(n){this.stream=n}function nr(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function tr(n){return er(function(){return n})()}function er(n){function t(n){return n=a(n[0]*Ca,n[1]*Ca),[n[0]*h+c,l-n[1]*h]}function e(n){return n=a.invert((n[0]-c)/h,(l-n[1])/h),n&&[n[0]*Na,n[1]*Na]}function r(){a=He(o=or(m,y,x),i);var n=i(v,d);return c=g-n[0]*h,l=p+n[1]*h,u()}function u(){return s&&(s.valid=!1,s=null),t}var i,o,a,c,l,s,f=Ge(function(n,t){return n=i(n,t),[n[0]*h+c,l-n[1]*h]}),h=150,g=480,p=250,v=0,d=0,m=0,y=0,x=0,M=kc,_=wt,b=null,w=null;return t.stream=function(n){return s&&(s.valid=!1),s=rr(M(o,f(_(n)))),s.valid=!0,s},t.clipAngle=function(n){return arguments.length?(M=null==n?(b=n,kc):Pe((b=+n)*Ca),u()):b},t.clipExtent=function(n){return arguments.length?(w=n,_=n?je(n[0][0],n[0][1],n[1][0],n[1][1]):wt,u()):w},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(g=+n[0],p=+n[1],r()):[g,p]},t.center=function(n){return arguments.length?(v=n[0]%360*Ca,d=n[1]%360*Ca,r()):[v*Na,d*Na]},t.rotate=function(n){return arguments.length?(m=n[0]%360*Ca,y=n[1]%360*Ca,x=n.length>2?n[2]%360*Ca:0,r()):[m*Na,y*Na,x*Na]},Vo.rebind(t,f,"precision"),function(){return i=n.apply(this,arguments),t.invert=i.invert&&e,r()}}function rr(n){return nr(n,function(t,e){n.point(t*Ca,e*Ca)})}function ur(n,t){return[n,t]}function ir(n,t){return[n>wa?n-Sa:-wa>n?n+Sa:n,t]}function or(n,t,e){return n?t||e?He(cr(n),lr(t,e)):cr(n):t||e?lr(t,e):ir}function ar(n){return function(t,e){return t+=n,[t>wa?t-Sa:-wa>t?t+Sa:t,e]}}function cr(n){var t=ar(n);return t.invert=ar(-n),t}function lr(n,t){function e(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,l=Math.sin(t),s=l*r+a*u;return[Math.atan2(c*i-s*o,a*r-l*u),G(s*i+c*o)]}var r=Math.cos(n),u=Math.sin(n),i=Math.cos(t),o=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,l=Math.sin(t),s=l*i-c*o;return[Math.atan2(c*i+l*o,a*r+s*u),G(s*r-a*u)]},e}function sr(n,t){var e=Math.cos(n),r=Math.sin(n);return function(u,i,o,a){var c=o*t;null!=u?(u=fr(e,u),i=fr(e,i),(o>0?i>u:u>i)&&(u+=o*Sa)):(u=n+o*Sa,i=n-.5*c);for(var l,s=u;o>0?s>i:i>s;s-=c)a.point((l=me([e,-r*Math.cos(s),-r*Math.sin(s)]))[0],l[1])}}function fr(n,t){var e=fe(t);e[0]-=n,de(e);var r=J(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Ea)%(2*Math.PI)}function hr(n,t,e){var r=Vo.range(n,t-Ea,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function gr(n,t,e){var r=Vo.range(n,t-Ea,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function pr(n){return n.source}function vr(n){return n.target}function dr(n,t,e,r){var u=Math.cos(t),i=Math.sin(t),o=Math.cos(r),a=Math.sin(r),c=u*Math.cos(n),l=u*Math.sin(n),s=o*Math.cos(e),f=o*Math.sin(e),h=2*Math.asin(Math.sqrt(tt(r-t)+u*o*tt(e-n))),g=1/Math.sin(h),p=h?function(n){var t=Math.sin(n*=h)*g,e=Math.sin(h-n)*g,r=e*c+t*s,u=e*l+t*f,o=e*i+t*a;return[Math.atan2(u,r)*Na,Math.atan2(o,Math.sqrt(r*r+u*u))*Na]}:function(){return[n*Na,t*Na]};return p.distance=h,p}function mr(){function n(n,u){var i=Math.sin(u*=Ca),o=Math.cos(u),a=ia((n*=Ca)-t),c=Math.cos(a);Pc+=Math.atan2(Math.sqrt((a=o*Math.sin(a))*a+(a=r*i-e*o*c)*a),e*i+r*o*c),t=n,e=i,r=o}var t,e,r;Uc.point=function(u,i){t=u*Ca,e=Math.sin(i*=Ca),r=Math.cos(i),Uc.point=n},Uc.lineEnd=function(){Uc.point=Uc.lineEnd=v}}function yr(n,t){function e(t,e){var r=Math.cos(t),u=Math.cos(e),i=n(r*u);return[i*u*Math.sin(t),i*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),u=t(r),i=Math.sin(u),o=Math.cos(u);return[Math.atan2(n*i,r*o),Math.asin(r&&e*i/r)]},e}function xr(n,t){function e(n,t){o>0?-ka+Ea>t&&(t=-ka+Ea):t>ka-Ea&&(t=ka-Ea);var e=o/Math.pow(u(t),i);return[e*Math.sin(i*n),o-e*Math.cos(i*n)]}var r=Math.cos(n),u=function(n){return Math.tan(wa/4+n/2)},i=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(u(t)/u(n)),o=r*Math.pow(u(n),i)/i;return i?(e.invert=function(n,t){var e=o-t,r=B(i)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/i,2*Math.atan(Math.pow(o/r,1/i))-ka]},e):_r}function Mr(n,t){function e(n,t){var e=i-t;return[e*Math.sin(u*n),i-e*Math.cos(u*n)]}var r=Math.cos(n),u=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),i=r/u+n;return ia(u)u;u++){for(;r>1&&W(n[e[r-2]],n[e[r-1]],n[u])<=0;)--r;e[r++]=u}return e.slice(0,r)}function Ar(n,t){return n[0]-t[0]||n[1]-t[1]}function Cr(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Nr(n,t,e,r){var u=n[0],i=e[0],o=t[0]-u,a=r[0]-i,c=n[1],l=e[1],s=t[1]-c,f=r[1]-l,h=(a*(c-l)-f*(u-i))/(f*o-a*s);return[u+h*o,c+h*s]}function zr(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Lr(){Kr(this),this.edge=this.site=this.circle=null}function Tr(n){var t=Wc.pop()||new Lr;return t.site=n,t}function qr(n){Ir(n),Xc.remove(n),Wc.push(n),Kr(n)}function Rr(n){var t=n.circle,e=t.x,r=t.cy,u={x:e,y:r},i=n.P,o=n.N,a=[n];qr(n);for(var c=i;c.circle&&ia(e-c.circle.x)s;++s)l=a[s],c=a[s-1],Wr(l.edge,c.site,l.site,u);c=a[0],l=a[f-1],l.edge=$r(c.site,l.site,null,u),Yr(c),Yr(l)}function Dr(n){for(var t,e,r,u,i=n.x,o=n.y,a=Xc._;a;)if(r=Pr(a,o)-i,r>Ea)a=a.L;else{if(u=i-Ur(a,o),!(u>Ea)){r>-Ea?(t=a.P,e=a):u>-Ea?(t=a,e=a.N):t=e=a;break}if(!a.R){t=a;break}a=a.R}var c=Tr(n);if(Xc.insert(t,c),t||e){if(t===e)return Ir(t),e=Tr(t.site),Xc.insert(c,e),c.edge=e.edge=$r(t.site,c.site),Yr(t),Yr(e),void 0;if(!e)return c.edge=$r(t.site,c.site),void 0;Ir(t),Ir(e);var l=t.site,s=l.x,f=l.y,h=n.x-s,g=n.y-f,p=e.site,v=p.x-s,d=p.y-f,m=2*(h*d-g*v),y=h*h+g*g,x=v*v+d*d,M={x:(d*y-g*x)/m+s,y:(h*x-v*y)/m+f};Wr(e.edge,l,p,M),c.edge=$r(l,n,null,M),e.edge=$r(n,p,null,M),Yr(t),Yr(e)}}function Pr(n,t){var e=n.site,r=e.x,u=e.y,i=u-t;if(!i)return r;var o=n.P;if(!o)return-1/0;e=o.site;var a=e.x,c=e.y,l=c-t;if(!l)return a;var s=a-r,f=1/i-1/l,h=s/l;return f?(-h+Math.sqrt(h*h-2*f*(s*s/(-2*l)-c+l/2+u-i/2)))/f+r:(r+a)/2}function Ur(n,t){var e=n.N;if(e)return Pr(e,t);var r=n.site;return r.y===t?r.x:1/0}function jr(n){this.site=n,this.edges=[]}function Hr(n){for(var t,e,r,u,i,o,a,c,l,s,f=n[0][0],h=n[1][0],g=n[0][1],p=n[1][1],v=Vc,d=v.length;d--;)if(i=v[d],i&&i.prepare())for(a=i.edges,c=a.length,o=0;c>o;)s=a[o].end(),r=s.x,u=s.y,l=a[++o%c].start(),t=l.x,e=l.y,(ia(r-t)>Ea||ia(u-e)>Ea)&&(a.splice(o,0,new Jr(Br(i.site,s,ia(r-f)Ea?{x:f,y:ia(t-f)Ea?{x:ia(e-p)Ea?{x:h,y:ia(t-h)Ea?{x:ia(e-g)=-Aa)){var g=c*c+l*l,p=s*s+f*f,v=(f*g-l*p)/h,d=(c*p-s*g)/h,f=d+a,m=Jc.pop()||new Or;m.arc=n,m.site=u,m.x=v+o,m.y=f+Math.sqrt(v*v+d*d),m.cy=f,n.circle=m;for(var y=null,x=Bc._;x;)if(m.yd||d>=a)return;if(h>p){if(i){if(i.y>=l)return}else i={x:d,y:c};e={x:d,y:l}}else{if(i){if(i.yr||r>1)if(h>p){if(i){if(i.y>=l)return}else i={x:(c-u)/r,y:c};e={x:(l-u)/r,y:l}}else{if(i){if(i.yg){if(i){if(i.x>=a)return}else i={x:o,y:r*o+u};e={x:a,y:r*a+u}}else{if(i){if(i.xi&&(u=t.slice(i,u),a[o]?a[o]+=u:a[++o]=u),(e=e[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,c.push({i:o,x:fu(e,r)})),i=Qc.lastIndex;return ir;++r)a[(e=c[r]).i]=e.x(n);return a.join("")})}function gu(n,t){for(var e,r=Vo.interpolators.length;--r>=0&&!(e=Vo.interpolators[r](n,t)););return e}function pu(n,t){var e,r=[],u=[],i=n.length,o=t.length,a=Math.min(n.length,t.length);for(e=0;a>e;++e)r.push(gu(n[e],t[e]));for(;i>e;++e)u[e]=n[e];for(;o>e;++e)u[e]=t[e];return function(n){for(e=0;a>e;++e)u[e]=r[e](n);return u}}function vu(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function du(n){return function(t){return 1-n(1-t)}}function mu(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function yu(n){return n*n}function xu(n){return n*n*n}function Mu(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function _u(n){return function(t){return Math.pow(t,n)}}function bu(n){return 1-Math.cos(n*ka)}function wu(n){return Math.pow(2,10*(n-1))}function Su(n){return 1-Math.sqrt(1-n*n)}function ku(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/Sa*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*Sa/t)}}function Eu(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function Au(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Cu(n,t){n=Vo.hcl(n),t=Vo.hcl(t);var e=n.h,r=n.c,u=n.l,i=t.h-e,o=t.c-r,a=t.l-u;return isNaN(o)&&(o=0,r=isNaN(r)?t.c:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return ot(e+i*n,r+o*n,u+a*n)+""}}function Nu(n,t){n=Vo.hsl(n),t=Vo.hsl(t);var e=n.h,r=n.s,u=n.l,i=t.h-e,o=t.s-r,a=t.l-u;return isNaN(o)&&(o=0,r=isNaN(r)?t.s:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return ut(e+i*n,r+o*n,u+a*n)+""}}function zu(n,t){n=Vo.lab(n),t=Vo.lab(t);var e=n.l,r=n.a,u=n.b,i=t.l-e,o=t.a-r,a=t.b-u;return function(n){return ct(e+i*n,r+o*n,u+a*n)+""}}function Lu(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function Tu(n){var t=[n.a,n.b],e=[n.c,n.d],r=Ru(t),u=qu(t,e),i=Ru(Du(e,t,-u))||0;t[0]*e[1]180?s+=360:s-l>180&&(l+=360),u.push({i:r.push(r.pop()+"rotate(",null,")")-2,x:fu(l,s)})):s&&r.push(r.pop()+"rotate("+s+")"),f!=h?u.push({i:r.push(r.pop()+"skewX(",null,")")-2,x:fu(f,h)}):h&&r.push(r.pop()+"skewX("+h+")"),g[0]!=p[0]||g[1]!=p[1]?(e=r.push(r.pop()+"scale(",null,",",null,")"),u.push({i:e-4,x:fu(g[0],p[0])},{i:e-2,x:fu(g[1],p[1])})):(1!=p[0]||1!=p[1])&&r.push(r.pop()+"scale("+p+")"),e=u.length,function(n){for(var t,i=-1;++i=0;)e.push(u[r])}function Wu(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(i=n.children)&&(u=i.length))for(var u,i,o=-1;++oe;++e)(t=n[e][1])>u&&(r=e,u=t);return r}function oi(n){return n.reduce(ai,0)}function ai(n,t){return n+t[1]}function ci(n,t){return li(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function li(n,t){for(var e=-1,r=+n[0],u=(n[1]-r)/t,i=[];++e<=t;)i[e]=u*e+r;return i}function si(n){return[Vo.min(n),Vo.max(n)]}function fi(n,t){return n.value-t.value}function hi(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function gi(n,t){n._pack_next=t,t._pack_prev=n}function pi(n,t){var e=t.x-n.x,r=t.y-n.y,u=n.r+t.r;return.999*u*u>e*e+r*r}function vi(n){function t(n){s=Math.min(n.x-n.r,s),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),g=Math.max(n.y+n.r,g)}if((e=n.children)&&(l=e.length)){var e,r,u,i,o,a,c,l,s=1/0,f=-1/0,h=1/0,g=-1/0;if(e.forEach(di),r=e[0],r.x=-r.r,r.y=0,t(r),l>1&&(u=e[1],u.x=u.r,u.y=0,t(u),l>2))for(i=e[2],xi(r,u,i),t(i),hi(r,i),r._pack_prev=i,hi(i,u),u=r._pack_next,o=3;l>o;o++){xi(r,u,i=e[o]);var p=0,v=1,d=1;for(a=u._pack_next;a!==u;a=a._pack_next,v++)if(pi(a,i)){p=1;break}if(1==p)for(c=r._pack_prev;c!==a._pack_prev&&!pi(c,i);c=c._pack_prev,d++);p?(d>v||v==d&&u.ro;o++)i=e[o],i.x-=m,i.y-=y,x=Math.max(x,i.r+Math.sqrt(i.x*i.x+i.y*i.y));n.r=x,e.forEach(mi)}}function di(n){n._pack_next=n._pack_prev=n}function mi(n){delete n._pack_next,delete n._pack_prev}function yi(n,t,e,r){var u=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,u)for(var i=-1,o=u.length;++i=0;)t=u[i],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function ki(n,t,e){return n.a.parent===t.parent?n.a:e}function Ei(n){return 1+Vo.max(n,function(n){return n.y})}function Ai(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Ci(n){var t=n.children;return t&&t.length?Ci(t[0]):n}function Ni(n){var t,e=n.children;return e&&(t=e.length)?Ni(e[t-1]):n}function zi(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Li(n,t){var e=n.x+t[3],r=n.y+t[0],u=n.dx-t[1]-t[3],i=n.dy-t[0]-t[2];return 0>u&&(e+=u/2,u=0),0>i&&(r+=i/2,i=0),{x:e,y:r,dx:u,dy:i}}function Ti(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function qi(n){return n.rangeExtent?n.rangeExtent():Ti(n.range())}function Ri(n,t,e,r){var u=e(n[0],n[1]),i=r(t[0],t[1]);return function(n){return i(u(n))}}function Di(n,t){var e,r=0,u=n.length-1,i=n[r],o=n[u];return i>o&&(e=r,r=u,u=e,e=i,i=o,o=e),n[r]=t.floor(i),n[u]=t.ceil(o),n}function Pi(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:sl}function Ui(n,t,e,r){var u=[],i=[],o=0,a=Math.min(n.length,t.length)-1;for(n[a]2?Ui:Ri,c=r?ju:Uu;return o=u(n,t,c,e),a=u(t,n,c,gu),i}function i(n){return o(n)}var o,a;return i.invert=function(n){return a(n)},i.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},i.range=function(n){return arguments.length?(t=n,u()):t},i.rangeRound=function(n){return i.range(n).interpolate(Lu)},i.clamp=function(n){return arguments.length?(r=n,u()):r},i.interpolate=function(n){return arguments.length?(e=n,u()):e},i.ticks=function(t){return Yi(n,t)},i.tickFormat=function(t,e){return Ii(n,t,e)},i.nice=function(t){return Fi(n,t),u()},i.copy=function(){return ji(n,t,e,r)},u()}function Hi(n,t){return Vo.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Fi(n,t){return Di(n,Pi(Oi(n,t)[2]))}function Oi(n,t){null==t&&(t=10);var e=Ti(n),r=e[1]-e[0],u=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),i=t/r*u;return.15>=i?u*=10:.35>=i?u*=5:.75>=i&&(u*=2),e[0]=Math.ceil(e[0]/u)*u,e[1]=Math.floor(e[1]/u)*u+.5*u,e[2]=u,e}function Yi(n,t){return Vo.range.apply(Vo,Oi(n,t))}function Ii(n,t,e){var r=Oi(n,t);if(e){var u=Ka.exec(e);if(u.shift(),"s"===u[8]){var i=Vo.formatPrefix(Math.max(ia(r[0]),ia(r[1])));return u[7]||(u[7]="."+Zi(i.scale(r[2]))),u[8]="f",e=Vo.format(u.join("")),function(n){return e(i.scale(n))+i.symbol}}u[7]||(u[7]="."+Vi(u[8],r)),e=u.join("")}else e=",."+Zi(r[2])+"f";return Vo.format(e)}function Zi(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function Vi(n,t){var e=Zi(t[2]);return n in fl?Math.abs(e-Zi(Math.max(ia(t[0]),ia(t[1]))))+ +("e"!==n):e-2*("%"===n)}function Xi(n,t,e,r){function u(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function i(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function o(t){return n(u(t))}return o.invert=function(t){return i(n.invert(t))},o.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(u)),o):r},o.base=function(e){return arguments.length?(t=+e,n.domain(r.map(u)),o):t},o.nice=function(){var t=Di(r.map(u),e?Math:gl);return n.domain(t),r=t.map(i),o},o.ticks=function(){var n=Ti(r),o=[],a=n[0],c=n[1],l=Math.floor(u(a)),s=Math.ceil(u(c)),f=t%1?2:t;if(isFinite(s-l)){if(e){for(;s>l;l++)for(var h=1;f>h;h++)o.push(i(l)*h);o.push(i(l))}else for(o.push(i(l));l++0;h--)o.push(i(l)*h);for(l=0;o[l]c;s--);o=o.slice(l,s)}return o},o.tickFormat=function(n,t){if(!arguments.length)return hl;arguments.length<2?t=hl:"function"!=typeof t&&(t=Vo.format(t));var r,a=Math.max(.1,n/o.ticks().length),c=e?(r=1e-12,Math.ceil):(r=-1e-12,Math.floor);return function(n){return n/i(c(u(n)+r))<=a?t(n):""}},o.copy=function(){return Xi(n.copy(),t,e,r)},Hi(o,n)}function $i(n,t,e){function r(t){return n(u(t))}var u=Bi(t),i=Bi(1/t);return r.invert=function(t){return i(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(u)),r):e},r.ticks=function(n){return Yi(e,n)},r.tickFormat=function(n,t){return Ii(e,n,t)},r.nice=function(n){return r.domain(Fi(e,n))},r.exponent=function(o){return arguments.length?(u=Bi(t=o),i=Bi(1/t),n.domain(e.map(u)),r):t},r.copy=function(){return $i(n.copy(),t,e)},Hi(r,n)}function Bi(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function Wi(n,t){function e(e){return i[((u.get(e)||("range"===t.t?u.set(e,n.push(e)):0/0))-1)%i.length]}function r(t,e){return Vo.range(n.length).map(function(n){return t+e*n})}var u,i,a;return e.domain=function(r){if(!arguments.length)return n;n=[],u=new o;for(var i,a=-1,c=r.length;++an?[0/0,0/0]:[n>0?o[n-1]:e[0],nt?0/0:t/i+n,[t,t+1/i]},r.copy=function(){return Gi(n,t,e)},u()}function Ki(n,t){function e(e){return e>=e?t[Vo.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return Ki(n,t)},e}function Qi(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return Yi(n,t)},t.tickFormat=function(t,e){return Ii(n,t,e)},t.copy=function(){return Qi(n)},t}function no(n){return n.innerRadius}function to(n){return n.outerRadius}function eo(n){return n.startAngle}function ro(n){return n.endAngle}function uo(n){function t(t){function o(){l.push("M",i(n(s),a))}for(var c,l=[],s=[],f=-1,h=t.length,g=bt(e),p=bt(r);++f1&&u.push("H",r[0]),u.join("")}function co(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t1){a=t[1],i=n[c],c++,r+="C"+(u[0]+o[0])+","+(u[1]+o[1])+","+(i[0]-a[0])+","+(i[1]-a[1])+","+i[0]+","+i[1];for(var l=2;l9&&(u=3*t/Math.sqrt(u),o[a]=u*e,o[a+1]=u*r));for(a=-1;++a<=c;)u=(n[Math.min(c,a+1)][0]-n[Math.max(0,a-1)][0])/(6*(1+o[a]*o[a])),i.push([u||0,o[a]*u||0]);return i}function ko(n){return n.length<3?io(n):n[0]+go(n,So(n))}function Eo(n){for(var t,e,r,u=-1,i=n.length;++ue?l():(u.active=e,i.event&&i.event.start.call(n,s,t),i.tween.forEach(function(e,r){(r=r.call(n,s,t))&&v.push(r)}),Vo.timer(function(){return p.c=c(r||1)?Se:c,1},0,a),void 0)}function c(r){if(u.active!==e)return l();for(var o=r/g,a=f(o),c=v.length;c>0;)v[--c].call(n,a);return o>=1?(i.event&&i.event.end.call(n,s,t),l()):void 0 }function l(){return--u.count?delete u[e]:delete n.__transition__,1}var s=n.__data__,f=i.ease,h=i.delay,g=i.duration,p=Wa,v=[];return p.t=h+a,r>=h?o(r-h):(p.c=o,void 0)},0,a)}}function jo(n,t){n.attr("transform",function(n){return"translate("+t(n)+",0)"})}function Ho(n,t){n.attr("transform",function(n){return"translate(0,"+t(n)+")"})}function Fo(n){return n.toISOString()}function Oo(n,t,e){function r(t){return n(t)}function u(n,e){var r=n[1]-n[0],u=r/e,i=Vo.bisect(jl,u);return i==jl.length?[t.year,Oi(n.map(function(n){return n/31536e6}),e)[2]]:i?t[u/jl[i-1]1?{floor:function(t){for(;e(t=n.floor(t));)t=Yo(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=Yo(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Ti(r.domain()),i=null==n?u(e,10):"number"==typeof n?u(e,n):!n.range&&[{range:n},t];return i&&(n=i[0],t=i[1]),n.range(e[0],Yo(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return Oo(n.copy(),t,e)},Hi(r,n)}function Yo(n){return new Date(n)}function Io(n){return JSON.parse(n.responseText)}function Zo(n){var t=Bo.createRange();return t.selectNode(Bo.body),t.createContextualFragment(n.responseText)}var Vo={version:"3.4.12"};Date.now||(Date.now=function(){return+new Date});var Xo=[].slice,$o=function(n){return Xo.call(n)},Bo=document,Wo=Bo.documentElement,Jo=window;try{$o(Wo.childNodes)[0].nodeType}catch(Go){$o=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}try{Bo.createElement("div").style.setProperty("opacity",0,"")}catch(Ko){var Qo=Jo.Element.prototype,na=Qo.setAttribute,ta=Qo.setAttributeNS,ea=Jo.CSSStyleDeclaration.prototype,ra=ea.setProperty;Qo.setAttribute=function(n,t){na.call(this,n,t+"")},Qo.setAttributeNS=function(n,t,e){ta.call(this,n,t,e+"")},ea.setProperty=function(n,t,e){ra.call(this,n,t+"",e)}}Vo.ascending=n,Vo.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:0/0},Vo.min=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u=e);)e=void 0;for(;++ur&&(e=r)}else{for(;++u=e);)e=void 0;for(;++ur&&(e=r)}return e},Vo.max=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u=e);)e=void 0;for(;++ue&&(e=r)}else{for(;++u=e);)e=void 0;for(;++ue&&(e=r)}return e},Vo.extent=function(n,t){var e,r,u,i=-1,o=n.length;if(1===arguments.length){for(;++i=e);)e=u=void 0;for(;++ir&&(e=r),r>u&&(u=r))}else{for(;++i=e);)e=void 0;for(;++ir&&(e=r),r>u&&(u=r))}return[e,u]},Vo.sum=function(n,t){var e,r=0,u=n.length,i=-1;if(1===arguments.length)for(;++i1&&(e=e.map(r)),e=e.filter(t),e.length?Vo.quantile(e.sort(n),.5):void 0};var ua=e(n);Vo.bisectLeft=ua.left,Vo.bisect=Vo.bisectRight=ua.right,Vo.bisector=function(t){return e(1===t.length?function(e,r){return n(t(e),r)}:t)},Vo.shuffle=function(n){for(var t,e,r=n.length;r;)e=0|Math.random()*r--,t=n[r],n[r]=n[e],n[e]=t;return n},Vo.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},Vo.pairs=function(n){for(var t,e=0,r=n.length-1,u=n[0],i=new Array(0>r?0:r);r>e;)i[e]=[t=u,u=n[++e]];return i},Vo.zip=function(){if(!(u=arguments.length))return[];for(var n=-1,t=Vo.min(arguments,r),e=new Array(t);++n=0;)for(r=n[u],t=r.length;--t>=0;)e[--o]=r[t];return e};var ia=Math.abs;Vo.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),1/0===(t-n)/e)throw new Error("infinite range");var r,i=[],o=u(ia(e)),a=-1;if(n*=o,t*=o,e*=o,0>e)for(;(r=n+e*++a)>t;)i.push(r/o);else for(;(r=n+e*++a)=i.length)return r?r.call(u,a):e?a.sort(e):a;for(var l,s,f,h,g=-1,p=a.length,v=i[c++],d=new o;++g=i.length)return n;var r=[],u=a[e++];return n.forEach(function(n,u){r.push({key:n,values:t(u,e)})}),u?r.sort(function(n,t){return u(n.key,t.key)}):r}var e,r,u={},i=[],a=[];return u.map=function(t,e){return n(e,t,0)},u.entries=function(e){return t(n(Vo.map,e,0),0)},u.key=function(n){return i.push(n),u},u.sortKeys=function(n){return a[i.length-1]=n,u},u.sortValues=function(n){return e=n,u},u.rollup=function(n){return r=n,u},u},Vo.set=function(n){var t=new h;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},i(h,{has:a,add:function(n){return this[oa+n]=!0,n},remove:function(n){return n=oa+n,n in this&&delete this[n]},values:l,size:s,empty:f,forEach:function(n){for(var t in this)t.charCodeAt(0)===aa&&n.call(this,t.slice(1))}}),Vo.behavior={},Vo.rebind=function(n,t){for(var e,r=1,u=arguments.length;++r=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},Vo.event=null,Vo.requote=function(n){return n.replace(la,"\\$&")};var la=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,sa={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},fa=function(n,t){return t.querySelector(n)},ha=function(n,t){return t.querySelectorAll(n)},ga=Wo.matches||Wo[p(Wo,"matchesSelector")],pa=function(n,t){return ga.call(n,t)};"function"==typeof Sizzle&&(fa=function(n,t){return Sizzle(n,t)[0]||null},ha=Sizzle,pa=Sizzle.matchesSelector),Vo.selection=function(){return ya};var va=Vo.selection.prototype=[];va.select=function(n){var t,e,r,u,i=[];n=b(n);for(var o=-1,a=this.length;++o=0&&(e=n.slice(0,t),n=n.slice(t+1)),da.hasOwnProperty(e)?{space:da[e],local:n}:n}},va.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=Vo.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(S(t,n[t]));return this}return this.each(S(n,t))},va.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=A(n)).length,u=-1;if(t=e.classList){for(;++ur){if("string"!=typeof n){2>r&&(t="");for(e in n)this.each(z(e,n[e],t));return this}if(2>r)return Jo.getComputedStyle(this.node(),null).getPropertyValue(n);e=""}return this.each(z(n,t,e))},va.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(L(t,n[t]));return this}return this.each(L(n,t))},va.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},va.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},va.append=function(n){return n=T(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},va.insert=function(n,t){return n=T(n),t=b(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},va.remove=function(){return this.each(function(){var n=this.parentNode;n&&n.removeChild(this)})},va.data=function(n,t){function e(n,e){var r,u,i,a=n.length,f=e.length,h=Math.min(a,f),g=new Array(f),p=new Array(f),v=new Array(a);if(t){var d,m=new o,y=new o,x=[];for(r=-1;++rr;++r)p[r]=q(e[r]);for(;a>r;++r)v[r]=n[r]}p.update=g,p.parentNode=g.parentNode=v.parentNode=n.parentNode,c.push(p),l.push(g),s.push(v)}var r,u,i=-1,a=this.length;if(!arguments.length){for(n=new Array(a=(r=this[0]).length);++ii;i++){u.push(t=[]),t.parentNode=(e=this[i]).parentNode;for(var a=0,c=e.length;c>a;a++)(r=e[a])&&n.call(r,r.__data__,a,i)&&t.push(r)}return _(u)},va.order=function(){for(var n=-1,t=this.length;++n=0;)(e=r[u])&&(i&&i!==e.nextSibling&&i.parentNode.insertBefore(e,i),i=e);return this},va.sort=function(n){n=D.apply(this,arguments);for(var t=-1,e=this.length;++tn;n++)for(var e=this[n],r=0,u=e.length;u>r;r++){var i=e[r];if(i)return i}return null},va.size=function(){var n=0;return P(this,function(){++n}),n};var ma=[];Vo.selection.enter=U,Vo.selection.enter.prototype=ma,ma.append=va.append,ma.empty=va.empty,ma.node=va.node,ma.call=va.call,ma.size=va.size,ma.select=function(n){for(var t,e,r,u,i,o=[],a=-1,c=this.length;++ar){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each(F(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(F(n,t,e))};var xa=Vo.map({mouseenter:"mouseover",mouseleave:"mouseout"});xa.forEach(function(n){"on"+n in Bo&&xa.remove(n)});var Ma="onselectstart"in Bo?null:p(Wo.style,"userSelect"),_a=0;Vo.mouse=function(n){return Z(n,x())};var ba=/WebKit/.test(Jo.navigator.userAgent)?-1:0;Vo.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=x().changedTouches),t)for(var r,u=0,i=t.length;i>u;++u)if((r=t[u]).identifier===e)return Z(n,r)},Vo.behavior.drag=function(){function n(){this.on("mousedown.drag",u).on("touchstart.drag",i)}function t(n,t,u,i,o){return function(){function a(){var n,e,r=t(h,v);r&&(n=r[0]-x[0],e=r[1]-x[1],p|=n|e,x=r,g({type:"drag",x:r[0]+l[0],y:r[1]+l[1],dx:n,dy:e}))}function c(){t(h,v)&&(m.on(i+d,null).on(o+d,null),y(p&&Vo.event.target===f),g({type:"dragend"}))}var l,s=this,f=Vo.event.target,h=s.parentNode,g=e.of(s,arguments),p=0,v=n(),d=".drag"+(null==v?"":"-"+v),m=Vo.select(u()).on(i+d,a).on(o+d,c),y=I(),x=t(h,v);r?(l=r.apply(s,arguments),l=[l.x-x[0],l.y-x[1]]):l=[0,0],g({type:"dragstart"})}}var e=M(n,"drag","dragstart","dragend"),r=null,u=t(v,Vo.mouse,$,"mousemove","mouseup"),i=t(V,Vo.touch,X,"touchmove","touchend");return n.origin=function(t){return arguments.length?(r=t,n):r},Vo.rebind(n,e,"on")},Vo.touches=function(n,t){return arguments.length<2&&(t=x().touches),t?$o(t).map(function(t){var e=Z(n,t);return e.identifier=t.identifier,e}):[]};var wa=Math.PI,Sa=2*wa,ka=wa/2,Ea=1e-6,Aa=Ea*Ea,Ca=wa/180,Na=180/wa,za=Math.SQRT2,La=2,Ta=4;Vo.interpolateZoom=function(n,t){function e(n){var t=n*y;if(m){var e=Q(v),o=i/(La*h)*(e*nt(za*t+v)-K(v));return[r+o*l,u+o*s,i*e/Q(za*t+v)]}return[r+n*l,u+n*s,i*Math.exp(za*t)]}var r=n[0],u=n[1],i=n[2],o=t[0],a=t[1],c=t[2],l=o-r,s=a-u,f=l*l+s*s,h=Math.sqrt(f),g=(c*c-i*i+Ta*f)/(2*i*La*h),p=(c*c-i*i-Ta*f)/(2*c*La*h),v=Math.log(Math.sqrt(g*g+1)-g),d=Math.log(Math.sqrt(p*p+1)-p),m=d-v,y=(m||Math.log(c/i))/za;return e.duration=1e3*y,e},Vo.behavior.zoom=function(){function n(n){n.on(A,l).on(Da+".zoom",f).on("dblclick.zoom",h).on(z,s)}function t(n){return[(n[0]-S.x)/S.k,(n[1]-S.y)/S.k]}function e(n){return[n[0]*S.k+S.x,n[1]*S.k+S.y]}function r(n){S.k=Math.max(E[0],Math.min(E[1],n))}function u(n,t){t=e(t),S.x+=n[0]-t[0],S.y+=n[1]-t[1]}function i(){_&&_.domain(x.range().map(function(n){return(n-S.x)/S.k}).map(x.invert)),w&&w.domain(b.range().map(function(n){return(n-S.y)/S.k}).map(b.invert))}function o(n){n({type:"zoomstart"})}function a(n){i(),n({type:"zoom",scale:S.k,translate:[S.x,S.y]})}function c(n){n({type:"zoomend"})}function l(){function n(){s=1,u(Vo.mouse(r),h),a(l)}function e(){f.on(C,null).on(N,null),g(s&&Vo.event.target===i),c(l)}var r=this,i=Vo.event.target,l=L.of(r,arguments),s=0,f=Vo.select(Jo).on(C,n).on(N,e),h=t(Vo.mouse(r)),g=I();H.call(r),o(l)}function s(){function n(){var n=Vo.touches(g);return h=S.k,n.forEach(function(n){n.identifier in v&&(v[n.identifier]=t(n))}),n}function e(){var t=Vo.event.target;Vo.select(t).on(M,i).on(_,f),b.push(t);for(var e=Vo.event.changedTouches,o=0,c=e.length;c>o;++o)v[e[o].identifier]=null;var l=n(),s=Date.now();if(1===l.length){if(500>s-m){var h=l[0],g=v[h.identifier];r(2*S.k),u(h,g),y(),a(p)}m=s}else if(l.length>1){var h=l[0],x=l[1],w=h[0]-x[0],k=h[1]-x[1];d=w*w+k*k}}function i(){for(var n,t,e,i,o=Vo.touches(g),c=0,l=o.length;l>c;++c,i=null)if(e=o[c],i=v[e.identifier]){if(t)break;n=e,t=i}if(i){var s=(s=e[0]-n[0])*s+(s=e[1]-n[1])*s,f=d&&Math.sqrt(s/d);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+i[0])/2,(t[1]+i[1])/2],r(f*h)}m=null,u(n,t),a(p)}function f(){if(Vo.event.touches.length){for(var t=Vo.event.changedTouches,e=0,r=t.length;r>e;++e)delete v[t[e].identifier];for(var u in v)return void n()}Vo.selectAll(b).on(x,null),w.on(A,l).on(z,s),k(),c(p)}var h,g=this,p=L.of(g,arguments),v={},d=0,x=".zoom-"+Vo.event.changedTouches[0].identifier,M="touchmove"+x,_="touchend"+x,b=[],w=Vo.select(g),k=I();H.call(g),e(),o(p),w.on(A,null).on(z,e)}function f(){var n=L.of(this,arguments);d?clearTimeout(d):(g=t(p=v||Vo.mouse(this)),H.call(this),o(n)),d=setTimeout(function(){d=null,c(n)},50),y(),r(Math.pow(2,.002*qa())*S.k),u(p,g),a(n)}function h(){var n=L.of(this,arguments),e=Vo.mouse(this),i=t(e),l=Math.log(S.k)/Math.LN2;o(n),r(Math.pow(2,Vo.event.shiftKey?Math.ceil(l)-1:Math.floor(l)+1)),u(e,i),a(n),c(n)}var g,p,v,d,m,x,_,b,w,S={x:0,y:0,k:1},k=[960,500],E=Ra,A="mousedown.zoom",C="mousemove.zoom",N="mouseup.zoom",z="touchstart.zoom",L=M(n,"zoomstart","zoom","zoomend");return n.event=function(n){n.each(function(){var n=L.of(this,arguments),t=S;kl?Vo.select(this).transition().each("start.zoom",function(){S=this.__chart__||{x:0,y:0,k:1},o(n)}).tween("zoom:zoom",function(){var e=k[0],r=k[1],u=e/2,i=r/2,o=Vo.interpolateZoom([(u-S.x)/S.k,(i-S.y)/S.k,e/S.k],[(u-t.x)/t.k,(i-t.y)/t.k,e/t.k]);return function(t){var r=o(t),c=e/r[2];this.__chart__=S={x:u-r[0]*c,y:i-r[1]*c,k:c},a(n)}}).each("end.zoom",function(){c(n)}):(this.__chart__=S,o(n),a(n),c(n))})},n.translate=function(t){return arguments.length?(S={x:+t[0],y:+t[1],k:S.k},i(),n):[S.x,S.y]},n.scale=function(t){return arguments.length?(S={x:S.x,y:S.y,k:+t},i(),n):S.k},n.scaleExtent=function(t){return arguments.length?(E=null==t?Ra:[+t[0],+t[1]],n):E},n.center=function(t){return arguments.length?(v=t&&[+t[0],+t[1]],n):v},n.size=function(t){return arguments.length?(k=t&&[+t[0],+t[1]],n):k},n.x=function(t){return arguments.length?(_=t,x=t.copy(),S={x:0,y:0,k:1},n):_},n.y=function(t){return arguments.length?(w=t,b=t.copy(),S={x:0,y:0,k:1},n):w},Vo.rebind(n,L,"on")};var qa,Ra=[0,1/0],Da="onwheel"in Bo?(qa=function(){return-Vo.event.deltaY*(Vo.event.deltaMode?120:1)},"wheel"):"onmousewheel"in Bo?(qa=function(){return Vo.event.wheelDelta},"mousewheel"):(qa=function(){return-Vo.event.detail},"MozMousePixelScroll");Vo.color=et,et.prototype.toString=function(){return this.rgb()+""},Vo.hsl=rt;var Pa=rt.prototype=new et;Pa.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new rt(this.h,this.s,this.l/n)},Pa.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new rt(this.h,this.s,n*this.l)},Pa.rgb=function(){return ut(this.h,this.s,this.l)},Vo.hcl=it;var Ua=it.prototype=new et;Ua.brighter=function(n){return new it(this.h,this.c,Math.min(100,this.l+ja*(arguments.length?n:1)))},Ua.darker=function(n){return new it(this.h,this.c,Math.max(0,this.l-ja*(arguments.length?n:1)))},Ua.rgb=function(){return ot(this.h,this.c,this.l).rgb()},Vo.lab=at;var ja=18,Ha=.95047,Fa=1,Oa=1.08883,Ya=at.prototype=new et;Ya.brighter=function(n){return new at(Math.min(100,this.l+ja*(arguments.length?n:1)),this.a,this.b)},Ya.darker=function(n){return new at(Math.max(0,this.l-ja*(arguments.length?n:1)),this.a,this.b)},Ya.rgb=function(){return ct(this.l,this.a,this.b)},Vo.rgb=gt;var Ia=gt.prototype=new et;Ia.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,u=30;return t||e||r?(t&&u>t&&(t=u),e&&u>e&&(e=u),r&&u>r&&(r=u),new gt(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new gt(u,u,u)},Ia.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new gt(n*this.r,n*this.g,n*this.b)},Ia.hsl=function(){return yt(this.r,this.g,this.b)},Ia.toString=function(){return"#"+dt(this.r)+dt(this.g)+dt(this.b)};var Za=Vo.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Za.forEach(function(n,t){Za.set(n,pt(t))}),Vo.functor=bt,Vo.xhr=St(wt),Vo.dsv=function(n,t){function e(n,e,i){arguments.length<3&&(i=e,e=null);var o=kt(n,t,null==e?r:u(e),i);return o.row=function(n){return arguments.length?o.response(null==(e=n)?r:u(n)):e},o}function r(n){return e.parse(n.responseText)}function u(n){return function(t){return e.parse(t.responseText,n)}}function i(t){return t.map(o).join(n)}function o(n){return a.test(n)?'"'+n.replace(/\"/g,'""')+'"':n}var a=new RegExp('["'+n+"\n]"),c=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var u=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(u(n),e)}:u})},e.parseRows=function(n,t){function e(){if(s>=l)return o;if(u)return u=!1,i;var t=s;if(34===n.charCodeAt(t)){for(var e=t;e++s;){var r=n.charCodeAt(s++),a=1;if(10===r)u=!0;else if(13===r)u=!0,10===n.charCodeAt(s)&&(++s,++a);else if(r!==c)continue;return n.slice(t,s-a)}return n.slice(t)}for(var r,u,i={},o={},a=[],l=n.length,s=0,f=0;(r=e())!==o;){for(var h=[];r!==i&&r!==o;)h.push(r),r=e();(!t||(h=t(h,f++)))&&a.push(h)}return a},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new h,u=[];return t.forEach(function(n){for(var t in n)r.has(t)||u.push(r.add(t))}),[u.map(o).join(n)].concat(t.map(function(t){return u.map(function(n){return o(t[n])}).join(n)})).join("\n")},e.formatRows=function(n){return n.map(i).join("\n")},e},Vo.csv=Vo.dsv(",","text/csv"),Vo.tsv=Vo.dsv(" ","text/tab-separated-values");var Va,Xa,$a,Ba,Wa,Ja=Jo[p(Jo,"requestAnimationFrame")]||function(n){setTimeout(n,17)};Vo.timer=function(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var u=e+t,i={c:n,t:u,f:!1,n:null};Xa?Xa.n=i:Va=i,Xa=i,$a||(Ba=clearTimeout(Ba),$a=1,Ja(Ct))},Vo.timer.flush=function(){Nt(),zt()},Vo.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var Ga=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Tt);Vo.formatPrefix=function(n,t){var e=0;return n&&(0>n&&(n*=-1),t&&(n=Vo.round(n,Lt(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),Ga[8+e/3]};var Ka=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,Qa=Vo.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=Vo.round(n,Lt(n,t))).toFixed(Math.max(0,Math.min(20,Lt(n*(1+1e-15),t))))}}),nc=Vo.time={},tc=Date;Dt.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){ec.setUTCDate.apply(this._,arguments)},setDay:function(){ec.setUTCDay.apply(this._,arguments)},setFullYear:function(){ec.setUTCFullYear.apply(this._,arguments)},setHours:function(){ec.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){ec.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){ec.setUTCMinutes.apply(this._,arguments)},setMonth:function(){ec.setUTCMonth.apply(this._,arguments)},setSeconds:function(){ec.setUTCSeconds.apply(this._,arguments)},setTime:function(){ec.setTime.apply(this._,arguments)}};var ec=Date.prototype;nc.year=Pt(function(n){return n=nc.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),nc.years=nc.year.range,nc.years.utc=nc.year.utc.range,nc.day=Pt(function(n){var t=new tc(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),nc.days=nc.day.range,nc.days.utc=nc.day.utc.range,nc.dayOfYear=function(n){var t=nc.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=nc[n]=Pt(function(n){return(n=nc.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=nc.year(n).getDay();return Math.floor((nc.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});nc[n+"s"]=e.range,nc[n+"s"].utc=e.utc.range,nc[n+"OfYear"]=function(n){var e=nc.year(n).getDay();return Math.floor((nc.dayOfYear(n)+(e+t)%7)/7)}}),nc.week=nc.sunday,nc.weeks=nc.sunday.range,nc.weeks.utc=nc.sunday.utc.range,nc.weekOfYear=nc.sundayOfYear;var rc={"-":"",_:" ",0:"0"},uc=/^\s*\d+/,ic=/^%/;Vo.locale=function(n){return{numberFormat:qt(n),timeFormat:jt(n)}};var oc=Vo.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});Vo.format=oc.numberFormat,Vo.geo={},ie.prototype={s:0,t:0,add:function(n){oe(n,this.t,ac),oe(ac.s,this.s,this),this.s?this.t+=ac.t:this.s=ac.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var ac=new ie;Vo.geo.stream=function(n,t){n&&cc.hasOwnProperty(n.type)?cc[n.type](n,t):ae(n,t)};var cc={Feature:function(n,t){ae(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,u=e.length;++rn?4*wa+n:n,hc.lineStart=hc.lineEnd=hc.point=v}};Vo.geo.bounds=function(){function n(n,t){x.push(M=[s=n,h=n]),f>t&&(f=t),t>g&&(g=t)}function t(t,e){var r=fe([t*Ca,e*Ca]);if(m){var u=ge(m,r),i=[u[1],-u[0],0],o=ge(i,u);de(o),o=me(o);var c=t-p,l=c>0?1:-1,v=o[0]*Na*l,d=ia(c)>180;if(d^(v>l*p&&l*t>v)){var y=o[1]*Na;y>g&&(g=y)}else if(v=(v+360)%360-180,d^(v>l*p&&l*t>v)){var y=-o[1]*Na;f>y&&(f=y)}else f>e&&(f=e),e>g&&(g=e);d?p>t?a(s,t)>a(s,h)&&(h=t):a(t,h)>a(s,h)&&(s=t):h>=s?(s>t&&(s=t),t>h&&(h=t)):t>p?a(s,t)>a(s,h)&&(h=t):a(t,h)>a(s,h)&&(s=t)}else n(t,e);m=r,p=t}function e(){_.point=t}function r(){M[0]=s,M[1]=h,_.point=n,m=null}function u(n,e){if(m){var r=n-p;y+=ia(r)>180?r+(r>0?360:-360):r}else v=n,d=e;hc.point(n,e),t(n,e)}function i(){hc.lineStart()}function o(){u(v,d),hc.lineEnd(),ia(y)>Ea&&(s=-(h=180)),M[0]=s,M[1]=h,m=null}function a(n,t){return(t-=n)<0?t+360:t}function c(n,t){return n[0]-t[0]}function l(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:nfc?(s=-(h=180),f=-(g=90)):y>Ea?g=90:-Ea>y&&(f=-90),M[0]=s,M[1]=h}};return function(n){g=h=-(s=f=1/0),x=[],Vo.geo.stream(n,_);var t=x.length;if(t){x.sort(c);for(var e,r=1,u=x[0],i=[u];t>r;++r)e=x[r],l(e[0],u)||l(e[1],u)?(a(u[0],e[1])>a(u[0],u[1])&&(u[1]=e[1]),a(e[0],u[1])>a(u[0],u[1])&&(u[0]=e[0])):i.push(u=e);for(var o,e,p=-1/0,t=i.length-1,r=0,u=i[t];t>=r;u=e,++r)e=i[r],(o=a(u[1],e[0]))>p&&(p=o,s=e[0],h=u[1]) diff --git a/web/gui/src/main/webapp/libs/jquery-2.1.1.js b/web/gui/src/main/webapp/libs/jquery-2.1.1.js index eeefa5a33f..0426368872 100644 --- a/web/gui/src/main/webapp/libs/jquery-2.1.1.js +++ b/web/gui/src/main/webapp/libs/jquery-2.1.1.js @@ -1,22 +1,3 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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. - */ - (function( global, factory ) { if ( typeof module === "object" && typeof module.exports === "object" ) { diff --git a/web/gui/src/main/webapp/libs/jquery-2.1.1.min.js b/web/gui/src/main/webapp/libs/jquery-2.1.1.min.js index 5e093ec43a..e5ace116b6 100644 --- a/web/gui/src/main/webapp/libs/jquery-2.1.1.min.js +++ b/web/gui/src/main/webapp/libs/jquery-2.1.1.min.js @@ -1,22 +1,3 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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. - */ - /*! jQuery v2.1.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.1",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="
",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+Math.random()}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b) },_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthx",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|&#?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*\s*$/g,ib={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("