当前位置: 首页>>代码示例>>Python>>正文


Python Rally.subscriptionName方法代码示例

本文整理汇总了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))
开发者ID:amcolosk,项目名称:RallyRestToolkitForPython,代码行数:44,代码来源:typedef.py

示例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)
开发者ID:evogirossdrew,项目名称:ZeroHour,代码行数:32,代码来源:rallyPython.py


注:本文中的pyral.Rally.subscriptionName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。