MCPcopy Create free account
hub / github.com/apache/cloudstack / generateCodeFromJSON

Method generateCodeFromJSON

tools/marvin/marvin/codegenerator.py:433–444  ·  view source on GitHub ↗

Api Discovery plugin returns the supported APIs of a CloudStack endpoint. @return: The classes in cloudstackAPI/ formed from api discovery json

(self, endpointUrl)

Source from the content-addressed store, hash-verified

431 return cmds
432
433 def generateCodeFromJSON(self, endpointUrl):
434 """
435 Api Discovery plugin returns the supported APIs of a CloudStack
436 endpoint.
437 @return: The classes in cloudstackAPI/ formed from api discovery json
438 """
439 if endpointUrl.find('response=json') >= 0:
440 apiStream = urlopen(endpointUrl)
441 cmds = self.loadCmdFromJSON(apiStream)
442 for cmd in cmds:
443 self.generate(cmd)
444 self.finalize()
445
446
447def getText(elements):

Callers 2

codegenerator.pyFile · 0.80

Calls 4

loadCmdFromJSONMethod · 0.95
generateMethod · 0.95
finalizeMethod · 0.95
findMethod · 0.65

Tested by

no test coverage detected