PacketFence
Bug Tracking System

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000943PacketFencerefactoringpublic2010-04-07 11:382015-02-13 15:26
Reporterobilodeau 
Assigned To 
PriorityhighSeverityminorReproducibilityN/A
StatusclosedResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000943: create interfaces (abstract classes) to our switch objects
Descriptionat least the following interfaces should be created (with their implemented methods):

- switch
-- _setVlan
-- getVersion

- switch port-security
-- authorizeMAC
-- isPortSecurityEnabled
-- getSecureMacAddresses
-- getAllSecureMacAddresses

- switch MAB
-- NasPortToIfIndex

- switch 802.1x
-- NasPortToIfIndex
-- dot1xPortReauthenticate

- AP / controller
-- deauthenticateMac


The interface would implement the methods but die on them with: die ("unimplemented!")

This would allow that in tests, we could test switches against each interface and trap for die and if a switch dies then it's improperly implementing it's type. I think this would need removal of empty implementations in pf::SNMP so this might be a hard decision to take.

Check here for the design pattern: http://perldesignpatterns.com/?AbstractClass [^]

I think something like:
use base('pf::SNMP::Cisco', 'pf::SNMP::WiredDot1x', 'pf::SNMP::WiredMAB', 'pf::SNMP::PortSecurity')
shoudl work

and we should be careful about left to right since the search for sub implementations is done from left to right.
TagsNo tags attached.
fixed in git revision
fixed in mtn revision
Attached Files

- Relationships

-  Notes
(0001507)
obilodeau (reporter)
2010-04-07 11:47

forget about use base, use this instead:
http://search.cpan.org/~swalters/interface-0.03/interface.pm [^]
(0002312)
obilodeau (reporter)
2011-10-05 09:32

Actually I've read about Moose lately and I think it should be done using Moose's roles.
(0003687)
lmunro (administrator)
2015-02-13 15:26

Old issues.
Most are not relevant to PF 4 and up.

Let's reopen the ones that matter when we move to github.

- Issue History
Date Modified Username Field Change
2010-04-07 11:38 obilodeau New Issue
2010-04-07 11:38 obilodeau Status new => assigned
2010-04-07 11:38 obilodeau Assigned To => obilodeau
2010-04-07 11:47 obilodeau Note Added: 0001507
2010-04-15 17:43 obilodeau Project PacketFence 1.9 => PacketFence
2011-01-18 11:43 obilodeau Target Version => trunk
2011-10-05 09:32 obilodeau Note Added: 0002312
2012-10-19 14:21 fgaudreault Assigned To obilodeau =>
2012-10-19 14:21 fgaudreault Target Version devel => general
2015-02-13 15:26 lmunro Note Added: 0003687
2015-02-13 15:26 lmunro Status assigned => closed


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker