def makeResourceUrl(rally, entity, **kwargs): resource = RallyUrlBuilder(entity) resource.qualify(True, None, None, 10, 1) context, augments = rally.contextHelper.identifyContext(**kwargs) ## ## print(" context: %s" % repr(context)) ## print("augments: %s" % repr(augments)) ## workspace_ref = rally.contextHelper.currentWorkspaceRef() project_ref = rally.contextHelper.currentProjectRef() ## ## print("workspace_ref: %s" % workspace_ref) ## print(" project_ref: %s" % project_ref) ## if workspace_ref: if 'workspace' not in kwargs or ('workspace' in kwargs and kwargs['workspace'] is not None): resource.augmentWorkspace(augments, workspace_ref) if project_ref: if 'project' not in kwargs or ('project' in kwargs and kwargs['project'] is not None): resource.augmentProject(augments, project_ref) resource.augmentScoping(augments) url = "%s/%s" % (rally.service_url, resource.build()) return url