diff options
Diffstat (limited to 'framework/src/onos/apps')
9 files changed, 33 insertions, 33 deletions
diff --git a/framework/src/onos/apps/acl/src/main/java/org/onosproject/acl/AclRule.java b/framework/src/onos/apps/acl/src/main/java/org/onosproject/acl/AclRule.java index 8c91da4c..cd85dea7 100644 --- a/framework/src/onos/apps/acl/src/main/java/org/onosproject/acl/AclRule.java +++ b/framework/src/onos/apps/acl/src/main/java/org/onosproject/acl/AclRule.java @@ -86,7 +86,7 @@ public final class AclRule { /** * Check if the first CIDR address is in (or the same as) the second CIDR address. */ - private boolean checkCIDRinCIDR(Ip4Prefix cidrAddr1, Ip4Prefix cidrAddr2) { + private boolean checkCidrInCidr(Ip4Prefix cidrAddr1, Ip4Prefix cidrAddr2) { if (cidrAddr2 == null) { return true; } else if (cidrAddr1 == null) { @@ -116,8 +116,8 @@ public final class AclRule { public boolean checkMatch(AclRule r) { return (this.dstTpPort == r.dstTpPort || r.dstTpPort == 0) && (this.ipProto == r.ipProto || r.ipProto == 0) - && (checkCIDRinCIDR(this.srcIp(), r.srcIp())) - && (checkCIDRinCIDR(this.dstIp(), r.dstIp())); + && (checkCidrInCidr(this.srcIp(), r.srcIp())) + && (checkCidrInCidr(this.dstIp(), r.dstIp())); } /** diff --git a/framework/src/onos/apps/acl/src/main/java/org/onosproject/acl/AclWebResource.java b/framework/src/onos/apps/acl/src/main/java/org/onosproject/acl/AclWebResource.java index 9ec4c883..bdbcc693 100644 --- a/framework/src/onos/apps/acl/src/main/java/org/onosproject/acl/AclWebResource.java +++ b/framework/src/onos/apps/acl/src/main/java/org/onosproject/acl/AclWebResource.java @@ -129,7 +129,7 @@ public class AclWebResource extends AbstractWebResource { * @return 200 OK */ @DELETE - public Response clearACL() { + public Response clearAcl() { get(AclService.class).clearAcl(); return Response.ok().build(); } @@ -189,4 +189,4 @@ public class AclWebResource extends AbstractWebResource { return rule.build(); } -}
\ No newline at end of file +} diff --git a/framework/src/onos/apps/acl/src/main/java/org/onosproject/acl/impl/AclManager.java b/framework/src/onos/apps/acl/src/main/java/org/onosproject/acl/impl/AclManager.java index f5c0c204..638f0799 100644 --- a/framework/src/onos/apps/acl/src/main/java/org/onosproject/acl/impl/AclManager.java +++ b/framework/src/onos/apps/acl/src/main/java/org/onosproject/acl/impl/AclManager.java @@ -90,7 +90,7 @@ public class AclManager implements AclService { /** * Checks if the given IP address is in the given CIDR address. */ - private boolean checkIpInCIDR(Ip4Address ip, Ip4Prefix cidr) { + private boolean checkIpInCidr(Ip4Address ip, Ip4Prefix cidr) { int offset = 32 - cidr.prefixLength(); int cidrPrefix = cidr.address().toInt(); int ipIntValue = ip.toInt(); @@ -111,17 +111,17 @@ public class AclManager implements AclService { DeviceId deviceId = event.subject().location().deviceId(); for (IpAddress address : event.subject().ipAddresses()) { if ((rule.srcIp() != null) ? - (checkIpInCIDR(address.getIp4Address(), rule.srcIp())) : - (checkIpInCIDR(address.getIp4Address(), rule.dstIp()))) { + (checkIpInCidr(address.getIp4Address(), rule.srcIp())) : + (checkIpInCidr(address.getIp4Address(), rule.dstIp()))) { if (!aclStore.checkIfRuleWorksInDevice(rule.id(), deviceId)) { List<RuleId> allowingRuleList = aclStore .getAllowingRuleByDenyingRule(rule.id()); if (allowingRuleList != null) { for (RuleId allowingRuleId : allowingRuleList) { - generateACLFlow(aclStore.getAclRule(allowingRuleId), deviceId); + generateAclFlow(aclStore.getAclRule(allowingRuleId), deviceId); } } - generateACLFlow(rule, deviceId); + generateAclFlow(rule, deviceId); } } } @@ -212,7 +212,7 @@ public class AclManager implements AclService { if (cidrAddr.prefixLength() != 32) { for (Host h : hosts) { for (IpAddress a : h.ipAddresses()) { - if (checkIpInCIDR(a.getIp4Address(), cidrAddr)) { + if (checkIpInCidr(a.getIp4Address(), cidrAddr)) { deviceIdSet.add(h.location().deviceId()); } } @@ -220,7 +220,7 @@ public class AclManager implements AclService { } else { for (Host h : hosts) { for (IpAddress a : h.ipAddresses()) { - if (checkIpInCIDR(a.getIp4Address(), cidrAddr)) { + if (checkIpInCidr(a.getIp4Address(), cidrAddr)) { deviceIdSet.add(h.location().deviceId()); return deviceIdSet; } @@ -245,10 +245,10 @@ public class AclManager implements AclService { List<RuleId> allowingRuleList = aclStore.getAllowingRuleByDenyingRule(rule.id()); if (allowingRuleList != null) { for (RuleId allowingRuleId : allowingRuleList) { - generateACLFlow(aclStore.getAclRule(allowingRuleId), deviceId); + generateAclFlow(aclStore.getAclRule(allowingRuleId), deviceId); } } - generateACLFlow(rule, deviceId); + generateAclFlow(rule, deviceId); } } @@ -256,7 +256,7 @@ public class AclManager implements AclService { * Generates ACL flow rule according to ACL rule * and install it into related device. */ - private void generateACLFlow(AclRule rule, DeviceId deviceId) { + private void generateAclFlow(AclRule rule, DeviceId deviceId) { if (rule == null || aclStore.checkIfRuleWorksInDevice(rule.id(), deviceId)) { return; } diff --git a/framework/src/onos/apps/bgprouter/src/main/java/org/onosproject/bgprouter/IcmpHandler.java b/framework/src/onos/apps/bgprouter/src/main/java/org/onosproject/bgprouter/IcmpHandler.java index 6130a2e2..be4499e9 100644 --- a/framework/src/onos/apps/bgprouter/src/main/java/org/onosproject/bgprouter/IcmpHandler.java +++ b/framework/src/onos/apps/bgprouter/src/main/java/org/onosproject/bgprouter/IcmpHandler.java @@ -83,11 +83,11 @@ public class IcmpHandler { if (((ICMP) ipv4.getPayload()).getIcmpType() == ICMP.TYPE_ECHO_REQUEST && ipMatches) { - sendICMPResponse(ethernet, connectPoint); + sendIcmpResponse(ethernet, connectPoint); } } - private void sendICMPResponse(Ethernet icmpRequest, ConnectPoint outport) { + private void sendIcmpResponse(Ethernet icmpRequest, ConnectPoint outport) { Ethernet icmpReplyEth = new Ethernet(); diff --git a/framework/src/onos/apps/cordfabric/src/main/java/org/onosproject/cordfabric/CordFabricManager.java b/framework/src/onos/apps/cordfabric/src/main/java/org/onosproject/cordfabric/CordFabricManager.java index fa916865..690a3581 100644 --- a/framework/src/onos/apps/cordfabric/src/main/java/org/onosproject/cordfabric/CordFabricManager.java +++ b/framework/src/onos/apps/cordfabric/src/main/java/org/onosproject/cordfabric/CordFabricManager.java @@ -268,7 +268,7 @@ public class CordFabricManager implements FabricService { removeVlan(vlan.vlan()); if (vlan.iptv()) { - provisionIPTV(); + provisionIpTv(); } vlan.ports().forEach(cp -> { @@ -283,7 +283,7 @@ public class CordFabricManager implements FabricService { } //FIXME: pass iptv vlan in here. - private void provisionIPTV() { + private void provisionIpTv() { TrafficSelector ipTvUp = DefaultTrafficSelector.builder() .matchVlanId(VlanId.vlanId((short) 7)) .matchInPort(PortNumber.portNumber(2)) diff --git a/framework/src/onos/apps/optical/src/main/java/org/onosproject/optical/testapp/MPLSForwarding.java b/framework/src/onos/apps/optical/src/main/java/org/onosproject/optical/testapp/MplsForwarding.java index c784c82f..b9a4b0ca 100644 --- a/framework/src/onos/apps/optical/src/main/java/org/onosproject/optical/testapp/MPLSForwarding.java +++ b/framework/src/onos/apps/optical/src/main/java/org/onosproject/optical/testapp/MplsForwarding.java @@ -15,15 +15,12 @@ */ package org.onosproject.optical.testapp; -import static org.slf4j.LoggerFactory.getLogger; - -import java.util.HashMap; -import java.util.Map; - import org.apache.felix.scr.annotations.Activate; import org.apache.felix.scr.annotations.Deactivate; import org.apache.felix.scr.annotations.Reference; import org.apache.felix.scr.annotations.ReferenceCardinality; +import org.onlab.packet.Ethernet; +import org.onlab.packet.MplsLabel; import org.onosproject.core.ApplicationId; import org.onosproject.core.CoreService; import org.onosproject.net.Device; @@ -39,15 +36,18 @@ import org.onosproject.net.flow.FlowRule; import org.onosproject.net.flow.FlowRuleService; import org.onosproject.net.flow.TrafficSelector; import org.onosproject.net.flow.TrafficTreatment; -import org.onlab.packet.Ethernet; -import org.onlab.packet.MplsLabel; import org.slf4j.Logger; +import java.util.HashMap; +import java.util.Map; + +import static org.slf4j.LoggerFactory.getLogger; + /** * Sample reactive forwarding application. */ //@Component(immediate = true) -public class MPLSForwarding { +public class MplsForwarding { private final Logger log = getLogger(getClass()); diff --git a/framework/src/onos/apps/test/demo/src/main/java/org/onosproject/demo/DemoAPI.java b/framework/src/onos/apps/test/demo/src/main/java/org/onosproject/demo/DemoApi.java index 00956763..1e594157 100644 --- a/framework/src/onos/apps/test/demo/src/main/java/org/onosproject/demo/DemoAPI.java +++ b/framework/src/onos/apps/test/demo/src/main/java/org/onosproject/demo/DemoApi.java @@ -22,7 +22,7 @@ import java.util.Optional; /** * Simple demo api interface. */ -public interface DemoAPI { +public interface DemoApi { enum InstallType { MESH, RANDOM } diff --git a/framework/src/onos/apps/test/demo/src/main/java/org/onosproject/demo/DemoInstaller.java b/framework/src/onos/apps/test/demo/src/main/java/org/onosproject/demo/DemoInstaller.java index a408e695..0bddc083 100644 --- a/framework/src/onos/apps/test/demo/src/main/java/org/onosproject/demo/DemoInstaller.java +++ b/framework/src/onos/apps/test/demo/src/main/java/org/onosproject/demo/DemoInstaller.java @@ -87,7 +87,7 @@ import static org.slf4j.LoggerFactory.getLogger; */ @Component(immediate = true) @Service -public class DemoInstaller implements DemoAPI { +public class DemoInstaller implements DemoApi { private final Logger log = getLogger(getClass()); diff --git a/framework/src/onos/apps/test/demo/src/main/java/org/onosproject/demo/DemoResource.java b/framework/src/onos/apps/test/demo/src/main/java/org/onosproject/demo/DemoResource.java index e0c97dd8..e3a5a2d8 100644 --- a/framework/src/onos/apps/test/demo/src/main/java/org/onosproject/demo/DemoResource.java +++ b/framework/src/onos/apps/test/demo/src/main/java/org/onosproject/demo/DemoResource.java @@ -51,7 +51,7 @@ public class DemoResource extends BaseResource { public Response flowTest(InputStream input) throws IOException { ObjectMapper mapper = new ObjectMapper(); JsonNode cfg = mapper.readTree(input); - DemoAPI demo = get(DemoAPI.class); + DemoApi demo = get(DemoApi.class); return Response.ok(demo.flowTest(Optional.ofNullable(cfg)).toString()).build(); } @@ -75,9 +75,9 @@ public class DemoResource extends BaseResource { } - DemoAPI.InstallType type = DemoAPI.InstallType.valueOf( + DemoApi.InstallType type = DemoApi.InstallType.valueOf( cfg.get("type").asText().toUpperCase()); - DemoAPI demo = get(DemoAPI.class); + DemoApi demo = get(DemoApi.class); demo.setup(type, Optional.ofNullable(cfg.get("runParams"))); return Response.ok(mapper.createObjectNode().toString()).build(); @@ -93,7 +93,7 @@ public class DemoResource extends BaseResource { @Produces(MediaType.APPLICATION_JSON) public Response tearDown() { ObjectMapper mapper = new ObjectMapper(); - DemoAPI demo = get(DemoAPI.class); + DemoApi demo = get(DemoApi.class); demo.tearDown(); return Response.ok(mapper.createObjectNode().toString()).build(); } |