示例#1
0
def countInventoryHistory(days, only_new, pattern):
    return Inventory().countInventoryHistory(days, only_new, pattern)
示例#2
0
def getMachinesBy(table, field, value):
    # TODO : ctx is missing....Inventory
    ctx = None
    return Inventory().getMachinesBy(ctx, table, field, value)
示例#3
0
def getInventoryHistory(days, only_new, pattern, max, min):
    # Use xmlrpcCleanup to clean the date values
    return xmlrpcCleanup(Inventory().getInventoryHistory(
        days, only_new, pattern, max, min))
示例#4
0
 def getUUIDByMachineName(self, name):
     ctx = self.currentContext
     return xmlrpcCleanup(Inventory().getUUIDByMachineName(ctx, name))
示例#5
0
def getValueFuzzyWhere(table, field1, value1, field2, fuzzy_value):
    return Inventory().getValueFuzzyWhere(table, field1, value1, field2,
                                          fuzzy_value)
示例#6
0
 def getMachineByOwner(self, user):
     ctx = self.currentContext
     return xmlrpcCleanup(Inventory().getMachineByOwner(ctx, user))
示例#7
0
文件: __init__.py 项目: allgi/mmc
 def getLastMachineInventoryFull(self, params):
     ctx = self.currentContext
     #        if not ComputerLocationManager().doesUserHaveAccessToMachine(ctx.userid, uuid):
     #            return False
     return xmlrpcCleanup(Inventory().getLastMachineInventoryFull(
         ctx, params))
示例#8
0
 def getMachineByHostnameAndMacs(self, hostname, macs):
     ctx = self.currentContext
     return xmlrpcCleanup(Inventory().getMachineByHostnameAndMacs(
         ctx, hostname, macs))
示例#9
0
 def getMachines(self, pattern=None):
     ctx = self.currentContext
     return xmlrpcCleanup(Inventory().getMachines(ctx, pattern))
示例#10
0
 def getMachineNumberByState(self):
     ctx = self.currentContext
     return xmlrpcCleanup(Inventory().getMachineNumberByState(ctx))
示例#11
0
 def getMachineListByState(self, groupName):
     ctx = self.currentContext
     return xmlrpcCleanup(Inventory().getMachineListByState(ctx, groupName))
示例#12
0
 def getMachineInventoryDiff(self, params):
     ctx = self.currentContext
     # Use xmlrpcCleanup to clean all None values
     return xmlrpcCleanup(Inventory().getComputerInventoryDiff(ctx, params))
示例#13
0
 def countMachineInventoryHistory(self, params):
     ctx = self.currentContext
     return Inventory().countComputerInventoryHistory(ctx, params)
示例#14
0
 def countLastMachineInventoryPart(self, part, params):
     ctx = self.currentContext
     return xmlrpcCleanup(Inventory().countLastMachineInventoryPart(
         ctx, part, params))
示例#15
0
def getTypeOfAttribute(klass, attr):
    return Inventory().getTypeOfAttribute(klass, attr)
示例#16
0
def getValues(table, field):
    return Inventory().getValues(table, field)
示例#17
0
 def getContext(self):
     s = SecurityContext()
     s.userid = self.userid
     s.locations = Inventory().getUserLocations(s.userid)
     s.locationsid = map(lambda e: e.id, s.locations)
     return s
示例#18
0
def getValuesWhere(table, field1, value1, field2):
    return Inventory().getValuesWhere(table, field1, value1, field2)
示例#19
0
文件: __init__.py 项目: allgi/mmc
 def getLastMachineInventoryPart(self, part, params):
     ctx = self.currentContext
     #        uuid = name # TODO : get uuid from name, or something like that...
     #        ComputerLocationManager().doesUserHaveAccessToMachine(ctx.userid, uuid)
     return xmlrpcCleanup(Inventory().getLastMachineInventoryPart(
         ctx, part, params))
示例#20
0
def getValuesFuzzy(table, field, fuzzy_value):
    return Inventory().getValuesFuzzy(table, field, fuzzy_value)
示例#21
0
文件: __init__.py 项目: allgi/mmc
 def getMachineInventoryHistory(self, params):
     ctx = self.currentContext
     return xmlrpcCleanup(Inventory().getComputerInventoryHistory(
         ctx, params))
示例#22
0
文件: computers.py 项目: allgi/mmc
 def __init__(self, conffile=None):
     self.logger = logging.getLogger()
     self.config = InventoryConfig()
     self.inventory = Inventory()