Commit 0bc0ed96 authored by Dmitry Volodin's avatar Dmitry Volodin
Browse files

Generic.has_local_user

parent ee728f6d
# -*- coding: utf-8 -*-
##----------------------------------------------------------------------
## Generic.has_local_user
##----------------------------------------------------------------------
## Copyright (C) 2007-2009 The NOC Project
## See LICENSE for details
##----------------------------------------------------------------------
"""
"""
import noc.sa.script
from noc.sa.interfaces import *
import re
class Script(noc.sa.script.Script):
name="Generic.has_local_user"
implements=[IHasLocalUser]
requires=[("get_local_users",IGetLocalUsers)]
def execute(self,username):
for u in self.scripts.get_local_users():
if u["username"]==username:
return True
return False
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment