Example #1
0
def countInventoryHistory(days, only_new, pattern):
    return Inventory().countInventoryHistory(days, only_new, pattern)
Example #2
0
def getMachinesBy(table, field, value):
    # TODO : ctx is missing....Inventory
    ctx = None
    return Inventory().getMachinesBy(ctx, table, field, value)
Example #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))
Example #4
0
 def getUUIDByMachineName(self, name):
     ctx = self.currentContext
     return xmlrpcCleanup(Inventory().getUUIDByMachineName(ctx, name))
Example #5
0
def getValueFuzzyWhere(table, field1, value1, field2, fuzzy_value):
    return Inventory().getValueFuzzyWhere(table, field1, value1, field2,
                                          fuzzy_value)
Example #6
0
 def getMachineByOwner(self, user):
     ctx = self.currentContext
     return xmlrpcCleanup(Inventory().getMachineByOwner(ctx, user))
Example #7
0
 def getLastMachineInventoryFull(self, params):
     ctx = self.currentContext
     #        if not ComputerLocationManager().doesUserHaveAccessToMachine(ctx.userid, uuid):
     #            return False
     return xmlrpcCleanup(Inventory().getLastMachineInventoryFull(
         ctx, params))
Example #8
0
 def getMachineByHostnameAndMacs(self, hostname, macs):
     ctx = self.currentContext
     return xmlrpcCleanup(Inventory().getMachineByHostnameAndMacs(
         ctx, hostname, macs))
Example #9
0
 def getMachines(self, pattern=None):
     ctx = self.currentContext
     return xmlrpcCleanup(Inventory().getMachines(ctx, pattern))
Example #10
0
 def getMachineNumberByState(self):
     ctx = self.currentContext
     return xmlrpcCleanup(Inventory().getMachineNumberByState(ctx))
Example #11
0
 def getMachineListByState(self, groupName):
     ctx = self.currentContext
     return xmlrpcCleanup(Inventory().getMachineListByState(ctx, groupName))
Example #12
0
 def getMachineInventoryDiff(self, params):
     ctx = self.currentContext
     # Use xmlrpcCleanup to clean all None values
     return xmlrpcCleanup(Inventory().getComputerInventoryDiff(ctx, params))
Example #13
0
 def countMachineInventoryHistory(self, params):
     ctx = self.currentContext
     return Inventory().countComputerInventoryHistory(ctx, params)
Example #14
0
 def countLastMachineInventoryPart(self, part, params):
     ctx = self.currentContext
     return xmlrpcCleanup(Inventory().countLastMachineInventoryPart(
         ctx, part, params))
Example #15
0
def getTypeOfAttribute(klass, attr):
    return Inventory().getTypeOfAttribute(klass, attr)
Example #16
0
def getValues(table, field):
    return Inventory().getValues(table, field)
Example #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
Example #18
0
def getValuesWhere(table, field1, value1, field2):
    return Inventory().getValuesWhere(table, field1, value1, field2)
Example #19
0
 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))
Example #20
0
def getValuesFuzzy(table, field, fuzzy_value):
    return Inventory().getValuesFuzzy(table, field, fuzzy_value)
Example #21
0
 def getMachineInventoryHistory(self, params):
     ctx = self.currentContext
     return xmlrpcCleanup(Inventory().getComputerInventoryHistory(
         ctx, params))
Example #22
0
 def __init__(self, conffile=None):
     self.logger = logging.getLogger()
     self.config = InventoryConfig()
     self.inventory = Inventory()