Changeset 1067 for opsi/server


Ignore:
Timestamp:
Aug 16, 2012, 2:11:15 PM (12 years ago)
Author:
slederer
Message:

Methoden clientCreate und clientSetDepot hinzugefügt, Description-Parameter bei copyClient

File:
1 edited

Legend:

Unmodified
Added
Removed
  • opsi/server/dass-opsi-tools/usr/bin/opsi-client

    r1065 r1067  
    8989        return True
    9090       
    91     def copyClient( self, src, dst, ipAddress = None, hardwareAddress = None, depot = None ):
     91    def createClient(self, name, opsiHostKey, description, notes, hardwareAddress, ipAddress):
     92        self.rpc.host_createOpsiClient( name, opsiHostKey, description, notes, hardwareAddress, ipAddress )
     93
     94    def clientSetDepot(self, name, depot):
     95        self.rpc.configState_create( "clientconfig.depot.id", name, depot )       
     96
     97    def copyClient( self, src, dst, ipAddress = None, hardwareAddress = None, depot = None, description = "" ):
    9298   
    9399        print "create/update", dst, "from template", src + ":",
     
    96102          "type" : "OpsiClient",
    97103          "notes" : "copy of " + src,
    98           #"description" : "",
     104          "description" : description,
    99105          #"inventoryNumber" : "",
    100106        }
     
    110116           
    111117        if depot:
    112             self.rpc.configState_create( "clientconfig.depot.id", dst, depot )       
     118            self.clientSetDepot(dst,depot)
    113119           
    114120        if self.debug:
Note: See TracChangeset for help on using the changeset viewer.