271""" 272 Given an object identifier, this returns all of the editable fields 273 on that object as well as their ExtJs xtype that one would 274 use on a client side form. 275 276 @type uid: string 277 @param uid: Unique identifier of an object 278 @rtype: DirectResponse 279 @return: B{Properties} 280 - form: (dictionary) form fields for the object 281 """ 282info=self._getFacade().getInfo(uid) 283form=IFormBuilder(info).render(fieldsets=False) 284form=Zuul.marshal(form) 285returnDirectResponse(form=form)

474""" 475 Set the device specified by the uid,"uid" to have the 476 the id "newId" 477 This will raise an exception if it fails. 478 479 @type uid: string 480 @param uid: The unique id of the device we are renaming 481 @type newId: string 482 @param newId: string of the new id 483 """ 484facade=self._getFacade() 485newUid=facade.renameDevice(uid,newId) 486returnDirectResponse.succeed(uid=newUid)

855""" 856 Move all devices under one or more collectors to another collector 857 858 The signature is exactly the same as setCollector(), except that the 859 'uids' parameter is replaced with 'srcCollectors' 860 861 @type srcCollectors: list of strings 862 @param srcCollectors: The collectors to move all devices from 863 """ 864monitorFacade=Zuul.getFacade('monitors',self.context) 865ifisinstance(srcCollectors,basestring): 866srcCollectorObjs=monitorFacade.get(srcCollectors) 867else: 868srcCollectorObjs=[] 869forcollectorinsrcCollectors: 870srcCollectorObjs.append(monitorFacade.get(collector)) 871deviceUids=[] 872forcollectorinsrcCollectorObjs: 873deviceUids.extend([dev.getPrimaryId()fordevincollector.getDevices()]) 874returnself.setCollector(deviceUids,dstCollector,hashcheck,uid,ranges, 875params,sort,dir,moveData,asynchronous)

1185"""1186 Returns the url and title for each graph1187 for the object passed in.1188 @type uid: string1189 @param uid: unique identifier of an object1190 """1191facade=self._getFacade()1192data=facade.getGraphDefs(uid,drange)1193returnDirectResponse(data=Zuul.marshal(data))

1291"""1292 Get a list of available production states.12931294 @rtype: [dictionary]1295 @return: List of name/value pairs of available production states1296 """1297returnDirectResponse(data=[dict(name=s.split(':')[0],1298value=int(s.split(':')[1]))forsin1299self.context.dmd.prodStateConversions])

1302"""1303 Get a list of available device priorities.13041305 @rtype: [dictionary]1306 @return: List of name/value pairs of available device priorities1307 """1308returnDirectResponse(data=[dict(name=s.split(':')[0],1309value=int(s.split(':')[1]))forsin1310self.context.dmd.priorityConversions])

1336"""1337 Get a list of all systems.13381339 @rtype: DirectResponse1340 @return: B{Properties}:1341 - systems: ([dictionary]) List of systems1342 - totalCount: (integer) Total number of systems1343 """1344systems=self.context.dmd.Systems.getOrganizerNames()1345result=[{'name':name}fornameinsystemsifname!='/']1346returnDirectResponse(systems=result,totalCount=len(result))

1349"""1350 Get a list of all groups.13511352 @rtype: DirectResponse1353 @return: B{Properties}:1354 - systems: ([dictionary]) List of groups1355 - totalCount: (integer) Total number of groups1356 """1357groups=self.context.dmd.Groups.getOrganizerNames()1358result=[{'name':name}fornameingroupsifname!='/']1359returnDirectResponse(groups=result,totalCount=len(result))

1362"""1363 Get a list of all locations.13641365 @rtype: DirectResponse1366 @return: B{Properties}:1367 - systems: ([dictionary]) List of locations1368 - totalCount: (integer) Total number of locations1369 """1370locations=self.context.dmd.Locations.getOrganizerNames()1371result=[{'name':name}fornameinlocationsifname!='/']1372returnDirectResponse(locations=result,totalCount=len(result))

1795"""1796 Given a uid returns the documentation for all the modeler plugins.1797 """1798facade=self._getFacade()1799data=facade.getModelerPluginDocStrings(uid)1800returnDirectResponse.succeed(data=Zuul.marshal(data))

1860"""1861 returns a list of Overridden Objects and properties for this context1862 """1863facade=self._getFacade()1864data=facade.getOverriddenObjectsList(uid,propname,relName)1865returnDirectResponse.succeed(data=Zuul.marshal(data))

1868"""1869 returns the base of the Overridden Objects1870 """1871facade=self._getFacade()1872data=facade.getOverriddenObjectsParent(uid,propname)1873returnDirectResponse.succeed(data=Zuul.marshal(data))

1876"""1877 returns a list of zProperty values for the overridden objects1878 """1879facade=self._getFacade()1880data=facade.getOverriddenZprops(uid,all)1881returnDirectResponse.succeed(data=Zuul.marshal(data))

1889"""1890 Returns the graph denoted by graphId for every component in1891 device (uid) with the meta_type meta_type1892 """1893facade=self._getFacade()1894data=facade.getComponentGraphs(uid,meta_type,graphId,allOnSame=allOnSame)1895returnDirectResponse.succeed(data=Zuul.marshal(data))