本文整理汇总了Python中pyral.Rally.subscriptionName方法的典型用法代码示例。如果您正苦于以下问题:Python Rally.subscriptionName方法的具体用法?Python Rally.subscriptionName怎么用?Python Rally.subscriptionName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyral.Rally
的用法示例。
在下文中一共展示了Rally.subscriptionName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from pyral import Rally [as 别名]
# 或者: from pyral.Rally import subscriptionName [as 别名]
def main(args):
options = [opt for opt in args if opt.startswith('--')]
args = [arg for arg in args if arg not in options]
if not args:
print("You must supply an entity name!")
sys.exit(1)
query = ""
target = args[0]
if target in ['UserStory', 'User Story', 'Story']:
target = "HierarchicalRequirement"
if '/' in target:
parent, entity = target.split('/', 1)
target = entity
query = 'ElementName = "%s"' % target
server, username, password, apikey, workspace, project = rallyWorkset(options)
print(" ".join(["|%s|" % item for item in [server, username, password, apikey, workspace, project]]))
try:
rally = Rally(server, username, password, apikey=apikey, workspace=workspace, server_ping=False)
except Exception as ex:
errout(str(ex.args[0]))
sys.exit(1)
sub_name = rally.subscriptionName()
print("Subscription Name: %s" % sub_name)
wksp = rally.getWorkspace()
print("Workspace Name: %s" % wksp.Name)
print("Entity: %s" % target)
print("-----------")
print("Attributes:")
print("-----------")
typedef = rally.typedef(target)
showAttributes(rally, target, typedef.Attributes)
print("")
print("-" * 64)
print("")
for ix, ancestor in enumerate(typedef.inheritanceChain()):
print("%s %s" % (" " * (ix*4), ancestor))
示例2: rallyWorkset
# 需要导入模块: from pyral import Rally [as 别名]
# 或者: from pyral.Rally import subscriptionName [as 别名]
options = [arg for arg in sys.argv[1:] if arg.startswith('--')]
args = [arg for arg in sys.argv[1:] if arg not in options]
print 'Connecting to Rally...'
#(1) Connect via command line arguments
#server, user, password, apikey, workspace, project = rallyWorkset(options) #--> config.py
#rally = Rally(server, user, password, workspace=workspace, project=project)
#(2) Connect via hard coded values
rally = Rally(RALLY_URI, RALLY_USER, RALLY_PASS)
print "OK!"
if LOG_OUTPUT:
rally.enableLogging()
subscriptionName = rally.subscriptionName()
workspace = rally.getWorkspace()
print 'Subscribed to \'{}\', Workspace: {}'.format(subscriptionName, workspace.Name)
class RallyDebug():
"""Class for some simply Rally debug ouput"""
#Show a list of projects
def listProjects(self):
for pr in rally.getProjects():
print "{} ({})".format(pr.Name, pr.oid)
#Show a list of workspaces
def listWorkspaces(self):
for ws in rally.getWorkspaces():
print "{} ({})".format(ws.Name, ws.oid)