4. route

class fwOper.route.ROUTE(route_line)[source]

Bases: fwOper.fwObj.Singulars

Individual static-route object,

Properties:

(network, nexthop, ifdesc, distance)

Parameters

Singulars (Singulars) – inherits Singulars object properties/methods

parse()[source]

parse static route line and set route_dict

str()[source]

return String representation of routes

class fwOper.route.ROUTES(config_list)[source]

Bases: object

collection of object of Routes

get_route_objects()[source]

set ROUTE objects in self-Routes instance

prefix(network)[source]

check matching network in ROUTES object, return longest matching route

Parameters

network (str) – ip-address/subnet

Returns

matching Route object (longest match)

Return type

Route

str()[source]

string representation of self

Returns

all routes

Return type

str

fwOper.route.routes_list(config_list)[source]

list of lines with static routes from given config-list

Parameters

config_list (list) – firewall (instance) configuration list

Returns

routes

Return type

list