|
153 |
return hosts |
153 |
return hosts |
154 |
|
154 |
|
155 |
def __parse_command(self, command): |
155 |
def __parse_command(self, command): |
156 |
data, sep, command = command.partition(':') |
156 |
if command.find( ':' ) != -1: |
|
|
157 |
data = command.split( ':' )[ 1 ] |
158 |
command = command.split( ':' )[ 0 ] |
159 |
else: |
160 |
data = [ ] |
157 |
options = {} |
161 |
options = {} |
158 |
if data: |
162 |
if data: |
159 |
elements = data.split(',') |
163 |
elements = data.split(',') |
|
225 |
if cmd1 == cmd2: |
229 |
if cmd1 == cmd2: |
226 |
return ACLs.MATCH_FULL |
230 |
return ACLs.MATCH_FULL |
227 |
|
231 |
|
228 |
if cmd1[ -1 ] == '*' and cmd2.startswith( cmd1[ : -1 ] ): |
232 |
if cmd1.endswith('*') and cmd2.startswith( cmd1[ : -1 ] ): |
229 |
return ACLs.MATCH_PART |
233 |
return ACLs.MATCH_PART |
230 |
|
234 |
|
231 |
return ACLs.MATCH_NONE |
235 |
return ACLs.MATCH_NONE |