def __init__(self, socket, connection, wspaceFolder): self.socket = socket self.connection = connection self.wspaceFolder = wspaceFolder self.newCreds = [] self.newUsers = [] self.newEndpoints = [] self.newConnections = [] self.keysHash = {} for c in Creds.findAll(): if c.credsType != "privkey": continue path = c.obj.keypath p = subprocess.run(["sha1sum", path], stdout=subprocess.PIPE) out = p.stdout.decode("utf-8") h = out.split(" ", 1)[0] self.keysHash[h] = path
def getBaseObjects(self,scope=None): return Endpoint.findAll(scope=scope) + Creds.findAll(scope=scope) + User.findAll(scope=scope) + Host.findAll(scope=scope)
def getCreds(self,scope=None): return Creds.findAll(scope=scope)