test_class.declarator: cntx
test_class.modifier: protected
test_class.original_string: protected FloodlightContext cntx;
test_class.type: FloodlightContext
test_class.var_name: cntx
test_class.declarator: packetIn
test_class.modifier: protected
test_class.original_string: protected OFPacketIn packetIn;
test_class.type: OFPacketIn
test_class.var_name: packetIn
test_class.declarator: sw
test_class.modifier: protected
test_class.original_string: protected IOFSwitch sw;
test_class.type: IOFSwitch
test_class.var_name: sw
test_class.declarator: tcpPacket
test_class.modifier: protected
test_class.original_string: protected IPacket tcpPacket;
test_class.type: IPacket
test_class.var_name: tcpPacket
test_class.declarator: broadcastARPPacket
test_class.modifier: protected
test_class.original_string: protected IPacket broadcastARPPacket;
test_class.type: IPacket
test_class.var_name: broadcastARPPacket
test_class.declarator: ARPReplyPacket
test_class.modifier: protected
test_class.original_string: protected IPacket ARPReplyPacket;
test_class.type: IPacket
test_class.var_name: ARPReplyPacket
test_class.declarator: broadcastIPPacket
test_class.modifier: protected
test_class.original_string: protected IPacket broadcastIPPacket;
test_class.type: IPacket
test_class.var_name: broadcastIPPacket
test_class.declarator: tcpPacketReply
test_class.modifier: protected
test_class.original_string: protected IPacket tcpPacketReply;
test_class.type: IPacket
test_class.var_name: tcpPacketReply
test_class.declarator: broadcastMalformedPacket
test_class.modifier: protected
test_class.original_string: protected IPacket broadcastMalformedPacket;
test_class.type: IPacket
test_class.var_name: broadcastMalformedPacket
test_class.declarator: firewall
test_class.modifier: private
test_class.original_string: private Firewall firewall;
test_class.type: Firewall
test_class.var_name: firewall
test_class.declarator: debugCounterService
test_class.modifier: private
test_class.original_string: private MockDebugCounterService debugCounterService;
test_class.type: MockDebugCounterService
test_class.var_name: debugCounterService
test_class.declarator: TestSwitch1DPID = "00:00:00:00:00:00:00:01"
test_class.modifier: public static
test_class.original_string: public static String TestSwitch1DPID = "00:00:00:00:00:00:00:01";
test_class.type: String
test_class.var_name: TestSwitch1DPID
test_class.file: src/agents/apps/floodlight/floodlight-1.2/src/test/java/net/floodlightcontroller/firewall/FirewallTest.java
test_class.identifier: FirewallTest
test_class.superclass: extends FloodlightTestCase
test_case.body: @Test
      public void testReadRulesFromStorage() throws Exception {
          // add 2 rules first
          FirewallRule rule = new FirewallRule();
          rule.in_port = OFPort.of(2);
          rule.dl_src = MacAddress.of("00:00:00:00:00:01");
          rule.dl_dst = MacAddress.of("00:00:00:00:00:02");
          rule.priority = 1;
          rule.action = FirewallRule.FirewallAction.DROP;
          firewall.addRule(rule);
          rule = new FirewallRule();
          rule.in_port = OFPort.of(3);
          rule.dl_src = MacAddress.of("00:00:00:00:00:02");
          rule.dl_dst = MacAddress.of("00:00:00:00:00:01");
          rule.nw_proto = IpProtocol.TCP;
          rule.any_nw_proto = false;
          rule.tp_dst = TransportPort.of(80);
          rule.priority = 2;
          rule.action = FirewallRule.FirewallAction.ALLOW;
          firewall.addRule(rule);
  
          List<FirewallRule> rules = firewall.readRulesFromStorage();
          // verify rule 1
          FirewallRule r = rules.get(0);
          assertEquals(r.in_port, OFPort.of(2));
          assertEquals(r.priority, 1);
          assertEquals(r.dl_src, MacAddress.of("00:00:00:00:00:01"));
          assertEquals(r.dl_dst, MacAddress.of("00:00:00:00:00:02"));
          assertEquals(r.action, FirewallRule.FirewallAction.DROP);
          // verify rule 2
          r = rules.get(1);
          assertEquals(r.in_port, OFPort.of(3));
          assertEquals(r.priority, 2);
          assertEquals(r.dl_src, MacAddress.of("00:00:00:00:00:02"));
          assertEquals(r.dl_dst, MacAddress.of("00:00:00:00:00:01"));
          assertEquals(r.nw_proto, IpProtocol.TCP);
          assertEquals(r.tp_dst, TransportPort.of(80));
          assertEquals(r.any_nw_proto, false);
          assertEquals(r.action, FirewallRule.FirewallAction.ALLOW);
      }
test_case.class_method_signature: FirewallTest.testReadRulesFromStorage()
test_case.full_signature: @Test public void testReadRulesFromStorage()
test_case.identifier: testReadRulesFromStorage
test_case.invocations: of of of addRule of of of of addRule readRulesFromStorage get assertEquals of assertEquals assertEquals of assertEquals of assertEquals get assertEquals of assertEquals assertEquals of assertEquals of assertEquals assertEquals of assertEquals assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testReadRulesFromStorage()
focal_class.declarator: floodlightProvider
focal_class.modifier: protected
focal_class.original_string: protected IFloodlightProviderService floodlightProvider;
focal_class.type: IFloodlightProviderService
focal_class.var_name: floodlightProvider
focal_class.declarator: storageSource
focal_class.modifier: protected
focal_class.original_string: protected IStorageSourceService storageSource;
focal_class.type: IStorageSourceService
focal_class.var_name: storageSource
focal_class.declarator: restApi
focal_class.modifier: protected
focal_class.original_string: protected IRestApiService restApi;
focal_class.type: IRestApiService
focal_class.var_name: restApi
focal_class.declarator: logger
focal_class.modifier: protected static
focal_class.original_string: protected static Logger logger;
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: rules
focal_class.modifier: protected
focal_class.original_string: protected List<FirewallRule> rules;
focal_class.type: List<FirewallRule>
focal_class.var_name: rules
focal_class.declarator: enabled
focal_class.modifier: protected
focal_class.original_string: protected boolean enabled;
focal_class.type: boolean
focal_class.var_name: enabled
focal_class.declarator: subnet_mask = IPv4Address.of("255.255.255.0")
focal_class.modifier: protected
focal_class.original_string: protected IPv4Address subnet_mask = IPv4Address.of("255.255.255.0");
focal_class.type: IPv4Address
focal_class.var_name: subnet_mask
focal_class.declarator: TABLE_NAME = "controller_firewallrules"
focal_class.modifier: public static final
focal_class.original_string: public static final String TABLE_NAME = "controller_firewallrules";
focal_class.type: String
focal_class.var_name: TABLE_NAME
focal_class.declarator: COLUMN_RULEID = "ruleid"
focal_class.modifier: public static final
focal_class.original_string: public static final String COLUMN_RULEID = "ruleid";
focal_class.type: String
focal_class.var_name: COLUMN_RULEID
focal_class.declarator: COLUMN_DPID = "dpid"
focal_class.modifier: public static final
focal_class.original_string: public static final String COLUMN_DPID = "dpid";
focal_class.type: String
focal_class.var_name: COLUMN_DPID
focal_class.declarator: COLUMN_IN_PORT = "in_port"
focal_class.modifier: public static final
focal_class.original_string: public static final String COLUMN_IN_PORT = "in_port";
focal_class.type: String
focal_class.var_name: COLUMN_IN_PORT
focal_class.declarator: COLUMN_DL_SRC = "dl_src"
focal_class.modifier: public static final
focal_class.original_string: public static final String COLUMN_DL_SRC = "dl_src";
focal_class.type: String
focal_class.var_name: COLUMN_DL_SRC
focal_class.declarator: COLUMN_DL_DST = "dl_dst"
focal_class.modifier: public static final
focal_class.original_string: public static final String COLUMN_DL_DST = "dl_dst";
focal_class.type: String
focal_class.var_name: COLUMN_DL_DST
focal_class.declarator: COLUMN_DL_TYPE = "dl_type"
focal_class.modifier: public static final
focal_class.original_string: public static final String COLUMN_DL_TYPE = "dl_type";
focal_class.type: String
focal_class.var_name: COLUMN_DL_TYPE
focal_class.declarator: COLUMN_NW_SRC_PREFIX = "nw_src_prefix"
focal_class.modifier: public static final
focal_class.original_string: public static final String COLUMN_NW_SRC_PREFIX = "nw_src_prefix";
focal_class.type: String
focal_class.var_name: COLUMN_NW_SRC_PREFIX
focal_class.declarator: COLUMN_NW_SRC_MASKBITS = "nw_src_maskbits"
focal_class.modifier: public static final
focal_class.original_string: public static final String COLUMN_NW_SRC_MASKBITS = "nw_src_maskbits";
focal_class.type: String
focal_class.var_name: COLUMN_NW_SRC_MASKBITS
focal_class.declarator: COLUMN_NW_DST_PREFIX = "nw_dst_prefix"
focal_class.modifier: public static final
focal_class.original_string: public static final String COLUMN_NW_DST_PREFIX = "nw_dst_prefix";
focal_class.type: String
focal_class.var_name: COLUMN_NW_DST_PREFIX
focal_class.declarator: COLUMN_NW_DST_MASKBITS = "nw_dst_maskbits"
focal_class.modifier: public static final
focal_class.original_string: public static final String COLUMN_NW_DST_MASKBITS = "nw_dst_maskbits";
focal_class.type: String
focal_class.var_name: COLUMN_NW_DST_MASKBITS
focal_class.declarator: COLUMN_NW_PROTO = "nw_proto"
focal_class.modifier: public static final
focal_class.original_string: public static final String COLUMN_NW_PROTO = "nw_proto";
focal_class.type: String
focal_class.var_name: COLUMN_NW_PROTO
focal_class.declarator: COLUMN_TP_SRC = "tp_src"
focal_class.modifier: public static final
focal_class.original_string: public static final String COLUMN_TP_SRC = "tp_src";
focal_class.type: String
focal_class.var_name: COLUMN_TP_SRC
focal_class.declarator: COLUMN_TP_DST = "tp_dst"
focal_class.modifier: public static final
focal_class.original_string: public static final String COLUMN_TP_DST = "tp_dst";
focal_class.type: String
focal_class.var_name: COLUMN_TP_DST
focal_class.declarator: COLUMN_WILDCARD_DPID = "wildcard_dpid"
focal_class.modifier: public static final
focal_class.original_string: public static final String COLUMN_WILDCARD_DPID = "wildcard_dpid";
focal_class.type: String
focal_class.var_name: COLUMN_WILDCARD_DPID
focal_class.declarator: COLUMN_WILDCARD_IN_PORT = "any_in_port"
focal_class.modifier: public static final
focal_class.original_string: public static final String COLUMN_WILDCARD_IN_PORT = "any_in_port";
focal_class.type: String
focal_class.var_name: COLUMN_WILDCARD_IN_PORT
focal_class.declarator: COLUMN_WILDCARD_DL_SRC = "any_dl_src"
focal_class.modifier: public static final
focal_class.original_string: public static final String COLUMN_WILDCARD_DL_SRC = "any_dl_src";
focal_class.type: String
focal_class.var_name: COLUMN_WILDCARD_DL_SRC
focal_class.declarator: COLUMN_WILDCARD_DL_DST = "any_dl_dst"
focal_class.modifier: public static final
focal_class.original_string: public static final String COLUMN_WILDCARD_DL_DST = "any_dl_dst";
focal_class.type: String
focal_class.var_name: COLUMN_WILDCARD_DL_DST
focal_class.declarator: COLUMN_WILDCARD_DL_TYPE = "any_dl_type"
focal_class.modifier: public static final
focal_class.original_string: public static final String COLUMN_WILDCARD_DL_TYPE = "any_dl_type";
focal_class.type: String
focal_class.var_name: COLUMN_WILDCARD_DL_TYPE
focal_class.declarator: COLUMN_WILDCARD_NW_SRC = "any_nw_src"
focal_class.modifier: public static final
focal_class.original_string: public static final String COLUMN_WILDCARD_NW_SRC = "any_nw_src";
focal_class.type: String
focal_class.var_name: COLUMN_WILDCARD_NW_SRC
focal_class.declarator: COLUMN_WILDCARD_NW_DST = "any_nw_dst"
focal_class.modifier: public static final
focal_class.original_string: public static final String COLUMN_WILDCARD_NW_DST = "any_nw_dst";
focal_class.type: String
focal_class.var_name: COLUMN_WILDCARD_NW_DST
focal_class.declarator: COLUMN_WILDCARD_NW_PROTO = "any_nw_proto"
focal_class.modifier: public static final
focal_class.original_string: public static final String COLUMN_WILDCARD_NW_PROTO = "any_nw_proto";
focal_class.type: String
focal_class.var_name: COLUMN_WILDCARD_NW_PROTO
focal_class.declarator: COLUMN_WILDCARD_TP_SRC = "any_tp_src"
focal_class.modifier: public static final
focal_class.original_string: public static final String COLUMN_WILDCARD_TP_SRC = "any_tp_src";
focal_class.type: String
focal_class.var_name: COLUMN_WILDCARD_TP_SRC
focal_class.declarator: COLUMN_WILDCARD_TP_DST = "any_tp_dst"
focal_class.modifier: public static final
focal_class.original_string: public static final String COLUMN_WILDCARD_TP_DST = "any_tp_dst";
focal_class.type: String
focal_class.var_name: COLUMN_WILDCARD_TP_DST
focal_class.declarator: COLUMN_PRIORITY = "priority"
focal_class.modifier: public static final
focal_class.original_string: public static final String COLUMN_PRIORITY = "priority";
focal_class.type: String
focal_class.var_name: COLUMN_PRIORITY
focal_class.declarator: COLUMN_ACTION = "action"
focal_class.modifier: public static final
focal_class.original_string: public static final String COLUMN_ACTION = "action";
focal_class.type: String
focal_class.var_name: COLUMN_ACTION
focal_class.declarator: ColumnNames[] = { COLUMN_RULEID, COLUMN_DPID,
  		COLUMN_IN_PORT, COLUMN_DL_SRC, COLUMN_DL_DST, COLUMN_DL_TYPE,
  		COLUMN_NW_SRC_PREFIX, COLUMN_NW_SRC_MASKBITS, COLUMN_NW_DST_PREFIX,
  		COLUMN_NW_DST_MASKBITS, COLUMN_NW_PROTO, COLUMN_TP_SRC,
  		COLUMN_TP_DST, COLUMN_WILDCARD_DPID, COLUMN_WILDCARD_IN_PORT,
  		COLUMN_WILDCARD_DL_SRC, COLUMN_WILDCARD_DL_DST,
  		COLUMN_WILDCARD_DL_TYPE, COLUMN_WILDCARD_NW_SRC,
  		COLUMN_WILDCARD_NW_DST, COLUMN_WILDCARD_NW_PROTO, COLUMN_PRIORITY,
  		COLUMN_ACTION }
focal_class.modifier: public static
focal_class.original_string: public static String ColumnNames[] = { COLUMN_RULEID, COLUMN_DPID,
  		COLUMN_IN_PORT, COLUMN_DL_SRC, COLUMN_DL_DST, COLUMN_DL_TYPE,
  		COLUMN_NW_SRC_PREFIX, COLUMN_NW_SRC_MASKBITS, COLUMN_NW_DST_PREFIX,
  		COLUMN_NW_DST_MASKBITS, COLUMN_NW_PROTO, COLUMN_TP_SRC,
  		COLUMN_TP_DST, COLUMN_WILDCARD_DPID, COLUMN_WILDCARD_IN_PORT,
  		COLUMN_WILDCARD_DL_SRC, COLUMN_WILDCARD_DL_DST,
  		COLUMN_WILDCARD_DL_TYPE, COLUMN_WILDCARD_NW_SRC,
  		COLUMN_WILDCARD_NW_DST, COLUMN_WILDCARD_NW_PROTO, COLUMN_PRIORITY,
  		COLUMN_ACTION };
focal_class.type: String
focal_class.var_name: ColumnNames
focal_class.file: src/agents/apps/floodlight/floodlight-1.2/src/main/java/net/floodlightcontroller/firewall/Firewall.java
focal_class.identifier: Firewall
focal_class.interfaces: implements IFirewallService, IOFMessageListener,
  IFloodlightModule
focal_class.class_method_signature: Firewall.getName()
focal_class.full_signature: @Override public String getName()
focal_class.identifier: getName
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getName()
focal_class.class_method_signature: Firewall.isCallbackOrderingPrereq(OFType type, String name)
focal_class.full_signature: @Override public boolean isCallbackOrderingPrereq(OFType type, String name)
focal_class.identifier: isCallbackOrderingPrereq
focal_class.modifiers: @Override public
focal_class.parameters: (OFType type, String name)
focal_class.return: boolean
focal_class.signature: boolean isCallbackOrderingPrereq(OFType type, String name)
focal_class.class_method_signature: Firewall.isCallbackOrderingPostreq(OFType type, String name)
focal_class.full_signature: @Override public boolean isCallbackOrderingPostreq(OFType type, String name)
focal_class.identifier: isCallbackOrderingPostreq
focal_class.modifiers: @Override public
focal_class.parameters: (OFType type, String name)
focal_class.return: boolean
focal_class.signature: boolean isCallbackOrderingPostreq(OFType type, String name)
focal_class.class_method_signature: Firewall.getModuleServices()
focal_class.full_signature: @Override public Collection<Class<? extends IFloodlightService>> getModuleServices()
focal_class.identifier: getModuleServices
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Collection<Class<? extends IFloodlightService>>
focal_class.signature: Collection<Class<? extends IFloodlightService>> getModuleServices()
focal_class.class_method_signature: Firewall.getServiceImpls()
focal_class.full_signature: @Override public Map<Class<? extends IFloodlightService>, IFloodlightService> getServiceImpls()
focal_class.identifier: getServiceImpls
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Map<Class<? extends IFloodlightService>, IFloodlightService>
focal_class.signature: Map<Class<? extends IFloodlightService>, IFloodlightService> getServiceImpls()
focal_class.class_method_signature: Firewall.getModuleDependencies()
focal_class.full_signature: @Override public Collection<Class<? extends IFloodlightService>> getModuleDependencies()
focal_class.identifier: getModuleDependencies
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Collection<Class<? extends IFloodlightService>>
focal_class.signature: Collection<Class<? extends IFloodlightService>> getModuleDependencies()
focal_class.class_method_signature: Firewall.readRulesFromStorage()
focal_class.full_signature: protected ArrayList<FirewallRule> readRulesFromStorage()
focal_class.identifier: readRulesFromStorage
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: ArrayList<FirewallRule>
focal_class.signature: ArrayList<FirewallRule> readRulesFromStorage()
focal_class.class_method_signature: Firewall.init(FloodlightModuleContext context)
focal_class.full_signature: @Override public void init(FloodlightModuleContext context)
focal_class.identifier: init
focal_class.modifiers: @Override public
focal_class.parameters: (FloodlightModuleContext context)
focal_class.return: void
focal_class.signature: void init(FloodlightModuleContext context)
focal_class.class_method_signature: Firewall.startUp(FloodlightModuleContext context)
focal_class.full_signature: @Override public void startUp(FloodlightModuleContext context)
focal_class.identifier: startUp
focal_class.modifiers: @Override public
focal_class.parameters: (FloodlightModuleContext context)
focal_class.return: void
focal_class.signature: void startUp(FloodlightModuleContext context)
focal_class.class_method_signature: Firewall.receive(IOFSwitch sw, OFMessage msg, FloodlightContext cntx)
focal_class.full_signature: @Override public Command receive(IOFSwitch sw, OFMessage msg, FloodlightContext cntx)
focal_class.identifier: receive
focal_class.modifiers: @Override public
focal_class.parameters: (IOFSwitch sw, OFMessage msg, FloodlightContext cntx)
focal_class.return: Command
focal_class.signature: Command receive(IOFSwitch sw, OFMessage msg, FloodlightContext cntx)
focal_class.class_method_signature: Firewall.enableFirewall(boolean enabled)
focal_class.full_signature: @Override public void enableFirewall(boolean enabled)
focal_class.identifier: enableFirewall
focal_class.modifiers: @Override public
focal_class.parameters: (boolean enabled)
focal_class.return: void
focal_class.signature: void enableFirewall(boolean enabled)
focal_class.class_method_signature: Firewall.getRules()
focal_class.full_signature: @Override public List<FirewallRule> getRules()
focal_class.identifier: getRules
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: List<FirewallRule>
focal_class.signature: List<FirewallRule> getRules()
focal_class.class_method_signature: Firewall.getStorageRules()
focal_class.full_signature: @Override public List<Map<String, Object>> getStorageRules()
focal_class.identifier: getStorageRules
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: List<Map<String, Object>>
focal_class.signature: List<Map<String, Object>> getStorageRules()
focal_class.class_method_signature: Firewall.getSubnetMask()
focal_class.full_signature: @Override public String getSubnetMask()
focal_class.identifier: getSubnetMask
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getSubnetMask()
focal_class.class_method_signature: Firewall.setSubnetMask(String newMask)
focal_class.full_signature: @Override public void setSubnetMask(String newMask)
focal_class.identifier: setSubnetMask
focal_class.modifiers: @Override public
focal_class.parameters: (String newMask)
focal_class.return: void
focal_class.signature: void setSubnetMask(String newMask)
focal_class.class_method_signature: Firewall.addRule(FirewallRule rule)
focal_class.full_signature: @Override public synchronized void addRule(FirewallRule rule)
focal_class.identifier: addRule
focal_class.modifiers: @Override public synchronized
focal_class.parameters: (FirewallRule rule)
focal_class.return: void
focal_class.signature: void addRule(FirewallRule rule)
focal_class.class_method_signature: Firewall.deleteRule(int ruleid)
focal_class.full_signature: @Override public synchronized void deleteRule(int ruleid)
focal_class.identifier: deleteRule
focal_class.modifiers: @Override public synchronized
focal_class.parameters: (int ruleid)
focal_class.return: void
focal_class.signature: void deleteRule(int ruleid)
focal_class.class_method_signature: Firewall.matchWithRule(IOFSwitch sw, OFPacketIn pi, FloodlightContext cntx)
focal_class.full_signature: protected RuleMatchPair matchWithRule(IOFSwitch sw, OFPacketIn pi, FloodlightContext cntx)
focal_class.identifier: matchWithRule
focal_class.modifiers: protected
focal_class.parameters: (IOFSwitch sw, OFPacketIn pi, FloodlightContext cntx)
focal_class.return: RuleMatchPair
focal_class.signature: RuleMatchPair matchWithRule(IOFSwitch sw, OFPacketIn pi, FloodlightContext cntx)
focal_class.class_method_signature: Firewall.isIPBroadcast(IPv4Address ip)
focal_class.full_signature: protected boolean isIPBroadcast(IPv4Address ip)
focal_class.identifier: isIPBroadcast
focal_class.modifiers: protected
focal_class.parameters: (IPv4Address ip)
focal_class.return: boolean
focal_class.signature: boolean isIPBroadcast(IPv4Address ip)
focal_class.class_method_signature: Firewall.processPacketInMessage(IOFSwitch sw, OFPacketIn pi, IRoutingDecision decision, FloodlightContext cntx)
focal_class.full_signature: public Command processPacketInMessage(IOFSwitch sw, OFPacketIn pi, IRoutingDecision decision, FloodlightContext cntx)
focal_class.identifier: processPacketInMessage
focal_class.modifiers: public
focal_class.parameters: (IOFSwitch sw, OFPacketIn pi, IRoutingDecision decision, FloodlightContext cntx)
focal_class.return: Command
focal_class.signature: Command processPacketInMessage(IOFSwitch sw, OFPacketIn pi, IRoutingDecision decision, FloodlightContext cntx)
focal_class.class_method_signature: Firewall.isEnabled()
focal_class.full_signature: @Override public boolean isEnabled()
focal_class.identifier: isEnabled
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isEnabled()
focal_method.body: protected ArrayList<FirewallRule> readRulesFromStorage() {
  		ArrayList<FirewallRule> l = new ArrayList<FirewallRule>();
  
  		try {
  			Map<String, Object> row;
  
  			// (..., null, null) for no predicate, no ordering
  			IResultSet resultSet = storageSource.executeQuery(TABLE_NAME, ColumnNames, null, null);
  
  			// put retrieved rows into FirewallRules
  			for (Iterator<IResultSet> it = resultSet.iterator(); it.hasNext();) {
  				row = it.next().getRow();
  				// now, parse row
  				FirewallRule r = new FirewallRule();
  				if (!row.containsKey(COLUMN_RULEID) || !row.containsKey(COLUMN_DPID)) {
  					logger.error( "skipping entry with missing required 'ruleid' or 'switchid' entry: {}", row);
  					return l;
  				}
  				try {
  					r.ruleid = Integer
  							.parseInt((String) row.get(COLUMN_RULEID));
  					r.dpid = DatapathId.of((String) row.get(COLUMN_DPID));
  
  					for (String key : row.keySet()) {
  						if (row.get(key) == null) {
  							continue;
  						}
  						if (key.equals(COLUMN_RULEID) || key.equals(COLUMN_DPID) || key.equals("id")) {
  							continue; // already handled
  						} else if (key.equals(COLUMN_IN_PORT)) {
  							r.in_port = OFPort.of(Integer.parseInt((String) row.get(COLUMN_IN_PORT)));
  						} else if (key.equals(COLUMN_DL_SRC)) {
  							r.dl_src = MacAddress.of(Long.parseLong((String) row.get(COLUMN_DL_SRC)));
  						}  else if (key.equals(COLUMN_DL_DST)) {
  							r.dl_dst = MacAddress.of(Long.parseLong((String) row.get(COLUMN_DL_DST)));
  						} else if (key.equals(COLUMN_DL_TYPE)) {
  							r.dl_type = EthType.of(Integer.parseInt((String) row.get(COLUMN_DL_TYPE)));
  						} else if (key.equals(COLUMN_NW_SRC_PREFIX)) {
  							r.nw_src_prefix_and_mask = IPv4AddressWithMask.of(IPv4Address.of(Integer.parseInt((String) row.get(COLUMN_NW_SRC_PREFIX))), r.nw_src_prefix_and_mask.getMask());
  						} else if (key.equals(COLUMN_NW_SRC_MASKBITS)) {
  							r.nw_src_prefix_and_mask = IPv4AddressWithMask.of(r.nw_src_prefix_and_mask.getValue(), IPv4Address.of(Integer.parseInt((String) row.get(COLUMN_NW_SRC_MASKBITS))));
  						} else if (key.equals(COLUMN_NW_DST_PREFIX)) {
  							r.nw_dst_prefix_and_mask = IPv4AddressWithMask.of(IPv4Address.of(Integer.parseInt((String) row.get(COLUMN_NW_DST_PREFIX))), r.nw_dst_prefix_and_mask.getMask());
  						} else if (key.equals(COLUMN_NW_DST_MASKBITS)) {
  							r.nw_dst_prefix_and_mask = IPv4AddressWithMask.of(r.nw_dst_prefix_and_mask.getValue(), IPv4Address.of(Integer.parseInt((String) row.get(COLUMN_NW_DST_MASKBITS))));
  						} else if (key.equals(COLUMN_NW_PROTO)) {
  							r.nw_proto = IpProtocol.of(Short.parseShort((String) row.get(COLUMN_NW_PROTO)));
  						} else if (key.equals(COLUMN_TP_SRC)) {
  							r.tp_src = TransportPort.of(Integer.parseInt((String) row.get(COLUMN_TP_SRC)));
  						} else if (key.equals(COLUMN_TP_DST)) {
  							r.tp_dst = TransportPort.of(Integer.parseInt((String) row.get(COLUMN_TP_DST)));
  						} else if (key.equals(COLUMN_WILDCARD_DPID)) {
  							r.any_dpid = Boolean.parseBoolean((String) row.get(COLUMN_WILDCARD_DPID));
  						} else if (key.equals(COLUMN_WILDCARD_IN_PORT)) {
  							r.any_in_port = Boolean.parseBoolean((String) row.get(COLUMN_WILDCARD_IN_PORT));
  						} else if (key.equals(COLUMN_WILDCARD_DL_SRC)) {
  							r.any_dl_src = Boolean.parseBoolean((String) row.get(COLUMN_WILDCARD_DL_SRC));
  						} else if (key.equals(COLUMN_WILDCARD_DL_DST)) {
  							r.any_dl_dst = Boolean.parseBoolean((String) row.get(COLUMN_WILDCARD_DL_DST));
  						} else if (key.equals(COLUMN_WILDCARD_DL_TYPE)) {
  							r.any_dl_type = Boolean.parseBoolean((String) row.get(COLUMN_WILDCARD_DL_TYPE));
  						} else if (key.equals(COLUMN_WILDCARD_NW_SRC)) {
  							r.any_nw_src = Boolean.parseBoolean((String) row.get(COLUMN_WILDCARD_NW_SRC));
  						} else if (key.equals(COLUMN_WILDCARD_NW_DST)) {
  							r.any_nw_dst = Boolean.parseBoolean((String) row.get(COLUMN_WILDCARD_NW_DST));
  						} else if (key.equals(COLUMN_WILDCARD_NW_PROTO)) {
  							r.any_nw_proto = Boolean.parseBoolean((String) row.get(COLUMN_WILDCARD_NW_PROTO));
  						} else if (key.equals(COLUMN_PRIORITY)) {
  							r.priority = Integer.parseInt((String) row.get(COLUMN_PRIORITY));
  						} else if (key.equals(COLUMN_ACTION)) {
  							int tmp = Integer.parseInt((String) row.get(COLUMN_ACTION));
  							if (tmp == FirewallRule.FirewallAction.DROP.ordinal()) {
  								r.action = FirewallRule.FirewallAction.DROP;
  							} else if (tmp == FirewallRule.FirewallAction.ALLOW.ordinal()) {
  								r.action = FirewallRule.FirewallAction.ALLOW;
  							} else {
  								r.action = null;
  								logger.error("action not recognized");
  							}
  						}
  					}
  				} catch (ClassCastException e) {
  					logger.error("skipping rule {} with bad data : " + e.getMessage(), r.ruleid);
  				}
  				if (r.action != null) {
  					l.add(r);
  				}
  			}
  		} catch (StorageException e) {
  			logger.error("failed to access storage: {}", e.getMessage());
  			// if the table doesn't exist, then wait to populate later via
  			// setStorageSource()
  		}
  
  		// now, sort the list based on priorities
  		Collections.sort(l);
  
  		return l;
  	}
focal_method.class_method_signature: Firewall.readRulesFromStorage()
focal_method.full_signature: protected ArrayList<FirewallRule> readRulesFromStorage()
focal_method.identifier: readRulesFromStorage
focal_method.invocations: executeQuery iterator hasNext getRow next containsKey containsKey error parseInt get of get keySet get equals equals equals equals of parseInt get equals of parseLong get equals of parseLong get equals of parseInt get equals of of parseInt get getMask equals of getValue of parseInt get equals of of parseInt get getMask equals of getValue of parseInt get equals of parseShort get equals of parseInt get equals of parseInt get equals parseBoolean get equals parseBoolean get equals parseBoolean get equals parseBoolean get equals parseBoolean get equals parseBoolean get equals parseBoolean get equals parseBoolean get equals parseInt get equals parseInt get ordinal ordinal error error getMessage add error getMessage sort
focal_method.modifiers: protected
focal_method.parameters: ()
focal_method.return: ArrayList<FirewallRule>
focal_method.signature: ArrayList<FirewallRule> readRulesFromStorage()