Esempio n. 1
0
def get_issue_tracker_utils(*args, **kwargs):
    """Returns the correct utility instance depending on the issue tracker
    being deployed with Software Factory"""
    if 'redmine' in services:
        return RedmineUtils(config.GATEWAY_URL + "/redmine/", *args, **kwargs)
    else:
        from pysflib.interfaces.issuetracker import IssueTrackerUtils
        return IssueTrackerUtils(config.GATEWAY_URL, *args, **kwargs)
Esempio n. 2
0
 def setUp(self):
     self.projects = []
     self.rm = RedmineUtils(
         config.GATEWAY_URL + "/redmine/",
         auth_cookie=config.USERS[config.ADMIN_USER]['auth_cookie'])
     self.gu = GerritUtils(
         config.GATEWAY_URL,
         auth_cookie=config.USERS[config.ADMIN_USER]['auth_cookie'])
Esempio n. 3
0
 def project_exists_ex(self, name, user):
     # Test here the project is "public"
     # ( Redmine API project detail does not return the private/public flag)
     rm = RedmineUtils(config.GATEWAY_URL + "/redmine/",
                       auth_cookie=config.USERS[user]['auth_cookie'])
     try:
         return rm.project_exists(name)
     except Exception:
         return False
Esempio n. 4
0
 def __init__(self, cli_options=None, conf_file=None):
     self.command_line_options = cli_options or DEFAULT_CLI_OPTIONS
     self.conf_file = conf_file
     self.config = yaml.load(conf_file)
     self.redmine_client = RedmineUtils(self.config['redmine_url'],
                                        key=self.config['redmine_key'])
     bottom_url = "/r/gitweb?p=%(project)s;a=commit;h=%(commit)s"
     self.gitweb_url = urllib_parse.urljoin(self.config['gitweb_url'],
                                            bottom_url)
Esempio n. 5
0
 def __init__(self):
     with open("%s/resources.yaml" % pwd, 'r') as rsc:
         self.resources = yaml.load(rsc)
     config.USERS[config.ADMIN_USER]['auth_cookie'] = get_cookie(
         config.ADMIN_USER, config.USERS[config.ADMIN_USER]['password'])
     self.msu = ManageSfUtils(config.GATEWAY_URL)
     self.ggu = GerritGitUtils(config.ADMIN_USER,
                               config.ADMIN_PRIV_KEY_PATH,
                               config.USERS[config.ADMIN_USER]['email'])
     self.ju = JenkinsUtils()
     self.rm = RedmineUtils(
         config.GATEWAY_URL + "/redmine/",
         auth_cookie=config.USERS[config.ADMIN_USER]['auth_cookie'])
 def setUp(self):
     self.projects = []
     self.dirs_to_delete = []
     self.issues = []
     self.u = config.ADMIN_USER
     self.u2 = config.USER_2
     self.rm = RedmineUtils(
         config.GATEWAY_URL + "/redmine/",
         auth_cookie=config.USERS[config.ADMIN_USER]['auth_cookie'])
     self.gu = GerritUtils(config.GATEWAY_URL,
                           auth_cookie=config.USERS[self.u]['auth_cookie'])
     self.gu2 = GerritUtils(
         config.GATEWAY_URL,
         auth_cookie=config.USERS[self.u2]['auth_cookie'])
     self.gu.add_pubkey(config.USERS[self.u]["pubkey"])
     priv_key_path = set_private_key(config.USERS[self.u]["privkey"])
     self.gitu = GerritGitUtils(self.u, priv_key_path,
                                config.USERS[self.u]['email'])