diff --git a/4.0/es/dns.ip_addr.js b/4.0/es/dns.ip_addr.js index c0a1733fed4fbccf7f2f974bc0e9f7a8f0765a45..fde1a95e687c955e7c6650f834b75adc68231964 100644 --- a/4.0/es/dns.ip_addr.js +++ b/4.0/es/dns.ip_addr.js @@ -14,34 +14,25 @@ import NETVSConfig from '@/../netvs.config' export default { bulk_createParamsList () { - return {'old': [ ], 'new': [ 'is_dhcp', 'value_stop', 'is_reserved', 'value_start']} + return {'old': [ ], 'new': [ 'is_dhcp', 'is_reserved']} }, - bulk_create (config, {is_dhcp_new = false, value_stop_new, is_reserved_new = false, value_start_new}) { - const params = { 'new': { 'is_dhcp': is_dhcp_new, 'value_stop': value_stop_new, 'is_reserved': is_reserved_new, 'value_start': value_start_new}, 'old': { }} + bulk_create (config, {is_dhcp_new = false, is_reserved_new = false}) { + const params = { 'new': { 'is_dhcp': is_dhcp_new, 'is_reserved': is_reserved_new}, 'old': { }} // TODO: Return ta-object instead return Axios.post(`${NETVSConfig.NETDB_API_BASE_URL}/${NETVSConfig.NETDB_API_VERSION}/dns/ip_addr/bulk_create`, params, (config || {}).netdb_axios_config) // eslint-disable-next-line comma-dangle }, - bulk_deleteParamsList () { - return {'old': [ 'value_stop', 'value_start'], 'new': [ ]} - }, - bulk_delete (config, {value_stop_old, value_start_old}) { - const params = { 'new': { }, 'old': { 'value_stop': value_stop_old, 'value_start': value_start_old}} - // TODO: Return ta-object instead - return Axios.post(`${NETVSConfig.NETDB_API_BASE_URL}/${NETVSConfig.NETDB_API_VERSION}/dns/ip_addr/bulk_delete`, params, (config || {}).netdb_axios_config) - // eslint-disable-next-line comma-dangle - }, bulk_updateParamsList () { - return {'old': [ 'value_cidr', 'value_stop', 'value_start'], 'new': [ 'is_dhcp', 'value_cidr', 'is_reserved']} + return {'old': [ ], 'new': [ 'is_dhcp', 'is_reserved']} }, - bulk_update (config, {is_dhcp_new, value_cidr_old, value_cidr_new, value_stop_old, is_reserved_new, value_start_old}) { - const params = { 'new': { 'is_dhcp': is_dhcp_new, 'value_cidr': value_cidr_new, 'is_reserved': is_reserved_new}, 'old': { 'value_cidr': value_cidr_old, 'value_stop': value_stop_old, 'value_start': value_start_old}} + bulk_update (config, {is_dhcp_new, is_reserved_new}) { + const params = { 'new': { 'is_dhcp': is_dhcp_new, 'is_reserved': is_reserved_new}, 'old': { }} // TODO: Return ta-object instead return Axios.post(`${NETVSConfig.NETDB_API_BASE_URL}/${NETVSConfig.NETDB_API_VERSION}/dns/ip_addr/bulk_update`, params, (config || {}).netdb_axios_config) // eslint-disable-next-line comma-dangle }, - list (config, { gpk, type, is_own, is_dhcp, value_cidr, fetch_limit, is_reserved, fetch_offset, is_rr_target, filter_params_dict, sorting_params_list }) { - const params = APIUtils.denullify_dict({ 'gpk': gpk, 'type': type, 'is_own': is_own, 'is_dhcp': is_dhcp, 'value_cidr': value_cidr, 'fetch_limit': fetch_limit, 'is_reserved': is_reserved, 'fetch_offset': fetch_offset, 'is_rr_target': is_rr_target, 'filter_params_dict': filter_params_dict, 'sorting_params_list': (sorting_params_list === null) ? null : JSON.stringify(sorting_params_list)}) + list (config, { gpk, type, is_own, is_dhcp, fetch_limit, is_reserved, fetch_offset, is_rr_target, filter_params_dict, sorting_params_list }) { + const params = APIUtils.denullify_dict({ 'gpk': gpk, 'type': type, 'is_own': is_own, 'is_dhcp': is_dhcp, 'fetch_limit': fetch_limit, 'is_reserved': is_reserved, 'fetch_offset': fetch_offset, 'is_rr_target': is_rr_target, 'filter_params_dict': filter_params_dict, 'sorting_params_list': (sorting_params_list === null) ? null : JSON.stringify(sorting_params_list)}) const cnf = {} Object.assign(cnf, (config || {}).netdb_axios_config) cnf.params = params diff --git a/4.0/functions.json b/4.0/functions.json index ab1ab680030e35eccd021e84494878aca1a765ff..f03d3179fe8e2e4a528562fdc582b1f2a5f9e4ff 100644 --- a/4.0/functions.json +++ b/4.0/functions.json @@ -113,14 +113,6 @@ "data_type": "boolean", "is_deprecated": false }, - "value_stop": { - "new": { - "is_nullable": false, - "is_required": false - }, - "data_type": "ip_address", - "is_deprecated": false - }, "is_reserved": { "new": { "is_nullable": false, @@ -129,41 +121,6 @@ }, "data_type": "boolean", "is_deprecated": false - }, - "value_start": { - "new": { - "is_nullable": false, - "is_required": true - }, - "data_type": "ip_address", - "is_deprecated": false - } - }, - "object_type": "ip_addr", - "is_returning": false, - "is_executable": true, - "is_data_manipulating": true - }, - { - "name": "bulk_delete", - "system": "dns", - "fq_name": "dns.ip_addr.bulk_delete", - "parameters": { - "value_stop": { - "old": { - "is_nullable": false, - "is_required": false - }, - "data_type": "ip_address", - "is_deprecated": false - }, - "value_start": { - "old": { - "is_nullable": false, - "is_required": true - }, - "data_type": "ip_address", - "is_deprecated": false } }, "object_type": "ip_addr", @@ -482,26 +439,6 @@ "data_type": "boolean", "is_deprecated": false }, - "value_cidr": { - "new": { - "is_nullable": false, - "is_required": false - }, - "old": { - "is_nullable": false, - "is_required": false - }, - "data_type": "ip_network", - "is_deprecated": false - }, - "value_stop": { - "old": { - "is_nullable": false, - "is_required": false - }, - "data_type": "ip_address", - "is_deprecated": false - }, "is_reserved": { "new": { "is_nullable": false, @@ -509,14 +446,6 @@ }, "data_type": "boolean", "is_deprecated": false - }, - "value_start": { - "old": { - "is_nullable": false, - "is_required": false - }, - "data_type": "ip_address", - "is_deprecated": false } }, "object_type": "ip_addr", @@ -11957,14 +11886,6 @@ "data_type": "boolean", "is_deprecated": false }, - "value_cidr": { - "old": { - "is_nullable": false, - "is_required": false - }, - "data_type": "ip_network", - "is_deprecated": false - }, "fetch_limit": { "old": { "is_nullable": false, diff --git a/4.0/openapi.yml b/4.0/openapi.yml index 5b657266560e2c42e3257b813c33c7f7d48cf01f..741c20e6af1e28d0799caac81f7e39450a1c7a52 100644 --- a/4.0/openapi.yml +++ b/4.0/openapi.yml @@ -3469,7 +3469,7 @@ info: \ nicht Bestandteil dieser Dokumentation, sondern \xFCber selbstdokumentierende\ \ Indexabfragen der WebAPI erreichbar." title: SCC NETDB-API - version: 4.0.693 + version: 4.0.698 openapi: 3.0.3 paths: /cntl/column/create: @@ -13324,53 +13324,6 @@ paths: description: '' nullable: false type: boolean - value_start: - description: '' - nullable: false - type: string - value_stop: - description: '' - nullable: false - type: string - required: - - value_start - type: object - type: object - required: true - responses: - 200: - description: Request erfolgreich - 400: - description: Eingabefehler - 401: - description: Unautorisiert - 500: - description: Interner Serverfehler - security: - - api_key: [] - tags: - - dns - /dns/ip_addr/bulk_delete: - post: - requestBody: - content: - application/json: - schema: - properties: - old: - description: Alte Attribute zur einduetigen Identifizierung des - Objekts - properties: - value_start: - description: '' - nullable: false - type: string - value_stop: - description: '' - nullable: false - type: string - required: - - value_start type: object type: object required: true @@ -13405,27 +13358,6 @@ paths: description: '' nullable: false type: boolean - value_cidr: - description: '' - nullable: false - type: string - type: object - old: - description: Alte Attribute zur einduetigen Identifizierung des - Objekts - properties: - value_cidr: - description: '' - nullable: false - type: string - value_start: - description: '' - nullable: false - type: string - value_stop: - description: '' - nullable: false - type: string type: object type: object required: true @@ -13477,13 +13409,6 @@ paths: schema: nullable: false type: boolean - - description: '' - in: query - name: value_cidr - required: false - schema: - nullable: false - type: string - description: '' in: query name: fetch_limit diff --git a/4.0/python/dns.py b/4.0/python/dns.py index ef71d29b8f6fd7a0e2e5549777cb272341350e5c..7ab795d1a8b570b9d10d1de3343b99fae96ff7b9 100644 --- a/4.0/python/dns.py +++ b/4.0/python/dns.py @@ -576,97 +576,51 @@ class IpAddr(APIObject): raise ValueError(f"'is_rr_target' of incorrect type. Expected bool, got {type(self.is_rr_target)}") @staticmethod - def bulk_create_ta(value_start_new: str, is_dhcp_new: bool = False, value_stop_new: str = None, is_reserved_new: bool = False) -> dict: + def bulk_create_ta(is_dhcp_new: bool = False, is_reserved_new: bool = False) -> dict: if is_dhcp_new is not None and not (isinstance(is_dhcp_new, bool)): raise ValueError(f"'is_dhcp' of incorrect type. Expected bool, got {type(is_dhcp_new)}") - if value_stop_new is not None and not (isinstance(value_stop_new, str)): - raise ValueError(f"'value_stop' of incorrect type. Expected str, got {type(value_stop_new)}") if is_reserved_new is not None and not (isinstance(is_reserved_new, bool)): raise ValueError(f"'is_reserved' of incorrect type. Expected bool, got {type(is_reserved_new)}") - if not (isinstance(value_start_new, str)): - raise ValueError(f"'value_start' of incorrect type. Expected str, got {type(value_start_new)}") - return {'name': 'dns.ip_addr.bulk_create', 'new': _denullify_dict({'is_dhcp': is_dhcp_new, 'value_stop': value_stop_new, 'is_reserved': is_reserved_new, 'value_start': value_start_new}), 'old': _denullify_dict({})} + return {'name': 'dns.ip_addr.bulk_create', 'new': _denullify_dict({'is_dhcp': is_dhcp_new, 'is_reserved': is_reserved_new}), 'old': _denullify_dict({})} # TODO: Consider is_returning @classmethod - def bulk_create(cls, api_session: APISession, value_start_new: str, is_dhcp_new: bool = False, value_stop_new: str = None, is_reserved_new: bool = False) -> list: + def bulk_create(cls, api_session: APISession, is_dhcp_new: bool = False, is_reserved_new: bool = False) -> list: if is_dhcp_new is not None and not (isinstance(is_dhcp_new, bool)): raise ValueError(f"'is_dhcp' of incorrect type. Expected bool, got {type(is_dhcp_new)}") - if value_stop_new is not None and not (isinstance(value_stop_new, str)): - raise ValueError(f"'value_stop' of incorrect type. Expected str, got {type(value_stop_new)}") if is_reserved_new is not None and not (isinstance(is_reserved_new, bool)): raise ValueError(f"'is_reserved' of incorrect type. Expected bool, got {type(is_reserved_new)}") - if not (isinstance(value_start_new, str)): - raise ValueError(f"'value_start' of incorrect type. Expected str, got {type(value_start_new)}") - res = api_session.session.post(api_session.base_url + '/wapi/transaction/execute', json=[cls.bulk_create_ta(is_dhcp_new=is_dhcp_new, value_stop_new=value_stop_new, is_reserved_new=is_reserved_new, value_start_new=value_start_new, )]) + res = api_session.session.post(api_session.base_url + '/wapi/transaction/execute', json=[cls.bulk_create_ta(is_dhcp_new=is_dhcp_new, is_reserved_new=is_reserved_new, )]) if not res.ok: raise ExecutionError(res.status_code, res.reason, res.json() if "json" in res.headers["content-type"] else res.text) return [cls(**s) for s in res.json()[0]] @staticmethod - def bulk_delete_ta(value_start_old: str, value_stop_old: str = None) -> dict: - if value_stop_old is not None and not (isinstance(value_stop_old, str)): - raise ValueError(f"'value_stop' of incorrect type. Expected str, got {type(value_stop_old)}") - if not (isinstance(value_start_old, str)): - raise ValueError(f"'value_start' of incorrect type. Expected str, got {type(value_start_old)}") - - return {'name': 'dns.ip_addr.bulk_delete', 'new': _denullify_dict({}), 'old': _denullify_dict({'value_stop': value_stop_old, 'value_start': value_start_old})} - - # TODO: Consider is_returning - @classmethod - def bulk_delete(cls, api_session: APISession, value_start_old: str, value_stop_old: str = None) -> list: - if value_stop_old is not None and not (isinstance(value_stop_old, str)): - raise ValueError(f"'value_stop' of incorrect type. Expected str, got {type(value_stop_old)}") - if not (isinstance(value_start_old, str)): - raise ValueError(f"'value_start' of incorrect type. Expected str, got {type(value_start_old)}") - - res = api_session.session.post(api_session.base_url + '/wapi/transaction/execute', json=[cls.bulk_delete_ta(value_stop_old=value_stop_old, value_start_old=value_start_old)]) - if not res.ok: - raise ExecutionError(res.status_code, res.reason, res.json() if "json" in res.headers["content-type"] else res.text) - return [cls(**s) for s in res.json()[0]] - - @staticmethod - def bulk_update_ta(is_dhcp_new: bool = None, value_cidr_new: str = None, is_reserved_new: bool = None, value_cidr_old: str = None, value_stop_old: str = None, value_start_old: str = None) -> dict: + def bulk_update_ta(is_dhcp_new: bool = None, is_reserved_new: bool = None) -> dict: if is_dhcp_new is not None and not (isinstance(is_dhcp_new, bool)): raise ValueError(f"'is_dhcp' of incorrect type. Expected bool, got {type(is_dhcp_new)}") - if value_cidr_new is not None and not (isinstance(value_cidr_new, str)): - raise ValueError(f"'value_cidr' of incorrect type. Expected str, got {type(value_cidr_new)}") if is_reserved_new is not None and not (isinstance(is_reserved_new, bool)): raise ValueError(f"'is_reserved' of incorrect type. Expected bool, got {type(is_reserved_new)}") - if value_cidr_old is not None and not (isinstance(value_cidr_old, str)): - raise ValueError(f"'value_cidr' of incorrect type. Expected str, got {type(value_cidr_old)}") - if value_stop_old is not None and not (isinstance(value_stop_old, str)): - raise ValueError(f"'value_stop' of incorrect type. Expected str, got {type(value_stop_old)}") - if value_start_old is not None and not (isinstance(value_start_old, str)): - raise ValueError(f"'value_start' of incorrect type. Expected str, got {type(value_start_old)}") - return {'name': 'dns.ip_addr.bulk_update', 'new': _denullify_dict({'is_dhcp': is_dhcp_new, 'value_cidr': value_cidr_new, 'is_reserved': is_reserved_new}), 'old': _denullify_dict({'value_cidr': value_cidr_old, 'value_stop': value_stop_old, 'value_start': value_start_old})} + return {'name': 'dns.ip_addr.bulk_update', 'new': _denullify_dict({'is_dhcp': is_dhcp_new, 'is_reserved': is_reserved_new}), 'old': _denullify_dict({})} # TODO: Consider is_returning @classmethod - def bulk_update(cls, api_session: APISession, is_dhcp_new: bool = None, value_cidr_new: str = None, is_reserved_new: bool = None, value_cidr_old: str = None, value_stop_old: str = None, value_start_old: str = None) -> list: + def bulk_update(cls, api_session: APISession, is_dhcp_new: bool = None, is_reserved_new: bool = None) -> list: if is_dhcp_new is not None and not (isinstance(is_dhcp_new, bool)): raise ValueError(f"'is_dhcp' of incorrect type. Expected bool, got {type(is_dhcp_new)}") - if value_cidr_new is not None and not (isinstance(value_cidr_new, str)): - raise ValueError(f"'value_cidr' of incorrect type. Expected str, got {type(value_cidr_new)}") if is_reserved_new is not None and not (isinstance(is_reserved_new, bool)): raise ValueError(f"'is_reserved' of incorrect type. Expected bool, got {type(is_reserved_new)}") - if value_cidr_old is not None and not (isinstance(value_cidr_old, str)): - raise ValueError(f"'value_cidr' of incorrect type. Expected str, got {type(value_cidr_old)}") - if value_stop_old is not None and not (isinstance(value_stop_old, str)): - raise ValueError(f"'value_stop' of incorrect type. Expected str, got {type(value_stop_old)}") - if value_start_old is not None and not (isinstance(value_start_old, str)): - raise ValueError(f"'value_start' of incorrect type. Expected str, got {type(value_start_old)}") - - res = api_session.session.post(api_session.base_url + '/wapi/transaction/execute', json=[cls.bulk_update_ta(is_dhcp_new=is_dhcp_new, value_cidr_new=value_cidr_new, is_reserved_new=is_reserved_new, value_cidr_old=value_cidr_old, value_stop_old=value_stop_old, value_start_old=value_start_old)]) + + res = api_session.session.post(api_session.base_url + '/wapi/transaction/execute', json=[cls.bulk_update_ta(is_dhcp_new=is_dhcp_new, is_reserved_new=is_reserved_new, )]) if not res.ok: raise ExecutionError(res.status_code, res.reason, res.json() if "json" in res.headers["content-type"] else res.text) return [cls(**s) for s in res.json()[0]] @staticmethod - def list_ta(gpk_old: str = None, type_old: str = None, is_own_old: bool = None, is_dhcp_old: bool = None, value_cidr_old: str = None, fetch_limit_old: int = None, is_reserved_old: bool = None, fetch_offset_old: int = None, is_rr_target_old: bool = None, filter_params_dict_old: dict = None, sorting_params_list_old: list = None) -> dict: + def list_ta(gpk_old: str = None, type_old: str = None, is_own_old: bool = None, is_dhcp_old: bool = None, fetch_limit_old: int = None, is_reserved_old: bool = None, fetch_offset_old: int = None, is_rr_target_old: bool = None, filter_params_dict_old: dict = None, sorting_params_list_old: list = None) -> dict: if gpk_old is not None and not (isinstance(gpk_old, str)): raise ValueError(f"'gpk' of incorrect type. Expected str, got {type(gpk_old)}") if type_old is not None and not (isinstance(type_old, str)): @@ -675,8 +629,6 @@ class IpAddr(APIObject): raise ValueError(f"'is_own' of incorrect type. Expected bool, got {type(is_own_old)}") if is_dhcp_old is not None and not (isinstance(is_dhcp_old, bool)): raise ValueError(f"'is_dhcp' of incorrect type. Expected bool, got {type(is_dhcp_old)}") - if value_cidr_old is not None and not (isinstance(value_cidr_old, str)): - raise ValueError(f"'value_cidr' of incorrect type. Expected str, got {type(value_cidr_old)}") if fetch_limit_old is not None and not (isinstance(fetch_limit_old, int)): raise ValueError(f"'fetch_limit' of incorrect type. Expected int, got {type(fetch_limit_old)}") if is_reserved_old is not None and not (isinstance(is_reserved_old, bool)): @@ -690,11 +642,11 @@ class IpAddr(APIObject): if sorting_params_list_old is not None and not (isinstance(sorting_params_list_old, list)): raise ValueError(f"'sorting_params_list' of incorrect type. Expected list, got {type(sorting_params_list_old)}") - return {'name': 'dns.ip_addr.list', 'new': _denullify_dict({}), 'old': _denullify_dict({'gpk': gpk_old, 'type': type_old, 'is_own': is_own_old, 'is_dhcp': is_dhcp_old, 'value_cidr': value_cidr_old, 'fetch_limit': fetch_limit_old, 'is_reserved': is_reserved_old, 'fetch_offset': fetch_offset_old, 'is_rr_target': is_rr_target_old, 'filter_params_dict': filter_params_dict_old, 'sorting_params_list': sorting_params_list_old})} + return {'name': 'dns.ip_addr.list', 'new': _denullify_dict({}), 'old': _denullify_dict({'gpk': gpk_old, 'type': type_old, 'is_own': is_own_old, 'is_dhcp': is_dhcp_old, 'fetch_limit': fetch_limit_old, 'is_reserved': is_reserved_old, 'fetch_offset': fetch_offset_old, 'is_rr_target': is_rr_target_old, 'filter_params_dict': filter_params_dict_old, 'sorting_params_list': sorting_params_list_old})} # TODO: Consider is_returning @classmethod - def list(cls, api_session: APISession, gpk_old: str = None, type_old: str = None, is_own_old: bool = None, is_dhcp_old: bool = None, value_cidr_old: str = None, fetch_limit_old: int = None, is_reserved_old: bool = None, fetch_offset_old: int = None, is_rr_target_old: bool = None, filter_params_dict_old: dict = None, sorting_params_list_old: list = None) -> list: + def list(cls, api_session: APISession, gpk_old: str = None, type_old: str = None, is_own_old: bool = None, is_dhcp_old: bool = None, fetch_limit_old: int = None, is_reserved_old: bool = None, fetch_offset_old: int = None, is_rr_target_old: bool = None, filter_params_dict_old: dict = None, sorting_params_list_old: list = None) -> list: if gpk_old is not None and not (isinstance(gpk_old, str)): raise ValueError(f"'gpk' of incorrect type. Expected str, got {type(gpk_old)}") if type_old is not None and not (isinstance(type_old, str)): @@ -703,8 +655,6 @@ class IpAddr(APIObject): raise ValueError(f"'is_own' of incorrect type. Expected bool, got {type(is_own_old)}") if is_dhcp_old is not None and not (isinstance(is_dhcp_old, bool)): raise ValueError(f"'is_dhcp' of incorrect type. Expected bool, got {type(is_dhcp_old)}") - if value_cidr_old is not None and not (isinstance(value_cidr_old, str)): - raise ValueError(f"'value_cidr' of incorrect type. Expected str, got {type(value_cidr_old)}") if fetch_limit_old is not None and not (isinstance(fetch_limit_old, int)): raise ValueError(f"'fetch_limit' of incorrect type. Expected int, got {type(fetch_limit_old)}") if is_reserved_old is not None and not (isinstance(is_reserved_old, bool)): @@ -718,7 +668,7 @@ class IpAddr(APIObject): if sorting_params_list_old is not None and not (isinstance(sorting_params_list_old, list)): raise ValueError(f"'sorting_params_list' of incorrect type. Expected list, got {type(sorting_params_list_old)}") - res = api_session.session.post(api_session.base_url + '/wapi/transaction/execute', json=[cls.list_ta(gpk_old=gpk_old, type_old=type_old, is_own_old=is_own_old, is_dhcp_old=is_dhcp_old, value_cidr_old=value_cidr_old, fetch_limit_old=fetch_limit_old, is_reserved_old=is_reserved_old, fetch_offset_old=fetch_offset_old, is_rr_target_old=is_rr_target_old, filter_params_dict_old=filter_params_dict_old, sorting_params_list_old=sorting_params_list_old)]) + res = api_session.session.post(api_session.base_url + '/wapi/transaction/execute', json=[cls.list_ta(gpk_old=gpk_old, type_old=type_old, is_own_old=is_own_old, is_dhcp_old=is_dhcp_old, fetch_limit_old=fetch_limit_old, is_reserved_old=is_reserved_old, fetch_offset_old=fetch_offset_old, is_rr_target_old=is_rr_target_old, filter_params_dict_old=filter_params_dict_old, sorting_params_list_old=sorting_params_list_old)]) if not res.ok: raise ExecutionError(res.status_code, res.reason, res.json() if "json" in res.headers["content-type"] else res.text) return [cls(**s) for s in res.json()[0]] diff --git a/4.0/version_numeric b/4.0/version_numeric index 2381c0cdf1a211d7622d736521b2af74f49e9554..837a05457aca0d33d739d9ea72d9b2a001fdd584 100644 --- a/4.0/version_numeric +++ b/4.0/version_numeric @@ -1 +1 @@ -4.0.693 \ No newline at end of file +4.0.698 \ No newline at end of file diff --git a/4.1/es/dns.ip_addr.js b/4.1/es/dns.ip_addr.js index aa193291fb0ad98be70b40d3824823f898c4d962..95b5e439e6c3ad20a6566e29a61ab0f29a6da82b 100644 --- a/4.1/es/dns.ip_addr.js +++ b/4.1/es/dns.ip_addr.js @@ -14,28 +14,19 @@ import NETVSConfig from '@/../netvs.config' export default { bulk_createParamsList () { - return {'old': [ ], 'new': [ 'is_dhcp', 'value_stop', 'is_reserved', 'value_start']} + return {'old': [ ], 'new': [ 'is_dhcp', 'is_reserved']} }, - bulk_create (config, {is_dhcp_new = false, value_stop_new, is_reserved_new = false, value_start_new}) { - const params = { 'new': { 'is_dhcp': is_dhcp_new, 'value_stop': value_stop_new, 'is_reserved': is_reserved_new, 'value_start': value_start_new}, 'old': { }} + bulk_create (config, {is_dhcp_new = false, is_reserved_new = false}) { + const params = { 'new': { 'is_dhcp': is_dhcp_new, 'is_reserved': is_reserved_new}, 'old': { }} // TODO: Return ta-object instead return Axios.post(`${NETVSConfig.NETDB_API_BASE_URL}/${NETVSConfig.NETDB_API_VERSION}/dns/ip_addr/bulk_create`, params, (config || {}).netdb_axios_config) // eslint-disable-next-line comma-dangle }, - bulk_deleteParamsList () { - return {'old': [ 'value_stop', 'value_start'], 'new': [ ]} - }, - bulk_delete (config, {value_stop_old, value_start_old}) { - const params = { 'new': { }, 'old': { 'value_stop': value_stop_old, 'value_start': value_start_old}} - // TODO: Return ta-object instead - return Axios.post(`${NETVSConfig.NETDB_API_BASE_URL}/${NETVSConfig.NETDB_API_VERSION}/dns/ip_addr/bulk_delete`, params, (config || {}).netdb_axios_config) - // eslint-disable-next-line comma-dangle - }, bulk_updateParamsList () { - return {'old': [ 'value_stop', 'value_start'], 'new': [ 'is_dhcp', 'is_reserved']} + return {'old': [ ], 'new': [ 'is_dhcp', 'is_reserved']} }, - bulk_update (config, {is_dhcp_new, value_stop_old, is_reserved_new, value_start_old}) { - const params = { 'new': { 'is_dhcp': is_dhcp_new, 'is_reserved': is_reserved_new}, 'old': { 'value_stop': value_stop_old, 'value_start': value_start_old}} + bulk_update (config, {is_dhcp_new, is_reserved_new}) { + const params = { 'new': { 'is_dhcp': is_dhcp_new, 'is_reserved': is_reserved_new}, 'old': { }} // TODO: Return ta-object instead return Axios.post(`${NETVSConfig.NETDB_API_BASE_URL}/${NETVSConfig.NETDB_API_VERSION}/dns/ip_addr/bulk_update`, params, (config || {}).netdb_axios_config) // eslint-disable-next-line comma-dangle @@ -58,8 +49,8 @@ export default { return Axios.post(`${NETVSConfig.NETDB_API_BASE_URL}/${NETVSConfig.NETDB_API_VERSION}/dns/ip_addr/delete`, params, (config || {}).netdb_axios_config) // eslint-disable-next-line comma-dangle }, - list (config, { gpk, type, is_own, is_dhcp, gpk_list, value_cidr, value_list, fetch_limit, is_reserved, fetch_offset, is_rr_target, filter_params_dict, sorting_params_list }) { - const params = APIUtils.denullify_dict({ 'gpk': gpk, 'type': type, 'is_own': is_own, 'is_dhcp': is_dhcp, 'gpk_list': (gpk_list === null) ? null : JSON.stringify(gpk_list), 'value_cidr': value_cidr, 'value_list': (value_list === null) ? null : JSON.stringify(value_list), 'fetch_limit': fetch_limit, 'is_reserved': is_reserved, 'fetch_offset': fetch_offset, 'is_rr_target': is_rr_target, 'filter_params_dict': filter_params_dict, 'sorting_params_list': (sorting_params_list === null) ? null : JSON.stringify(sorting_params_list)}) + list (config, { gpk, type, is_own, is_dhcp, gpk_list, value_list, fetch_limit, is_reserved, fetch_offset, is_rr_target, filter_params_dict, sorting_params_list }) { + const params = APIUtils.denullify_dict({ 'gpk': gpk, 'type': type, 'is_own': is_own, 'is_dhcp': is_dhcp, 'gpk_list': (gpk_list === null) ? null : JSON.stringify(gpk_list), 'value_list': (value_list === null) ? null : JSON.stringify(value_list), 'fetch_limit': fetch_limit, 'is_reserved': is_reserved, 'fetch_offset': fetch_offset, 'is_rr_target': is_rr_target, 'filter_params_dict': filter_params_dict, 'sorting_params_list': (sorting_params_list === null) ? null : JSON.stringify(sorting_params_list)}) const cnf = {} Object.assign(cnf, (config || {}).netdb_axios_config) cnf.params = params @@ -67,10 +58,10 @@ export default { // eslint-disable-next-line comma-dangle }, updateParamsList () { - return {'old': [ 'value', 'value_cidr'], 'new': [ 'is_dhcp', 'value_cidr', 'is_reserved']} + return {'old': [ 'value'], 'new': [ 'is_dhcp', 'is_reserved']} }, - update (config, {value_old, is_dhcp_new, value_cidr_old, value_cidr_new, is_reserved_new}) { - const params = { 'new': { 'is_dhcp': is_dhcp_new, 'value_cidr': value_cidr_new, 'is_reserved': is_reserved_new}, 'old': { 'value': value_old, 'value_cidr': value_cidr_old}} + update (config, {value_old, is_dhcp_new, is_reserved_new}) { + const params = { 'new': { 'is_dhcp': is_dhcp_new, 'is_reserved': is_reserved_new}, 'old': { 'value': value_old}} // TODO: Return ta-object instead return Axios.post(`${NETVSConfig.NETDB_API_BASE_URL}/${NETVSConfig.NETDB_API_VERSION}/dns/ip_addr/update`, params, (config || {}).netdb_axios_config) // eslint-disable-next-line comma-dangle diff --git a/4.1/es/evlog.record.js b/4.1/es/evlog.record.js index fa001c67f063d230f89dcc8398c594e7851d4609..8262fc3bf767445c384eeefac4c0cf6f009cbe22 100644 --- a/4.1/es/evlog.record.js +++ b/4.1/es/evlog.record.js @@ -22,8 +22,8 @@ export default { return Axios.post(`${NETVSConfig.NETDB_API_BASE_URL}/${NETVSConfig.NETDB_API_VERSION}/evlog/record/create`, params, (config || {}).netdb_axios_config) // eslint-disable-next-line comma-dangle }, - list (config, { type, top_n, type_list, object_gfk, ta_interval, language_tag, ta_timestamp, mgr_login_name, log_param_state, log_param_value, log_params_dict, log_param_fq_name, top_n_from_newest = true, filter_params_dict, object_type_fq_name, sorting_params_list, log_param_value_regexp }) { - const params = APIUtils.denullify_dict({ 'type': type, 'top_n': top_n, 'type_list': (type_list === null) ? null : JSON.stringify(type_list), 'object_gfk': object_gfk, 'ta_interval': ta_interval, 'language_tag': language_tag, 'ta_timestamp': ta_timestamp, 'mgr_login_name': mgr_login_name, 'log_param_state': log_param_state, 'log_param_value': log_param_value, 'log_params_dict': log_params_dict, 'log_param_fq_name': log_param_fq_name, 'top_n_from_newest': top_n_from_newest, 'filter_params_dict': filter_params_dict, 'object_type_fq_name': object_type_fq_name, 'sorting_params_list': (sorting_params_list === null) ? null : JSON.stringify(sorting_params_list), 'log_param_value_regexp': log_param_value_regexp}) + list (config, { type, top_n, type_list, object_gfk, ta_interval, language_tag, ta_timestamp, mgr_login_name, log_params_dict, top_n_from_newest = true, filter_params_dict, object_type_fq_name, sorting_params_list }) { + const params = APIUtils.denullify_dict({ 'type': type, 'top_n': top_n, 'type_list': (type_list === null) ? null : JSON.stringify(type_list), 'object_gfk': object_gfk, 'ta_interval': ta_interval, 'language_tag': language_tag, 'ta_timestamp': ta_timestamp, 'mgr_login_name': mgr_login_name, 'log_params_dict': log_params_dict, 'top_n_from_newest': top_n_from_newest, 'filter_params_dict': filter_params_dict, 'object_type_fq_name': object_type_fq_name, 'sorting_params_list': (sorting_params_list === null) ? null : JSON.stringify(sorting_params_list)}) const cnf = {} Object.assign(cnf, (config || {}).netdb_axios_config) cnf.params = params diff --git a/4.1/functions.json b/4.1/functions.json index 0b249d6ff5447c8699667d6bf19e1db71a73b1b5..83e9ce0e412b2b950d1468fdb99dc87df5d318bb 100644 --- a/4.1/functions.json +++ b/4.1/functions.json @@ -113,14 +113,6 @@ "data_type": "boolean", "is_deprecated": false }, - "value_stop": { - "new": { - "is_nullable": false, - "is_required": false - }, - "data_type": "ip_address", - "is_deprecated": false - }, "is_reserved": { "new": { "is_nullable": false, @@ -129,41 +121,6 @@ }, "data_type": "boolean", "is_deprecated": false - }, - "value_start": { - "new": { - "is_nullable": false, - "is_required": true - }, - "data_type": "ip_address", - "is_deprecated": false - } - }, - "object_type": "ip_addr", - "is_returning": false, - "is_executable": true, - "is_data_manipulating": true - }, - { - "name": "bulk_delete", - "system": "dns", - "fq_name": "dns.ip_addr.bulk_delete", - "parameters": { - "value_stop": { - "old": { - "is_nullable": false, - "is_required": false - }, - "data_type": "ip_address", - "is_deprecated": false - }, - "value_start": { - "old": { - "is_nullable": false, - "is_required": true - }, - "data_type": "ip_address", - "is_deprecated": false } }, "object_type": "ip_addr", @@ -482,14 +439,6 @@ "data_type": "boolean", "is_deprecated": false }, - "value_stop": { - "old": { - "is_nullable": false, - "is_required": false - }, - "data_type": "ip_address", - "is_deprecated": false - }, "is_reserved": { "new": { "is_nullable": false, @@ -497,14 +446,6 @@ }, "data_type": "boolean", "is_deprecated": false - }, - "value_start": { - "old": { - "is_nullable": false, - "is_required": false - }, - "data_type": "ip_address", - "is_deprecated": false } }, "object_type": "ip_addr", @@ -12727,14 +12668,6 @@ "data_type": "uuid_array", "is_deprecated": false }, - "value_cidr": { - "old": { - "is_nullable": false, - "is_required": false - }, - "data_type": "ip_network", - "is_deprecated": false - }, "value_list": { "old": { "is_nullable": false, @@ -17788,107 +17721,13 @@ "data_type": "text_kw_mc_long", "is_deprecated": false }, - "log_param_state": { - "old": { - "is_nullable": false, - "is_required": false - }, - "data_type": "integer8", - "is_deprecated": false, - "supported_values": { - "0": { - "de": null, - "en": null - }, - "1": { - "de": "ALT", - "en": "OLD" - }, - "2": { - "de": "NEU", - "en": "NEW" - }, - "3": { - "de": "REF", - "en": "REF" - }, - "4": { - "de": "IMP", - "en": "IMP" - }, - "5": { - "de": "QUELLE", - "en": "SRC" - }, - "6": { - "de": "ZIEL", - "en": "DST" - }, - "7": { - "de": "EGR", - "en": "EGR" - }, - "8": { - "de": "INGR", - "en": "INGR" - }, - "9": { - "de": "FK", - "en": "FK" - }, - "10": { - "de": "RK", - "en": "RK" - }, - "11": { - "de": "ORIG", - "en": "ORIG" - }, - "12": { - "de": "DUP", - "en": "DUP" - }, - "13": { - "de": "GEG", - "en": "GIVEN" - }, - "14": { - "de": "ERF", - "en": "RQRD" - }, - "15": { - "de": "TAKES", - "en": "TAKES" - }, - "16": { - "de": "RETS", - "en": "RETS" - } - } - }, - "log_param_value": { - "old": { - "is_nullable": false, - "is_required": false - }, - "data_type": "json", - "is_deprecated": false - }, "log_params_dict": { "old": { "is_nullable": false, "is_required": false }, "data_type": "json_object", - "is_deprecated": false - }, - "log_param_fq_name": { - "old": { - "is_nullable": false, - "is_required": false - }, - "data_type": "text_otattr_identifier", - "is_deprecated": false + "is_deprecated": true }, "top_n_from_newest": { "old": { @@ -17922,14 +17761,6 @@ }, "data_type": "text_array", "is_deprecated": false - }, - "log_param_value_regexp": { - "old": { - "is_nullable": false, - "is_required": false - }, - "data_type": "regexp", - "is_deprecated": false } }, "object_type": "record", @@ -23165,18 +22996,6 @@ "data_type": "boolean", "is_deprecated": false }, - "value_cidr": { - "new": { - "is_nullable": false, - "is_required": false - }, - "old": { - "is_nullable": false, - "is_required": false - }, - "data_type": "ip_network", - "is_deprecated": false - }, "is_reserved": { "new": { "is_nullable": false, diff --git a/4.1/objects.json b/4.1/objects.json index fc3a604203b1405592a10ca01a36d0e8573543b1..3dccc3b27f0eaa1563c554fbeb9966255575d4e3 100644 --- a/4.1/objects.json +++ b/4.1/objects.json @@ -18121,7 +18121,7 @@ "is_core": true, "data_type": "json_object", "is_nullable": false, - "is_deprecated": false + "is_deprecated": true }, "object_type_fq_name": { "is_core": true, diff --git a/4.1/openapi.yml b/4.1/openapi.yml index 7f4c4c1841a556bd9c7f05718dc48efe9c9b7160..97545a5ec334fb736760d55d2101c0d88834dd7c 100644 --- a/4.1/openapi.yml +++ b/4.1/openapi.yml @@ -2059,7 +2059,7 @@ components: \ Objektes" type: string object_type_fq_name: - description: Objekttyp des Log-Datensatzes + description: voll qualifizierter Objekttypname des Log-Datensatzes type: string ta_timestamp: description: "Zeitstempel der Log-Transaktion. Alle Log-Datens\xE4tze ein\ @@ -4064,7 +4064,7 @@ info: \ nicht Bestandteil dieser Dokumentation, sondern \xFCber selbstdokumentierende\ \ Indexabfragen der WebAPI erreichbar." title: SCC NETDB-API - version: 4.1.141 + version: 4.1.146 openapi: 3.0.3 paths: /cntl/column/create: @@ -15986,57 +15986,6 @@ paths: \ reserviert" nullable: false type: boolean - value_start: - description: "erste Adresse des zu behandelnden IP-Adre\xDF\ - blocks (nicht in Kombination mit value_cidr erlaubt)" - nullable: false - type: string - value_stop: - description: "letzte Adresse des zu behandelnden IP-Adre\xDF\ - blocks (nicht in Kombination mit value_cidr erlaubt)" - nullable: false - type: string - required: - - value_start - type: object - type: object - required: true - responses: - 200: - description: Request erfolgreich - 400: - description: Eingabefehler - 401: - description: Unautorisiert - 500: - description: Interner Serverfehler - security: - - api_key: [] - tags: - - dns - /dns/ip_addr/bulk_delete: - post: - requestBody: - content: - application/json: - schema: - properties: - old: - description: Alte Attribute zur einduetigen Identifizierung des - Objekts - properties: - value_start: - description: "erste Adresse des zu behandelnden IP-Adre\xDF\ - blocks (nicht in Kombination mit value_cidr erlaubt)" - nullable: false - type: string - value_stop: - description: "letzte Adresse des zu behandelnden IP-Adre\xDF\ - blocks (nicht in Kombination mit value_cidr erlaubt)" - nullable: false - type: string - required: - - value_start type: object type: object required: true @@ -16074,21 +16023,6 @@ paths: nullable: false type: boolean type: object - old: - description: Alte Attribute zur einduetigen Identifizierung des - Objekts - properties: - value_start: - description: "erste Adresse des zu behandelnden IP-Adre\xDF\ - blocks (nicht in Kombination mit value_cidr erlaubt)" - nullable: false - type: string - value_stop: - description: "letzte Adresse des zu behandelnden IP-Adre\xDF\ - blocks (nicht in Kombination mit value_cidr erlaubt)" - nullable: false - type: string - type: object type: object required: true responses: @@ -16233,15 +16167,6 @@ paths: format: '["value1","value2",...]' nullable: false type: string - - description: "CIDR-Ausdruck f\xFCr Adressen (die zu behandelnden Adressen\ - \ passen in den CIDR-Ausdruck). Nicht in Kombination mit value_start oder\ - \ value_stop erlaubt." - in: query - name: value_cidr - required: false - schema: - nullable: false - type: string - description: 'Liste aus: IP-Adresse' in: query name: value_list @@ -16347,12 +16272,6 @@ paths: \ reserviert" nullable: false type: boolean - value_cidr: - description: "CIDR-Ausdruck f\xFCr Adressen (die zu behandelnden\ - \ Adressen passen in den CIDR-Ausdruck). Nicht in Kombination\ - \ mit value_start oder value_stop erlaubt." - nullable: false - type: string type: object old: description: Alte Attribute zur einduetigen Identifizierung des @@ -16362,12 +16281,6 @@ paths: description: IP-Adresse nullable: false type: string - value_cidr: - description: "CIDR-Ausdruck f\xFCr Adressen (die zu behandelnden\ - \ Adressen passen in den CIDR-Ausdruck). Nicht in Kombination\ - \ mit value_start oder value_stop erlaubt." - nullable: false - type: string type: object type: object required: true @@ -20098,7 +20011,7 @@ paths: nullable: false type: number object_type_fq_name: - description: Objekttyp des Log-Datensatzes + description: voll qualifizierter Objekttypname des Log-Datensatzes nullable: false type: string ta_timestamp: @@ -20208,40 +20121,6 @@ paths: schema: nullable: false type: string - - description: "Status des Objektattributes im Kontext der Funktion bzw. des\ - \ Transaktionsinhaltes\n\n0: \n1: OLD\n2: NEW\n3: REF\n4: IMP\n5: SRC\n\ - 6: DST\n7: EGR\n8: INGR\n9: FK\n10: RK\n11: ORIG\n12: DUP\n13: GIVEN\n14:\ - \ RQRD\n15: TAKES\n16: RETS" - in: query - name: log_param_state - required: false - schema: - enum: - - '0' - - '1' - - '2' - - '3' - - '4' - - '5' - - '6' - - '7' - - '8' - - '9' - - '10' - - '11' - - '12' - - '13' - - '14' - - '15' - - '16' - nullable: false - type: number - - description: WebAPI-Attributwert - in: query - name: log_param_value - required: false - schema: - nullable: false - description: "Parameter-Dict des Log-Eintrags. Schl\xFCssel: voll qualifizierter\ \ WebAPI-Attribut-Name, Werte: Dict der Form '{\"<num_state>\": <value>}'.\ \ Bei der Funktion 'list' k\xF6nnen Abfragetupel formuliert werden, wobei\ @@ -20264,13 +20143,6 @@ paths: schema: nullable: false type: object - - description: WebAPI-Attributname der Form <system>.<objekttypname>.<attributname> - in: query - name: log_param_fq_name - required: false - schema: - nullable: false - type: string - description: "True: Das Limit wird vom Ende des Zeitfensters absteigend gez\xE4\ hlt (Abfrage beginnt mit neuester TA). False: das Limit wird vom Anfang\ \ des Zeitfensters aufsteigend gez\xE4hlt (Abfrage beginnt mit \xE4ltester\ @@ -20295,7 +20167,7 @@ paths: schema: nullable: false type: object - - description: Objekttyp des Log-Datensatzes + - description: voll qualifizierter Objekttypname des Log-Datensatzes in: query name: object_type_fq_name required: false @@ -20312,14 +20184,6 @@ paths: format: '["value1","value2",...]' nullable: false type: string - - description: "Regul\xE4rer Ausdruck des Suchmusters f\xFCr Parameterwerte\ - \ in Log-Daten" - in: query - name: log_param_value_regexp - required: false - schema: - nullable: false - type: string responses: 200: content: diff --git a/4.1/python/dns.py b/4.1/python/dns.py index b230440639199161e45dd919216c780dfa1b5c52..14e26f160fe779f40eca0836be3603f0fba3225c 100644 --- a/4.1/python/dns.py +++ b/4.1/python/dns.py @@ -595,83 +595,45 @@ class IpAddr(APIObject): raise ValueError(f"'is_rr_target' of incorrect type. Expected bool, got {type(self.is_rr_target)}") @staticmethod - def bulk_create_ta(value_start_new: str, is_dhcp_new: bool = False, value_stop_new: str = None, is_reserved_new: bool = False) -> dict: + def bulk_create_ta(is_dhcp_new: bool = False, is_reserved_new: bool = False) -> dict: if is_dhcp_new is not None and not (isinstance(is_dhcp_new, bool)): raise ValueError(f"'is_dhcp' of incorrect type. Expected bool, got {type(is_dhcp_new)}") - if value_stop_new is not None and not (isinstance(value_stop_new, str)): - raise ValueError(f"'value_stop' of incorrect type. Expected str, got {type(value_stop_new)}") if is_reserved_new is not None and not (isinstance(is_reserved_new, bool)): raise ValueError(f"'is_reserved' of incorrect type. Expected bool, got {type(is_reserved_new)}") - if not (isinstance(value_start_new, str)): - raise ValueError(f"'value_start' of incorrect type. Expected str, got {type(value_start_new)}") - return {'name': 'dns.ip_addr.bulk_create', 'new': _denullify_dict({'is_dhcp': is_dhcp_new, 'value_stop': value_stop_new, 'is_reserved': is_reserved_new, 'value_start': value_start_new}), 'old': _denullify_dict({})} + return {'name': 'dns.ip_addr.bulk_create', 'new': _denullify_dict({'is_dhcp': is_dhcp_new, 'is_reserved': is_reserved_new}), 'old': _denullify_dict({})} # TODO: Consider is_returning @classmethod - def bulk_create(cls, api_session: APISession, value_start_new: str, is_dhcp_new: bool = False, value_stop_new: str = None, is_reserved_new: bool = False) -> list: + def bulk_create(cls, api_session: APISession, is_dhcp_new: bool = False, is_reserved_new: bool = False) -> list: if is_dhcp_new is not None and not (isinstance(is_dhcp_new, bool)): raise ValueError(f"'is_dhcp' of incorrect type. Expected bool, got {type(is_dhcp_new)}") - if value_stop_new is not None and not (isinstance(value_stop_new, str)): - raise ValueError(f"'value_stop' of incorrect type. Expected str, got {type(value_stop_new)}") if is_reserved_new is not None and not (isinstance(is_reserved_new, bool)): raise ValueError(f"'is_reserved' of incorrect type. Expected bool, got {type(is_reserved_new)}") - if not (isinstance(value_start_new, str)): - raise ValueError(f"'value_start' of incorrect type. Expected str, got {type(value_start_new)}") - res = api_session.session.post(api_session.base_url + '/wapi/transaction/execute', json=[cls.bulk_create_ta(is_dhcp_new=is_dhcp_new, value_stop_new=value_stop_new, is_reserved_new=is_reserved_new, value_start_new=value_start_new, )]) + res = api_session.session.post(api_session.base_url + '/wapi/transaction/execute', json=[cls.bulk_create_ta(is_dhcp_new=is_dhcp_new, is_reserved_new=is_reserved_new, )]) if not res.ok: raise ExecutionError(res.status_code, res.reason, res.json() if "json" in res.headers["content-type"] else res.text) return [cls(**s) for s in res.json()[0]] @staticmethod - def bulk_delete_ta(value_start_old: str, value_stop_old: str = None) -> dict: - if value_stop_old is not None and not (isinstance(value_stop_old, str)): - raise ValueError(f"'value_stop' of incorrect type. Expected str, got {type(value_stop_old)}") - if not (isinstance(value_start_old, str)): - raise ValueError(f"'value_start' of incorrect type. Expected str, got {type(value_start_old)}") - - return {'name': 'dns.ip_addr.bulk_delete', 'new': _denullify_dict({}), 'old': _denullify_dict({'value_stop': value_stop_old, 'value_start': value_start_old})} - - # TODO: Consider is_returning - @classmethod - def bulk_delete(cls, api_session: APISession, value_start_old: str, value_stop_old: str = None) -> list: - if value_stop_old is not None and not (isinstance(value_stop_old, str)): - raise ValueError(f"'value_stop' of incorrect type. Expected str, got {type(value_stop_old)}") - if not (isinstance(value_start_old, str)): - raise ValueError(f"'value_start' of incorrect type. Expected str, got {type(value_start_old)}") - - res = api_session.session.post(api_session.base_url + '/wapi/transaction/execute', json=[cls.bulk_delete_ta(value_stop_old=value_stop_old, value_start_old=value_start_old)]) - if not res.ok: - raise ExecutionError(res.status_code, res.reason, res.json() if "json" in res.headers["content-type"] else res.text) - return [cls(**s) for s in res.json()[0]] - - @staticmethod - def bulk_update_ta(is_dhcp_new: bool = None, is_reserved_new: bool = None, value_stop_old: str = None, value_start_old: str = None) -> dict: + def bulk_update_ta(is_dhcp_new: bool = None, is_reserved_new: bool = None) -> dict: if is_dhcp_new is not None and not (isinstance(is_dhcp_new, bool)): raise ValueError(f"'is_dhcp' of incorrect type. Expected bool, got {type(is_dhcp_new)}") if is_reserved_new is not None and not (isinstance(is_reserved_new, bool)): raise ValueError(f"'is_reserved' of incorrect type. Expected bool, got {type(is_reserved_new)}") - if value_stop_old is not None and not (isinstance(value_stop_old, str)): - raise ValueError(f"'value_stop' of incorrect type. Expected str, got {type(value_stop_old)}") - if value_start_old is not None and not (isinstance(value_start_old, str)): - raise ValueError(f"'value_start' of incorrect type. Expected str, got {type(value_start_old)}") - return {'name': 'dns.ip_addr.bulk_update', 'new': _denullify_dict({'is_dhcp': is_dhcp_new, 'is_reserved': is_reserved_new}), 'old': _denullify_dict({'value_stop': value_stop_old, 'value_start': value_start_old})} + return {'name': 'dns.ip_addr.bulk_update', 'new': _denullify_dict({'is_dhcp': is_dhcp_new, 'is_reserved': is_reserved_new}), 'old': _denullify_dict({})} # TODO: Consider is_returning @classmethod - def bulk_update(cls, api_session: APISession, is_dhcp_new: bool = None, is_reserved_new: bool = None, value_stop_old: str = None, value_start_old: str = None) -> list: + def bulk_update(cls, api_session: APISession, is_dhcp_new: bool = None, is_reserved_new: bool = None) -> list: if is_dhcp_new is not None and not (isinstance(is_dhcp_new, bool)): raise ValueError(f"'is_dhcp' of incorrect type. Expected bool, got {type(is_dhcp_new)}") if is_reserved_new is not None and not (isinstance(is_reserved_new, bool)): raise ValueError(f"'is_reserved' of incorrect type. Expected bool, got {type(is_reserved_new)}") - if value_stop_old is not None and not (isinstance(value_stop_old, str)): - raise ValueError(f"'value_stop' of incorrect type. Expected str, got {type(value_stop_old)}") - if value_start_old is not None and not (isinstance(value_start_old, str)): - raise ValueError(f"'value_start' of incorrect type. Expected str, got {type(value_start_old)}") - res = api_session.session.post(api_session.base_url + '/wapi/transaction/execute', json=[cls.bulk_update_ta(is_dhcp_new=is_dhcp_new, is_reserved_new=is_reserved_new, value_stop_old=value_stop_old, value_start_old=value_start_old)]) + res = api_session.session.post(api_session.base_url + '/wapi/transaction/execute', json=[cls.bulk_update_ta(is_dhcp_new=is_dhcp_new, is_reserved_new=is_reserved_new, )]) if not res.ok: raise ExecutionError(res.status_code, res.reason, res.json() if "json" in res.headers["content-type"] else res.text) return [cls(**s) for s in res.json()[0]] @@ -721,7 +683,7 @@ class IpAddr(APIObject): return [cls(**s) for s in res.json()[0]] @staticmethod - def list_ta(gpk_old: str = None, type_old: str = None, is_own_old: bool = None, is_dhcp_old: bool = None, gpk_list_old: list = None, value_cidr_old: str = None, value_list_old: list = None, fetch_limit_old: int = None, is_reserved_old: bool = None, fetch_offset_old: int = None, is_rr_target_old: bool = None, filter_params_dict_old: dict = None, sorting_params_list_old: list = None) -> dict: + def list_ta(gpk_old: str = None, type_old: str = None, is_own_old: bool = None, is_dhcp_old: bool = None, gpk_list_old: list = None, value_list_old: list = None, fetch_limit_old: int = None, is_reserved_old: bool = None, fetch_offset_old: int = None, is_rr_target_old: bool = None, filter_params_dict_old: dict = None, sorting_params_list_old: list = None) -> dict: if gpk_old is not None and not (isinstance(gpk_old, str)): raise ValueError(f"'gpk' of incorrect type. Expected str, got {type(gpk_old)}") if type_old is not None and not (isinstance(type_old, str)): @@ -732,8 +694,6 @@ class IpAddr(APIObject): raise ValueError(f"'is_dhcp' of incorrect type. Expected bool, got {type(is_dhcp_old)}") if gpk_list_old is not None and not (isinstance(gpk_list_old, list)): raise ValueError(f"'gpk_list' of incorrect type. Expected list, got {type(gpk_list_old)}") - if value_cidr_old is not None and not (isinstance(value_cidr_old, str)): - raise ValueError(f"'value_cidr' of incorrect type. Expected str, got {type(value_cidr_old)}") if value_list_old is not None and not (isinstance(value_list_old, list)): raise ValueError(f"'value_list' of incorrect type. Expected list, got {type(value_list_old)}") if fetch_limit_old is not None and not (isinstance(fetch_limit_old, int)): @@ -749,11 +709,11 @@ class IpAddr(APIObject): if sorting_params_list_old is not None and not (isinstance(sorting_params_list_old, list)): raise ValueError(f"'sorting_params_list' of incorrect type. Expected list, got {type(sorting_params_list_old)}") - return {'name': 'dns.ip_addr.list', 'new': _denullify_dict({}), 'old': _denullify_dict({'gpk': gpk_old, 'type': type_old, 'is_own': is_own_old, 'is_dhcp': is_dhcp_old, 'gpk_list': gpk_list_old, 'value_cidr': value_cidr_old, 'value_list': value_list_old, 'fetch_limit': fetch_limit_old, 'is_reserved': is_reserved_old, 'fetch_offset': fetch_offset_old, 'is_rr_target': is_rr_target_old, 'filter_params_dict': filter_params_dict_old, 'sorting_params_list': sorting_params_list_old})} + return {'name': 'dns.ip_addr.list', 'new': _denullify_dict({}), 'old': _denullify_dict({'gpk': gpk_old, 'type': type_old, 'is_own': is_own_old, 'is_dhcp': is_dhcp_old, 'gpk_list': gpk_list_old, 'value_list': value_list_old, 'fetch_limit': fetch_limit_old, 'is_reserved': is_reserved_old, 'fetch_offset': fetch_offset_old, 'is_rr_target': is_rr_target_old, 'filter_params_dict': filter_params_dict_old, 'sorting_params_list': sorting_params_list_old})} # TODO: Consider is_returning @classmethod - def list(cls, api_session: APISession, gpk_old: str = None, type_old: str = None, is_own_old: bool = None, is_dhcp_old: bool = None, gpk_list_old: list = None, value_cidr_old: str = None, value_list_old: list = None, fetch_limit_old: int = None, is_reserved_old: bool = None, fetch_offset_old: int = None, is_rr_target_old: bool = None, filter_params_dict_old: dict = None, sorting_params_list_old: list = None) -> list: + def list(cls, api_session: APISession, gpk_old: str = None, type_old: str = None, is_own_old: bool = None, is_dhcp_old: bool = None, gpk_list_old: list = None, value_list_old: list = None, fetch_limit_old: int = None, is_reserved_old: bool = None, fetch_offset_old: int = None, is_rr_target_old: bool = None, filter_params_dict_old: dict = None, sorting_params_list_old: list = None) -> list: if gpk_old is not None and not (isinstance(gpk_old, str)): raise ValueError(f"'gpk' of incorrect type. Expected str, got {type(gpk_old)}") if type_old is not None and not (isinstance(type_old, str)): @@ -764,8 +724,6 @@ class IpAddr(APIObject): raise ValueError(f"'is_dhcp' of incorrect type. Expected bool, got {type(is_dhcp_old)}") if gpk_list_old is not None and not (isinstance(gpk_list_old, list)): raise ValueError(f"'gpk_list' of incorrect type. Expected list, got {type(gpk_list_old)}") - if value_cidr_old is not None and not (isinstance(value_cidr_old, str)): - raise ValueError(f"'value_cidr' of incorrect type. Expected str, got {type(value_cidr_old)}") if value_list_old is not None and not (isinstance(value_list_old, list)): raise ValueError(f"'value_list' of incorrect type. Expected list, got {type(value_list_old)}") if fetch_limit_old is not None and not (isinstance(fetch_limit_old, int)): @@ -781,41 +739,33 @@ class IpAddr(APIObject): if sorting_params_list_old is not None and not (isinstance(sorting_params_list_old, list)): raise ValueError(f"'sorting_params_list' of incorrect type. Expected list, got {type(sorting_params_list_old)}") - res = api_session.session.post(api_session.base_url + '/wapi/transaction/execute', json=[cls.list_ta(gpk_old=gpk_old, type_old=type_old, is_own_old=is_own_old, is_dhcp_old=is_dhcp_old, gpk_list_old=gpk_list_old, value_cidr_old=value_cidr_old, value_list_old=value_list_old, fetch_limit_old=fetch_limit_old, is_reserved_old=is_reserved_old, fetch_offset_old=fetch_offset_old, is_rr_target_old=is_rr_target_old, filter_params_dict_old=filter_params_dict_old, sorting_params_list_old=sorting_params_list_old)]) + res = api_session.session.post(api_session.base_url + '/wapi/transaction/execute', json=[cls.list_ta(gpk_old=gpk_old, type_old=type_old, is_own_old=is_own_old, is_dhcp_old=is_dhcp_old, gpk_list_old=gpk_list_old, value_list_old=value_list_old, fetch_limit_old=fetch_limit_old, is_reserved_old=is_reserved_old, fetch_offset_old=fetch_offset_old, is_rr_target_old=is_rr_target_old, filter_params_dict_old=filter_params_dict_old, sorting_params_list_old=sorting_params_list_old)]) if not res.ok: raise ExecutionError(res.status_code, res.reason, res.json() if "json" in res.headers["content-type"] else res.text) return [cls(**s) for s in res.json()[0]] @staticmethod - def update_ta(is_dhcp_new: bool = None, value_cidr_new: str = None, is_reserved_new: bool = None, value_old: str = None, value_cidr_old: str = None) -> dict: + def update_ta(is_dhcp_new: bool = None, is_reserved_new: bool = None, value_old: str = None) -> dict: if is_dhcp_new is not None and not (isinstance(is_dhcp_new, bool)): raise ValueError(f"'is_dhcp' of incorrect type. Expected bool, got {type(is_dhcp_new)}") - if value_cidr_new is not None and not (isinstance(value_cidr_new, str)): - raise ValueError(f"'value_cidr' of incorrect type. Expected str, got {type(value_cidr_new)}") if is_reserved_new is not None and not (isinstance(is_reserved_new, bool)): raise ValueError(f"'is_reserved' of incorrect type. Expected bool, got {type(is_reserved_new)}") if value_old is not None and not (isinstance(value_old, str)): raise ValueError(f"'value' of incorrect type. Expected str, got {type(value_old)}") - if value_cidr_old is not None and not (isinstance(value_cidr_old, str)): - raise ValueError(f"'value_cidr' of incorrect type. Expected str, got {type(value_cidr_old)}") - return {'name': 'dns.ip_addr.update', 'new': _denullify_dict({'is_dhcp': is_dhcp_new, 'value_cidr': value_cidr_new, 'is_reserved': is_reserved_new}), 'old': _denullify_dict({'value': value_old, 'value_cidr': value_cidr_old})} + return {'name': 'dns.ip_addr.update', 'new': _denullify_dict({'is_dhcp': is_dhcp_new, 'is_reserved': is_reserved_new}), 'old': _denullify_dict({'value': value_old})} # TODO: Consider is_returning @classmethod - def update(cls, api_session: APISession, is_dhcp_new: bool = None, value_cidr_new: str = None, is_reserved_new: bool = None, value_old: str = None, value_cidr_old: str = None) -> list: + def update(cls, api_session: APISession, is_dhcp_new: bool = None, is_reserved_new: bool = None, value_old: str = None) -> list: if is_dhcp_new is not None and not (isinstance(is_dhcp_new, bool)): raise ValueError(f"'is_dhcp' of incorrect type. Expected bool, got {type(is_dhcp_new)}") - if value_cidr_new is not None and not (isinstance(value_cidr_new, str)): - raise ValueError(f"'value_cidr' of incorrect type. Expected str, got {type(value_cidr_new)}") if is_reserved_new is not None and not (isinstance(is_reserved_new, bool)): raise ValueError(f"'is_reserved' of incorrect type. Expected bool, got {type(is_reserved_new)}") if value_old is not None and not (isinstance(value_old, str)): raise ValueError(f"'value' of incorrect type. Expected str, got {type(value_old)}") - if value_cidr_old is not None and not (isinstance(value_cidr_old, str)): - raise ValueError(f"'value_cidr' of incorrect type. Expected str, got {type(value_cidr_old)}") - res = api_session.session.post(api_session.base_url + '/wapi/transaction/execute', json=[cls.update_ta(is_dhcp_new=is_dhcp_new, value_cidr_new=value_cidr_new, is_reserved_new=is_reserved_new, value_old=value_old, value_cidr_old=value_cidr_old)]) + res = api_session.session.post(api_session.base_url + '/wapi/transaction/execute', json=[cls.update_ta(is_dhcp_new=is_dhcp_new, is_reserved_new=is_reserved_new, value_old=value_old)]) if not res.ok: raise ExecutionError(res.status_code, res.reason, res.json() if "json" in res.headers["content-type"] else res.text) return [cls(**s) for s in res.json()[0]] diff --git a/4.1/python/evlog.py b/4.1/python/evlog.py index d8283e671eb93d805bf8dbf1ada2c28c2f63b961..2ba999ee3f02d2c4116aef47f61be5b1e8c00512 100644 --- a/4.1/python/evlog.py +++ b/4.1/python/evlog.py @@ -184,7 +184,7 @@ class Record(APIObject): return [cls(**s) for s in res.json()[0]] @staticmethod - def list_ta(type_old: str = None, top_n_old: int = None, type_list_old: list = None, object_gfk_old: str = None, ta_interval_old: str = None, language_tag_old: str = None, ta_timestamp_old: str = None, mgr_login_name_old: str = None, log_param_state_old: int = None, log_param_value_old: str = None, log_params_dict_old: dict = None, log_param_fq_name_old: str = None, top_n_from_newest_old: bool = True, filter_params_dict_old: dict = None, object_type_fq_name_old: str = None, sorting_params_list_old: list = None, log_param_value_regexp_old: str = None) -> dict: + def list_ta(type_old: str = None, top_n_old: int = None, type_list_old: list = None, object_gfk_old: str = None, ta_interval_old: str = None, language_tag_old: str = None, ta_timestamp_old: str = None, mgr_login_name_old: str = None, log_params_dict_old: dict = None, top_n_from_newest_old: bool = True, filter_params_dict_old: dict = None, object_type_fq_name_old: str = None, sorting_params_list_old: list = None) -> dict: if type_old is not None and not (isinstance(type_old, str)): raise ValueError(f"'type' of incorrect type. Expected str, got {type(type_old)}") if top_n_old is not None and not (isinstance(top_n_old, int)): @@ -201,14 +201,8 @@ class Record(APIObject): raise ValueError(f"'ta_timestamp' of incorrect type. Expected str, got {type(ta_timestamp_old)}") if mgr_login_name_old is not None and not (isinstance(mgr_login_name_old, str)): raise ValueError(f"'mgr_login_name' of incorrect type. Expected str, got {type(mgr_login_name_old)}") - if log_param_state_old is not None and not (isinstance(log_param_state_old, int)): - raise ValueError(f"'log_param_state' of incorrect type. Expected int, got {type(log_param_state_old)}") - if log_param_value_old is not None and not (isinstance(log_param_value_old, str)): - raise ValueError(f"'log_param_value' of incorrect type. Expected str, got {type(log_param_value_old)}") if log_params_dict_old is not None and not (isinstance(log_params_dict_old, dict)): raise ValueError(f"'log_params_dict' of incorrect type. Expected dict, got {type(log_params_dict_old)}") - if log_param_fq_name_old is not None and not (isinstance(log_param_fq_name_old, str)): - raise ValueError(f"'log_param_fq_name' of incorrect type. Expected str, got {type(log_param_fq_name_old)}") if top_n_from_newest_old is not None and not (isinstance(top_n_from_newest_old, bool)): raise ValueError(f"'top_n_from_newest' of incorrect type. Expected bool, got {type(top_n_from_newest_old)}") if filter_params_dict_old is not None and not (isinstance(filter_params_dict_old, dict)): @@ -217,14 +211,12 @@ class Record(APIObject): raise ValueError(f"'object_type_fq_name' of incorrect type. Expected str, got {type(object_type_fq_name_old)}") if sorting_params_list_old is not None and not (isinstance(sorting_params_list_old, list)): raise ValueError(f"'sorting_params_list' of incorrect type. Expected list, got {type(sorting_params_list_old)}") - if log_param_value_regexp_old is not None and not (isinstance(log_param_value_regexp_old, str)): - raise ValueError(f"'log_param_value_regexp' of incorrect type. Expected str, got {type(log_param_value_regexp_old)}") - return {'name': 'evlog.record.list', 'new': _denullify_dict({}), 'old': _denullify_dict({'type': type_old, 'top_n': top_n_old, 'type_list': type_list_old, 'object_gfk': object_gfk_old, 'ta_interval': ta_interval_old, 'language_tag': language_tag_old, 'ta_timestamp': ta_timestamp_old, 'mgr_login_name': mgr_login_name_old, 'log_param_state': log_param_state_old, 'log_param_value': log_param_value_old, 'log_params_dict': log_params_dict_old, 'log_param_fq_name': log_param_fq_name_old, 'top_n_from_newest': top_n_from_newest_old, 'filter_params_dict': filter_params_dict_old, 'object_type_fq_name': object_type_fq_name_old, 'sorting_params_list': sorting_params_list_old, 'log_param_value_regexp': log_param_value_regexp_old})} + return {'name': 'evlog.record.list', 'new': _denullify_dict({}), 'old': _denullify_dict({'type': type_old, 'top_n': top_n_old, 'type_list': type_list_old, 'object_gfk': object_gfk_old, 'ta_interval': ta_interval_old, 'language_tag': language_tag_old, 'ta_timestamp': ta_timestamp_old, 'mgr_login_name': mgr_login_name_old, 'log_params_dict': log_params_dict_old, 'top_n_from_newest': top_n_from_newest_old, 'filter_params_dict': filter_params_dict_old, 'object_type_fq_name': object_type_fq_name_old, 'sorting_params_list': sorting_params_list_old})} # TODO: Consider is_returning @classmethod - def list(cls, api_session: APISession, type_old: str = None, top_n_old: int = None, type_list_old: list = None, object_gfk_old: str = None, ta_interval_old: str = None, language_tag_old: str = None, ta_timestamp_old: str = None, mgr_login_name_old: str = None, log_param_state_old: int = None, log_param_value_old: str = None, log_params_dict_old: dict = None, log_param_fq_name_old: str = None, top_n_from_newest_old: bool = True, filter_params_dict_old: dict = None, object_type_fq_name_old: str = None, sorting_params_list_old: list = None, log_param_value_regexp_old: str = None) -> list: + def list(cls, api_session: APISession, type_old: str = None, top_n_old: int = None, type_list_old: list = None, object_gfk_old: str = None, ta_interval_old: str = None, language_tag_old: str = None, ta_timestamp_old: str = None, mgr_login_name_old: str = None, log_params_dict_old: dict = None, top_n_from_newest_old: bool = True, filter_params_dict_old: dict = None, object_type_fq_name_old: str = None, sorting_params_list_old: list = None) -> list: if type_old is not None and not (isinstance(type_old, str)): raise ValueError(f"'type' of incorrect type. Expected str, got {type(type_old)}") if top_n_old is not None and not (isinstance(top_n_old, int)): @@ -241,14 +233,8 @@ class Record(APIObject): raise ValueError(f"'ta_timestamp' of incorrect type. Expected str, got {type(ta_timestamp_old)}") if mgr_login_name_old is not None and not (isinstance(mgr_login_name_old, str)): raise ValueError(f"'mgr_login_name' of incorrect type. Expected str, got {type(mgr_login_name_old)}") - if log_param_state_old is not None and not (isinstance(log_param_state_old, int)): - raise ValueError(f"'log_param_state' of incorrect type. Expected int, got {type(log_param_state_old)}") - if log_param_value_old is not None and not (isinstance(log_param_value_old, str)): - raise ValueError(f"'log_param_value' of incorrect type. Expected str, got {type(log_param_value_old)}") if log_params_dict_old is not None and not (isinstance(log_params_dict_old, dict)): raise ValueError(f"'log_params_dict' of incorrect type. Expected dict, got {type(log_params_dict_old)}") - if log_param_fq_name_old is not None and not (isinstance(log_param_fq_name_old, str)): - raise ValueError(f"'log_param_fq_name' of incorrect type. Expected str, got {type(log_param_fq_name_old)}") if top_n_from_newest_old is not None and not (isinstance(top_n_from_newest_old, bool)): raise ValueError(f"'top_n_from_newest' of incorrect type. Expected bool, got {type(top_n_from_newest_old)}") if filter_params_dict_old is not None and not (isinstance(filter_params_dict_old, dict)): @@ -257,10 +243,8 @@ class Record(APIObject): raise ValueError(f"'object_type_fq_name' of incorrect type. Expected str, got {type(object_type_fq_name_old)}") if sorting_params_list_old is not None and not (isinstance(sorting_params_list_old, list)): raise ValueError(f"'sorting_params_list' of incorrect type. Expected list, got {type(sorting_params_list_old)}") - if log_param_value_regexp_old is not None and not (isinstance(log_param_value_regexp_old, str)): - raise ValueError(f"'log_param_value_regexp' of incorrect type. Expected str, got {type(log_param_value_regexp_old)}") - res = api_session.session.post(api_session.base_url + '/wapi/transaction/execute', json=[cls.list_ta(type_old=type_old, top_n_old=top_n_old, type_list_old=type_list_old, object_gfk_old=object_gfk_old, ta_interval_old=ta_interval_old, language_tag_old=language_tag_old, ta_timestamp_old=ta_timestamp_old, mgr_login_name_old=mgr_login_name_old, log_param_state_old=log_param_state_old, log_param_value_old=log_param_value_old, log_params_dict_old=log_params_dict_old, log_param_fq_name_old=log_param_fq_name_old, top_n_from_newest_old=top_n_from_newest_old, filter_params_dict_old=filter_params_dict_old, object_type_fq_name_old=object_type_fq_name_old, sorting_params_list_old=sorting_params_list_old, log_param_value_regexp_old=log_param_value_regexp_old)]) + res = api_session.session.post(api_session.base_url + '/wapi/transaction/execute', json=[cls.list_ta(type_old=type_old, top_n_old=top_n_old, type_list_old=type_list_old, object_gfk_old=object_gfk_old, ta_interval_old=ta_interval_old, language_tag_old=language_tag_old, ta_timestamp_old=ta_timestamp_old, mgr_login_name_old=mgr_login_name_old, log_params_dict_old=log_params_dict_old, top_n_from_newest_old=top_n_from_newest_old, filter_params_dict_old=filter_params_dict_old, object_type_fq_name_old=object_type_fq_name_old, sorting_params_list_old=sorting_params_list_old)]) if not res.ok: raise ExecutionError(res.status_code, res.reason, res.json() if "json" in res.headers["content-type"] else res.text) return [cls(**s) for s in res.json()[0]] diff --git a/4.1/version_numeric b/4.1/version_numeric index 736d0b358506a0c2e3b16ec2b3248b368515a50d..fe52238391ca144c0a6e419df31b7c080bb7ac0d 100644 --- a/4.1/version_numeric +++ b/4.1/version_numeric @@ -1 +1 @@ -4.1.141 \ No newline at end of file +4.1.146 \ No newline at end of file diff --git a/4.2/es/dns.ip_addr.js b/4.2/es/dns.ip_addr.js index 9784708d7595fbf35def99c4dc4aabfa0333e6c4..efb7607a3f75f1630039fbff8560bca1e591b632 100644 --- a/4.2/es/dns.ip_addr.js +++ b/4.2/es/dns.ip_addr.js @@ -14,28 +14,19 @@ import NETVSConfig from '@/../netvs.config' export default { bulk_createParamsList () { - return {'old': [ ], 'new': [ 'is_dhcp', 'value_stop', 'is_reserved', 'value_start']} + return {'old': [ ], 'new': [ 'is_dhcp', 'is_reserved']} }, - bulk_create (config, {is_dhcp_new = false, value_stop_new, is_reserved_new = false, value_start_new}) { - const params = { 'new': { 'is_dhcp': is_dhcp_new, 'value_stop': value_stop_new, 'is_reserved': is_reserved_new, 'value_start': value_start_new}, 'old': { }} + bulk_create (config, {is_dhcp_new = false, is_reserved_new = false}) { + const params = { 'new': { 'is_dhcp': is_dhcp_new, 'is_reserved': is_reserved_new}, 'old': { }} // TODO: Return ta-object instead return Axios.post(`${NETVSConfig.NETDB_API_BASE_URL}/${NETVSConfig.NETDB_API_VERSION}/dns/ip_addr/bulk_create`, params, (config || {}).netdb_axios_config) // eslint-disable-next-line comma-dangle }, - bulk_deleteParamsList () { - return {'old': [ 'value_stop', 'value_start'], 'new': [ ]} - }, - bulk_delete (config, {value_stop_old, value_start_old}) { - const params = { 'new': { }, 'old': { 'value_stop': value_stop_old, 'value_start': value_start_old}} - // TODO: Return ta-object instead - return Axios.post(`${NETVSConfig.NETDB_API_BASE_URL}/${NETVSConfig.NETDB_API_VERSION}/dns/ip_addr/bulk_delete`, params, (config || {}).netdb_axios_config) - // eslint-disable-next-line comma-dangle - }, bulk_updateParamsList () { - return {'old': [ 'value_stop', 'value_start'], 'new': [ 'is_dhcp', 'is_reserved']} + return {'old': [ 'cidr'], 'new': [ 'cidr', 'is_dhcp', 'is_reserved']} }, - bulk_update (config, {is_dhcp_new, value_stop_old, is_reserved_new, value_start_old}) { - const params = { 'new': { 'is_dhcp': is_dhcp_new, 'is_reserved': is_reserved_new}, 'old': { 'value_stop': value_stop_old, 'value_start': value_start_old}} + bulk_update (config, {cidr_old, cidr_new, is_dhcp_new, is_reserved_new}) { + const params = { 'new': { 'cidr': cidr_new, 'is_dhcp': is_dhcp_new, 'is_reserved': is_reserved_new}, 'old': { 'cidr': cidr_old}} // TODO: Return ta-object instead return Axios.post(`${NETVSConfig.NETDB_API_BASE_URL}/${NETVSConfig.NETDB_API_VERSION}/dns/ip_addr/bulk_update`, params, (config || {}).netdb_axios_config) // eslint-disable-next-line comma-dangle @@ -58,8 +49,8 @@ export default { return Axios.post(`${NETVSConfig.NETDB_API_BASE_URL}/${NETVSConfig.NETDB_API_VERSION}/dns/ip_addr/delete`, params, (config || {}).netdb_axios_config) // eslint-disable-next-line comma-dangle }, - list (config, { type, is_own, is_dhcp, gpk_list, value_cidr, value_list, fetch_limit, is_reserved, fetch_offset, is_rr_target, filter_params_dict, sorting_params_list }) { - const params = APIUtils.denullify_dict({ 'type': type, 'is_own': is_own, 'is_dhcp': is_dhcp, 'gpk_list': (gpk_list === null) ? null : JSON.stringify(gpk_list), 'value_cidr': value_cidr, 'value_list': (value_list === null) ? null : JSON.stringify(value_list), 'fetch_limit': fetch_limit, 'is_reserved': is_reserved, 'fetch_offset': fetch_offset, 'is_rr_target': is_rr_target, 'filter_params_dict': filter_params_dict, 'sorting_params_list': (sorting_params_list === null) ? null : JSON.stringify(sorting_params_list)}) + list (config, { cidr, type, is_own, is_dhcp, gpk_list, value_list, fetch_limit, is_reserved, fetch_offset, is_rr_target, filter_params_dict, sorting_params_list }) { + const params = APIUtils.denullify_dict({ 'cidr': cidr, 'type': type, 'is_own': is_own, 'is_dhcp': is_dhcp, 'gpk_list': (gpk_list === null) ? null : JSON.stringify(gpk_list), 'value_list': (value_list === null) ? null : JSON.stringify(value_list), 'fetch_limit': fetch_limit, 'is_reserved': is_reserved, 'fetch_offset': fetch_offset, 'is_rr_target': is_rr_target, 'filter_params_dict': filter_params_dict, 'sorting_params_list': (sorting_params_list === null) ? null : JSON.stringify(sorting_params_list)}) const cnf = {} Object.assign(cnf, (config || {}).netdb_axios_config) cnf.params = params @@ -67,10 +58,10 @@ export default { // eslint-disable-next-line comma-dangle }, updateParamsList () { - return {'old': [ 'value', 'value_cidr'], 'new': [ 'is_dhcp', 'value_cidr', 'is_reserved']} + return {'old': [ 'value'], 'new': [ 'is_dhcp', 'is_reserved']} }, - update (config, {value_old, is_dhcp_new, value_cidr_old, value_cidr_new, is_reserved_new}) { - const params = { 'new': { 'is_dhcp': is_dhcp_new, 'value_cidr': value_cidr_new, 'is_reserved': is_reserved_new}, 'old': { 'value': value_old, 'value_cidr': value_cidr_old}} + update (config, {value_old, is_dhcp_new, is_reserved_new}) { + const params = { 'new': { 'is_dhcp': is_dhcp_new, 'is_reserved': is_reserved_new}, 'old': { 'value': value_old}} // TODO: Return ta-object instead return Axios.post(`${NETVSConfig.NETDB_API_BASE_URL}/${NETVSConfig.NETDB_API_VERSION}/dns/ip_addr/update`, params, (config || {}).netdb_axios_config) // eslint-disable-next-line comma-dangle diff --git a/4.2/es/evlog.record.js b/4.2/es/evlog.record.js index fa001c67f063d230f89dcc8398c594e7851d4609..54e371b5d546be4d5e9b45695e9e58069bedd0d5 100644 --- a/4.2/es/evlog.record.js +++ b/4.2/es/evlog.record.js @@ -22,8 +22,8 @@ export default { return Axios.post(`${NETVSConfig.NETDB_API_BASE_URL}/${NETVSConfig.NETDB_API_VERSION}/evlog/record/create`, params, (config || {}).netdb_axios_config) // eslint-disable-next-line comma-dangle }, - list (config, { type, top_n, type_list, object_gfk, ta_interval, language_tag, ta_timestamp, mgr_login_name, log_param_state, log_param_value, log_params_dict, log_param_fq_name, top_n_from_newest = true, filter_params_dict, object_type_fq_name, sorting_params_list, log_param_value_regexp }) { - const params = APIUtils.denullify_dict({ 'type': type, 'top_n': top_n, 'type_list': (type_list === null) ? null : JSON.stringify(type_list), 'object_gfk': object_gfk, 'ta_interval': ta_interval, 'language_tag': language_tag, 'ta_timestamp': ta_timestamp, 'mgr_login_name': mgr_login_name, 'log_param_state': log_param_state, 'log_param_value': log_param_value, 'log_params_dict': log_params_dict, 'log_param_fq_name': log_param_fq_name, 'top_n_from_newest': top_n_from_newest, 'filter_params_dict': filter_params_dict, 'object_type_fq_name': object_type_fq_name, 'sorting_params_list': (sorting_params_list === null) ? null : JSON.stringify(sorting_params_list), 'log_param_value_regexp': log_param_value_regexp}) + list (config, { type, top_n, type_list, log_params, object_gfk, ta_interval, language_tag, ta_timestamp, mgr_login_name, top_n_from_newest = true, filter_params_dict, object_type_fq_name, sorting_params_list }) { + const params = APIUtils.denullify_dict({ 'type': type, 'top_n': top_n, 'type_list': (type_list === null) ? null : JSON.stringify(type_list), 'log_params': (log_params === null) ? null : JSON.stringify(log_params), 'object_gfk': object_gfk, 'ta_interval': ta_interval, 'language_tag': language_tag, 'ta_timestamp': ta_timestamp, 'mgr_login_name': mgr_login_name, 'top_n_from_newest': top_n_from_newest, 'filter_params_dict': filter_params_dict, 'object_type_fq_name': object_type_fq_name, 'sorting_params_list': (sorting_params_list === null) ? null : JSON.stringify(sorting_params_list)}) const cnf = {} Object.assign(cnf, (config || {}).netdb_axios_config) cnf.params = params diff --git a/4.2/functions.json b/4.2/functions.json index da18c004531b6bb1dc1925f843448e1f210067bb..52fcceb8d0411b812c57de7c95860015f16e1e94 100644 --- a/4.2/functions.json +++ b/4.2/functions.json @@ -113,14 +113,6 @@ "data_type": "boolean", "is_deprecated": false }, - "value_stop": { - "new": { - "is_nullable": false, - "is_required": false - }, - "data_type": "ip_address", - "is_deprecated": false - }, "is_reserved": { "new": { "is_nullable": false, @@ -129,41 +121,6 @@ }, "data_type": "boolean", "is_deprecated": false - }, - "value_start": { - "new": { - "is_nullable": false, - "is_required": true - }, - "data_type": "ip_address", - "is_deprecated": false - } - }, - "object_type": "ip_addr", - "is_returning": false, - "is_executable": true, - "is_data_manipulating": true - }, - { - "name": "bulk_delete", - "system": "dns", - "fq_name": "dns.ip_addr.bulk_delete", - "parameters": { - "value_stop": { - "old": { - "is_nullable": false, - "is_required": false - }, - "data_type": "ip_address", - "is_deprecated": false - }, - "value_start": { - "old": { - "is_nullable": false, - "is_required": true - }, - "data_type": "ip_address", - "is_deprecated": false } }, "object_type": "ip_addr", @@ -363,23 +320,19 @@ "system": "dns", "fq_name": "dns.ip_addr.bulk_update", "parameters": { - "is_dhcp": { + "cidr": { "new": { "is_nullable": false, - "is_required": false + "is_required": true }, - "data_type": "boolean", - "is_deprecated": false - }, - "value_stop": { "old": { "is_nullable": false, - "is_required": false + "is_required": true }, - "data_type": "ip_address", + "data_type": "ip_network", "is_deprecated": false }, - "is_reserved": { + "is_dhcp": { "new": { "is_nullable": false, "is_required": false @@ -387,12 +340,12 @@ "data_type": "boolean", "is_deprecated": false }, - "value_start": { - "old": { + "is_reserved": { + "new": { "is_nullable": false, "is_required": false }, - "data_type": "ip_address", + "data_type": "boolean", "is_deprecated": false } }, @@ -11735,6 +11688,14 @@ "system": "dns", "fq_name": "dns.ip_addr.list", "parameters": { + "cidr": { + "old": { + "is_nullable": false, + "is_required": false + }, + "data_type": "ip_network", + "is_deprecated": false + }, "type": { "old": { "is_nullable": false, @@ -11781,14 +11742,6 @@ "data_type": "uuid_array", "is_deprecated": false }, - "value_cidr": { - "old": { - "is_nullable": false, - "is_required": false - }, - "data_type": "ip_network", - "is_deprecated": false - }, "value_list": { "old": { "is_nullable": false, @@ -16082,6 +16035,14 @@ "data_type": "text_array", "is_deprecated": false }, + "log_params": { + "old": { + "is_nullable": false, + "is_required": false + }, + "data_type": "json_array_of_objects", + "is_deprecated": false + }, "object_gfk": { "old": { "is_nullable": false, @@ -16122,108 +16083,6 @@ "data_type": "text_kw_mc_long", "is_deprecated": false }, - "log_param_state": { - "old": { - "is_nullable": false, - "is_required": false - }, - "data_type": "integer8", - "is_deprecated": false, - "supported_values": { - "0": { - "de": null, - "en": null - }, - "1": { - "de": "ALT", - "en": "OLD" - }, - "2": { - "de": "NEU", - "en": "NEW" - }, - "3": { - "de": "REF", - "en": "REF" - }, - "4": { - "de": "IMP", - "en": "IMP" - }, - "5": { - "de": "QUELLE", - "en": "SRC" - }, - "6": { - "de": "ZIEL", - "en": "DST" - }, - "7": { - "de": "EGR", - "en": "EGR" - }, - "8": { - "de": "INGR", - "en": "INGR" - }, - "9": { - "de": "FK", - "en": "FK" - }, - "10": { - "de": "RK", - "en": "RK" - }, - "11": { - "de": "ORIG", - "en": "ORIG" - }, - "12": { - "de": "DUP", - "en": "DUP" - }, - "13": { - "de": "GEG", - "en": "GIVEN" - }, - "14": { - "de": "ERF", - "en": "RQRD" - }, - "15": { - "de": "TAKES", - "en": "TAKES" - }, - "16": { - "de": "RETS", - "en": "RETS" - } - } - }, - "log_param_value": { - "old": { - "is_nullable": false, - "is_required": false - }, - "data_type": "json", - "is_deprecated": false - }, - "log_params_dict": { - "old": { - "is_nullable": false, - "is_required": false - }, - "data_type": "json_object", - "is_deprecated": false - }, - "log_param_fq_name": { - "old": { - "is_nullable": false, - "is_required": false - }, - "data_type": "text_otattr_identifier", - "is_deprecated": false - }, "top_n_from_newest": { "old": { "is_nullable": false, @@ -16256,14 +16115,6 @@ }, "data_type": "text_array", "is_deprecated": false - }, - "log_param_value_regexp": { - "old": { - "is_nullable": false, - "is_required": false - }, - "data_type": "regexp", - "is_deprecated": false } }, "object_type": "record", @@ -21221,18 +21072,6 @@ "data_type": "boolean", "is_deprecated": false }, - "value_cidr": { - "new": { - "is_nullable": false, - "is_required": false - }, - "old": { - "is_nullable": false, - "is_required": false - }, - "data_type": "ip_network", - "is_deprecated": false - }, "is_reserved": { "new": { "is_nullable": false, diff --git a/4.2/golang/structs.go b/4.2/golang/structs.go index a4d3c9833e4f5a0e72a6e17e8eaefa4cea5e40c0..f3ab8bd88c75bdca610e9e29b9cbff576f977914 100644 --- a/4.2/golang/structs.go +++ b/4.2/golang/structs.go @@ -1000,14 +1000,14 @@ type WapiException struct { } type EvlogRecord struct { - Data *string `mapstructure:"data"` - Type string `mapstructure:"type"` - ObjectGfk string `mapstructure:"object_gfk"` - LanguageTag string `mapstructure:"language_tag"` - TaTimestamp string `mapstructure:"ta_timestamp"` - MgrLoginName *string `mapstructure:"mgr_login_name"` - LogParamsDict map[string]interface{} `mapstructure:"log_params_dict"` - ObjectTypeFqName string `mapstructure:"object_type_fq_name"` + Data *string `mapstructure:"data"` + Type string `mapstructure:"type"` + LogParams []map[string]interface{} `mapstructure:"log_params"` + ObjectGfk string `mapstructure:"object_gfk"` + LanguageTag string `mapstructure:"language_tag"` + TaTimestamp string `mapstructure:"ta_timestamp"` + MgrLoginName *string `mapstructure:"mgr_login_name"` + ObjectTypeFqName string `mapstructure:"object_type_fq_name"` } type CntlWapiAuth struct { diff --git a/4.2/objects.json b/4.2/objects.json index fdd7ab4617c9697aec34b3074fc736062bc9168e..e81a02f0a64c3c0fb14d7a77b0b4916a9fb22a0e 100644 --- a/4.2/objects.json +++ b/4.2/objects.json @@ -18275,6 +18275,12 @@ "is_nullable": false, "is_deprecated": false }, + "log_params": { + "is_core": true, + "data_type": "json_array_of_objects", + "is_nullable": false, + "is_deprecated": false + }, "object_gfk": { "is_core": true, "data_type": "uuid", @@ -18299,12 +18305,6 @@ "is_nullable": true, "is_deprecated": false }, - "log_params_dict": { - "is_core": true, - "data_type": "json_object", - "is_nullable": false, - "is_deprecated": false - }, "object_type_fq_name": { "is_core": true, "data_type": "text_ot_identifier", diff --git a/4.2/openapi.yml b/4.2/openapi.yml index 1edc33639c5824804630add1dba108dd4e888840..47409bc6452be6a4f69654dad65ea44db0ceaba3 100644 --- a/4.2/openapi.yml +++ b/4.2/openapi.yml @@ -2045,24 +2045,19 @@ components: language_tag: description: Kurzzeichen der Sprache type: string - log_params_dict: - description: "Parameter-Dict des Log-Eintrags. Schl\xFCssel: voll qualifizierter\ - \ WebAPI-Attribut-Name, Werte: Dict der Form '{\"<num_state>\": <value>}'.\ - \ Bei der Funktion 'list' k\xF6nnen Abfragetupel formuliert werden, wobei\ - \ effektiv maximal 10 Tupel erlaubt sind. Alle Tupelabfragen werden logisch\ - \ UND-verkn\xFCpft. Das Parameter-Dict kann folgende Werte haben: 1. Wert\ - \ ist Dict: Suche nach Tupel aus Parameternamen, Status, Wert. Status\ - \ \"<num_state>\" kann Leerstring sein, um Parameterwerte unabh\xE4ngig\ - \ vom Status abzufragen. Das Dict kann leer sein, falls nur nach Parameternamen\ - \ (WebAPI-Attribut-Namen) gesucht werden soll. 2. Wert ist null: analog\ - \ leeres Dict. 3. Wert ist String: String wird als regul\xE4rer Ausdruck\ - \ (regexp) f\xFCr <value> in Textform gewertet. Bei dieser Form ist keine\ - \ Statusangabe m\xF6glich, daher wird der Status ignoriert. Alle anderen\ - \ Werte des Paramter-Dicts (die nicht die beschriebene Form erf\xFCllen)\ - \ f\xFChren zur Nicht\xFCbereinstimmung, dh. es werden keine Daten zur\xFC\ - ckgegeben. Ung\xFCltige Parameterstati f\xFChren ebenfalls zur Nicht\xFC\ - bereinstimmung, und ung\xFCltige Parameternamen erzeugen eine Fehlermeldung." - type: object + log_params: + description: "Parameterliste des Log-Eintrags (Array-of-Dicts). Ein Dict\ + \ hat die Schl\xFCssel: 'fq_name' (Parametername als voll qualifizierter\ + \ WebAPI-Attribut-Name), 'state' (numerischer Parameterstatus), 'value'\ + \ (Parameterwert), 'value_regexp' (regul\xE4rer Ausdruck f\xFCr den Parameterwert;\ + \ nur bei der Funktion 'list' verwendbar. Bei der Funktion 'list' kann\ + \ f\xFCr einen gesuchten Log-Parameter ein Abfragetupel als Dict formuliert\ + \ werden, wobei effektiv maximal 10 Tupel erlaubt sind. Die Position der\ + \ Dicts im Array spielt keine Rolle; alle Abfragetupel werden logisch\ + \ UND-verkn\xFCpft. Ung\xFCltige Parameternamen erzeugen eine Fehlermeldung." + items: + type: string + type: array mgr_login_name: description: Benutzerkonto, das den Log-Datensatz erzeugt hat type: string @@ -2071,7 +2066,7 @@ components: \ Objektes" type: string object_type_fq_name: - description: Objekttyp des Log-Datensatzes + description: voll qualifizierter Objekttypname des Log-Datensatzes type: string ta_timestamp: description: "Zeitstempel der Log-Transaktion. Alle Log-Datens\xE4tze ein\ @@ -3746,7 +3741,7 @@ components: description: '' properties: base_value: - description: '' + description: "Zugeh\xF6riger Basiswert des generierten CIDR-Objektes" type: string value: description: CIDR-Notation des generierten CIDR-Objektes @@ -4086,7 +4081,7 @@ info: \ nicht Bestandteil dieser Dokumentation, sondern \xFCber selbstdokumentierende\ \ Indexabfragen der WebAPI erreichbar." title: SCC NETDB-API - version: 4.2.110 + version: 4.2.2 openapi: 3.0.3 paths: /cntl/column/create: @@ -15029,57 +15024,6 @@ paths: \ reserviert" nullable: false type: boolean - value_start: - description: "erste Adresse des zu behandelnden IP-Adre\xDF\ - blocks (nicht in Kombination mit value_cidr erlaubt)" - nullable: false - type: string - value_stop: - description: "letzte Adresse des zu behandelnden IP-Adre\xDF\ - blocks (nicht in Kombination mit value_cidr erlaubt)" - nullable: false - type: string - required: - - value_start - type: object - type: object - required: true - responses: - 200: - description: Request erfolgreich - 400: - description: Eingabefehler - 401: - description: Unautorisiert - 500: - description: Interner Serverfehler - security: - - api_key: [] - tags: - - dns - /dns/ip_addr/bulk_delete: - post: - requestBody: - content: - application/json: - schema: - properties: - old: - description: Alte Attribute zur einduetigen Identifizierung des - Objekts - properties: - value_start: - description: "erste Adresse des zu behandelnden IP-Adre\xDF\ - blocks (nicht in Kombination mit value_cidr erlaubt)" - nullable: false - type: string - value_stop: - description: "letzte Adresse des zu behandelnden IP-Adre\xDF\ - blocks (nicht in Kombination mit value_cidr erlaubt)" - nullable: false - type: string - required: - - value_start type: object type: object required: true @@ -15106,6 +15050,10 @@ paths: new: description: Neue Angaben properties: + cidr: + description: IP-Subnetzangabe in CIDR-Notation + nullable: false + type: string is_dhcp: description: "Die IP-Adresse geh\xF6rt zum DHCP-Adre\xDFpool\ \ des Subnetzes" @@ -15116,21 +15064,19 @@ paths: \ reserviert" nullable: false type: boolean + required: + - cidr type: object old: description: Alte Attribute zur einduetigen Identifizierung des Objekts properties: - value_start: - description: "erste Adresse des zu behandelnden IP-Adre\xDF\ - blocks (nicht in Kombination mit value_cidr erlaubt)" - nullable: false - type: string - value_stop: - description: "letzte Adresse des zu behandelnden IP-Adre\xDF\ - blocks (nicht in Kombination mit value_cidr erlaubt)" + cidr: + description: IP-Subnetzangabe in CIDR-Notation nullable: false type: string + required: + - cidr type: object type: object required: true @@ -15235,6 +15181,13 @@ paths: /dns/ip_addr/list: get: parameters: + - description: IP-Subnetzangabe in CIDR-Notation + in: query + name: cidr + required: false + schema: + nullable: false + type: string - description: "IP-Protokollversion der Adresse\n\n0: \n4: \n6: " in: query name: type @@ -15269,15 +15222,6 @@ paths: format: '["value1","value2",...]' nullable: false type: string - - description: "CIDR-Ausdruck f\xFCr Adressen (die zu behandelnden Adressen\ - \ passen in den CIDR-Ausdruck). Nicht in Kombination mit value_start oder\ - \ value_stop erlaubt." - in: query - name: value_cidr - required: false - schema: - nullable: false - type: string - description: 'Liste aus: IP-Adresse' in: query name: value_list @@ -15383,12 +15327,6 @@ paths: \ reserviert" nullable: false type: boolean - value_cidr: - description: "CIDR-Ausdruck f\xFCr Adressen (die zu behandelnden\ - \ Adressen passen in den CIDR-Ausdruck). Nicht in Kombination\ - \ mit value_start oder value_stop erlaubt." - nullable: false - type: string type: object old: description: Alte Attribute zur einduetigen Identifizierung des @@ -15398,12 +15336,6 @@ paths: description: IP-Adresse nullable: false type: string - value_cidr: - description: "CIDR-Ausdruck f\xFCr Adressen (die zu behandelnden\ - \ Adressen passen in den CIDR-Ausdruck). Nicht in Kombination\ - \ mit value_start oder value_stop erlaubt." - nullable: false - type: string type: object type: object required: true @@ -18993,7 +18925,7 @@ paths: nullable: false type: number object_type_fq_name: - description: Objekttyp des Log-Datensatzes + description: voll qualifizierter Objekttypname des Log-Datensatzes nullable: false type: string ta_timestamp: @@ -19064,6 +18996,22 @@ paths: format: '["value1","value2",...]' nullable: false type: string + - description: "Parameterliste des Log-Eintrags (Array-of-Dicts). Ein Dict hat\ + \ die Schl\xFCssel: 'fq_name' (Parametername als voll qualifizierter WebAPI-Attribut-Name),\ + \ 'state' (numerischer Parameterstatus), 'value' (Parameterwert), 'value_regexp'\ + \ (regul\xE4rer Ausdruck f\xFCr den Parameterwert; nur bei der Funktion\ + \ 'list' verwendbar. Bei der Funktion 'list' kann f\xFCr einen gesuchten\ + \ Log-Parameter ein Abfragetupel als Dict formuliert werden, wobei effektiv\ + \ maximal 10 Tupel erlaubt sind. Die Position der Dicts im Array spielt\ + \ keine Rolle; alle Abfragetupel werden logisch UND-verkn\xFCpft. Ung\xFC\ + ltige Parameternamen erzeugen eine Fehlermeldung." + in: query + name: log_params + required: false + schema: + format: '["value1","value2",...]' + nullable: false + type: string - description: "Referenz zu globalem Prim\xE4rschl\xFCssel des zugeh\xF6rigen\ \ Objektes" in: query @@ -19103,69 +19051,6 @@ paths: schema: nullable: false type: string - - description: "Status des Objektattributes im Kontext der Funktion bzw. des\ - \ Transaktionsinhaltes\n\n0: \n1: OLD\n2: NEW\n3: REF\n4: IMP\n5: SRC\n\ - 6: DST\n7: EGR\n8: INGR\n9: FK\n10: RK\n11: ORIG\n12: DUP\n13: GIVEN\n14:\ - \ RQRD\n15: TAKES\n16: RETS" - in: query - name: log_param_state - required: false - schema: - enum: - - '0' - - '1' - - '2' - - '3' - - '4' - - '5' - - '6' - - '7' - - '8' - - '9' - - '10' - - '11' - - '12' - - '13' - - '14' - - '15' - - '16' - nullable: false - type: number - - description: WebAPI-Attributwert - in: query - name: log_param_value - required: false - schema: - nullable: false - - description: "Parameter-Dict des Log-Eintrags. Schl\xFCssel: voll qualifizierter\ - \ WebAPI-Attribut-Name, Werte: Dict der Form '{\"<num_state>\": <value>}'.\ - \ Bei der Funktion 'list' k\xF6nnen Abfragetupel formuliert werden, wobei\ - \ effektiv maximal 10 Tupel erlaubt sind. Alle Tupelabfragen werden logisch\ - \ UND-verkn\xFCpft. Das Parameter-Dict kann folgende Werte haben: 1. Wert\ - \ ist Dict: Suche nach Tupel aus Parameternamen, Status, Wert. Status \"\ - <num_state>\" kann Leerstring sein, um Parameterwerte unabh\xE4ngig vom\ - \ Status abzufragen. Das Dict kann leer sein, falls nur nach Parameternamen\ - \ (WebAPI-Attribut-Namen) gesucht werden soll. 2. Wert ist null: analog\ - \ leeres Dict. 3. Wert ist String: String wird als regul\xE4rer Ausdruck\ - \ (regexp) f\xFCr <value> in Textform gewertet. Bei dieser Form ist keine\ - \ Statusangabe m\xF6glich, daher wird der Status ignoriert. Alle anderen\ - \ Werte des Paramter-Dicts (die nicht die beschriebene Form erf\xFCllen)\ - \ f\xFChren zur Nicht\xFCbereinstimmung, dh. es werden keine Daten zur\xFC\ - ckgegeben. Ung\xFCltige Parameterstati f\xFChren ebenfalls zur Nicht\xFC\ - bereinstimmung, und ung\xFCltige Parameternamen erzeugen eine Fehlermeldung." - in: query - name: log_params_dict - required: false - schema: - nullable: false - type: object - - description: WebAPI-Attributname der Form <system>.<objekttypname>.<attributname> - in: query - name: log_param_fq_name - required: false - schema: - nullable: false - type: string - description: "True: Das Limit wird vom Ende des Zeitfensters absteigend gez\xE4\ hlt (Abfrage beginnt mit neuester TA). False: das Limit wird vom Anfang\ \ des Zeitfensters aufsteigend gez\xE4hlt (Abfrage beginnt mit \xE4ltester\ @@ -19190,7 +19075,7 @@ paths: schema: nullable: false type: object - - description: Objekttyp des Log-Datensatzes + - description: voll qualifizierter Objekttypname des Log-Datensatzes in: query name: object_type_fq_name required: false @@ -19207,14 +19092,6 @@ paths: format: '["value1","value2",...]' nullable: false type: string - - description: "Regul\xE4rer Ausdruck des Suchmusters f\xFCr Parameterwerte\ - \ in Log-Daten" - in: query - name: log_param_value_regexp - required: false - schema: - nullable: false - type: string responses: 200: content: @@ -32604,7 +32481,9 @@ paths: schema: nullable: true type: number - - description: Liste der CIDR-Notationen der Basis-CIDR-Objekte + - description: Liste der CIDR-Notationen der Basis-CIDR-Objekte. Die Ausgabe + aller generierten CIDR-Objekte erfolgt immer in positionaler Reihenfolge + dieser Basisobjekte, und innerhalb eines Basisobjektes aufsteigend. in: query name: base_value_list required: false diff --git a/4.2/python/dns.py b/4.2/python/dns.py index 9083450189a98d236147f5598a8ec511906b0787..b0d648fb49c877463883d60535adef5193ee41bc 100644 --- a/4.2/python/dns.py +++ b/4.2/python/dns.py @@ -576,83 +576,53 @@ class IpAddr(APIObject): raise ValueError(f"'is_rr_target' of incorrect type. Expected bool, got {type(self.is_rr_target)}") @staticmethod - def bulk_create_ta(value_start_new: str, is_dhcp_new: bool = False, value_stop_new: str = None, is_reserved_new: bool = False) -> dict: + def bulk_create_ta(is_dhcp_new: bool = False, is_reserved_new: bool = False) -> dict: if is_dhcp_new is not None and not (isinstance(is_dhcp_new, bool)): raise ValueError(f"'is_dhcp' of incorrect type. Expected bool, got {type(is_dhcp_new)}") - if value_stop_new is not None and not (isinstance(value_stop_new, str)): - raise ValueError(f"'value_stop' of incorrect type. Expected str, got {type(value_stop_new)}") if is_reserved_new is not None and not (isinstance(is_reserved_new, bool)): raise ValueError(f"'is_reserved' of incorrect type. Expected bool, got {type(is_reserved_new)}") - if not (isinstance(value_start_new, str)): - raise ValueError(f"'value_start' of incorrect type. Expected str, got {type(value_start_new)}") - return {'name': 'dns.ip_addr.bulk_create', 'new': _denullify_dict({'is_dhcp': is_dhcp_new, 'value_stop': value_stop_new, 'is_reserved': is_reserved_new, 'value_start': value_start_new}), 'old': _denullify_dict({})} + return {'name': 'dns.ip_addr.bulk_create', 'new': _denullify_dict({'is_dhcp': is_dhcp_new, 'is_reserved': is_reserved_new}), 'old': _denullify_dict({})} # TODO: Consider is_returning @classmethod - def bulk_create(cls, api_session: APISession, value_start_new: str, is_dhcp_new: bool = False, value_stop_new: str = None, is_reserved_new: bool = False) -> list: + def bulk_create(cls, api_session: APISession, is_dhcp_new: bool = False, is_reserved_new: bool = False) -> list: if is_dhcp_new is not None and not (isinstance(is_dhcp_new, bool)): raise ValueError(f"'is_dhcp' of incorrect type. Expected bool, got {type(is_dhcp_new)}") - if value_stop_new is not None and not (isinstance(value_stop_new, str)): - raise ValueError(f"'value_stop' of incorrect type. Expected str, got {type(value_stop_new)}") if is_reserved_new is not None and not (isinstance(is_reserved_new, bool)): raise ValueError(f"'is_reserved' of incorrect type. Expected bool, got {type(is_reserved_new)}") - if not (isinstance(value_start_new, str)): - raise ValueError(f"'value_start' of incorrect type. Expected str, got {type(value_start_new)}") - res = api_session.session.post(api_session.base_url + '/wapi/transaction/execute', json=[cls.bulk_create_ta(is_dhcp_new=is_dhcp_new, value_stop_new=value_stop_new, is_reserved_new=is_reserved_new, value_start_new=value_start_new, )]) + res = api_session.session.post(api_session.base_url + '/wapi/transaction/execute', json=[cls.bulk_create_ta(is_dhcp_new=is_dhcp_new, is_reserved_new=is_reserved_new, )]) if not res.ok: raise ExecutionError(res.status_code, res.reason, res.json() if "json" in res.headers["content-type"] else res.text) return [cls(**s) for s in res.json()[0]] @staticmethod - def bulk_delete_ta(value_start_old: str, value_stop_old: str = None) -> dict: - if value_stop_old is not None and not (isinstance(value_stop_old, str)): - raise ValueError(f"'value_stop' of incorrect type. Expected str, got {type(value_stop_old)}") - if not (isinstance(value_start_old, str)): - raise ValueError(f"'value_start' of incorrect type. Expected str, got {type(value_start_old)}") - - return {'name': 'dns.ip_addr.bulk_delete', 'new': _denullify_dict({}), 'old': _denullify_dict({'value_stop': value_stop_old, 'value_start': value_start_old})} - - # TODO: Consider is_returning - @classmethod - def bulk_delete(cls, api_session: APISession, value_start_old: str, value_stop_old: str = None) -> list: - if value_stop_old is not None and not (isinstance(value_stop_old, str)): - raise ValueError(f"'value_stop' of incorrect type. Expected str, got {type(value_stop_old)}") - if not (isinstance(value_start_old, str)): - raise ValueError(f"'value_start' of incorrect type. Expected str, got {type(value_start_old)}") - - res = api_session.session.post(api_session.base_url + '/wapi/transaction/execute', json=[cls.bulk_delete_ta(value_stop_old=value_stop_old, value_start_old=value_start_old)]) - if not res.ok: - raise ExecutionError(res.status_code, res.reason, res.json() if "json" in res.headers["content-type"] else res.text) - return [cls(**s) for s in res.json()[0]] - - @staticmethod - def bulk_update_ta(is_dhcp_new: bool = None, is_reserved_new: bool = None, value_stop_old: str = None, value_start_old: str = None) -> dict: + def bulk_update_ta(cidr_new: str, cidr_old: str, is_dhcp_new: bool = None, is_reserved_new: bool = None) -> dict: + if not (isinstance(cidr_new, str)): + raise ValueError(f"'cidr' of incorrect type. Expected str, got {type(cidr_new)}") if is_dhcp_new is not None and not (isinstance(is_dhcp_new, bool)): raise ValueError(f"'is_dhcp' of incorrect type. Expected bool, got {type(is_dhcp_new)}") if is_reserved_new is not None and not (isinstance(is_reserved_new, bool)): raise ValueError(f"'is_reserved' of incorrect type. Expected bool, got {type(is_reserved_new)}") - if value_stop_old is not None and not (isinstance(value_stop_old, str)): - raise ValueError(f"'value_stop' of incorrect type. Expected str, got {type(value_stop_old)}") - if value_start_old is not None and not (isinstance(value_start_old, str)): - raise ValueError(f"'value_start' of incorrect type. Expected str, got {type(value_start_old)}") + if not (isinstance(cidr_old, str)): + raise ValueError(f"'cidr' of incorrect type. Expected str, got {type(cidr_old)}") - return {'name': 'dns.ip_addr.bulk_update', 'new': _denullify_dict({'is_dhcp': is_dhcp_new, 'is_reserved': is_reserved_new}), 'old': _denullify_dict({'value_stop': value_stop_old, 'value_start': value_start_old})} + return {'name': 'dns.ip_addr.bulk_update', 'new': _denullify_dict({'cidr': cidr_new, 'is_dhcp': is_dhcp_new, 'is_reserved': is_reserved_new}), 'old': _denullify_dict({'cidr': cidr_old})} # TODO: Consider is_returning @classmethod - def bulk_update(cls, api_session: APISession, is_dhcp_new: bool = None, is_reserved_new: bool = None, value_stop_old: str = None, value_start_old: str = None) -> list: + def bulk_update(cls, api_session: APISession, cidr_new: str, cidr_old: str, is_dhcp_new: bool = None, is_reserved_new: bool = None) -> list: + if not (isinstance(cidr_new, str)): + raise ValueError(f"'cidr' of incorrect type. Expected str, got {type(cidr_new)}") if is_dhcp_new is not None and not (isinstance(is_dhcp_new, bool)): raise ValueError(f"'is_dhcp' of incorrect type. Expected bool, got {type(is_dhcp_new)}") if is_reserved_new is not None and not (isinstance(is_reserved_new, bool)): raise ValueError(f"'is_reserved' of incorrect type. Expected bool, got {type(is_reserved_new)}") - if value_stop_old is not None and not (isinstance(value_stop_old, str)): - raise ValueError(f"'value_stop' of incorrect type. Expected str, got {type(value_stop_old)}") - if value_start_old is not None and not (isinstance(value_start_old, str)): - raise ValueError(f"'value_start' of incorrect type. Expected str, got {type(value_start_old)}") + if not (isinstance(cidr_old, str)): + raise ValueError(f"'cidr' of incorrect type. Expected str, got {type(cidr_old)}") - res = api_session.session.post(api_session.base_url + '/wapi/transaction/execute', json=[cls.bulk_update_ta(is_dhcp_new=is_dhcp_new, is_reserved_new=is_reserved_new, value_stop_old=value_stop_old, value_start_old=value_start_old)]) + res = api_session.session.post(api_session.base_url + '/wapi/transaction/execute', json=[cls.bulk_update_ta(cidr_new=cidr_new, is_dhcp_new=is_dhcp_new, is_reserved_new=is_reserved_new, cidr_old=cidr_old)]) if not res.ok: raise ExecutionError(res.status_code, res.reason, res.json() if "json" in res.headers["content-type"] else res.text) return [cls(**s) for s in res.json()[0]] @@ -702,7 +672,9 @@ class IpAddr(APIObject): return [cls(**s) for s in res.json()[0]] @staticmethod - def list_ta(type_old: str = None, is_own_old: bool = None, is_dhcp_old: bool = None, gpk_list_old: list = None, value_cidr_old: str = None, value_list_old: list = None, fetch_limit_old: int = None, is_reserved_old: bool = None, fetch_offset_old: int = None, is_rr_target_old: bool = None, filter_params_dict_old: dict = None, sorting_params_list_old: list = None) -> dict: + def list_ta(cidr_old: str = None, type_old: str = None, is_own_old: bool = None, is_dhcp_old: bool = None, gpk_list_old: list = None, value_list_old: list = None, fetch_limit_old: int = None, is_reserved_old: bool = None, fetch_offset_old: int = None, is_rr_target_old: bool = None, filter_params_dict_old: dict = None, sorting_params_list_old: list = None) -> dict: + if cidr_old is not None and not (isinstance(cidr_old, str)): + raise ValueError(f"'cidr' of incorrect type. Expected str, got {type(cidr_old)}") if type_old is not None and not (isinstance(type_old, str)): raise ValueError(f"'type' of incorrect type. Expected str, got {type(type_old)}") if is_own_old is not None and not (isinstance(is_own_old, bool)): @@ -711,8 +683,6 @@ class IpAddr(APIObject): raise ValueError(f"'is_dhcp' of incorrect type. Expected bool, got {type(is_dhcp_old)}") if gpk_list_old is not None and not (isinstance(gpk_list_old, list)): raise ValueError(f"'gpk_list' of incorrect type. Expected list, got {type(gpk_list_old)}") - if value_cidr_old is not None and not (isinstance(value_cidr_old, str)): - raise ValueError(f"'value_cidr' of incorrect type. Expected str, got {type(value_cidr_old)}") if value_list_old is not None and not (isinstance(value_list_old, list)): raise ValueError(f"'value_list' of incorrect type. Expected list, got {type(value_list_old)}") if fetch_limit_old is not None and not (isinstance(fetch_limit_old, int)): @@ -728,11 +698,13 @@ class IpAddr(APIObject): if sorting_params_list_old is not None and not (isinstance(sorting_params_list_old, list)): raise ValueError(f"'sorting_params_list' of incorrect type. Expected list, got {type(sorting_params_list_old)}") - return {'name': 'dns.ip_addr.list', 'new': _denullify_dict({}), 'old': _denullify_dict({'type': type_old, 'is_own': is_own_old, 'is_dhcp': is_dhcp_old, 'gpk_list': gpk_list_old, 'value_cidr': value_cidr_old, 'value_list': value_list_old, 'fetch_limit': fetch_limit_old, 'is_reserved': is_reserved_old, 'fetch_offset': fetch_offset_old, 'is_rr_target': is_rr_target_old, 'filter_params_dict': filter_params_dict_old, 'sorting_params_list': sorting_params_list_old})} + return {'name': 'dns.ip_addr.list', 'new': _denullify_dict({}), 'old': _denullify_dict({'cidr': cidr_old, 'type': type_old, 'is_own': is_own_old, 'is_dhcp': is_dhcp_old, 'gpk_list': gpk_list_old, 'value_list': value_list_old, 'fetch_limit': fetch_limit_old, 'is_reserved': is_reserved_old, 'fetch_offset': fetch_offset_old, 'is_rr_target': is_rr_target_old, 'filter_params_dict': filter_params_dict_old, 'sorting_params_list': sorting_params_list_old})} # TODO: Consider is_returning @classmethod - def list(cls, api_session: APISession, type_old: str = None, is_own_old: bool = None, is_dhcp_old: bool = None, gpk_list_old: list = None, value_cidr_old: str = None, value_list_old: list = None, fetch_limit_old: int = None, is_reserved_old: bool = None, fetch_offset_old: int = None, is_rr_target_old: bool = None, filter_params_dict_old: dict = None, sorting_params_list_old: list = None) -> list: + def list(cls, api_session: APISession, cidr_old: str = None, type_old: str = None, is_own_old: bool = None, is_dhcp_old: bool = None, gpk_list_old: list = None, value_list_old: list = None, fetch_limit_old: int = None, is_reserved_old: bool = None, fetch_offset_old: int = None, is_rr_target_old: bool = None, filter_params_dict_old: dict = None, sorting_params_list_old: list = None) -> list: + if cidr_old is not None and not (isinstance(cidr_old, str)): + raise ValueError(f"'cidr' of incorrect type. Expected str, got {type(cidr_old)}") if type_old is not None and not (isinstance(type_old, str)): raise ValueError(f"'type' of incorrect type. Expected str, got {type(type_old)}") if is_own_old is not None and not (isinstance(is_own_old, bool)): @@ -741,8 +713,6 @@ class IpAddr(APIObject): raise ValueError(f"'is_dhcp' of incorrect type. Expected bool, got {type(is_dhcp_old)}") if gpk_list_old is not None and not (isinstance(gpk_list_old, list)): raise ValueError(f"'gpk_list' of incorrect type. Expected list, got {type(gpk_list_old)}") - if value_cidr_old is not None and not (isinstance(value_cidr_old, str)): - raise ValueError(f"'value_cidr' of incorrect type. Expected str, got {type(value_cidr_old)}") if value_list_old is not None and not (isinstance(value_list_old, list)): raise ValueError(f"'value_list' of incorrect type. Expected list, got {type(value_list_old)}") if fetch_limit_old is not None and not (isinstance(fetch_limit_old, int)): @@ -758,41 +728,33 @@ class IpAddr(APIObject): if sorting_params_list_old is not None and not (isinstance(sorting_params_list_old, list)): raise ValueError(f"'sorting_params_list' of incorrect type. Expected list, got {type(sorting_params_list_old)}") - res = api_session.session.post(api_session.base_url + '/wapi/transaction/execute', json=[cls.list_ta(type_old=type_old, is_own_old=is_own_old, is_dhcp_old=is_dhcp_old, gpk_list_old=gpk_list_old, value_cidr_old=value_cidr_old, value_list_old=value_list_old, fetch_limit_old=fetch_limit_old, is_reserved_old=is_reserved_old, fetch_offset_old=fetch_offset_old, is_rr_target_old=is_rr_target_old, filter_params_dict_old=filter_params_dict_old, sorting_params_list_old=sorting_params_list_old)]) + res = api_session.session.post(api_session.base_url + '/wapi/transaction/execute', json=[cls.list_ta(cidr_old=cidr_old, type_old=type_old, is_own_old=is_own_old, is_dhcp_old=is_dhcp_old, gpk_list_old=gpk_list_old, value_list_old=value_list_old, fetch_limit_old=fetch_limit_old, is_reserved_old=is_reserved_old, fetch_offset_old=fetch_offset_old, is_rr_target_old=is_rr_target_old, filter_params_dict_old=filter_params_dict_old, sorting_params_list_old=sorting_params_list_old)]) if not res.ok: raise ExecutionError(res.status_code, res.reason, res.json() if "json" in res.headers["content-type"] else res.text) return [cls(**s) for s in res.json()[0]] @staticmethod - def update_ta(is_dhcp_new: bool = None, value_cidr_new: str = None, is_reserved_new: bool = None, value_old: str = None, value_cidr_old: str = None) -> dict: + def update_ta(is_dhcp_new: bool = None, is_reserved_new: bool = None, value_old: str = None) -> dict: if is_dhcp_new is not None and not (isinstance(is_dhcp_new, bool)): raise ValueError(f"'is_dhcp' of incorrect type. Expected bool, got {type(is_dhcp_new)}") - if value_cidr_new is not None and not (isinstance(value_cidr_new, str)): - raise ValueError(f"'value_cidr' of incorrect type. Expected str, got {type(value_cidr_new)}") if is_reserved_new is not None and not (isinstance(is_reserved_new, bool)): raise ValueError(f"'is_reserved' of incorrect type. Expected bool, got {type(is_reserved_new)}") if value_old is not None and not (isinstance(value_old, str)): raise ValueError(f"'value' of incorrect type. Expected str, got {type(value_old)}") - if value_cidr_old is not None and not (isinstance(value_cidr_old, str)): - raise ValueError(f"'value_cidr' of incorrect type. Expected str, got {type(value_cidr_old)}") - return {'name': 'dns.ip_addr.update', 'new': _denullify_dict({'is_dhcp': is_dhcp_new, 'value_cidr': value_cidr_new, 'is_reserved': is_reserved_new}), 'old': _denullify_dict({'value': value_old, 'value_cidr': value_cidr_old})} + return {'name': 'dns.ip_addr.update', 'new': _denullify_dict({'is_dhcp': is_dhcp_new, 'is_reserved': is_reserved_new}), 'old': _denullify_dict({'value': value_old})} # TODO: Consider is_returning @classmethod - def update(cls, api_session: APISession, is_dhcp_new: bool = None, value_cidr_new: str = None, is_reserved_new: bool = None, value_old: str = None, value_cidr_old: str = None) -> list: + def update(cls, api_session: APISession, is_dhcp_new: bool = None, is_reserved_new: bool = None, value_old: str = None) -> list: if is_dhcp_new is not None and not (isinstance(is_dhcp_new, bool)): raise ValueError(f"'is_dhcp' of incorrect type. Expected bool, got {type(is_dhcp_new)}") - if value_cidr_new is not None and not (isinstance(value_cidr_new, str)): - raise ValueError(f"'value_cidr' of incorrect type. Expected str, got {type(value_cidr_new)}") if is_reserved_new is not None and not (isinstance(is_reserved_new, bool)): raise ValueError(f"'is_reserved' of incorrect type. Expected bool, got {type(is_reserved_new)}") if value_old is not None and not (isinstance(value_old, str)): raise ValueError(f"'value' of incorrect type. Expected str, got {type(value_old)}") - if value_cidr_old is not None and not (isinstance(value_cidr_old, str)): - raise ValueError(f"'value_cidr' of incorrect type. Expected str, got {type(value_cidr_old)}") - res = api_session.session.post(api_session.base_url + '/wapi/transaction/execute', json=[cls.update_ta(is_dhcp_new=is_dhcp_new, value_cidr_new=value_cidr_new, is_reserved_new=is_reserved_new, value_old=value_old, value_cidr_old=value_cidr_old)]) + res = api_session.session.post(api_session.base_url + '/wapi/transaction/execute', json=[cls.update_ta(is_dhcp_new=is_dhcp_new, is_reserved_new=is_reserved_new, value_old=value_old)]) if not res.ok: raise ExecutionError(res.status_code, res.reason, res.json() if "json" in res.headers["content-type"] else res.text) return [cls(**s) for s in res.json()[0]] diff --git a/4.2/python/evlog.py b/4.2/python/evlog.py index 9c376b41548f9021293231175804dcd0f0e3003b..a170a4f6f5b82e4f07e6d38de9adf4b0de800b42 100644 --- a/4.2/python/evlog.py +++ b/4.2/python/evlog.py @@ -116,11 +116,11 @@ class RecordType(APIObject): class Record(APIObject): data: str type: str + log_params: list object_gfk: str language_tag: str ta_timestamp: str mgr_login_name: str - log_params_dict: dict object_type_fq_name: str def __post_init__(self): @@ -128,6 +128,8 @@ class Record(APIObject): raise ValueError(f"'data' of incorrect type. Expected str, got {type(self.data)}") if not isinstance(self.type, str): raise ValueError(f"'type' of incorrect type. Expected str, got {type(self.type)}") + if not isinstance(self.log_params, list): + raise ValueError(f"'log_params' of incorrect type. Expected list, got {type(self.log_params)}") if not isinstance(self.object_gfk, str): raise ValueError(f"'object_gfk' of incorrect type. Expected str, got {type(self.object_gfk)}") if not isinstance(self.language_tag, str): @@ -136,8 +138,6 @@ class Record(APIObject): raise ValueError(f"'ta_timestamp' of incorrect type. Expected str, got {type(self.ta_timestamp)}") if self.mgr_login_name is not None and not isinstance(self.mgr_login_name, str): raise ValueError(f"'mgr_login_name' of incorrect type. Expected str, got {type(self.mgr_login_name)}") - if not isinstance(self.log_params_dict, dict): - raise ValueError(f"'log_params_dict' of incorrect type. Expected dict, got {type(self.log_params_dict)}") if not isinstance(self.object_type_fq_name, str): raise ValueError(f"'object_type_fq_name' of incorrect type. Expected str, got {type(self.object_type_fq_name)}") @@ -180,13 +180,15 @@ class Record(APIObject): return [cls(**s) for s in res.json()[0]] @staticmethod - def list_ta(type_old: str = None, top_n_old: int = None, type_list_old: list = None, object_gfk_old: str = None, ta_interval_old: str = None, language_tag_old: str = None, ta_timestamp_old: str = None, mgr_login_name_old: str = None, log_param_state_old: int = None, log_param_value_old: str = None, log_params_dict_old: dict = None, log_param_fq_name_old: str = None, top_n_from_newest_old: bool = True, filter_params_dict_old: dict = None, object_type_fq_name_old: str = None, sorting_params_list_old: list = None, log_param_value_regexp_old: str = None) -> dict: + def list_ta(type_old: str = None, top_n_old: int = None, type_list_old: list = None, log_params_old: list = None, object_gfk_old: str = None, ta_interval_old: str = None, language_tag_old: str = None, ta_timestamp_old: str = None, mgr_login_name_old: str = None, top_n_from_newest_old: bool = True, filter_params_dict_old: dict = None, object_type_fq_name_old: str = None, sorting_params_list_old: list = None) -> dict: if type_old is not None and not (isinstance(type_old, str)): raise ValueError(f"'type' of incorrect type. Expected str, got {type(type_old)}") if top_n_old is not None and not (isinstance(top_n_old, int)): raise ValueError(f"'top_n' of incorrect type. Expected int, got {type(top_n_old)}") if type_list_old is not None and not (isinstance(type_list_old, list)): raise ValueError(f"'type_list' of incorrect type. Expected list, got {type(type_list_old)}") + if log_params_old is not None and not (isinstance(log_params_old, list)): + raise ValueError(f"'log_params' of incorrect type. Expected list, got {type(log_params_old)}") if object_gfk_old is not None and not (isinstance(object_gfk_old, str)): raise ValueError(f"'object_gfk' of incorrect type. Expected str, got {type(object_gfk_old)}") if ta_interval_old is not None and not (isinstance(ta_interval_old, str)): @@ -197,14 +199,6 @@ class Record(APIObject): raise ValueError(f"'ta_timestamp' of incorrect type. Expected str, got {type(ta_timestamp_old)}") if mgr_login_name_old is not None and not (isinstance(mgr_login_name_old, str)): raise ValueError(f"'mgr_login_name' of incorrect type. Expected str, got {type(mgr_login_name_old)}") - if log_param_state_old is not None and not (isinstance(log_param_state_old, int)): - raise ValueError(f"'log_param_state' of incorrect type. Expected int, got {type(log_param_state_old)}") - if log_param_value_old is not None and not (isinstance(log_param_value_old, str)): - raise ValueError(f"'log_param_value' of incorrect type. Expected str, got {type(log_param_value_old)}") - if log_params_dict_old is not None and not (isinstance(log_params_dict_old, dict)): - raise ValueError(f"'log_params_dict' of incorrect type. Expected dict, got {type(log_params_dict_old)}") - if log_param_fq_name_old is not None and not (isinstance(log_param_fq_name_old, str)): - raise ValueError(f"'log_param_fq_name' of incorrect type. Expected str, got {type(log_param_fq_name_old)}") if top_n_from_newest_old is not None and not (isinstance(top_n_from_newest_old, bool)): raise ValueError(f"'top_n_from_newest' of incorrect type. Expected bool, got {type(top_n_from_newest_old)}") if filter_params_dict_old is not None and not (isinstance(filter_params_dict_old, dict)): @@ -213,20 +207,20 @@ class Record(APIObject): raise ValueError(f"'object_type_fq_name' of incorrect type. Expected str, got {type(object_type_fq_name_old)}") if sorting_params_list_old is not None and not (isinstance(sorting_params_list_old, list)): raise ValueError(f"'sorting_params_list' of incorrect type. Expected list, got {type(sorting_params_list_old)}") - if log_param_value_regexp_old is not None and not (isinstance(log_param_value_regexp_old, str)): - raise ValueError(f"'log_param_value_regexp' of incorrect type. Expected str, got {type(log_param_value_regexp_old)}") - return {'name': 'evlog.record.list', 'new': _denullify_dict({}), 'old': _denullify_dict({'type': type_old, 'top_n': top_n_old, 'type_list': type_list_old, 'object_gfk': object_gfk_old, 'ta_interval': ta_interval_old, 'language_tag': language_tag_old, 'ta_timestamp': ta_timestamp_old, 'mgr_login_name': mgr_login_name_old, 'log_param_state': log_param_state_old, 'log_param_value': log_param_value_old, 'log_params_dict': log_params_dict_old, 'log_param_fq_name': log_param_fq_name_old, 'top_n_from_newest': top_n_from_newest_old, 'filter_params_dict': filter_params_dict_old, 'object_type_fq_name': object_type_fq_name_old, 'sorting_params_list': sorting_params_list_old, 'log_param_value_regexp': log_param_value_regexp_old})} + return {'name': 'evlog.record.list', 'new': _denullify_dict({}), 'old': _denullify_dict({'type': type_old, 'top_n': top_n_old, 'type_list': type_list_old, 'log_params': log_params_old, 'object_gfk': object_gfk_old, 'ta_interval': ta_interval_old, 'language_tag': language_tag_old, 'ta_timestamp': ta_timestamp_old, 'mgr_login_name': mgr_login_name_old, 'top_n_from_newest': top_n_from_newest_old, 'filter_params_dict': filter_params_dict_old, 'object_type_fq_name': object_type_fq_name_old, 'sorting_params_list': sorting_params_list_old})} # TODO: Consider is_returning @classmethod - def list(cls, api_session: APISession, type_old: str = None, top_n_old: int = None, type_list_old: list = None, object_gfk_old: str = None, ta_interval_old: str = None, language_tag_old: str = None, ta_timestamp_old: str = None, mgr_login_name_old: str = None, log_param_state_old: int = None, log_param_value_old: str = None, log_params_dict_old: dict = None, log_param_fq_name_old: str = None, top_n_from_newest_old: bool = True, filter_params_dict_old: dict = None, object_type_fq_name_old: str = None, sorting_params_list_old: list = None, log_param_value_regexp_old: str = None) -> list: + def list(cls, api_session: APISession, type_old: str = None, top_n_old: int = None, type_list_old: list = None, log_params_old: list = None, object_gfk_old: str = None, ta_interval_old: str = None, language_tag_old: str = None, ta_timestamp_old: str = None, mgr_login_name_old: str = None, top_n_from_newest_old: bool = True, filter_params_dict_old: dict = None, object_type_fq_name_old: str = None, sorting_params_list_old: list = None) -> list: if type_old is not None and not (isinstance(type_old, str)): raise ValueError(f"'type' of incorrect type. Expected str, got {type(type_old)}") if top_n_old is not None and not (isinstance(top_n_old, int)): raise ValueError(f"'top_n' of incorrect type. Expected int, got {type(top_n_old)}") if type_list_old is not None and not (isinstance(type_list_old, list)): raise ValueError(f"'type_list' of incorrect type. Expected list, got {type(type_list_old)}") + if log_params_old is not None and not (isinstance(log_params_old, list)): + raise ValueError(f"'log_params' of incorrect type. Expected list, got {type(log_params_old)}") if object_gfk_old is not None and not (isinstance(object_gfk_old, str)): raise ValueError(f"'object_gfk' of incorrect type. Expected str, got {type(object_gfk_old)}") if ta_interval_old is not None and not (isinstance(ta_interval_old, str)): @@ -237,14 +231,6 @@ class Record(APIObject): raise ValueError(f"'ta_timestamp' of incorrect type. Expected str, got {type(ta_timestamp_old)}") if mgr_login_name_old is not None and not (isinstance(mgr_login_name_old, str)): raise ValueError(f"'mgr_login_name' of incorrect type. Expected str, got {type(mgr_login_name_old)}") - if log_param_state_old is not None and not (isinstance(log_param_state_old, int)): - raise ValueError(f"'log_param_state' of incorrect type. Expected int, got {type(log_param_state_old)}") - if log_param_value_old is not None and not (isinstance(log_param_value_old, str)): - raise ValueError(f"'log_param_value' of incorrect type. Expected str, got {type(log_param_value_old)}") - if log_params_dict_old is not None and not (isinstance(log_params_dict_old, dict)): - raise ValueError(f"'log_params_dict' of incorrect type. Expected dict, got {type(log_params_dict_old)}") - if log_param_fq_name_old is not None and not (isinstance(log_param_fq_name_old, str)): - raise ValueError(f"'log_param_fq_name' of incorrect type. Expected str, got {type(log_param_fq_name_old)}") if top_n_from_newest_old is not None and not (isinstance(top_n_from_newest_old, bool)): raise ValueError(f"'top_n_from_newest' of incorrect type. Expected bool, got {type(top_n_from_newest_old)}") if filter_params_dict_old is not None and not (isinstance(filter_params_dict_old, dict)): @@ -253,10 +239,8 @@ class Record(APIObject): raise ValueError(f"'object_type_fq_name' of incorrect type. Expected str, got {type(object_type_fq_name_old)}") if sorting_params_list_old is not None and not (isinstance(sorting_params_list_old, list)): raise ValueError(f"'sorting_params_list' of incorrect type. Expected list, got {type(sorting_params_list_old)}") - if log_param_value_regexp_old is not None and not (isinstance(log_param_value_regexp_old, str)): - raise ValueError(f"'log_param_value_regexp' of incorrect type. Expected str, got {type(log_param_value_regexp_old)}") - res = api_session.session.post(api_session.base_url + '/wapi/transaction/execute', json=[cls.list_ta(type_old=type_old, top_n_old=top_n_old, type_list_old=type_list_old, object_gfk_old=object_gfk_old, ta_interval_old=ta_interval_old, language_tag_old=language_tag_old, ta_timestamp_old=ta_timestamp_old, mgr_login_name_old=mgr_login_name_old, log_param_state_old=log_param_state_old, log_param_value_old=log_param_value_old, log_params_dict_old=log_params_dict_old, log_param_fq_name_old=log_param_fq_name_old, top_n_from_newest_old=top_n_from_newest_old, filter_params_dict_old=filter_params_dict_old, object_type_fq_name_old=object_type_fq_name_old, sorting_params_list_old=sorting_params_list_old, log_param_value_regexp_old=log_param_value_regexp_old)]) + res = api_session.session.post(api_session.base_url + '/wapi/transaction/execute', json=[cls.list_ta(type_old=type_old, top_n_old=top_n_old, type_list_old=type_list_old, log_params_old=log_params_old, object_gfk_old=object_gfk_old, ta_interval_old=ta_interval_old, language_tag_old=language_tag_old, ta_timestamp_old=ta_timestamp_old, mgr_login_name_old=mgr_login_name_old, top_n_from_newest_old=top_n_from_newest_old, filter_params_dict_old=filter_params_dict_old, object_type_fq_name_old=object_type_fq_name_old, sorting_params_list_old=sorting_params_list_old)]) if not res.ok: raise ExecutionError(res.status_code, res.reason, res.json() if "json" in res.headers["content-type"] else res.text) return [cls(**s) for s in res.json()[0]] diff --git a/4.2/version_numeric b/4.2/version_numeric index 5fd0f162d8b9ef2453f81d5f67ad4de24628ca9e..078bf8b7ddcbb3b534436b29412dea38aa6061da 100644 --- a/4.2/version_numeric +++ b/4.2/version_numeric @@ -1 +1 @@ -4.2.110 \ No newline at end of file +4.2.2 \ No newline at end of file diff --git a/latest_version b/latest_version index 5fd0f162d8b9ef2453f81d5f67ad4de24628ca9e..078bf8b7ddcbb3b534436b29412dea38aa6061da 100644 --- a/latest_version +++ b/latest_version @@ -1 +1 @@ -4.2.110 \ No newline at end of file +4.2.2 \ No newline at end of file