# Path: igor/common.py
# class routes(object):
#     static_ui_data = '/ui/<filename>'
#     static_data = '/static/data/<filename>'
# 
#     testsuite_submit = '/jobs/submit/<tname>/with/<pname>/on/<hname>'
# 
#     jobs = '/jobs'
#     job = '/jobs/<cookie>'
#     job_start = '/jobs/<cookie>/start'
#     job_abort = '/jobs/<cookie>/abort'
#     job_status = '/jobs/<cookie>/status'
#     job_report = '/jobs/<cookie>/report'
#     job_report_junit = '/jobs/<cookie>/report/junit'
#     job_testsuite = '/jobs/<cookie>/testsuite'
#     job_artifacts = '/jobs/<cookie>/artifacts'
#     job_artifacts_archive = '/jobs/<cookie>/archive'  # FIXME
#     job_artifact = '/jobs/<cookie>/artifacts/<name>'
# 
#     job_step_skip = '/jobs/<cookie>/step/<n:int>/skip'
#     job_step_finish = '/jobs/<cookie>/step/<n:int>/<result:re:success|failed>'
#     job_step_result = '/jobs/<cookie>/step/<n:int>/result'
#     job_step_annotate = '/jobs/<cookie>/step/current/annotate'
# 
#     job_set_boot_profile = '/jobs/<cookie>/set/enable_pxe/<enable_pxe>'
#     job_set_kernelargs = '/jobs/<cookie>/set/kernelargs/<kernelargs>'
# 
#     job_bootstrap = '/testjob/<cookie>'
# 
#     testsuites = '/testsuites'
#     testsuites_validate = '/testsuites/validate'
#     testsuite_summary = '/testsuites/<name>/summary'
#     testsuite_archive = '/testsuites/<name>/download'
# 
#     testplans = '/testplans'
#     testplan = '/testplans/<name>'
#     testplan_start = '/testplans/<name>/submit'
#     testplan_abort = '/testplans/<name>/abort'
#     testplan_status = '/testplans/<name>/status'
#     testplan_report = '/testplans/<name>/report'
#     testplan_report_junit = '/testplans/<name>/report/junit'
#     testplan_summary = ''
# 
#     profiles = '/profiles'
#     profile = '/profiles/<pname>'
#     profile_delete = '/profiles/<pname>/remove'
#     profile_set_kernelargs = '/profiles/<pname>/kargs'
# 
#     hosts = '/hosts'
# 
#     testcase_source = '/testcases/<suitename>/<setname>/<casename>/source'
# 
#     server_log = '/server/log'
# 
#     datastore = '/store'
#     datastore_file = '/store/<filename>'
#     datastore_file_trigger = '/store/<filename>/trigger'


from igor.common import routes
from lxml import etree
import io
import logging
import os
import re
import subprocess
import tarfile
import tempfile
import time
import urllib
import urllib2
    """
    def __init__(self, host, port, sessionid):
        super(JobAPI, self).__init__(host, port)
        self.sessionid = sessionid

    def start(self):
        return self.route_request(routes.job_start, cookie=self.sessionid)

    def abort(self):
        return self.route_request(routes.job_abort, cookie=self.sessionid)

    def status(self):
        return self.route_request(routes.job_status, cookie=self.sessionid)

    def report(self):
        url = self.url(routes.job_report, cookie=self.sessionid)
        return self._http.request(url)

    def report_junit(self):
        return self.route_request(routes.job_report_junit,
                                  cookie=self.sessionid)

    def artifacts(self):
        return self.route_request(routes.job_artifacts, cookie=self.sessionid)

    def step_skip(self, n):
        return self.route_request(routes.job_step_skip, cookie=self.sessionid,
                                  n=n)

    def step_finish(self, n, result="success"):

# Path: igor/common.py
# class routes(object):
#     static_ui_data = '/ui/<filename>'
#     static_data = '/static/data/<filename>'
# 
#     testsuite_submit = '/jobs/submit/<tname>/with/<pname>/on/<hname>'
# 
#     jobs = '/jobs'
#     job = '/jobs/<cookie>'
#     job_start = '/jobs/<cookie>/start'
#     job_abort = '/jobs/<cookie>/abort'
#     job_status = '/jobs/<cookie>/status'
#     job_report = '/jobs/<cookie>/report'
#     job_report_junit = '/jobs/<cookie>/report/junit'
#     job_testsuite = '/jobs/<cookie>/testsuite'
#     job_artifacts = '/jobs/<cookie>/artifacts'
#     job_artifacts_archive = '/jobs/<cookie>/archive'  # FIXME
#     job_artifact = '/jobs/<cookie>/artifacts/<name>'
# 
#     job_step_skip = '/jobs/<cookie>/step/<n:int>/skip'
#     job_step_finish = '/jobs/<cookie>/step/<n:int>/<result:re:success|failed>'
#     job_step_result = '/jobs/<cookie>/step/<n:int>/result'
#     job_step_annotate = '/jobs/<cookie>/step/current/annotate'
# 
#     job_set_boot_profile = '/jobs/<cookie>/set/enable_pxe/<enable_pxe>'
#     job_set_kernelargs = '/jobs/<cookie>/set/kernelargs/<kernelargs>'
# 
#     job_bootstrap = '/testjob/<cookie>'
# 
#     testsuites = '/testsuites'
#     testsuites_validate = '/testsuites/validate'
#     testsuite_summary = '/testsuites/<name>/summary'
#     testsuite_archive = '/testsuites/<name>/download'
# 
#     testplans = '/testplans'
#     testplan = '/testplans/<name>'
#     testplan_start = '/testplans/<name>/submit'
#     testplan_abort = '/testplans/<name>/abort'
#     testplan_status = '/testplans/<name>/status'
#     testplan_report = '/testplans/<name>/report'
#     testplan_report_junit = '/testplans/<name>/report/junit'
#     testplan_summary = ''
# 
#     profiles = '/profiles'
#     profile = '/profiles/<pname>'
#     profile_delete = '/profiles/<pname>/remove'
#     profile_set_kernelargs = '/profiles/<pname>/kargs'
# 
#     hosts = '/hosts'
# 
#     testcase_source = '/testcases/<suitename>/<setname>/<casename>/source'
# 
#     server_log = '/server/log'
# 
#     datastore = '/store'
#     datastore_file = '/store/<filename>'
#     datastore_file_trigger = '/store/<filename>/trigger'


# Path: igor/client/main.py
from igor.common import routes
from lxml import etree
import io
import logging
import os
import re
import subprocess
import tarfile
import tempfile
import time
import urllib
import urllib2

    """
    def __init__(self, host, port, sessionid):
        super(JobAPI, self).__init__(host, port)
        self.sessionid = sessionid

    def start(self):
        return self.route_request(routes.job_start, cookie=self.sessionid)

    def abort(self):
        return self.route_request(routes.job_abort, cookie=self.sessionid)

    def status(self):
        return self.route_request(routes.job_status, cookie=self.sessionid)

    def report(self):
        url = self.url(routes.job_report, cookie=self.sessionid)
        return self._http.request(url)

    def report_junit(self):
        return self.route_request(routes.job_report_junit,
                                  cookie=self.sessionid)

    def artifacts(self):
        return self.route_request(routes.job_artifacts, cookie=self.sessionid)

    def step_skip(self, n):
        return self.route_request(routes.job_step_skip, cookie=self.sessionid,
                                  n=n)

    def step_finish(self, n, result="success"):

        return self.route_request(routes.job_step_finish,