the configuration variables are now class attributes to make patching possible
@@ -116,25 +116,25 @@ class PortalAPI(BaseQuery):
Should be used to facilitate all Portal API queries.
"""
- def __init__(self, session=None):
+ MAST_REQUEST_URL = conf.server + "/api/v0/invoke"
+ COLUMNS_CONFIG_URL = conf.server + "/portal/Mashup/Mashup.asmx/columnsconfig"
+ MAST_DOWNLOAD_URL = conf.server + "/api/v0.1/Download/file"
+ MAST_BUNDLE_URL = conf.server + "/api/v0.1/Download/bundle"
- super(PortalAPI, self).__init__()
- if session:
- self._session = session
+ TIMEOUT = conf.timeout
+ PAGESIZE = conf.pagesize
- self.MAST_REQUEST_URL = conf.server + "/api/v0/invoke"
- self.COLUMNS_CONFIG_URL = conf.server + "/portal/Mashup/Mashup.asmx/columnsconfig"
- self.MAST_DOWNLOAD_URL = conf.server + "/api/v0.1/Download/file"
- self.MAST_BUNDLE_URL = conf.server + "/api/v0.1/Download/bundle"
+ _column_configs = dict()
+ _current_service = None
- self.TIMEOUT = conf.timeout
- self.PAGESIZE = conf.pagesize
+ tess_all_name = 'Mast.Catalogs.All.Tic'
+ dd_all_name = 'Mast.Catalogs.All.Disk.Detective'
- self._column_configs = dict()
- self._current_service = None
+ def __init__(self, session=None):
- self.tess_all_name = 'Mast.Catalogs.All.Tic'
- self.dd_all_name = 'Mast.Catalogs.All.Disk.Detective'
+ super(PortalAPI, self).__init__()
+ if session:
+ self._session = session
def _request(self, method, url, params=None, data=None, headers=None,
files=None, stream=False, auth=None, retrieve_all=True):
@@ -485,6 +485,7 @@ class PortalAPI(BaseQuery):
headers = {"User-Agent": self._session.headers["User-Agent"],
"Content-type": "application/x-www-form-urlencoded",
"Accept": "text/plain"}
+
response = self._request("POST", self.COLUMNS_CONFIG_URL,
data=("colConfigId={}".format(colconf_name)), headers=headers)
