def __init__(self, core_management_host, core_management_port, svc=None):
        try:
            if svc:
                self.service = svc
            else:
                self.connect(core_management_host, core_management_port)

            self.base_url = '{}:{}'.format(self.service._address, self.service._port)
            self.management_api_url = '{}:{}'.format(self.service._address, self.service._management_port)
        except Exception:
            raise InvalidServiceInstance