Exemplo n.º 1
0
    def __init__(self, host='localhost', port=8080, api_path='/zstack/api', result_path='/zstack/api/result'):
        '''
        Constructor
        '''
        if not host:
            host = '127.0.0.1'

        if not port:
            port = 8080

        self.api_url = http.build_url(('http', host, port, api_path))
        self.api_result_url = http.build_url(('http', host, port, result_path))
Exemplo n.º 2
0
    def __init__(self, host='localhost', port=8080, api_path='/zstack/api', result_path='/zstack/api/result'):
        '''
        Constructor
        '''
        if not host:
            host = '127.0.0.1'

        if not port:
            port = 8080

        self.api_url = http.build_url(('http', host, port, api_path))
        self.api_result_url = http.build_url(('http', host, port, result_path))
Exemplo n.º 3
0
 def test_build_url3(self):
     ret = http.build_url(('http', 'google.com', '8080', '/search/world/'))
     self.assertEqual('http://google.com:8080/search/world/', ret)